Page 1 of 1

[Resolved] Image corrupts after convert

Posted: 2016-06-22T16:59:53-07:00
by grmrgecko
I have been noticing that an image will corrupt after running convert on the file with the latest version of ImageMagick from Arch: https://www.archlinux.org/packages/extr ... agemagick/ (6.9.4.6-2)

For example, download http://www.icepower.bang-olufsen.com/im ... onobig.jpg and run the following:

convert dualomonobig.jpg -resize 100x96 dualomonobig-resized.jpg

An older version of ImageMagic, 6.9.4.3-1, works.

dualomonobig-resized-6.9.4.3-1
Image

dualomonobig-resized-6.9.4.6-1
Image

dualomonobig-resized-6.9.4.6-2
Image

What changed to break ImageMagick between these versions? https://git.archlinux.org/svntogit/pack ... 9366987ac9 As far as I understand this, they just changed version number to download the newer version from ImageMagic.

Re: Image corrupts after convert

Posted: 2016-06-22T17:06:47-07:00
by fmw42
Imagemagick numbers contain only 4 values. You seem to have an extra number. Please confirm your IM version numbers using

Code: Select all

convert -version
I get the same and proper full results on IM 6.9.4-9 and 6.9.4-6 Q16 Mac OSX using your command and image.

I think you either have a full tmp directory or you have a corrupted install or bad limits.

Also be sure you have recent and good install of libjpeg. Mine is (90).

Code: Select all

convert -list format
will tell you what version you have.

Re: Image corrupts after convert

Posted: 2016-06-22T18:26:26-07:00
by grmrgecko
The way Arch does their versions is the actual version of ImageMagic plus a compile version. So the difference between 6.9.4.6-1 and 6.9.4.6-2 is -2 was compiled after perl was updated to include latest changes.

6.9.4.3-1
$ convert -version
Version: ImageMagick 6.9.4-3 Q16 x86_64 2016-05-20 http://www.imagemagick.org
Copyright: Copyright (C) 1999-2016 ImageMagick Studio LLC
License: http://www.imagemagick.org/script/license.php
Features: Cipher DPC HDRI Modules OpenCL OpenMP
Delegates (built-in): bzlib cairo fontconfig freetype gslib jng jp2 jpeg lcms lqr ltdl lzma openexr pangocairo png ps rsvg tiff webp wmf x xml zlib

6.9.4.6-2
Version: ImageMagick 6.9.4-6 Q16 x86_64 2016-06-01 http://www.imagemagick.org
Copyright: Copyright (C) 1999-2016 ImageMagick Studio LLC
License: http://www.imagemagick.org/script/license.php
Features: Cipher DPC HDRI Modules OpenCL OpenMP
Delegates (built-in): bzlib cairo fontconfig freetype gslib jng jp2 jpeg lcms lqr ltdl lzma openexr pangocairo png ps rsvg tiff webp wmf x xml zlib

6.9.4.9 - Built, same issue.
Version: ImageMagick 6.9.4-9 Q16 x86_64 2016-06-22 http://www.imagemagick.org
Copyright: Copyright (C) 1999-2016 ImageMagick Studio LLC
License: http://www.imagemagick.org/script/license.php
Features: Cipher DPC HDRI Modules OpenCL OpenMP
Delegates (built-in): bzlib cairo fontconfig freetype gslib jng jp2 jpeg lcms lqr ltdl lzma openexr pangocairo png ps rsvg tiff webp wmf x xml zlib

7.0.2.0 - Built, no issues.
convert: unable to access configure file `/home/grmrgecko/.cache/ImageMagick/ImagemagickOpenCLDeviceProfile.xml' @ warning/configure.c/GetConfigureOptions/709.
[grmrgecko@arch-server BadDrive]$ convert --version
Version: ImageMagick 7.0.2-0 Q16 x86_64 2016-06-22 http://www.imagemagick.org
Copyright: Copyright (C) 1999-2016 ImageMagick Studio LLC
License: http://www.imagemagick.org/script/license.php
Features: Cipher DPC HDRI Modules OpenCL OpenMP
Delegates (built-in): bzlib cairo fontconfig freetype gslib jng jp2 jpeg lcms lqr ltdl lzma openexr pangocairo png ps rsvg tiff webp wmf x xml zlib

So maybe I need to report to Arch that there is an issue which is fixed in the latest version.

Re: Image corrupts after convert

Posted: 2016-06-22T18:40:19-07:00
by grmrgecko
Bug report submitted, do not know how much they will like it since they warn again and again not to report bugs when it is out of date. It's been out of date since the first, so I'm hoping this will just remind them that it needs updating.

https://bugs.archlinux.org/task/49810

Re: Image corrupts after convert

Posted: 2016-06-22T19:29:14-07:00
by fmw42
Have you tried compiling without OpenMp or OpenCL or non-hdri or all of them? If so, do they fail also? Have you checked your MAGICK_TEMPORARY_PATH directory to be sure it is not full?

Re: Image corrupts after convert

Posted: 2016-06-22T19:57:51-07:00
by fmw42
It could also be a system limitation on memory or file size or /tmp directory.

Re: Image corrupts after convert

Posted: 2016-06-22T21:28:35-07:00
by grmrgecko
I know it is not a out of memory issue, there is 16GB free in /tmp, and 23GB free in ram.

I haven't tried disabling OpenMP or OpenCL, probably won't. I'll just keep using an older version until Arch team fixes it or updates to the latest. I am happy with using the out dated one.

Re: Image corrupts after convert

Posted: 2016-06-23T04:01:23-07:00
by grmrgecko
Disabling OpenCL fixes my issues, I am reporting to Arch.

Re: [Resolved] Image corrupts after convert

Posted: 2016-06-23T10:50:21-07:00
by dlemstra
Would you mind giving ImageMagick 6.9.4-10 a try? We did fix some OpenCL bugs in the latest release.

Re: [Resolved] Image corrupts after convert

Posted: 2016-06-23T11:17:39-07:00
by grmrgecko
It seems that 6.9.4-10 works:
Version: ImageMagick 6.9.4-10 Q16 x86_64 2016-06-23 http://www.imagemagick.org
Copyright: Copyright (C) 1999-2016 ImageMagick Studio LLC
License: http://www.imagemagick.org/script/license.php
Features: Cipher DPC HDRI Modules OpenCL OpenMP
Delegates (built-in): bzlib cairo fontconfig freetype gslib jng jp2 jpeg lcms lqr ltdl lzma openexr pangocairo png ps rsvg tiff webp wmf x xml zlib

Resulting image:
Image