inline_replace_color.pl - replace one color with another in an image, using Inline
perl inline_replace_color.pl fromcolor tocolor inimage outimage perl inline_replace_color.pl white 808080 foo.jpg bar.png
This is a simple demonstration of using Imager with Inline::C to replace one color in an image with another.
Most of the work is done in the inline_replace_color() function.
Called:
inline_replace_color($in_image, $from_color, $to_color);
Returns a new image object with colors replaced.
$Revision: 816 $
Tony Cook <tony@develop-help.com>
Imager, Imager::Inline, Imager::API, Imager::Color, Imager::Files
To install Imager, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Imager
CPAN shell
perl -MCPAN -e shell install Imager
For more information on module installation, please visit the detailed CPAN module installation guide.