I need a C# class to extract the thumbnail from AI and EPS formats, and gets it as the Bitmap class.
The thumbnail is located between %AI7_Thumbnail and %EndData tags.
Thumbnail format:
-------------------------------------------------- ------------
%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
-------------------------------------------------- ------------
- The class should recognize 8 and 24 bit thumbnails. 8-bit thumbnails might be compressed with RLE.
- There is a small free program written in Java that has the similar functionality
- I'll pass the class you'll write through my test AI/EPS collection of files (~20 images)
I have other tasks for a people who will successfully and accurately did this job.
Please specify me your price and time you need to complete this job.