Andre Majorel on  wrote...
| 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.
| > |=20
| > | 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.
| > |=20
| > | 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.
| > |=20
| > | 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.
| > |=20
| > | 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.
| > |=20
| > | 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.
| 
You can just turn off dithering  using  +dither.
In that case -map will just set colors to the closest color found in
the given color map image.

See IM Examples  Quantization and Dithering.

  Anthony Thyssen ( System Programmer )    <[EMAIL PROTECTED]>
 -----------------------------------------------------------------------------
        Here dragon, Stupid Dragon, have a cookie...
                                   -- Visitor to Anthony's Castle
 -----------------------------------------------------------------------------
     Anthony's Home is his Castle     http://www.cit.gu.edu.au/~anthony/
_______________________________________________
Magick-users mailing list
[email protected]
http://studio.imagemagick.org/mailman/listinfo/magick-users

Reply via email to