magick.exe fails on one machine, but works on another

Questions and postings pertaining to the usage of ImageMagick regardless of the interface. This includes the command-line utilities, as well as the C and C++ APIs. Usage questions are like "How do I use ImageMagick to create drop shadows?".
Post Reply
mdf
Posts: 3
Joined: 2019-01-30T05:22:36-07:00
Authentication code: 1152

magick.exe fails on one machine, but works on another

Post by mdf »

Hi all,

I've ran into some weird behavior that I cannot seem to understand.

I am running a very simple resize command:

Code: Select all

magick.exe myimage.jpg -resize 160x110 test.jpg
The command works perfectly well on my own machine, however fails when it goes onto another machine. This only happens for certain images. I cannot link the specific image, as it is under a copyright, but this is the error I get:

Code: Select all

magick.exe: CorruptImageProfile `xmp' @ warning/profile.c/SetImageProfileInternal/1746.
magick.exe: memory allocation failed `myimage.jpg' @ error/jpeg.c/ReadProfile/803.
magick.exe: Improper call to JPEG library in state 201 `myimage.jpg' @ error/jpeg.c/JPEGErrorHandler/333.
There is plenty of memory on the machine on which it fails (8gb and it is a 7mb file), so that is not the problem.

Any help would be much appreciated!

Thanks in advance.

/Magnus
snibgo
Posts: 12159
Joined: 2010-01-23T23:01:33-07:00
Authentication code: 1151
Location: England, UK

Re: magick.exe fails on one machine, but works on another

Post by snibgo »

mdf wrote:CorruptImageProfile `xmp'
This suggests that your JPG file is corrupt. Try opening it with other programs, eg Gimp.
snibgo's IM pages: im.snibgo.com
mdf
Posts: 3
Joined: 2019-01-30T05:22:36-07:00
Authentication code: 1152

Re: magick.exe fails on one machine, but works on another

Post by mdf »

Yes, I was thinking the same, but I can open it just fine in any other program, including the ImageMagick Display program that is part of the ImageMagick windows installation. That is, I can do so on any other machine, than the specific one where it fails.

It is only on the specific machine, that this image seems to be corrupt.
snibgo
Posts: 12159
Joined: 2010-01-23T23:01:33-07:00
Authentication code: 1151
Location: England, UK

Re: magick.exe fails on one machine, but works on another

Post by snibgo »

What are the versions of IM on the two machines? What platforms?

In general, later versions of IM protect more against corrupt image files.
snibgo's IM pages: im.snibgo.com
mdf
Posts: 3
Joined: 2019-01-30T05:22:36-07:00
Authentication code: 1152

Re: magick.exe fails on one machine, but works on another

Post by mdf »

Okay, I actually got it to work from a command line now.

The question about versions got me thinking. Both machines run the same version (7.0.8), but I realize now that there is a patch version as well. This meant that the non-working was running 7.0.8.15 and the working was running 7.0.8.19. I upgraded to the most recent version (7.0.8.25) and then it worked. So somewhere between 15 and 19, the error handling of jpgs must have been improved.

Thanks alot for your help.
Post Reply