Subject: | Square option leaves empty parts black, not strip_color |
Date: | Wed, 2 Sep 2009 00:42:12 -0500 |
To: | <bug-GD-Thumbnail [...] rt.cpan.org> |
From: | "Alexander Vonk" <alex [...] atvonk.com> |
Running Perl 5.8.8 on Linux 2.6.28.8, GD::Thumbnail 1.34, GD 2.44.
When using option 'square', the empty parts of the thumbnail are not drawn in the strip color, but rather in black. For example:
my $thumb = GD::Thumbnail->new(
strip_color => [ 125, 0, 125 ],
info_color => [ 250, 250, 240 ],
font => 'Small',
square => 1,
);
Should render purple strips and purple empty areas (as per documentation under new, option square). Instead, the empty areas are black. The following code fixes the issue:
123a124,127
Show quoted text
> #ATV: prefill Thumbnail with strip color, as promised
> my $bg_color = $thumb->colorAllocate(@{ $self->{STRIP_COLOR} });
> $thumb->fill(0,0,$bg_color);
>
Kind regards, Alexander.