Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Image conversion to Grayscale using ImageMagick is very dark

I converted a bunch of "normal" JPG photos via

convert infile -colorspace Gray outfile

to monochrome. However the result is for all images very dark. Here a sample conversion: original photo and converted monochrome image.

Is there a better way to convert a photo-realistic image with ImageMagick to gray-scale?

like image 968
halloleo Avatar asked Mar 14 '13 01:03

halloleo


1 Answers

The documentation states that when changing the color space, the colors are converted from their original gamma to linear before the conversion. You need to convert them back to an appropriate gamma.

convert infile -colorspace Gray -gamma 2.2 outfile
like image 133
Mark Ransom Avatar answered Oct 18 '22 05:10

Mark Ransom