Subject: | combine=>'normal' is broken |
Date: | Wed, 10 Oct 2007 11:53:56 +1000 |
To: | bug-Imager [...] rt.cpan.org |
From: | tonyc [...] cpan.org |
The following program produces a dark boundary around the drawn
figure.
#!perl -w
use strict;
use Imager;
use Imager::Fill;
my $im = Imager->new(xsize => 100, ysize => 100, channels => 4);
my $fillimg = Imager->new(xsize => 100, ysize => 100);
$fillimg->box(filled => 1, color => '#FFF0F0');
#my $fill = Imager::Fill->new(image => $fillimg, combine => 'normal');
my $fill = Imager::Fill->new(solid => '#FFF0F0');
$im->polygon(points => [ [ 0, 0 ], [ 80, 80], [ 90, 10 ] ],
fill => $fill);
$im->write(file => 'test.png');
my $jpeg = Imager->new(xsize => 100, ysize => 100);
$jpeg->box(filled => 1, color => 'white');
$jpeg->rubthrough(src => $im);
$jpeg->write(file => 'test.jpg');
Note that the problem occurs on both the PNG (composited onto the
background by firefox) and JPEG (composited by Imager).