[Magick-bugs] Composite with mask and x/y offset stopped working in v6.3.0

Joseph Huckaby jhuckaby at gmail.com
Sat Mar 17 13:54:51 PDT 2007


Hello, I use ImageMagick and PerlMagick extensively at my company.  I
believe I have discovered a bug that seems to have began on or around
verison 6.3.0, and is still present in version 6.3.3.  If you
composite an image on top of another using a mask, and offset it with
X and/or Y values, the overlay image is cut off (e.g. cropped) by the
X/Y amount, instead of being positioned (i.e. offset) by it.  Here is
an example, with source code to reproduce:

Source image, 404x303 JPEG:
http://staging.sr.admission.net/joetemp/magick_bug/source.jpg

Mask image, 404x90 BMP (Grayscale):
http://staging.sr.admission.net/joetemp/magick_bug/mask.bmp

Overlay image, 404x90 BMP (Grayscale):
http://staging.sr.admission.net/joetemp/magick_bug/overlay.bmp

Source code to composite overlay.bmp on top of source.jpg using
mask.bmp, and a Y offset of 50 pixels, outputs "dest.bmp":
http://staging.sr.admission.net/joetemp/magick_bug/test.txt

CORRECT image generated using ImageMagick 6.2.4:
http://staging.sr.admission.net/joetemp/magick_bug/dest-v6.2.4.bmp
(This is the expected output)

BUGGY image generated using ImageMagick 6.3.0:
http://staging.sr.admission.net/joetemp/magick_bug/dest-v6.3.0.bmp
(Notice how the image is cropped by 50 pixels, instead of being offset by it)

BUGGY image generated using ImageMagick 6.3.3:
http://staging.sr.admission.net/joetemp/magick_bug/dest-v6.3.3.bmp
(Same problem here, and this ImageMagick was freshly downloaded and
compiled yesterday, March 16).

All three images were generated using the very same source images, and
source code shown above.  Oh, and if you eliminate the mask entirely,
the composite works properly in all cases.  The bug is only
reproducible using both a mask image, and an X or Y offset specified.

My ImageMagick 6.2.4 server is running Fedora Core 4:
Linux staging.sr.admission.net 2.6.17-1.2142_FC4smp #1 SMP Tue Jul 11
22:57:02 EDT 2006 i686 i686 i386 GNU/Linux
Version: ImageMagick 6.2.4 02/13/06 Q8 http://www.imagemagick.org

My ImageMagick 6.3.0 server is running Mac OS X 10.4.8:
Darwin joebook 8.8.1 Darwin Kernel Version 8.8.1: Mon Sep 25 19:42:00
PDT 2006; root:xnu-792.13.8.obj~1/RELEASE_I386 i386 i386
Version: ImageMagick 6.3.0 11/06/06 Q8 http://www.imagemagick.org

My ImageMagick 6.3.3 server is running Fedora Core 6:
Linux dev-fc6.eng.admission.net 2.6.18-1.2798.fc6 #1 SMP Mon Oct 16
14:37:32 EDT 2006 i686 athlon i386 GNU/Linux
Version: ImageMagick 6.3.3 03/15/07 Q8 http://www.imagemagick.org

Any help would be appreciated.

Thanks!

- Joe


More information about the Magick-bugs mailing list