Page 1 of 1

What's the gamma of my JPEG file?

Posted: 2012-07-06T04:50:55-07:00
by splee
I have a scanned image (grayscale) and I want to find out the gamma correction value. I read from the ImageMagicK webpage that:
"When processing an image, be aware of the colorspace. Many image processing algorithms assume a linear RGB colorspace. Although you may get satisfactory results processing in the sRGB colorspace, you may get improved results in linear RGB (essentially sRGB with the gamma function removed)."

What does it mean?
I use "identify -verbose myfile.jpg" and it tells me the colorspace is RGB

Basically, I want to:
- find out the gamma-correction value of my JPEG file, and then
- remove the gamma correction


How to do this? Please help.

Re: What's the gamma of my JPEG file?

Posted: 2012-07-08T17:41:28-07:00
by anthony
Make sure your IM is up to date.

IM v6.7.5 saw IM correctly identify "sRGB" as meaning non-linear RGB, and "RGB" meaning linear RGB.
Before this version the two were swapped.

Note sRGB is not simply RGB with a 'perceptual' gamma correction, though it is close to a linear RGB with a 2.2 gamma correction applied.

See IM Examples, Human Color Perception
http://www.imagemagick.org/Usage/color_ ... perception

And Resize with Colorspace Correction Example (including the 'old example' with a 'red line' indentation)
http://www.imagemagick.org/Usage/resize ... colorspace