[Image-SIG] Correctly determine image size of a Photoshop EPS

Stefano Masini stefano at pragma2000.com
Tue Sep 20 08:10:02 CEST 2005


On 9/19/05, kevin at cazabon.com <kevin at cazabon.com> wrote:
> EPS files don't have specific pixel dimensions - they're essentially a
> vector format.  You may happen to have raster data embedded in it, but
> that's besides the point.

I know, but correctly determining the pixel size of the embedded
raster image is not besides the point. As I said, I have to take
decisions basing on that. Namely, determine whether they're too small
for print.

> The issue is likely the DPI or pixels/inch setting used to convert the image
> to raster format.  Photoshop probably defaults to 300 pixels/inch or
> something, while the others default to 72.

Nope.
Photoshop stores inside the eps metadata section the information about
the original image resolution.

<x:xmpmeta xmlns:x="adobe:ns:meta/" x:xmptk="3.1.1-111">
   <rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
      <rdf:Description rdf:about="" xmlns:tiff="http://ns.adobe.com/tiff/1.0/">
         <tiff:XResolution>3000000/10000</tiff:XResolution>
         <tiff:YResolution>3000000/10000</tiff:YResolution>
      </rdf:Description>
   </rdf:RDF>
</x:xmpmeta>

This way when you open a Photoshop EPS file in Photoshop, unlike Gimp
or whatever else, it doesn't ask you your target device resolution,
but just opens it. If instead, you open a generic eps, _then_ it asks
for the intended resolution, of course.

A "Photoshop EPS" file is not a generic EPS. Infact I doubt Photoshop
even has a full blown postscript interpreter (mhmm... maybe it uses
that of illustrator... I'd have to try).
It's a very particular case of EPS, used exclusively for raster
images, with a whole bunch of extra metainformation about it, that
_happens_ to be also an embeddable Postscript! :)

So, my point: since I have so many images to batch process, do I have
to implement my own thing, or did someone else took the trouble of
writing code for reading metadata from Photoshop EPS files?

stefano


More information about the Image-SIG mailing list