in reply to Replace colors in an image
Here is a snippet to get pixel rgb values with GD, and I'm sure Imager has a similar method.
And check out gif colour changes#!/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";
|
|---|