Bug in -alpha disassociate when combine with masking

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
chaoscarnage
Posts: 93
Joined: 2012-12-31T15:56:29-07:00
Authentication code: 6789

Bug in -alpha disassociate when combine with masking

Post by chaoscarnage »

Bug in -alpha disassociate when combine with masking

I have about 60 private messages with Fred. He has tested and found that it does generate the incorrect image.

What I have tried:
- Imagemagick 6.9, newest, beta version, 7.0.5-5, 7.0.8-10, 7.0.8-11, 7.0.8-25, 7.0.8-46 and many versions along the way.
- Several different versions of libpng
- with and without openMP
- Multiple servers. One that didn't have imagemagick at all and did a completely fresh install.

We are using Unbuntu Linux, and I have tried several different servers running different versions.

I built Fred a test page and had him try it. He generates an incorrect image. If you need please read my private messages with him. Fred instructed me to message you.

Here is the test page. http://208.38.162.164/fred.php


Refresh this a few times and you will see that sometimes it builds the images with black bars or even a sold black block at the top of the image. This happens when using disassociate with masking.

I need to use disassociate due to

With Disassociate
Image
Image

Without
Image
Image

When I do not use disassociate the images that have opaque areas loses their hue and saturation and come out gray.

I have run into a bug with disassociate that creates images like this
Image

This is what the image should look like if generated correctly.
Image

When running the same code without OpenMP
Image (This is the image fred himself generated)

The code used in all cases is...

Code: Select all

magick http://208.38.162.164/images/avatar/temp/buffer.png \( http://208.38.162.164/images/avatar/layers/06/98/76/3e37872bc438d90b42b7c8b411236.png \( http://208.38.162.164/images/avatar/layers/a1/24/9c/d362dff1c846cb363255a92887.png -alpha copy \) -compose Dst_In -composite -alpha disassociate \( http://208.38.162.164/images/avatar/social/mask/male/11.png -alpha copy \) -compose Dst_In -composite -alpha disassociate \) -compose Over -composite \( http://208.38.162.164/images/avatar/layers/9e/f6/71/ecffb46acb381153f558c72efd211.png \( http://208.38.162.164/images/avatar/social/mask/male/11.png -alpha copy -compose Dst_In \) -composite -alpha disassociate \) -compose Over -composite \( http://208.38.162.164/images/avatar/layers/4b/ab/53/469175e93372a650b8bb73c597230.png \( http://208.38.162.164/images/avatar/social/mask/male/11.png -alpha copy -compose Dst_In \) -composite -alpha disassociate \) -compose Over -composite \( http://208.38.162.164/images/avatar/layers/fb/d2/aa/3751679806b601a6d63083b0ab236.png \( http://208.38.162.164/images/avatar/layers/90/d6/37/11a7f63e649fc43cdd66e8522a.png -alpha copy \) -compose Dst_In -composite -alpha disassociate \( http://208.38.162.164/images/avatar/social/mask/male/12.png -alpha copy \) -compose Dst_In -composite -alpha disassociate \) -compose Over -composite finishedimage.png

I beg you, please help me.

I am by no means attached to using -alpha disassociate. If there is another method to achieve the same result I am happy to change.

I went back to the older version we had which was 7.0.5-5. It still generates the wrong image, but it is wrong differently. The placement of the images appears to have shifted. As a dev, I figured this might be worth noting as it may help point out where a potential bug may be.

Image
chaoscarnage
Posts: 93
Joined: 2012-12-31T15:56:29-07:00
Authentication code: 6789

Re: Bug in -alpha disassociate when combine with masking

Post by chaoscarnage »

Any chance this has been looked at? If you have a different code I should be using instead, I am happy to change it and help test.
Post Reply