Equality operator in fx image
Posted: 2014-05-15T07:50:40-07:00
Hi,
I think I've discovered a bug in the equality operator in the fx operator.
In the above example the single equality operator "int(pos) == int(120)" should be equivalent to "(int(pos) >= int(120) && int(pos) <= int(120)" however the two output images are different.
output1.png appears correct - or at least what I expect:
output2.png appears incorrect
I think I've discovered a bug in the equality operator in the fx operator.
Code: Select all
convert -size 256x256 "xc:pink" input1.jpg
convert -size 256x256 "gradient:black-white" input2.jpg
convert input1.jpg input2.jpg -fx "colorInt=int(256 * v.p{0,j}.lightness); pos = int(256 * i/w); (int(pos) >= int(120) && int(pos) <= int(120))" output1.png
convert input1.jpg input2.jpg -fx "colorInt=int(256 * v.p{0,j}.lightness); pos = int(256 * i/w); int(pos) == int(120) " output2.png
output1.png appears correct - or at least what I expect:
output2.png appears incorrect