#!/usr/bin/perl use strict; use warnings; use FindBin qw/$Bin/; use Image::Magick; my $img = Image::Magick->new(); $img->Read($Bin.'/red.bmp'); my ($r,$g,$b) = $img->GetPixel(x=>10,y=>10); print "$r $g $b\n";