Bug generating text on black frames
Posted: 2013-02-23T23:10:38-07:00
ImageMagick 6.7.5-6
The following commands generate text on green background, instead of the desired black background:
convert -quiet -colorspace RGB -type truecolor -alpha on -size 720!x480! xc:"#000000FF" temp.png
convert -quiet -colorspace RGB -type truecolor -alpha on temp.png -fill "#FFFFFFFF" -stroke "#FFFFFFFF" -pointsize 32 -draw "text 78 44 'Text'" 00000001.png
with just a slight adjustment it works almost as desired:
convert -quiet -colorspace RGB -type truecolor -alpha on -size 720!x480! xc:"#000001FF" temp.png
convert -quiet -colorspace RGB -type truecolor -alpha on temp.png -fill "#FFFFFFFF" -stroke "#FFFFFFFF" -pointsize 32 -draw "text 78 44 'Text'" 00000001.png
and:
convert -quiet -colorspace RGB -type truecolor -alpha on -size 720!x480! xc:"#000000FF" temp.jpg
convert -quiet -colorspace RGB -type truecolor -alpha on temp.jpg -fill "#FFFFFFFF" -stroke "#FFFFFFFF" -pointsize 32 -draw "text 78 44 'Text'" 00000001.png
also works OK.
Seems like in the first example a YUV colorspace is being used incorrectly.
The following commands generate text on green background, instead of the desired black background:
convert -quiet -colorspace RGB -type truecolor -alpha on -size 720!x480! xc:"#000000FF" temp.png
convert -quiet -colorspace RGB -type truecolor -alpha on temp.png -fill "#FFFFFFFF" -stroke "#FFFFFFFF" -pointsize 32 -draw "text 78 44 'Text'" 00000001.png
with just a slight adjustment it works almost as desired:
convert -quiet -colorspace RGB -type truecolor -alpha on -size 720!x480! xc:"#000001FF" temp.png
convert -quiet -colorspace RGB -type truecolor -alpha on temp.png -fill "#FFFFFFFF" -stroke "#FFFFFFFF" -pointsize 32 -draw "text 78 44 'Text'" 00000001.png
and:
convert -quiet -colorspace RGB -type truecolor -alpha on -size 720!x480! xc:"#000000FF" temp.jpg
convert -quiet -colorspace RGB -type truecolor -alpha on temp.jpg -fill "#FFFFFFFF" -stroke "#FFFFFFFF" -pointsize 32 -draw "text 78 44 'Text'" 00000001.png
also works OK.
Seems like in the first example a YUV colorspace is being used incorrectly.