Good day,
This maybe a bug or just odd behavior in version 6.2.3 and 6.2.4. Or it
is just me not knowing :)
If you have anitalias=>'false' and add stroke to the Annotate parameters
the resulting image has antialias but without it there is no antialias.
When looking at the code it looked like the antialias was passed into
AnnotateImage but I was not 100% sure.
When an image only needs 2 colors and antialias is true, there are
additional colors added for the antialiasing. Not a problem unless the
requirement is for only 2 colors.
With stroke, identify -verbose will show 160 colors. (more odd:
antialias=>true there are 174 colors)
Without stroke, identify -verbose will show 2 colors. (antialias=>true
there are 168 colors as expected)
Here is the perl code:
use Image::Magick;
$image=new Image::Magick(size=>'198x39',depth=>'8',density=>'81x72'
,units=>'pixelsperinch');
$x=$image->ReadImage('xc:rgba(0,0,0,255)');
warn "$x" if "$x";
# yes antialias
#$x=$image->Annotate(text=>"This is Zquelr",
# gravity=>'Center',font=>'Helvetica',
# stroke=>'red',fill=>'red',pointsize=>'24',
# antialias=>"false");
# no antialias
$x=$image->Annotate(text=>"This is
Zquelr",gravity=>'Center',font=>'Helvetica',
fill=>'red',pointsize=>'24',
antialias=>"false");
If you draw it using convert at the command line everything is fine.
convert +antialias -size 198x39 -depth 8 -density "81x72" \
-units "pixelsperinch" xc:"rgba(0,0,0,255)" -pointsize 24 \
-fill red -stroke red -font 'Helvetica' \
-draw 'gravity center text 0,0 "This is Zquelr"' \
png:file5s.png
If this is not a bug could someone enlighten me as to why it works this
way. If it is a bug should I report on the bug list?
Thanks
Phil
_______________________________________________
Magick-users mailing list
[email protected]
http://studio.imagemagick.org/mailman/listinfo/magick-users