problem with PerlMagick Resize(blur=>0)

Post any defects you find in the released or beta versions of the ImageMagick software here. Include the ImageMagick version, OS, and any command-line required to reproduce the problem. Got a patch for a bug? Post it here.
Post Reply
abjones
Posts: 33
Joined: 2004-03-26T12:21:59-07:00

problem with PerlMagick Resize(blur=>0)

Post by abjones »

ImageMagick-6.3.6-3-Q8-windows-dll.exe

I have some older perl code where I used a statement like

Code: Select all

$error = $image1->Resize(width=>75,height=>75,blur=>0);
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.

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";
}
results:
  • Image1

    0) 85 85 85 0 2026
    1) 255 255 255 0 20474


    Image1 after Resize

    0) 0 0 0 0 5625
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

Re: problem with PerlMagick Resize(blur=>0)

Post by magick »

The problem you reported is in the Windows binaries but not the ImageMagick source distribution. The fix is to build ImageMagick from source or wait until the next Windows binary release in a week or two.
Post Reply