<?xml version="1.0" encoding="windows-1252"?>
<node id="497355" title="Replace colors in an image" created="2005-10-04 14:37:05" updated="2005-10-04 10:37:05">
<type id="115">
perlquestion</type>
<author id="369157">
johnnywang</author>
<data>
<field name="doctext">
Given an image, I'd like to replace some color (say red) with another color (say white). What's the best way to go about it? I've looked into PerlMagick (are there more complete documentations? the one at &lt;a href="http://www.imagemagick.org/script/perl-magick.php"&gt;http://www.imagemagick.org/script/perl-magick.php&lt;/a&gt; doesn't explain function parameters in detail). I guess I could get the rgb value at every pixel and replace it one by one, isn't there something easier, or fuzzy(i.e., replace colors in certain rgb range)? Thanks.</field>
</data>
</node>
