x-offset of annotate with stroke

Post any defects you find in the released or beta versions of the ImageMagick software here. Include the ImageMagick version, OS, and any command-line required to reproduce the problem. Got a patch for a bug? Post it here.
Post Reply
RetroJ
Posts: 108
Joined: 2006-10-25T08:12:50-07:00

x-offset of annotate with stroke

Post by RetroJ »

Hi,

Please see the experiment shown at this url:

http://jjfoerch.com/bitbucket/annotest/

Whether you want to call this a bug or not is a subjective matter, but I believe the images shown in the second table represent a more useful behavior of annotate.
User avatar
anthony
Posts: 8883
Joined: 2004-05-31T19:27:03-07:00
Authentication code: 8675308
Location: Brisbane, Australia

Re: x-offset of annotate with stroke

Post by anthony »

You are almost right....

Rather than use +stroke to explicitally turn it off, (and thus turning off the strokewidth, which in tern effects gravity placement), try just setting the stroke
color to 'none' so the stroke width still applies...

Hmmm testing...

Code: Select all

convert -gravity East -size 100x100 xc:white -pointsize 72 \
            -stroke blue -strokewidth 10 -annotate +0+0 'HI' \
            -stroke none -annotate +0+0 'HI'  \
            x:
Nope that failes too... strokewidth was still reduced to 0 with regards to the effects of gravity!

This looks like a bug alright, and shows that there is a difference between stroke being turned off, and stroke being set to transparency.

Adding a bug report to the IM examples bug testing page (may take a day to appear).
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
https://imagemagick.org/Usage/
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

Re: x-offset of annotate with stroke

Post by magick »

We will have a fix to the problem you reported within a day or two. Thanks for alerting us to the problem.
RetroJ
Posts: 108
Joined: 2006-10-25T08:12:50-07:00

Re: x-offset of annotate with stroke

Post by RetroJ »

Thank you!
User avatar
anthony
Posts: 8883
Joined: 2004-05-31T19:27:03-07:00
Authentication code: 8675308
Location: Brisbane, Australia

Re: x-offset of annotate with stroke

Post by anthony »

The problem has now been resolved.

The stroke width will play no part in the position calculation, so if you want space for the stroke width, you will have to add space for it in the text positioning offset for that edge.
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
https://imagemagick.org/Usage/
Post Reply