Page 1 of 1

Does "-geometry" round non-integer args?

Posted: 2018-07-20T09:40:37-07:00
by HiRezGuy
I've been using the following command line with the -geometry option. It works as expected, and no errors or warnings are thrown.

Code: Select all

"C:\Program Files\ImageMagick\composite" -gravity NorthEast -geometry +95+95.6 image_1b.png image_0b.png image_6-01.png
QUESTION:
What does IM do with the decimal portion of the argument that I'm passing with -geometry (e.g., round-up, round-down, truncate)? It's too difficult to tell by visually inspecting the resultant png.

Re: Does "-geometry" round non-integer args?

Posted: 2018-07-20T09:57:34-07:00
by fmw42
Looks like it rounds. I create a 2x1 black image, the a 1x1 white image and use -geometry +0.7+0. If it truncated the white would be on the left, but the white is on the right. That tells me it rounds.

Code: Select all

convert -size 2x1 xc:black -size 1x1 xc:white -geometry +0.7+0 -compose over -composite -scale 20x10! result.gif