convert (6.5.7.8-1ubuntu1) generates a broken EPS file

Bug #504122 reported by Dmitry Potapov
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
imagemagick (Debian)
Fix Released
Unknown
imagemagick (Ubuntu)
Fix Committed
Undecided
broucaries

Bug Description

Binary package hint: imagemagick

The problem introduced in Imagemagick 6.5.7.8-1ubuntu1 (lucid). Karmic Koala does not have this problem, because it uses an old version of Imagemagick that does not try to generate embedded XMP comments when convert JPEG file to EPS.

How to reproduce the problem:

1. Get any JPEG file using XMP extension. For instance, this:

$ wget http://www.stockartistsalliance.org/files/STILLINGS_Jamey_SAAweb_0.jpg

2. Try to convert it to EPS

$ convert STILLINGS_Jamey_SAAweb_0.jpg STILLINGS_Jamey_SAAweb_0.eps

3. Check the result

$ gv STILLINGS_Jamey_SAAweb_0.eps

Ghoscript will produce an error. Moreover, a close inspection in any text editor will reveal that XMP is incorrect embedded. See the segement between `%begin_xml_code' and `%end_xml_code'. And here is an example how XMP comment can be embedded to EPS correctly:
http://mep.fi/cgi-bin/viewvc.cgi/*checkout*/gurvi/scopegui.eps?revision=1.1.1.1&root=cvs

I have downloaded and tested the last upstream release (6.5.8-10), and it has the same problem.

I suggest to report the problem to the upstream, and meanwhile to disable generating XMP comments by commenting out the following lines from coders/ps.c.

==================================================================================
http://trac.imagemagick.org/browser/ImageMagick/trunk/coders/ps.c
1508 profile=GetImageProfile(image,"xmp");
1509 if (profile != (StringInfo *) NULL)
1510 {
1511 /*
1512 Embed XML profile.
1513 */
1514 (void) WriteBlobString(image,"\n%begin_xml_code\n");
1515 for (i=0; i < (long) GetStringInfoLength(profile); i++)
1516 (void) WriteBlobByte(image,GetStringInfoDatum(profile)[i]);
1517 (void) WriteBlobString(image,"\n%end_xml_code\n");
1518 }
1519 value=GetImageProperty(image,"label");
==================================================================================

Because this is a new feature, its disabling will not affect anyone. The output will be exactly as it was before.

Changed in imagemagick (Ubuntu):
assignee: nobody → broucaries (roucaries-bastien+bugs)
status: New → Confirmed
Revision history for this message
broucaries (roucaries-bastien+bugs) wrote :

In the mean-time, try adding +profile xmp to the command line to remove the profile before its saved to EPS.

Changed in imagemagick (Debian):
status: Unknown → Confirmed
Changed in imagemagick (Debian):
status: Confirmed → Fix Released
Changed in imagemagick (Ubuntu):
status: Confirmed → Fix Committed
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.