replace_color - replace one color with another in an image
perl replace_color fromcolor tocolor inimage outimage
This is a simple demonstration of Imager::transform2 that replaces one color with another in an image.
Note: this works with full color images, and always produces a 3 channel output image - the alpha channel (if any) is not preserved.
Most of the work is done in the replace_color() function.
my $result = replace_color($in_image, $from_color, $to_color);
Returns a new image object with colors replaced.
Tony Cook <email@example.com>