Eps File corrupted after writing Metadata

Started by mariokrupik, November 01, 2010, 07:54:02 AM

Previous topic - Next topic

mariokrupik

I created a small Script in AutoIt, which adds Metadata to Images downloaded from shutterstock.com

Everything works fine for jpg images, except for the eps Files.

Here's an Example:

exiftool -Subject="New Year's Card Whit Rabbit" shutterstock_60989023.eps
1 image File updated


Everything works fine, and in Adobe Bridge i get the Metadata displayed.
But if I try to open in in Illustrator, i get the Error:

Offending Operator: "where"
Pc
PB
%AI5_EndPalette
%%EndSetup
%begin_xml_code
/pdfmark where


Eps Files which I created myself in ILustrator cs5, are not affected.
I cannot tell if only shutterstock eps files are affected, or what is actually causing the Problem.

To reproduce the error, you can download a free eps image from shutterstock after free registration.

I tried a few different options, but all with the same result.

thank you

Exiftool 8.37 on Windows 64bit
Adobe Illustrator Cs5

Phil Harvey

Would it be possible to attach a sample "before" eps image here?

Thanks.

- 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 ($).

mariokrupik

#2

It could have something to do with the Filesize, as I wanted to send you one with ~400kb, but after a quick test this File was ok.
Now the Testfile has a Filesize of 1200kb, and after a test, it is corrupted after writing Metadata to it.

thanks

mariokrupik

Ok, I can replicate the Error when saving whatever File in Illustrator as "Illustrator 8",
which is an old standard, but as for compability Shutterstock may uses this Version.

When I open testfile.eps , and save it again in Illustrator 9 +,
the Metadata gets written properly and doesn't affect the eps file.

thank you

Phil Harvey

I have downloaded the file.  You can remove it from your server now.

I will take a look at it and post back here.

- 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 ($).

Phil Harvey

I am downloading the AI CS5 trial so I can run some tests myself.  This could be a tricky problem.  It is possible that AI simply doesn't support XMP in their version 8 EPS files.  I am following the technique described in the XMP specification to add XMP to EPS, but the specification also states:

"It also specifically discusses issues involving Acrobat® Distiller®, since workflows often use Distiller to produce PDF from PostScript and EPS.

NOTE   This does not imply that use of Distiller is necessary, or that other application issues do not exist."


... which isn't exactly what one wants to hear.

I have Bridge CS4 and it won't add XMP to any EPS files.  Do you have anything that will do this to see if it produces something that AI likes?  (Bridge CS5 perhaps?)

- 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 ($).

mariokrupik

I only have Adobe Cs5 here.
In Bridge Cs5 I am not able to add any Metatags to eps Files which are Created with "Illustrator 8".
Same File saved again as 9+, I am able to add Metadata.

I was happy to see that I can add Metadata through Exiftool.

I tried opening those Files in Corel Draw, to see if it`s only an Adobe Problem,
or if it is a Problem that I8 eps Files beeing not compatible to have Metadate,
but unfortunatly I am not able to open any eps Files with my Corel Draw X3.
Maybe it's just my installation here, but the Program becomes unresponsive as soon as I try to load any eps file.

But at least, Adobe Cs5 displays Metadata and Preview Image of every eps File just Fine.
Only Illustrator has a Problem loading those Files.

If you know any other Software which can load and edit eps Files,
I am happy to do a few tests.

thank you

Phil Harvey

I have definitely managed to reproduce the problem with respect to getting AI to barf on the edited images.  However, the file still displays properly in Photoshop (CS4) and Apple Preview.  Photoshop even picks up the edited metadata without a problem.

So it seems that there is something specific about the EPS format expected by Illustrator.  I will do some more work to try to figure out what this is.

- 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 ($).

Phil Harvey

It's looking like I may have to just disable writing to older AI EPS files. :(  I'm still working on this, but this is my current thinking.

- 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 ($).

mariokrupik

Ok, I am already trying to write a Batch File to convert all of the eps Files from Shutterstock to Illustrator 12 Files.

Although, I have already written around 50 eps Files with the Option -overwrite_original .
Any Idea how I might get those 50 Files back to work in Illustrator?

I tried -xmp:all=  and so on, but the Error Message keeps coming.

thank you

Phil Harvey

Do you have Perl installed?  I can easily write a script that should be able to fix your 50 files.  Basically you want to remove everything between "%begin_xml_code" and "%end_xml_code" in the files.  You could even do this with any good plain-text word processor, but doing 50 files would be a lot of work.

- 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 ($).

mariokrupik

no, not yet.
But I will go and install it.

So with exiftool.exe this probably ain't possible, right?

Phil Harvey

Right.  ExifTool leaves an empty XMP record in the file even if you delete all XMP tags.

- 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 ($).

mariokrupik

Ok.

Do you already have such a perl script, or would you have to code one?
I am not good at programming, I just know that it's a lot of work.

thanks

Phil Harvey

It's not a lot of work. I can have something ready in a couple of hours.

- 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 ($).