Rectangle should be transparent by default (unless you provide `fill` argument explicitly). 'false' is not a valid color, so providing it shouldn't make any difference. I suggest to provide color explicitly: https://imagemagick.org/script/color.php
<https://imagemagick.org/script/color.php> Here is red: $bg->Draw(primitive=>'rectangle',stroke=>'red',points=>"100,100,980,980", fill=>'#FF0000'); Black: $bg->Draw(primitive=>'rectangle',stroke=>'red',points=>"100,100,980,980", fill=>'#FFFFFF'); While $bg->Draw(primitive=>'rectangle',stroke=>'red',points=>"100,100,980,980", fill=>'#000000'); <https://imagemagick.org/script/color.php> See hex color converter: https://www.rapidtables.com/convert/color/rgb-to-hex.html <https://imagemagick.org/script/color.php> On Wed, Apr 27, 2022 at 3:55 PM mick crane <mick.cr...@gmail.com> wrote: > with bullseye previous Perl script > > use Graphics::Magick; > > my $bg=Graphics::Magick->new; > $bg->Set(size=>"1000"."x"."1000"); > $bg->ReadImage('xc:white'); > $bg->Draw(primitive=>'rectangle',stroke=>'red',points=>"100,100 > 980,980"); > $bg->Draw(primitive=>'rectangle',stroke=>'blue',points=>"20,20 > 400,400"); > my $filename = "test.png"; > $bg->Write(filename=>$filename); > $bg=undef; > > would result in outlines of 2 rectangles overlaid on white. > but with bookworm same thing results in 2 rectangles filled with black. > to get same result have to change to > $bg->Draw(primitive=>'rectangle',stroke=>'red',points=>"100,100 > 980,980",fill=>'false'); > > Is this because bookworm is work in progress ? > > regards > > mick > -- > Key ID 4BFEBB31 > >