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 do I convert a image on from grayscale to black and while (1-bit palette) using command line tools?

My new scanner only scan color or grayscale, and not "lineart", so I'm finding my self open gimp and selecting "Image -> Mode -> Indexed" and then "Use black and white (1-bit) palette" on quite a lot of images.

So I'm searching for a command line tool that can do this without any gui.

There seems to be some support in gimp itself to do this

gimp-console --batch=<command>

But I'm not sure how to use this "gimp-console".

Thanks Johan

Note: I am using Ubuntu

share|improve this question
up vote 3 down vote accepted

Try ImageMagick:

convert input.png -monochrome output.png

It has plenty of options to further adjust output.

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.