Page 1 of 1

Resizing image causes corruption (stripes)

Posted: 2011-08-15T11:47:12-07:00
by andygeers
Hi there,

I was a very happy ImageMagick / PythonMagick user until I upgraded to OS X Lion last week. Having reinstalled/upgraded ImageMagick to get it working, I'm now finding my images (particularly ones with a transparency / alpha channel) are corrupted when I try to resize them.

I installed using MacPorts, ImageMagick version 6.7.1-5

Here's an example of the image I'm trying to resize (it's happening on lots of them) (link):
Image

Here's the results I'm seeing (link):
Image

I'm using the 'convert' command - if I just do a straight conversion, then it works fine.
e.g.

Code: Select all

convert stream-full-8-correct.png stream-test.jpg
If I do it with resizing, then the stripes appear:

Code: Select all

convert stream-full-8-correct.png -scale 80% stream-test.png
I've ruled out any problems with the .PNG exporting side of things, because the same issue occurs if I export as a .JPG too. If I replace the transparent background with white then it all works fine.

Re: Resizing image causes corruption (stripes)

Posted: 2011-08-15T12:40:44-07:00
by magick
That may very well be a bug in Lion's OpenMP implementation. Type
  • convert -version
We assume there is an OpenMP feature. It doesn't look like MacPorts has a variant without OpenMP-enabled. You could try building from source and add --disable-openmp to the configure script command line. Report back here if the problem is resolved.

Re: Resizing image causes corruption (stripes)

Posted: 2011-08-15T13:44:35-07:00
by andygeers
I haven't had a chance to try building from source right now, but you're correct about it using Open MP:

Code: Select all

$ convert -version
Version: ImageMagick 6.7.1-0 2011-08-15 Q16 http://www.imagemagick.org
Copyright: Copyright (C) 1999-2011 ImageMagick Studio LLC
Features: OpenMP   

Re: Resizing image causes corruption (stripes)

Posted: 2011-08-15T13:56:08-07:00
by magick
Try setting the MAGICK_THREADS environment variable to 1. See if that fixes the problem.