reduce scanned image to black/red/white
Posted: 2007-09-02T11:09:13-07:00
I'd like to color reduce TIF images which contain scans of black text on white paper, with red proof read annotations. I thought that a custom color map with three colors #000000, #ffffff, and #ff0000 would be best, with pixels mapped to their nearest neighbor.
I tried
where colormap.gif is a GIF file with the above three color map.
However I feel that there might be easier solutions. How can I specify this easy color map directly on the command line without the need of a dummy colormap.gif file?
Option 'posterize 2' alone yields green and blue and yellow artefacts at the border of black characters.
I tried
Code: Select all
mogrify +dither -posterize 2 -map colormap.gif -format png *.tif
However I feel that there might be easier solutions. How can I specify this easy color map directly on the command line without the need of a dummy colormap.gif file?
Option 'posterize 2' alone yields green and blue and yellow artefacts at the border of black characters.