Page 1 of 1

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

Posted: 2006-07-13T16:54:04-07:00
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

Posted: 2006-07-13T19:39:27-07:00
by magick
Upgrade your version of ImageMagick and the -fx mask will work fine. Try the latest release, ImageMagick 6.2.8-4.

Posted: 2006-07-14T05:27:17-07:00
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!