Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

How can I convert a JPEG photo to black and white (not grayscale) image like output of a FAX scanner, by ImageMagick?

share|improve this question
up vote 4 down vote accepted

According to this forum post:

However, if you want two colors only (black and white), then you need to threshold. For example, to select the color where above will be white and below will be black.

convert <input> -threshold xx% <output>

where xx is in range 0-100 (for percent).

share|improve this answer

Dithering is clearer and more fax-like than a threshold cutoff:

convert <input> -monochrome <output>

For a less contrasty but more information-preserving kind of dithering, use:

convert <input> -remap pattern:gray50 <output>


share|improve this answer
Note that if the output looks low-quality, you may need to set the density higher using the flag -density 150 (the 150 is a dpi value) – David Fraser Dec 22 '15 at 15:22

According to this answer here:

If you have imagemagick installed:

true grayscale only:

convert source.jpg -colorspace Gray destination.jpg

true black and white:

convert source.jpg -monochrome destination.jpg

separate into gray channels:

convert source.jpg -separate destination.jpg

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.