Page 1 of 1

possible bug stroke/strokewidth IM 6.9.1.2 Q16 Mac OSX

Posted: 2015-04-24T14:04:49-07:00
by fmw42
Overlaying a strokewidth=0 on a strokewidth=20 is properly centered vertically but not horizontally. It is off by half the strokewidth.

Is this a bug?

# get optimal size
size=`convert -background none -font Tahoma -fill red -pointsize 100 -stroke red -strokewidth 20 label:"Test text" -format "%wx%h" info:`

# This fails to center properly horizontally
convert -size $size xc:none \
-gravity center -font Tahoma -fill red -pointsize 100 -stroke red -strokewidth 20 -annotate +0+0 "Test text" \
-gravity center -font Tahoma -fill white -pointsize 100 -stroke white -strokewidth 0 -annotate +0+0 "Test text" result1.png

Image


convert -size $size xc:none \
-gravity center -font Tahoma -fill red -pointsize 100 -stroke red -strokewidth 20 -annotate +0+0 "Test text" \
-gravity center -font Tahoma -fill white -pointsize 100 -stroke white -strokewidth 0 -annotate -10+0 "Test text" result2.png

Image

Re: possible bug stroke/strokewidth IM 6.9.1.2 Q16 Mac OSX

Posted: 2015-05-04T04:36:02-07:00
by dlemstra
This does look like a bug to me. When you make the background xc:green instead of xc:none you will notice that the red text is not centered. I think the text should be centered. Maybe magick can tell us if this is by design?

Re: possible bug stroke/strokewidth IM 6.9.1.2 Q16 Mac OSX

Posted: 2015-05-17T16:49:26-07:00
by fmw42
This issue does not seem to have been resolved yet in 6.9.1.3 beta. As far as I can tell, it still has an offset.

Re: possible bug stroke/strokewidth IM 6.9.1.2 Q16 Mac OSX

Posted: 2015-05-25T15:34:21-07:00
by fmw42
This issue does not seem to have been resolved in recently released 6.9.1.3. As far as I can tell, it still has an offset.

Re: possible bug stroke/strokewidth IM 6.9.1.2 Q16 Mac OSX

Posted: 2015-05-25T16:36:40-07:00
by magick
We can reproduce the problem you posted and have a patch in ImageMagick 6.9.1-4 Beta, available by sometime tomorrow. Thanks.