[Resolved] Image corrupts after convert

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.
Post Reply
grmrgecko
Posts: 6
Joined: 2016-06-22T16:37:11-07:00
Authentication code: 1151

[Resolved] Image corrupts after convert

Post 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.
Last edited by grmrgecko on 2016-06-23T07:39:21-07:00, edited 1 time in total.
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: Image corrupts after convert

Post 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.
grmrgecko
Posts: 6
Joined: 2016-06-22T16:37:11-07:00
Authentication code: 1151

Re: Image corrupts after convert

Post 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.
grmrgecko
Posts: 6
Joined: 2016-06-22T16:37:11-07:00
Authentication code: 1151

Re: Image corrupts after convert

Post 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
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: Image corrupts after convert

Post 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?
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: Image corrupts after convert

Post by fmw42 »

It could also be a system limitation on memory or file size or /tmp directory.
grmrgecko
Posts: 6
Joined: 2016-06-22T16:37:11-07:00
Authentication code: 1151

Re: Image corrupts after convert

Post 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.
grmrgecko
Posts: 6
Joined: 2016-06-22T16:37:11-07:00
Authentication code: 1151

Re: Image corrupts after convert

Post by grmrgecko »

Disabling OpenCL fixes my issues, I am reporting to Arch.
User avatar
dlemstra
Posts: 1570
Joined: 2013-05-04T15:28:54-07:00
Authentication code: 6789
Contact:

Re: [Resolved] Image corrupts after convert

Post by dlemstra »

Would you mind giving ImageMagick 6.9.4-10 a try? We did fix some OpenCL bugs in the latest release.
.NET + ImageMagick = Magick.NET https://github.com/dlemstra/Magick.NET, @MagickNET, Donate
grmrgecko
Posts: 6
Joined: 2016-06-22T16:37:11-07:00
Authentication code: 1151

Re: [Resolved] Image corrupts after convert

Post 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
Post Reply