-verbose gives same gamma value regardless of image

Questions and postings pertaining to the usage of ImageMagick regardless of the interface. This includes the command-line utilities, as well as the C and C++ APIs. Usage questions are like "How do I use ImageMagick to create drop shadows?".
Post Reply
Name
Posts: 2
Joined: 2014-12-08T10:58:16-07:00
Authentication code: 6789

-verbose gives same gamma value regardless of image

Post by Name »

I have adjusted the gamma of some images, and to check that I had done it correctly, I decided to check the gamma of the converted image using the identify -verbose command. The problem is that however I adjust the gamma, the -verbose command gives a gamma value of 0.454545 for the converted picture.

For example:

convert test_picture.jpg -gamma 2.0 converted_2_0.jpg

and

convert test_picture2.jpg -gamma 0.5 converted_0_5.jpg

will give two different images, one lighter than the other, like expected. However, running a identify -verbose "image" command on either image will give the same value for gamma. 0.454545 for both converted_2_0.jpg and for converted_0_5.jpg.

Does this mean I did something wrong in my gamma correction? Or is there an error with the value given by -verbose?
snibgo
Posts: 12159
Joined: 2010-01-23T23:01:33-07:00
Authentication code: 1151
Location: England, UK

Re: -verbose gives same gamma value regardless of image

Post by snibgo »

The "-gamma" operator changes pixel values. "gamma" reported by "identify" is the gamma-shift that display software and hardware should apply to the image so it shows the correct tones. This value is either 0.454545 (=1/2.2) or 1.0.

In current versions of IM, the "-gamma" command doesn't modify the gamma setting.
snibgo's IM pages: im.snibgo.com
Name
Posts: 2
Joined: 2014-12-08T10:58:16-07:00
Authentication code: 6789

Re: -verbose gives same gamma value regardless of image

Post by Name »

Thanks for quick answer!

That makes sense.
Post Reply