overlaying a canvas on an image
Posted: 2015-11-02T01:25:46-07:00
I am trying to overlay a canvas (specifically a white rectangle of defined size) on an image. The following command, which I expect to overlay a rectangle of 100 pixel width and 4 pixel height, does not overlay a rectangle of the expected size:
convert file.tif -gravity center -crop 50%x50% 'xc:white[100x4!]' -gravity southeast -geometry +10+10 -composite x:
I have tried various permutations, but the pixel size of the rectangle is not correct. For instance, when file.tif has dimensions 333x390, the white bar is longer than half the image width, which should not be the case. Please advise on how the task can be accomplished properly. Thank you.
PS: I am using ImageMagick 6.8.9-9 Q16 x86_64 2015-01-05 on a Debian 8 system.
convert file.tif -gravity center -crop 50%x50% 'xc:white[100x4!]' -gravity southeast -geometry +10+10 -composite x:
I have tried various permutations, but the pixel size of the rectangle is not correct. For instance, when file.tif has dimensions 333x390, the white bar is longer than half the image width, which should not be the case. Please advise on how the task can be accomplished properly. Thank you.
PS: I am using ImageMagick 6.8.9-9 Q16 x86_64 2015-01-05 on a Debian 8 system.