>
> Thanks for the fast reply. The challenge is to open a pict preview and
> save it as a tiff preview within the eps. Any chance to geht things
> going with ghostscript and MBS?
>
I don't think you want or need GhostScript for this. If the EPS has a
PICT resource preview, then you can create an RB picture object from
it. Next, you'll want to get the TIFF data of this picture (e.g., use
MBS to write it to a temp file). Finally, you'll need to understand
the Adobe EPS spec as it concerns embedded TIFF previews. You can
find the spec here:
<partners.adobe.com/public/ developer/en/ps/5002.EPSF_Spec.pdf>
Basically, you'll have to add a header to what's in the data fork of
your EPS. Glue the header, the TIFF data, and the PostScript data
together, write it all out to a binary file, and voilà.
The 30 byte header will specify offsets and lengths for various
sections of the file (as described in the spec:
> Bytes Description
> 0-3 Must be hex C5D0D3C6 (byte 0=C5).
> 4-7 Byte position in file for start of PostScript language code
> section.
> 8-11 Byte length of PostScript language section.
> 12-15 Byte position in file for start of Metafile screen
> representation.
> 16-19 Byte length of Metafile section (PSize).
> 20-23 Byte position of TIFF representation.
> 24-27 Byte length of TIFF section.
> 28-29 Checksum of header (XOR of bytes 0-27). If Checksum is FFFF
> then ignore it
HTH,
Peter
_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>
Search the archives:
<http://support.realsoftware.com/listarchives/lists.html>
|