2000.07.28 14:36 "Re: Extracting previews", by Steve Roy
The format you are describing is for EPS Metafiles which are used by MS Windows applications. With these files, you can find the offset to the TIFF, extract it to a file, and then use libtiff on the extracted data.
Thanks. I found the spec for the EPSP file format.
0-3 Must be C5D0D3C6 (byte 0 = C5)
4-7 Byte position where poscript start
8-11 Byte lenght of poscript
12-15 Byte position where metafile start
16-19 Byte lenght of metafile
20-23 Byte position where tiffpreview start
24-27 Byte lenght of tiffpreview
28-29 checksum of header(XOR of bytes 0-27) if FFFF then it is to be
Using this, I was able to extract the TIFF preview and make a new file by hand with it.
Now I have a different problem. My TIFF file can be opened and displayed by Photoshop and GraphicConverter, but libtiff doesn't like it. I get the following messages.
Warning, invalid TIFF directory; tags are not sorted in ascending order.
Warning, TIFF directory is missing required "StripByteCounts" field, calculating from imagelength.
PackBitsDecode: Not enough data for scanline 0.
The PackBitsDecode message appears when I call TIFFRGBAImageGet() to get the decoded raster data. My raster array is left filled with values 0xFFFFFFFF.
What doesn that message mean and how can I fix this? Again, my image loads and displays fine in Photoshop and GraphicConverter.