TI.Image: Difference between revisions

From Hackspire
Jump to navigation Jump to search
No edit summary
Line 1: Line 1:
The TI.Image format is a type of image used in several places in the Nspire documents, such as Lua scripts.
The TI.Image format is a type of image used in several places in the Nspire documents, such as Lua scripts.


From what we can see with the help of errors in the Lua interpreter, the image is in fact a "tiff" file, encrypted and/or compressed in an unusual way.
The image format just some form of bitmap, and almost no compression at all.


==Header==
==Header==
Line 18: Line 18:
==Data==
==Data==


?
The image data comes directly after the header, and is written in the same form.
 
[image data] is for examle \011\022\033\044\055\066\077\088
 
If [image height] is \004 and [image width] is \002 then the image looks like this: (each number is a pixel)
 
\011 \022
\033 \044
\055 \066
\077 \088
 
Each number represents a color.
We are still documenting the color map.
 
Extra compression:
Numbers which are representable in the ascii table (on the nspire) are replaced with the corresponding character. \105 is for example replaced with 'i'. This is not necessary though.


==External Links==
==External Links==


[[User:AdRiWeB]] made [http://www.youtube.com/watch?v=YQhrMHNkL3A a video] showing some direct manipulations of the TI-Image, in order to understand better how the format in general.
[[User:AdRiWeB]] made [http://www.youtube.com/watch?v=YQhrMHNkL3A a video] showing some direct manipulations of the TI-Image, in order to understand better how the format in general.

Revision as of 21:16, 21 April 2011

The TI.Image format is a type of image used in several places in the Nspire documents, such as Lua scripts.

The image format just some form of bitmap, and almost no compression at all.

Header

The format has a header specifying the total buffer length. The header is 19 decimal numbers long.

Example header : .\000\000\000\018\000\000\000\000\000\000\000\092\000\000\000\016\000\001\000

Currently we know this: 000\000\000\[Image HEIGHT]\000\000\000\000\000\000\000\[image WIDTH]\000\000\000\[image Depth]\000\001\000

The format of the numbers must be in this form : 000-255

Data

The image data comes directly after the header, and is written in the same form.

[image data] is for examle \011\022\033\044\055\066\077\088

If [image height] is \004 and [image width] is \002 then the image looks like this: (each number is a pixel)

\011 \022 \033 \044 \055 \066 \077 \088

Each number represents a color. We are still documenting the color map.

Extra compression: Numbers which are representable in the ascii table (on the nspire) are replaced with the corresponding character. \105 is for example replaced with 'i'. This is not necessary though.

External Links

User:AdRiWeB made a video showing some direct manipulations of the TI-Image, in order to understand better how the format in general.