On 2007-12-23 22:42 +1000, Anthony Thyssen wrote: > Andre Majorel on wrote... > | Hello all. I have large 600 DPI colour scans that I would like to > | convert to compact PNG. To let PNG do its work, the number of > | colours needs to be reduced. > | > | The document lends itself to quantisation very well ; it is > | typeset text with some orange highlighter so the scan contains > | only black, white and shades of fluorescent orange and grey. It > | could be adequately rendered with just, say, 8 colours : black, > | white, 3 greys and 3 shades of orange. > | > | Unfortunately, convert's native quantisation does not work that > | well with it. I end up with either too many shades of light grey > | for good compression or light brown instead of orange. > | > | I would like the quantiser to pick something along the lines of > | #000 #444 #888 #ccc #FFF for the greys and #FF9840 #804c20 #402610 > | for the oranges. > | > | Some scaling would be required, as the thresholds for logical > | black and white are maybe #333 and #ddd in the original. > | Normalisation cannot be used because many pixels have at least one > | component set to 0xFF. > | > | How would you approach this ? > > I would specify the colors you want in a small image with just thouse > colors, than use -map. That is avoid the color quantization entirely.
Thanks but that doesn't work too well. The original image is noisy and it's not obvious how to choose shades that are distant enough to avoid the dithering but not so distant that pixels end up remapped to the wrong hue. And the scaling problem is still there. -- André Majorel <URL:http://www.teaser.fr/~amajorel/> Do not use this account for regular correspondence. See the URL above for contact information. _______________________________________________ Magick-users mailing list [email protected] http://studio.imagemagick.org/mailman/listinfo/magick-users
