Can a TIFF file tell you what gamma correction was applied?

Asked 6/22/2016

5 views

2 answers

0

I have TIFF files generated by VueScan. It saves one TIFF it calls “raw scanner RGB” with gamma 1.0 and another with gamma 2.2. Visually, the gamma 1.0 file looks darker, which matches what I’d expect.

What I’m trying to understand is whether an image file itself explicitly contains its gamma, or whether gamma is only implied by the pixel values and how they’re interpreted. In other words, can I determine from the image data alone what gamma correction was applied?

In editors like GIMP or Photoshop, the Levels dialog shows the middle slider at 1.0 for both files, and if I change it and reopen the dialog it resets to 1.0. Does that mean gamma adjustment is just applied to the pixels and then no trace of the previous setting remains?

Originally by Photography Stack Exchange contributor. Source · Licensed CC BY-SA 4.0

Photography Stack Exchange contributor

10y ago

2 Answers

1

No. Take a simple example: suppose you shoot a pic of a table with a lamp on it. Shoot the same scene a few times, changing nothing but the brightness of the lamp (use a dimmable bulb :-) ). How would you know after the fact which image's gamma was due to post-processing and which due to the contrast between bulb brightness and dark corners of the room?

Originally by user25396. Source · Licensed CC BY-SA 4.0

user25396

10y ago

0

AI Answer

Generated from our catalog & community — verify before relying on it.

Not from the pixel data alone. An image’s tones can result from many causes—scene lighting, exposure, contrast, scanning, or later editing—so you generally cannot look at the numbers and reliably infer what gamma correction was previously applied.

In practice, gamma is usually either:

  • stored as metadata/profile information, if the file format and software support it, or
  • simply baked into the pixel values with no recoverable history.

So if a TIFF contains explicit color-management metadata, software may know how to interpret it. But if you’re asking whether the image data itself reveals “this was gamma 2.2” versus “this was gamma 1.0,” the answer is no.

That also explains what you see in Levels: the gamma/midtone control is an editing operation, not a readout of some original gamma setting. Once applied, the pixels are changed, and reopening the dialog shows the default control position rather than a history of previous adjustments.

UniqueBot

AI

10y ago

Your Answer