On Mon, 18 Apr 2011 14:15:45 +0200 [email protected] wrote: | | I have a set of images using up to four different colors | contrastively in addition to a white/transparent background | and some black areas/text, and need to convert these to b/w | versions with each color replaced by a hatch/dot pattern, | and preferably with each hatched area outlined with a thin | black border. I know how to replace a color by another color | from the command line but not how to replace a color with a | pattern. However I'm totally at a loss on how to achieve a | black outline around a colored area. Additionally I'd like | to do this in a perl script. |
Replace each color by a grayscale value, then use a DIY script to map gray values to a image, as per... Dithering with Symbol Patterns http://www.imagemagick.org/Usage/quantize/#diy_symbols Alternativally if the patterns are inclusive, then you can use a full ordered-dither threshold pattern. That is the pattern for 75% gray includes the pattern for 50% gray with just a few more pixels. Using ordered-dither threshold patterns is a built-in, and you can define your own threshold patterns. See the rest of Order-Dither Patterns http://www.imagemagick.org/Usage/quantize/#thresholds_xml and http://www.imagemagick.org/Usage/quantize/#diy_dither The later goes though the process of generating such patterns. Note the patterns are stored in your HOME in the file ".magick/thresholds.xml" and as such are not effected by IM updates. I use them for implementing special dithered effects (like shadows). Anthony Thyssen ( System Programmer ) <[email protected]> -------------------------------------------------------------------------- Hmm.. Thursday TV viewing... Golf Channel 2 Racing Channel 9 Footy Channel 10 Arrrrhhhhhh (Present the Sign of the Protection against evil!) -- Anthony Thyssen -------------------------------------------------------------------------- Anthony's Castle http://www.ict.griffith.edu.au/anthony/ _______________________________________________ Magick-users mailing list [email protected] http://studio.imagemagick.org/mailman/listinfo/magick-users
