possible bug stroke/strokewidth IM 6.9.1.2 Q16 Mac OSX
Posted: 2015-04-24T14:04:49-07:00
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
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
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
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