Page 1 of 1

resolution error

Posted: 2009-11-04T10:20:12-07:00
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