Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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

1 Answer 1

up vote 2 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

 
discard

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.