Como faço para converter de cores para preto e branco verdadeiro?
If a field has color, I want to convert it to black.
Use o seguinte comando:
convert <input> -negate -threshold 0 -negate <output>
Métodos de pontilhamento de limites
Threshold Images
The simplest method of converting an image into black and white bitmap (to color) image is to use
-threshold
. This is actually a simple mathematical operator that just provides a cut-off value. Anything equal to or below that value becomes black, while anything larger becomes white.
...
If you actually want to convert all non-pure white colors to black, then I recommend that you threshold the negated image instead of trying to work out the right threshold value to use (one less than IM's current 'MaxRGB'), a value that is dependant on your specific IM's compile time in Quality, or 'Q' setting.
convert logo.png -negate -threshold 0 -negate threshold_white.gif