How to convert an image to grayscale using ImageMagick 2

Posted by Runar Svendsen on October 07, 2008

This is something I do just too rarely to remember the syntax, so I decided to write it down. Here it is:

To convert an image from color to grayscale (and save the result to a different file), type the following curse:

convert image1.jpg -colorspace Gray image1_grayscale.jpg

If you just want to overwrite the original image, use this command instead (thanks CableCat for the tip):

mogrify -modulate 100,0,50 image1.jpg

Trackbacks

Use this link to trackback from your own site.

Comments

Leave a response

  1. CableCat Sun, 09 Nov 2008 00:32:31 PST

    The above does not work, this does:

    mogrify -modulate 100,0,50 image.jpg

  2. runars Mon, 10 Nov 2008 17:06:41 PST

    Thanks, I have updated the post with the correct syntax.

Comments