I have several DNG image files, recorded with an LGE Nexus 5X using Open Camera for Android as camera app. For further image processing i converted the DNG files to TIF files using Camera Raw 8 and Photoshop CC 2015. I converted the images without changing any color or exposure settings.

As far as I know the DNG files should be linear, (without gamma correction). My question is whether the converted TIF file is still linear or not. Does Photoshop / Camera Raw make gamma correction for TIF files?

4 Answers 4


When you view the image with a normal image viewer, is it mostly dark? If not, a gamma curve has been applied. That is, does it look like this?

tif no gamma

That's what you'll get with a pure dump of linear values into a 16-bit tiff file. Or, encoded across 8 bits, and demosaiced, and with white-balance adjusted, something like this:

8 bit color

If it looks like that or similar, you are likely seeing a linear image. This is not normally considered very useful, so when RAW files are converted to image formats used for viewing and distribution, they're almost always processed into something with a gamma curve applied for that purpose.

I converted the images without changing any color or exposure settings.

You may not have changed settings from the default, but your RAW conversation software does have defaults which are not "leave input values unchanged".

See What does an unprocessed RAW file look like? for more. If you really want to extract unprocessed data for doing your own processing, look at using dcraw as referenced there.

  • Thank's! To linearize the images i would need to know the gamma value used for the gamma correction. Is there any way to find it out? Mar 5, 2019 at 8:17
  • Why not just use dcraw? Why do you want linear images anyway?
    – mattdm
    Mar 5, 2019 at 14:03
  • The problem is beyond gamma which is just an encoding/decoding method specified by tags written into the tiff file. The actual problem is the tone curve used converting from RAW to tiff and that's unrelated to gamma correction. Worse, it isn't defined, it also affects color chromaticity, and isn't reversible. It appears you want to get what's called a "Scene Referred" image. This is a somewhat specialized area for those that do high end reproduction prints.
    – doug
    Mar 5, 2019 at 18:50
  • 1
    @HansMüller It might be. The CIELAB color space is meant to correspond to human perception; if that's what you mean by "greenness" that might be an appropriate choice. However a) using Photoshop and photographic tools to do this isn't the right choice — you should instead look at dcraw or possibly Matlab, Octave or the like, and you need to really understand the RAW file format and the normal conversion process in order to do something different; b) a consumer camera may not be a good choice for this requirement; and c) this isn't really a photography problem.
    – mattdm
    Mar 6, 2019 at 15:51
  • 1
    I say "not really a photography problem" because the goal is a measurement, not a photograph, and actually the tools and processes used to produce photographs are getting in your way and you want to do something different.
    – mattdm
    Mar 6, 2019 at 16:24

Gamma is not something that has to be "corrected" It's a scaling to accommodate 8 bit images to adjust the values represented by those 8 bits over a larger dynamic range. A RAW file contains the sensor data which is purely linear (or gamma=1). If you convert a raw file to a 16x3 bit image with gamma set to 1.0 it will look the same in a color managed app like Photoshop as converting it to the same colorspace with a gamma=2.2*. But if you convert it to an 8 bit image file it will look the same overall but the darker parts will have significant banding because human vision is much more sensitive to small changes at low light levels than high light levels.

If you use 16 bit images, gamma will make no difference in how they look or print but, by convention, normal colorspaces have gammas varying from 1.8 (ProPhoto) to 3.0 (RGB scaled based on L*). An 8 bit image will look the same no matter what gamma the colorspace has that it's converted into since the gamma will be reversed when the image is displayed or printed.

*As an aside, you can turn a standard RGB profile like ProPhoto RGB into a gamma=1 version using Photoshop by creating a custom profile and setting the gamma=1. I find it useful to do things like resizing images in gamma=1 to reduce aliasing artifacts and moire that can occur with standard gammas.

  • 2
    Gamma absolutely is something to be corrected, and the correct name of the term is "Gamma Correction". See google.com/search?&q=gamma+correction . "Gamma" is the name of the problem to be corrected. We tend to forget about CRT monitors today, but correcting CRT monitors is the purpose of adding gamma correction. Our standards still do it to prevent obsoleting all the worlds old images.
    – WayneF
    Mar 5, 2019 at 16:31
  • @WayneF Using "Correction" implies something that is wrong needs to be made right. This certainly applied back in the day of analog CRTs since, as you point out, cathode ray tubes were intrinsically non linear. Gamma is simply an encoding/decoding technique that specifies how the relative luminance is encoded/decoded but not the luminance. It changes nothing visually. Take an 8 bit sRGB image. It's encoded as a modified, 2.4 gamma. If you change the mode in Photoshop from 8 bits to 32 bits, nothing at all changes visually. But what's the new image's gamma? It's 1.0.
    – doug
    Mar 5, 2019 at 18:19
  • Not correct. Gamma correction obviously and drastically changes the image tones, which is the entire point (to correct for the incorrect non-linear CRT response which is called gamma). There is no clipping due to gamma correction, but brightness DRASTICALLY changes (to correct the CRT response). The 8-16-32 bits is an entirely different concept, not related in any way to gamma correction. Printers also need a big measure of the boosted data, and they know how to deal with it. We should realize that our histograms show gamma data, NOT linear data. (continued next due to length)
    – WayneF
    Mar 5, 2019 at 19:02
  • Photoshop shows gamma 1.0 as meaning still UNCHANGED, RELATIVE to whatever the original gamma was. If the original gamma was 2.2, and you tweak it to 1.2 in Photoshop, then that means 2.2 x 1.2 = gamma 2.64 is the data that the CRT would see. However, LED monitors are linear, and simply know to first decode gamma correction (discarding it so to speak), but the LEDs do a 2.2 decode, the expectation from the sRGB standard. Our eyes only see the linear decode, we never ever see any gamma data. It has been reverse decoded first, either by the CRT response, or by the LED lookup tables.
    – WayneF
    Mar 5, 2019 at 19:02
  • 1
    Take picture of something bright, adjust to reach near histogram 255 (very close, but NOT quite clipped). Then also stop down 1.0 stop for another picture. One stop is 50% of light. Your wrong linear notion would expect to see that peak now at 127 (50% of the 255 previous). BUT IT DOES NOT. It will be near 3/4 full scale. Gamma 2.2 encoding of 50% linear computes 187 or 73%, but camera is also shifting white balance and contrast, etc, so it can't be exactly predicted. BUT SURE AIN'T NEAR 50% LINEAR AS YOU IMAGINE. Histogram data is absolutely encoded with gamma correction. It's all there is.
    – WayneF
    Mar 5, 2019 at 23:10

TIF should have gamma. Any normal and viewable (usable) tonal image includes gamma correction. Tonal includes color (RGB or indexed) and Grayscale, but does not include Line art (bilevel, data is only 1 or 0).

Raw images do not (yet), gamma and white balance is postponed for later processing into RGB. Your TIF file was that later processing.


Short answer: If you're looking at anything more than an almost black blob of nothingness, it's had gamma correction applied.

  • Too dark, but shouldn't be all black. 255 linear encodes to 255 gamma (in this 0..1 scale, 1 to any exponent is still 1. Kinda clever, no clipping due to gamma). That unencoded 255 linear will decode back to 255 when viewed (not dark). 70% linear would be decoded to 135 instead of 179, but still above midpoint. 50% linear encodes to 187 gamma 2.2, but the unencoded 50% decodes to 22% when viewed, or to 55 in histogram. Dark, but not all black, except for the dark tones which really suffer. But there should also be brighter tones, just not fully bright.
    – WayneF
    Mar 6, 2019 at 19:07
  • @WayneF "almost" does not equal "all."
    – Michael C
    Mar 6, 2019 at 21:06
  • Doesn't equal black blob either. :) Using Photoshop Levels to multiply gamma by 0.45 (reciprocal of 2.2) to get 1.0, which is linear, it looks about like any average or typical underexposed photo. More than slight, it is dark, but still looks very correctable, very far from black. Looking at Windows background wallpaper images done that way, some images might not have any black in it. Moot point though, it is unpleasantly darker, and our images are expected to have gamma correction encoded into them.
    – WayneF
    Mar 7, 2019 at 0:05

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.