JPG file failed to convert with new version of Image Magick

Post any defects you find in the released or beta versions of the ImageMagick software here. Include the ImageMagick version, OS, and any command-line required to reproduce the problem. Got a patch for a bug? Post it here.
User avatar
fmw42
Posts: 25161
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: JPG file failed to convert with new version of Image Magick

Post by fmw42 » 2019-03-27T14:11:34-07:00

With IM 7.0.8.35 Q16 Mac OSX, magick identify show the xmp error. But

Code: Select all

magick test5p.pdf tmp_%d.jpg
Produces the output images fine even though it shows that xmp error.

On the other hand, IM 6.9.10.35 Q16 Mac OSX shows no error when running the following and produces the same output images.

Code: Select all

convert test5p.pdf tmp_%d.jpg
IM 6 is a bit more forgiving. IM 7 is more strict and does more error checking.

Note that since you are running IM 7, you should be using magick rather than convert in your PHP exec command.

What tool created your PDF file?

maxjac
Posts: 3
Joined: 2019-03-27T12:49:04-07:00
Authentication code: 1152

Re: JPG file failed to convert with new version of Image Magick

Post by maxjac » 2019-03-27T15:05:46-07:00

The PDF file was created using MS Word (latest version)

User avatar
fmw42
Posts: 25161
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: JPG file failed to convert with new version of Image Magick

Post by fmw42 » 2019-03-27T17:02:41-07:00

If you create the PDF with some other tool, does Imagemagick give the same error? Might MS Word be the culprit? Do you get the error if you create a single page PDF with MS Word?

maxjac
Posts: 3
Joined: 2019-03-27T12:49:04-07:00
Authentication code: 1152

Re: JPG file failed to convert with new version of Image Magick

Post by maxjac » 2019-03-27T17:13:54-07:00

Confirmed. This warning/error message is raised on PDF files created with MS Word. I tested with other PDF files and the warning/error doesn't come up.

User avatar
fmw42
Posts: 25161
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: JPG file failed to convert with new version of Image Magick

Post by fmw42 » 2019-03-27T17:15:12-07:00

I created a single page PDF from MS Word on my Mac and when I convert it with IM 7, I get the same xmp error. Also magick identify shows the same error message, but there is no xmp profile listed.

I do not know what to tell you. Perhaps MS Word is adding a malformed xmp profile.

So I will leave it to the IM developers to look into this further.

tdavidson
Posts: 1
Joined: 2019-06-07T14:57:01-07:00
Authentication code: 1152

Re: JPG file failed to convert with new version of Image Magick

Post by tdavidson » 2019-06-07T15:12:16-07:00

I am wondering if there has been any movement on this case sense the last post from March.

We have a fairly new install of Omeka and the IM service is not making the preview images from any of our PDF's. Standard images thumbnails are working correctly for other file formats. Our Archival team says that some of them have been created from Word documents but I do not have an accurate count of what is and isn't created.

A test of a standard .pdf downloaded from the web converts to jpg without error.

I have just upgraded our IM from a previous build, I believe -38, to the newest 7.0.8-49 and the error is still present.

ndbroadbent
Posts: 1
Joined: 2019-06-08T13:53:35-07:00
Authentication code: 1152

Re: JPG file failed to convert with new version of Image Magick

Post by ndbroadbent » 2019-06-08T14:10:26-07:00

I'm still seeing this XMP error for ImageMagick 7.0.8-45 and 7.0.8-48 (the latest version.)

Code: Select all

magick --version
# Version: ImageMagick 7.0.8-45 Q16 x86_64 2019-05-18 https://imagemagick.org
# (Same results with: ImageMagick 7.0.8-48 Q16 x86_64 2019-06-08)
cd /tmp 
curl -O http://maximejacques.com/pdf/test5p.pdf
magick test5p.pdf test5p.jpg
# magick: CorruptImageProfile `xmp' @ warning/profile.c/SetImageProfileInternal/1772.
I didn't know much about XMP metadata before, so this article was helpful: https://www.pdflib.com/pdf-knowledge-ba ... -overview/.

The same site also has this online XMP validator tool: https://www.pdflib.com/pdf-knowledge-ba ... validator/

I uploaded the test5p.pdf PDF, and it parsed the XMP data, and validated it against all of the available PDF/A standards (PDF/A-1 and PDF/A-2/3). The validation tool reported that the XMP data is valid and doesn't contain any errors:

Code: Select all

<?xpacket begin="" id="W5M0MpCehiHzreSzNTczkc9d"?><x:xmpmeta xmlns:x="adobe:ns:meta/" x:xmptk="3.1-701">
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
<rdf:Description rdf:about=""  xmlns:pdf="http://ns.adobe.com/pdf/1.3/">
<pdf:Producer>Microsoft® Word for Office 365</pdf:Producer></rdf:Description>
<rdf:Description rdf:about=""  xmlns:dc="http://purl.org/dc/elements/1.1/">
<dc:creator><rdf:Seq><rdf:li>Maxime Jacques</rdf:li></rdf:Seq></dc:creator></rdf:Description>
<rdf:Description rdf:about=""  xmlns:xmp="http://ns.adobe.com/xap/1.0/">
<xmp:CreatorTool>Microsoft® Word for Office 365</xmp:CreatorTool><xmp:CreateDate>2019-03-14T23:06:56-04:00</xmp:CreateDate><xmp:ModifyDate>2019-03-14T23:06:56-04:00</xmp:ModifyDate></rdf:Description>
<rdf:Description rdf:about=""  xmlns:xmpMM="http://ns.adobe.com/xap/1.0/mm/">
<xmpMM:DocumentID>uuid:95F67DEE-BC1B-4AE4-A2B9-A4D4D999339B</xmpMM:DocumentID><xmpMM:InstanceID>uuid:95F67DEE-BC1B-4AE4-A2B9-A4D4D999339B</xmpMM:InstanceID></rdf:Description>

The converted images are totally fine, but the output is just a bit annoying for me. I have a test suite that runs through a lot of PDF processing functionality, so the test suite output looks like this:

Code: Select all

.............identify: CorruptImageProfile `xmp' @ warning/profile.c/SetImageProfileInternal/1772.
convert: CorruptImageProfile `xmp' @ warning/profile.c/SetImageProfileInternal/1772.
.identify: CorruptImageProfile `xmp' @ warning/profile.c/SetImageProfileInternal/1772.
convert: CorruptImageProfile `xmp' @ warning/profile.c/SetImageProfileInternal/1772.
........................identify: CorruptImageProfile `xmp' @ warning/profile.c/SetImageProfileInternal/1772.
convert: CorruptImageProfile `xmp' @ warning/profile.c/SetImageProfileInternal/1772.
.identify: CorruptImageProfile `xmp' @ warning/profile.c/SetImageProfileInternal/1772.
convert: CorruptImageProfile `xmp' @ warning/profile.c/SetImageProfileInternal/1772.
..........

I don't really want to use the -quiet flag, in case I miss something important in a future version. Would be great if this could be fixed!

Post Reply