EPS with double XMP resource

Started by tbraber, April 18, 2012, 07:21:32 AM

Previous topic - Next topic

tbraber

Hallo Phil,

I have some EPS files from CS5 that already have some XMP data in there. I can read that data with Exiftool without any problem.
When I want to change any of the existing data (XMP-DC:Title field) then it creates a new XMP resource in the EPS file, putting the updated info in that resource and leaving the original resource in place.

If I dump all info you also see a double XMP-X header:

---- XMP-x ----
XMP Toolkit                    : Image::ExifTool 8.85
XMP Toolkit                    : Adobe XMP Core 5.0-c060 61.134777, 2010/02/12-17:32:00 

I have an eps file attached

I use The Exiftool Perl Library (8.85)

Phil Harvey

Hi,

Thanks for the sample.

First, let me start by saying that there are many places in a PS/EPS file where XMP may be stored.  ExifTool reads XMP from most of these locations, but writes only document-level XMP as described by the XMP specification.

It seems that your original EPS document had XMP embedded in page 1, and not at the document level.  ExifTool will read this XMP, but will only write document-level XMP.  So when you write new XMP information to this file, ExifTool creates a new XMP record at the document level.

- Phil
...where DIR is the name of a directory/folder containing the images.  On Mac/Linux/PowerShell, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).

tbraber

Thanks for your answer, that clarifies a lot.

But why is it that if Exiftool prefers the XMP in the second XMP resource in favor of the one added by Exiftool ?
If I do $exifTool->GetValue('Title') , I get the value from the last resource.

Wouldn't it be better to return the resource that is written by Exiftool by default ?

Phil Harvey

Quote from: tbraber on April 18, 2012, 08:14:38 AM
Wouldn't it be better to return the resource that is written by Exiftool by default ?

Good point.  Yes, this would be better.  Currently the last extracted value takes priority, but in general this probably exactly the wrong thing to do.  I'll think about this.  Up until now I haven't seen many EPS files with more than one XMP record.

I just tried writing an EPS file from Photoshop CS4, and it puts the XMP where ExifTool expects.  It is unfortunate if Adobe changed this for CS5.  I'll have to look into this because I like to maintain compatibility with Photoshop.

- Phil
...where DIR is the name of a directory/folder containing the images.  On Mac/Linux/PowerShell, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).

tbraber

I am not sure if this is a problem with CS5 I have not created the file my self, it came from a customer.
Maybe it is converted from an other format or file that had this resource already.

But it would be a good idea  for reading metadata to give precedence  to tags  that Exiftool has written.
I think the problem is that this can be different for every file type.


Phil Harvey

I just tried using Photoshop CS5 to write an EPS file and it put the XMP in the standard location, and writing this using ExifTool worked as expected.

So at least ExifTool and CS5 are compatible, which makes me happier.

- Phil
...where DIR is the name of a directory/folder containing the images.  On Mac/Linux/PowerShell, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).