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";
Code: Select all
Resolution: 72 72
px: 000
Code: Select all
Resolution: 4 4
px: 000