Different behaviour of fx '&' operator in Windows and Li

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
Feagond

Different behaviour of fx '&' operator in Windows and Li

Post by Feagond »

Hi,

When trying out the imagemagick toolkit for some basic image processing I ran into some unexpected behaviour. The exact same command performed in Windows and Linux had different effects on the same image. I wanted to apply an AND bitwise mask for every pixel on every channel.
In Windows I used the syntax:
convert <original> -fx "u&<RGBA mask in decimal>" <destination>
which worked perfectly.
In gentoo linux, the exact same command gave an entirely different result. Upon experimenting in linux with different masks, I found that 0 for the mask returned the image totally in black, as would be expected. But upon using 1, the image came exactly the same as the original, which is unexpected as the 1 would filter out every bit except the first least significant bit, and it does so in windows.

Thanks in advance for any help,

Pedro Martins
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

Post by magick »

Upgrade your version of ImageMagick and the -fx mask will work fine. Try the latest release, ImageMagick 6.2.8-4.
Feagond

Post by Feagond »

Thanks a lot for the quick reply! Sorry for asking about a resolved bug, but 2.6.8-0 was the latest ebuild in portage, and as portage is usually quite bleeding-edge in popular packages, I never thought of checking it out :oops:.
I just thought I'd let another gentoo user that should run into the same problem that simple renaming of the ebuild for the new version (2.6.8.4 in portage package syntax) worked fine.
Congrats on the great toolkit and excellent support!
Post Reply