Page 1 of 1

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

Posted: 2019-01-30T05:28:31-07:00
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

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

Posted: 2019-01-30T06:18:10-07:00
by snibgo
mdf wrote:CorruptImageProfile `xmp'
This suggests that your JPG file is corrupt. Try opening it with other programs, eg Gimp.

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

Posted: 2019-01-30T06:33:58-07:00
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.

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

Posted: 2019-01-30T06:44:51-07:00
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.

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

Posted: 2019-01-31T01:17:09-07:00
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.