problem with PerlMagick Resize(blur=>0)
Posted: 2007-10-22T11:16:55-07:00
ImageMagick-6.3.6-3-Q8-windows-dll.exe
I have some older perl code where I used a statement like
which now produces a black image; but it works fine without the blur parameter. I can't remember why I had blur=>0 anyway, so my fix is to remove it, but I thought you might like to know there is a problem with it.
results:
I have some older perl code where I used a statement like
Code: Select all
$error = $image1->Resize(width=>75,height=>75,blur=>0);
Code: Select all
use Image::Magick;
$image1 = Image::Magick->new;
$error = $image1->Set(size=>'150x150');
die $error if( $error );
$error = $image1->ReadImage('xc:white');
die $error if( $error );
$error = $image1->Draw(stroke=>'#555555', fill=>'#555555', primitive=>'polygon',antialias=>0,
points=>'75 25 100 50 75 75 25 50 75 25',strokewidth=>1);
die $error if( $error );
printHistogram( $image1,"Image1");
$error = $image1->Resize(width=>75,height=>75,blur=>0);
printHistogram( $image1,"Image1 after Resize");
exit;
sub printHistogram {
my($image,$title) = @_;
my @histogram = $image->histogram();
my $a=0; my $p=0; my $c=0;
print "\n$title\n";
foreach my $tupple (@histogram) {
if( $p == int($p/5)*5 ) { print "\n$a) "; $a++; }
print " $tupple";
$p++;
}
print "\n\n";
}
- Image1
0) 85 85 85 0 2026
1) 255 255 255 0 20474
Image1 after Resize
0) 0 0 0 0 5625