On 11/14/07, Anthony Thyssen <[EMAIL PROTECTED]> wrote:
> "Daniel Johnson" on  wrote...
> | On Nov 14, 2007 7:52 PM, Anthony Thyssen <[EMAIL PROTECTED]> wrote:
> | >
> | > That is great news.  You wouldn't happen to know of a simular utility
> | > that can be used for postscript documents?
> | >
> | >
> | You mean pdf2ps? That's part of the ghostscript package.
> |
> NO I mean extract the exact raster image data that is stored within a
> postscript file without resampling it to another resoution.
>
> Ignore the text, ghostscript can extract the text in a postscript file
> as text, (not well but well enough).

Depending on the image encoding within the postscript, something can
probably be pulled together with perl and an image library, but
handling all the possible cases would be rough.[1] You'd be better off
examining the file and determining what the image resolution is
(taking into account that it might be scaled within the file), then
using ghostscript to RIP it.   Or else, distill the whole thing to PDF
and then use PDF image extraction tools -- the ghostscript pdfwrite
device *won't* resample images.

Ghostscript introduces color complications, though. If your image is
CMYK, duotone, ICC profile, or anything but ordinary RGB or grayscale,
you'll need to configure your ghostscript command carefully so that it
is not destroyed.

It is VERY IMPORTANT to note that the same caution applies to the
pdfimages tool!! pdfimages ONLY writes out images in PBM (for
monochrome) or PPM (which is inherently RGB) -- CMYK images *will* be
destroyed by this tool.

Footnote:
[1] However, see this newsgroup message; if the encoding within the
postscript file is JPEG, then it is much easier.
http://groups.google.com/group/comp.lang.postscript/browse_frm/thread/c39691b2249882b0/6b46674e9e65f0fb
.
_______________________________________________
Magick-users mailing list
[email protected]
http://studio.imagemagick.org/mailman/listinfo/magick-users

Reply via email to