I found "%AI7_Thumbnail" comment in an AI file.
I think following data after the comment is a thumbnail data.
The data expressed hex binaries in ASCII characters.
Does anyone know what kind of this data(thumbnail) format?
TIFF? JPEG? or Adobe's unique format?
I've checked the Illustrator File Format Specification, but couldn't find that.
Thanks
The format of the thumbnail is:
%AI7_Thumbnail: width height bitsperpixel
%%BeginData: hexdigitcount Hex Bytes
color table data
image data
Both the color table and image data are ASCII Hex encoded. Each line of data is preceded by a '%' character to make them comments as far as
PostScript is concerned.
The color table is present only if bitsperpixel is 8 (I think this is the usual case but the code does appear to also support 24 bit data). The color table consists of 256 RGB triples. Each triple consists of three bytes in the order R, G, B.
The image data may or may not be RLE compressed. It is RLE compressed if the first three bytes are 'R', 'L', 'E'. Otherwise it is not RLE compressed.
The following algorithm decompresses the RLE data:
let b = next input byte
if (b != 0xFD)
copy b to the output
else
let b = next input byte
if (b == 0xFD)
copy b to the output
else
let n = b
let b = next input byte
copy b to the output n times
endif
endif
But, I wish Adobe described these information in the specification.
Thanks for sharing your expertise with us. It's much appreciated ...