Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 7 years ago.
How can I use sips
, imagemagic
, or another tool to convert an image to black and white (grayscale) via the command line?
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 7 years ago.
How can I use sips
, imagemagic
, or another tool to convert an image to black and white (grayscale) via the command line?
If you have imagemagick
installed,
convert source.jpg -colorspace Gray destination.jpg (true grayscale only)
convert source.jpg -monochrome destination.jpg (true black and white)
convert source.jpg -separate destination.jpg (separate into gray channels)
If you don't care about losing the original file: mogrify -colorspace Gray file
.
use one of: -monochrome
or -colorspace gray
options for imagemagick
(convert
).