[magick-users] Newbie PerlMagick floodfill question
Anthony Thyssen
anthony at griffith.edu.au
Tue Oct 23 18:48:24 PDT 2007
rhubarbpie at poetworld.net on wrote...
|
| Greetings:
|
| I'm generating this gif using PerlMagick. Although the floodfill
| command mostly works, why do I have the white outlines of the form and
| circles? I want a red for with black center dot and a 9:00 black dot
| with white center.
|
Flood fill, fills and replaces an exact color with the given color.
You can increase the color that is replaced to 'close colors' by using a
Fuzz Factor
http://imagemagick.org/Usage/colors/#fuzz
However the preplacement color is left AS IS, so you loose any shading
effects that was used for anti-aliasing.
In fact it is the anti-aliased pixels around your circle that would
generate that white outline.
For more information on the problems of color replacement, and
specifically background replacement see
http://imagemagick.org/Usage/channels/#mask_creation
This area of IM examples has never been completed, basically because
there is no current ideal solution. :-(
I have an idea for a 'shaded' flood fill type solution, but have had no
time to try to implement it.
If you (or someone else) come up with anything interesting, please let
us know.
Anthony Thyssen ( System Programmer ) <A.Thyssen at griffith.edu.au>
-----------------------------------------------------------------------------
A novice practices until he gets it right.
An expert practices until he doesn't get it wrong.
-----------------------------------------------------------------------------
Anthony's Home is his Castle http://www.cit.gu.edu.au/~anthony/
More information about the Magick-users
mailing list