Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Thumbnail data format in ai file

189 views
Skip to first unread message

te...@adobeforums.com

unread,
Dec 4, 2003, 11:26:13 AM12/4/03
to
I'd like to extract thumbnail data directory from ai file.

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

Paul_A...@adobeforums.com

unread,
Dec 5, 2003, 12:08:42 PM12/5/03
to
First a disclaimer... we make no guarantees that the thumbnail format will not change in future versions. Also, the following information was obtained by reading the code. It has not been tested to verify its accuracy.

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

te...@adobeforums.com

unread,
Dec 5, 2003, 7:04:00 PM12/5/03
to
Paul, thanks very much for your analysis and detail explanation.
I've understood well. Then, I found a way out!

But, I wish Adobe described these information in the specification.

Ian_A....@adobeforums.com

unread,
Dec 6, 2003, 12:14:20 PM12/6/03
to
Paul:

Thanks for sharing your expertise with us. It's much appreciated ...

0 new messages