Page 1 of 1

Extract metadata from AI/EPS-file?

Posted: 2015-07-01T06:41:22-07:00
by rokdzone
Is it possible to use Image Magick to analyze a AI/EPS-file and extract whatever metadata that is there?
We are also very interested to know if it is possible to scan an EPS-document for pantone colors (Pantone Solid Coated).

We wish do this this programmatically from PHP, but all we wish to know if it is possible.

To specify exactly what we wan't to extract:

1. Width/height of the document (or rather if it is quadratical or not)
2. Content size (if possible)
3. Colors (CMYK/or pantone)

Re: Extract metadata from AI/EPS-file?

Posted: 2015-07-01T07:16:52-07:00
by snibgo
"identify -verbose x.ai" will show most or all the metadata that IM can see, including colorspace (CMYK etc). This may include spot colours (but IM won't use those).

I don't know what "quadratical" means.

Re: Extract metadata from AI/EPS-file?

Posted: 2015-07-03T02:52:36-07:00
by rokdzone
Thanks!

You don't happen how to do this with Imagick using PHP?
I've searched but can't find any information about that.

With quadratical i mean the same with/height of the document, but that is not important anyway

Re: Extract metadata from AI/EPS-file?

Posted: 2015-07-03T07:50:37-07:00
by rokdzone
The command "identify -verbose x.ai" returned an single dimensional array of 829 indexes.
No associative array either, just numbers, impossible to do something whith that information.

The XMP data in the AI file is well formed XML, should be possible to extract that somehow.

Re: Extract metadata from AI/EPS-file?

Posted: 2015-07-03T09:19:49-07:00
by fmw42
Upload an example .ai file to some place like dropbox.com and put the URL here, so some one can check it out. Also always identify your IM version and platform when you post questions.

You should be able to extract the xmp data using -profile. See http://www.imagemagick.org/Usage/formats/#profiles

Re: Extract metadata from AI/EPS-file?

Posted: 2015-07-05T23:31:15-07:00
by rokdzone
Here is the file: https://drive.google.com/file/d/0B3zign ... sp=sharing
My ImageMagick version is 6.6.5-10, the platform is Windows 8 + IIS (using Imagick dll)

As for Pantone, the colors are a part of the XMP, so if you could extract the XMP you should be able to extract the pantone color names :)

Re: Extract metadata from AI/EPS-file?

Posted: 2015-07-06T03:56:00-07:00
by snibgo

Code: Select all

convert Bring-logo-PMS.eps x.xmp
Then search x.xmp for "PANTONE".

Re: Extract metadata from AI/EPS-file?

Posted: 2015-07-06T06:10:50-07:00
by rokdzone
Will try this, thanx! :)

Re: Extract metadata from AI/EPS-file?

Posted: 2015-07-06T06:37:03-07:00
by snibgo
"identify -verbose Bring-logo-PMS.eps" also gives some PANTONE information. I haven't compared this with the XMP.