Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.debian.user > #247683 > unrolled thread

Re: Graphics::Magick

Started byIL Ka <kazakevichilya@gmail.com>
First post2022-04-28 03:20 +0200
Last post2022-04-28 03:20 +0200
Articles 1 — 1 participant

Back to article view | Back to linux.debian.user

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  Re: Graphics::Magick IL Ka <kazakevichilya@gmail.com> - 2022-04-28 03:20 +0200

#247683 — Re: Graphics::Magick

FromIL Ka <kazakevichilya@gmail.com>
Date2022-04-28 03:20 +0200
SubjectRe: Graphics::Magick
Message-ID<Eh0Z3-bF8y-1@gated-at.bofh.it>

[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
>
>

[toc] | [standalone]


Back to top | Article view | linux.debian.user


csiph-web