MagickFlattenImages stopped working as expected
Posted: 2012-05-15T03:28:56-07:00
Hello,
I am using MagickWand in my python application (using pythonmagicjwand).
One thing that my application does is taking an image, resize it and saves the resized image to disk.
Since I also works with PNG files which might have transparency in them, after the resize, I am setting the white background and use MagickFlattenImages so I can get a white background.
This worked perfectly with the following setup:
libMagickCore3
ii imagemagick 8:6.6.0.4-3 image manipulation programs
ii libmagickcore3 8:6.6.0.4-3 low-level image manipulation library
ii libmagickcore3-extra 8:6.6.0.4-3 low-level image manipulation library - extra codecs
ii libmagickwand3 8:6.6.0.4-3 image manipulation library
libjpng1.2:
ii libpng12-0 1.2.44-1 PNG library - runtime
Since I moved to ImageMagick 6.6.8-6 (from source), libpng-1.5.1:
Calling MagickFlattenImages makes the resized image black - the entire image is black rectangle not only the background.
Running convert from the command line yields the required result but it seems that the MagickFlattenImages API was broken.
I also tried using the newer API MergeImageLayers with FlattenLayer method.
This also occurs with the latest version: ImageMagick 6.7.6-9, libpng-1.5.10.
Please assist....
I am using MagickWand in my python application (using pythonmagicjwand).
One thing that my application does is taking an image, resize it and saves the resized image to disk.
Since I also works with PNG files which might have transparency in them, after the resize, I am setting the white background and use MagickFlattenImages so I can get a white background.
This worked perfectly with the following setup:
libMagickCore3
ii imagemagick 8:6.6.0.4-3 image manipulation programs
ii libmagickcore3 8:6.6.0.4-3 low-level image manipulation library
ii libmagickcore3-extra 8:6.6.0.4-3 low-level image manipulation library - extra codecs
ii libmagickwand3 8:6.6.0.4-3 image manipulation library
libjpng1.2:
ii libpng12-0 1.2.44-1 PNG library - runtime
Since I moved to ImageMagick 6.6.8-6 (from source), libpng-1.5.1:
Calling MagickFlattenImages makes the resized image black - the entire image is black rectangle not only the background.
Running convert from the command line yields the required result but it seems that the MagickFlattenImages API was broken.
I also tried using the newer API MergeImageLayers with FlattenLayer method.
This also occurs with the latest version: ImageMagick 6.7.6-9, libpng-1.5.10.
Please assist....