resolution error

PerlMagick is an object-oriented Perl interface to ImageMagick. Use this forum to discuss, make suggestions about, or report bugs concerning PerlMagick.
Post Reply
Nick_Ninja

resolution error

Post by Nick_Ninja »

Code: Select all

#!/usr/bin/perl
use Image::Magick;

$source_img = Image::Magick->new;

$source_img->Read("/home/nick/programming/collage/test2.jpeg");

$xres = $source_img->Get('x-resolution');
$yres = $source_img->Get('y-resolution');

print "Resolution: $xres $yres\n";
print "px: ", $source_img->GetPixel('x'=> 1, 'y'=> 1), "\n";
This returns:

Code: Select all

Resolution: 72 72
px: 000
It should return:

Code: Select all

Resolution: 4 4
px: 000

Post Reply