#!/usr/bin/perl use GD; my $image = newFromPng GD::Image('z.png'); ($x,$y)=$image->getBounds(); $maxColors = $image->colorsTotal; $pixel=$image->getPixel(23,34); ($r,$g,$b)=$image->rgb($pixel); print "$r\t$g\t$b\n";