#!/usr/bin/perl
use Image::Magick;
$im = new Image::Magick;
$im->Read("test.tif");
$x=20;$y=20;
($red, $green, $blue, $opacity) = split /,/, $im->Get("pixel[$x,$y]");
if($red==0 && $green==0 && $blue==0) {
print "Color is black\n";
} elsif($red==255 && $green==255 && $blue==255) {
print "Color is white\n";
} else {
print "Color is $red,$green,$blue\n";
}
Main Topics
Browse All Topics





by: holliPosted on 2003-03-19 at 12:52:42ID: 8169562
take a look at CPAN http://www.cpan.org
hor/SUMMER /Image-Bas e-1.07/Bas e.pm hor/KARASI K/Prima-1. 09/pod/Pri ma/ Image.p od
especially
http://search.cpan.org/aut
http://search.cpan.org/aut