Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.debian.user > #247683
| From | IL Ka <kazakevichilya@gmail.com> |
|---|---|
| Newsgroups | linux.debian.user |
| Subject | Re: Graphics::Magick |
| Date | 2022-04-28 03:20 +0200 |
| Message-ID | <Eh0Z3-bF8y-1@gated-at.bofh.it> (permalink) |
| References | <EgSI9-bA77-11@gated-at.bofh.it> <EgSI9-bA77-13@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
[Multipart message — attachments visible in raw view] - view raw
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.crane@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
>
>
Back to linux.debian.user | Previous | Next | Find similar | Unroll thread
Re: Graphics::Magick IL Ka <kazakevichilya@gmail.com> - 2022-04-28 03:20 +0200
csiph-web