-draw circle creates offset circle?
Posted: 2011-01-05T10:19:00-07:00
Hi
very new to im, and so maybe I'm being dumb or pedantic or both...
very basic simple exercise: I want to draw a circle in the centre of an image.
I've seen the examples here:
http://imagemagick.org/Usage/draw/#circles
great, wonderful, looks easy.
Then I realised the method isnt exactly what I thought, but I got it after a bit
( viewtopic.php?f=1&t=8443 )
So I think I have the method figured, But...
if we look carefully at the image produced by the first example, the circle isnt actually centered in the image; Its slightly offset.
adjusting the example slightly will show the 'effect' more clearly:
convert -size 100x60 xc: -stroke Firebrick -fill tomato -strokewidth 2 \
-draw 'circle 50,30 50,59' circle_circle.gif
if I understand the method correctly, this should show a 1px margin top and bottom - but it doesnt.
There is a 1px margin at the top but the circle is touching the image edge at the bottom. If we make a 60x60 square it hits the right side as well as the bottom
So how to draw a circle EXACTLY in the middle of an image?
or have I missed the point? (or maybe I am being dumb or pedantic or both!)
l.
very new to im, and so maybe I'm being dumb or pedantic or both...
very basic simple exercise: I want to draw a circle in the centre of an image.
I've seen the examples here:
http://imagemagick.org/Usage/draw/#circles
great, wonderful, looks easy.
Then I realised the method isnt exactly what I thought, but I got it after a bit
( viewtopic.php?f=1&t=8443 )
So I think I have the method figured, But...
if we look carefully at the image produced by the first example, the circle isnt actually centered in the image; Its slightly offset.
adjusting the example slightly will show the 'effect' more clearly:
convert -size 100x60 xc: -stroke Firebrick -fill tomato -strokewidth 2 \
-draw 'circle 50,30 50,59' circle_circle.gif
if I understand the method correctly, this should show a 1px margin top and bottom - but it doesnt.
There is a 1px margin at the top but the circle is touching the image edge at the bottom. If we make a 60x60 square it hits the right side as well as the bottom
So how to draw a circle EXACTLY in the middle of an image?
or have I missed the point? (or maybe I am being dumb or pedantic or both!)
l.