Convert an Image to Grayscale with ImageMagick

By  on  
Grayscale Logo

A few years ago I bought a DSLR camera with a bunch of filter effects built in and it's been worth every penny.  I took some incredible photos in London, Paris, and Jamaica, and tooks some really special photos of my son during his first few years.  And many of my favorite photos were taken with grayscale filter but some I took in color and badly wanted them in grayscale.  Of course I can use Photoshop to convert the image to grayscale but that's too much work.  I have ImageMagick -- why not use the shell to very quickly convert it to grayscale?

Converting the image to grayscale with ImageMagick is simple:

convert my-image.jpg -colorspace Gray my-image-gray.jpg

The command is self-explanatory and executes in milliseconds.  And since Photoshop takes a few seconds to start and I have to do the work manually, ImageMagick makes everything so much easier.

Recent Features

Incredible Demos

  • By
    Create Custom Events in MooTools 1.2

    Javascript has a number of native events like "mouseover," "mouseout", "click", and so on. What if you want to create your own events though? Creating events using MooTools is as easy as it gets. The MooTools JavaScript What's great about creating custom events in MooTools is...

  • By
    MooTools Gone Wild: Element Flashing

    If you're like me and lay awake in bed at night, you've flipped on the TV and seen the commercials: misguided, attention-starved college girls fueled by alcohol ruining their futures by flashing lame camera-men on Spring Break. Why do they do it? Attention...

Discussion

  1. MaxArt

    How about sepia tones? After all, it’s just like converting to grayscale with a different balance of red, green and blue.

Wrap your code in <pre class="{language}"></pre> tags, link to a GitHub gist, JSFiddle fiddle, or CodePen pen to embed!