TI.Image: Difference between revisions
Jimbauwens (talk | contribs) |
Jimbauwens (talk | contribs) |
||
Line 39: | Line 39: | ||
[[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. | ||
[[User:jimbauwens]] made [http://bwns/jim/tiimg.html a image previewer]. You have to paste the image data, and it will display it. Currently only shows the image in grayscale. | [[User:jimbauwens]] made [http://bwns.be/jim/tiimg.html a image previewer]. You have to paste the image data, and it will display it. Currently only shows the image in grayscale. |
Revision as of 21:21, 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.
User:jimbauwens made a image previewer. You have to paste the image data, and it will display it. Currently only shows the image in grayscale.