Page 1 of 1

Image gets corrupted with latest IM

Posted: 2009-09-01T01:40:23-07:00
by masterbp
Hi

After i upgraded to Imagemagick 6.5.5-2, certain Image gets corrupted in my production enviroment. The command I call is:

Code: Select all

convert 5653.tif +clip-path "#1" -fill white -draw "color 0,0 reset" out.tif
I get no errors, but the converted image has a fat wide white vertical line thats not supposed to be there.
I have tried to reproduce the error in our test environment, but everything works fine here. Could anyone give me any pointers to where i might look for the error? The Imagemagick is compiled almost identical in the two systems:

Test:

Code: Select all

Path: /usr/local/Imagemagick-6.5.5-2/lib/ImageMagick-6.5.5/config/configure.xml

Name          Value
-------------------------------------------------------------------------------
CC            gcc -std=gnu99
CFLAGS        -fopenmp -g -O2 -Wall -W -pthread
CONFIGURE     ./configure  '--with-lcms=yes' '--with-xml=yes' '--with-freetype=yes' '--with-fontconfig=yes' '--prefix=/usr/local/Imagemagick-6.5.5-2'
COPYRIGHT     Copyright (C) 1999-2009 ImageMagick Studio LLC
CPPFLAGS      -I/usr/local/Imagemagick-6.5.5-2/include/ImageMagick
CXX           g++
CXXFLAGS      -pthread
DEFS          -DHAVE_CONFIG_H
DELEGATES     fontconfig freetype jpeg jng jp2 lcms png tiff xml zlib
DISTCHECK_CONFIG_FLAGS --disable-deprecated --with-quantum-depth=16 --with-umem=no --with-autotrace=no --with-gslib=no --with-fontpath= --with-rsvg=no
EXEC-PREFIX   /usr/local/Imagemagick-6.5.5-2
HOST          i686-pc-linux-gnu
LDFLAGS       -L/usr/local/Imagemagick-6.5.5-2/lib -lfreetype -lz
LIB_VERSION   0x655
LIB_VERSION_NUMBER 6,5,5,2
LIBS          -lMagickCore -llcms -ltiff -lfreetype -ljpeg -lfontconfig -lz -lm -lgomp -lpthread
NAME          ImageMagick
PCFLAGS       -fopenmp
PREFIX        /usr/local/Imagemagick-6.5.5-2
QuantumDepth  16
RELEASE_DATE  2009-08-28
VERSION       6.5.5
WEBSITE       http://www.imagemagick.org
Prod:

Code: Select all

Path: /usr/local/ImageMagick/lib/ImageMagick-6.5.5/config/configure.xml

Name          Value
-------------------------------------------------------------------------------
CC            gcc -std=gnu99
CFLAGS        -g -O2 -Wall -W -pthread
CONFIGURE     ./configure  '--prefix' '/usr/local/ImageMagick' '--with-xml=yes' '--with-fontconfig=yes'
COPYRIGHT     Copyright (C) 1999-2009 ImageMagick Studio LLC
CPPFLAGS      -I/usr/local/ImageMagick/include/ImageMagick
CXX           g++
CXXFLAGS      -g -O2 -Wall -W -pthread
DEFS          -DHAVE_CONFIG_H
DELEGATES     bzlib fontconfig freetype jpeg jng jp2 lcms png tiff xml zlib
DISTCHECK_CONFIG_FLAGS --disable-deprecated --with-quantum-depth=16 --with-umem=no --with-autotrace=no --with-gslib=no --with-fontpath= --with-rsvg=no
EXEC-PREFIX   /usr/local/ImageMagick
HOST          x86_64-unknown-linux-gnu
LDFLAGS       -L/usr/local/ImageMagick/lib -lfreetype -lz
LIB_VERSION   0x655
LIB_VERSION_NUMBER 6,5,5,2
LIBS          -lMagickCore -llcms -ltiff -lfreetype -ljpeg -lfontconfig -lbz2 -lz -lm -lpthread
NAME          ImageMagick
PCFLAGS
PREFIX        /usr/local/ImageMagick
QuantumDepth  16
RELEASE_DATE  2009-08-27
VERSION       6.5.5
WEBSITE       http://www.imagemagick.org

Images used
Original Image (2Mb): https://sites.google.com/site/fileexamp ... edirects=0 preview
Output from prod https://sites.google.com/site/fileexamp ... edirects=0 preview
Output from test: https://sites.google.com/site/fileexamp ... edirects=0 preview
Debug traces (debug=all): https://sites.google.com/site/fileexamp ... edirects=0

Re: Image gets corrupted with latest IM

Posted: 2009-09-01T06:09:24-07:00
by magick
The conversion works fine on a number of our systems. We're using ImageMagick 6.5.5-6, the current release. We suspect your system may have a buggy libgomp used to support OpenMP. Disable OpenMP on your system and see if that fixes the problem:
  • cd ImageMagick-6.5.5-6
    ./configure --disable-openmp
    make
    make install

Re: Image gets corrupted with latest IM

Posted: 2009-09-02T05:38:42-07:00
by masterbp
Hi

Thank you for the quick answer. I have recompiled the Imagemagic in production without openMp support, but i believe that it already was without openMP. The result was negative - the Image is still corrupted. I checked the GCC compiler on the two systems:

Prod: 4.1.2 (Suse 10.2)
Test: 4.3.3 (Ubuntu 9.04)

I then tried to disable openMP support in test (--disable-openmp) to make it look a bit more like the production version, but the Image is still fine in test.

Any more hints?

Update:

Another difference between the two systems is Libtiff:

Prod: libtiff.so.3.8.2
Test: libtiff.so.4.2.1

Could that make the difference?