4
\$\begingroup\$

Recently I'm working with various images that need precise gamma correction, eg: scanned pictures that require a gamma shift from 1 to 2.2, it's a common problem around people who works with linear scan files.

Photoshop has the exposure correction layers/adjustments:

Photoshop Exposure Correction Dialog

Lightroom lacks of this option but it has curves:

Lightroom Tone Curve Section in Develop Module

I read around that i can mimic the effect by dragging around the sliders in some way and such.

What I would like is a serious reproducible, numeric (if possible) and precise way to do a gamma correction in lightroom. (basically i would be able to superimpose the file and obtain the same pixel colors I had if the gamma correction was done in photoshop with the exposure adjustment).

Side note: Edit the file in photoshop for the correction and do the edits later in lightroom is not an option. I want to keep the original uncorrected version, aswell as I don't want to store 2 times the file (uncorrected+corrected) because them are huge and it's a waste of memory.

I want to take advantage of the virtual copies of Lightroom and keep together an uncorrected and a gamma corrected version of the image just with the storage of the original uncorrected file and some light lightroom metadata.

\$\endgroup\$
6
  • \$\begingroup\$ Why not write a script to do the job? \$\endgroup\$ Commented Oct 7, 2016 at 18:30
  • \$\begingroup\$ @CountIblis what do you mean with a script? a develop setting to reapply to all images I want? I can do that but the problem is in the first place how precisely and numeric apply the gamma in Lightroom, once I have this, I can create a Develop Settings Preset. \$\endgroup\$ Commented Oct 7, 2016 at 18:51
  • \$\begingroup\$ That's why I use ImageJ, this gives me precise mathematical control over my images, you can write scripts/plugins to automate tasks. Higher end tools such as photoshop, lightroom, GIMP etc. are also useful,. but they may not be easy to use for (precise) low level processing. \$\endgroup\$ Commented Oct 7, 2016 at 21:35
  • \$\begingroup\$ @CountIblis is something that I can use to write my XMP tags and then import them into Lightroom / ACR too or.. is a standalone external program that isn't compatible with them? \$\endgroup\$ Commented Oct 7, 2016 at 21:49
  • \$\begingroup\$ Can Lightroom's Curves filter read Photoshop Curves files? If so, it's fairly easy to generate a PS curves file with the precise gamma you want. (I could even do it for you.) But I don't have Lightroom, so I don't know whether it accepts such files. \$\endgroup\$ Commented Nov 8, 2016 at 5:46

3 Answers 3

2
\$\begingroup\$

One notion.

We know that midpoint of 128 linear data when raised to gamma 2.2 goes to 186, or to about 73%. (0.5^1/2.2)

We know RGB images normally consist of gamma data (histograms show gamma data), but you have gamma 1.0 data that does not. So raising the 50% input point in the Curve Tool straight up from 128 output to 186 output (50% to 73%) ought to convert 1.0 to 2.2.

You probably could work up a formula for any exponent, but this should do 1.0 to 2.2.

EDIT: removed incorrect statement about PS Exposure.

The PS Levels middle slider is gamma too.

EDIT:

Pondering the gamma multiplier a bit, here's a chart of various multipliers:

128 linear (0.5) with gamma 2.2 multiplier of

Mult 0.2x, Exp 0.4, value 53
Mult 0.3x, Exp 0.7, value 89
Mult 0.4x, Exp 0.9, value 116
Mult 0.5x, Exp 1.1, value 136
Mult 0.6x, Exp 1.3, value 151
Mult 0.7x, Exp 1.5, value 163
Mult 0.8x, Exp 1.8, value 172
Mult 0.9x, Exp 2.0, value 180
Mult 1.0x, Exp 2.2, value 186
Mult 1.1x, Exp 2.4, value 191
Mult 1.2x, Exp 2.6, value 196
Mult 1.3x, Exp 2.9, value 200
Mult 1.4x, Exp 3.1, value 204
Mult 1.5x, Exp 3.3, value 207
Mult 1.6x, Exp 3.5, value 209
Mult 1.7x, Exp 3.7, value 212
Mult 1.8x, Exp 4.0, value 214
Mult 1.9x, Exp 4.2, value 216
Mult 2.0x, Exp 4.4, value 218
Mult 2.1x, Exp 4.6, value 219
Mult 2.2x, Exp 4.8, value 221
Mult 2.3x, Exp 5.1, value 222
Mult 2.4x, Exp 5.3, value 224
Mult 2.5x, Exp 5.5, value 225
Mult 2.6x, Exp 5.7, value 226
Mult 2.7x, Exp 5.9, value 227
Mult 2.8x, Exp 6.2, value 228
Mult 2.9x, Exp 6.4, value 229
Mult 3.0x, Exp 6.6, value 230
Mult 3.1x, Exp 6.8, value 230
Mult 3.2x, Exp 7.0, value 231
Mult 3.3x, Exp 7.3, value 232
Mult 3.4x, Exp 7.5, value 232
Mult 3.5x, Exp 7.7, value 233
Mult 3.6x, Exp 7.9, value 234
Mult 3.7x, Exp 8.1, value 234
Mult 3.8x, Exp 8.4, value 235
Mult 3.9x, Exp 8.6, value 235
Mult 4.0x, Exp 8.8, value 236

\$\endgroup\$
5
  • \$\begingroup\$ The curve probably doesn't exactly match a gamma curve, but it will be better than nothing. You could improve it by supplying a point at 64 and 192 in addition to 128. \$\endgroup\$ Commented Dec 8, 2016 at 18:42
  • \$\begingroup\$ Adobe Help says Levels center slider is gamma. It has always been considered to be gamma for years. RGB data is gamma, so not much else it could be. Here, a formula would be the better improvement. :) This is using gamma = 255 * (0.5 ^ (1 / (Multiplier * 2.2))). The 0.5 and even 2.2 could be variables. \$\endgroup\$
    – WayneF
    Commented Dec 8, 2016 at 18:58
  • \$\begingroup\$ I wasn't talking about Levels in Photoshop, I was talking about the Curves in Lightroom. That's what the question is about after all, and I thought that's what your answer indicated too. \$\endgroup\$ Commented Dec 8, 2016 at 19:06
  • \$\begingroup\$ Most histograms, such as those in Adobe products, show RGB values not "gamma" data. RGB values may or may not be gamma encoded. They could be linear, they could be log encoded, piecewise, LUT encoded, etc. Here in Hollywood in the film industry, we commonly work with linear RGB, files are usually 16 bit half float .EXR, or LOG RGB, usually in a 10bit .DPX or 10bit ProRes .MOV \$\endgroup\$
    – Myndex
    Commented Jun 1, 2019 at 8:52
  • \$\begingroup\$ Hollywood may have their own ways, but this forum is about user photography. Yes, histograms of course show RGB data, but histograms in Adobe Photoshop and Lightroom show gamma encoded RGB data, not linear (only because our image data is gamma encoded). TRY THIS: Take a picture with the high end near 255 (but not quite clipped there). Then reduce exposure 1 full stop, which is 50% in linear, but that right end does NOT go to 128 midpoint. It goes to about 3/4 scale (because linear 128 is near 2.2 gamma 186). Other things vary, but histograms shows this gamma data near 3/4 scale, NOT midpoint. \$\endgroup\$
    – WayneF
    Commented Jun 1, 2019 at 15:39
0
\$\begingroup\$

LR may not be the right tool to do mathematically precise modifications like that. Did you consider using ICC profiles? If you want to use ICC profiles to change just the gamma, you can use DispCal to generate them. https://displaycal.net

\$\endgroup\$
0
\$\begingroup\$

USING A DOUGH BEE

Does Lightroom still not have LEVELS ??? Because if it did I'd say simply slide the gamma in LEVELS to 2.2

Alternately you can edit ONE image in Photoshop as a SmartObject (from Lightroom), and then the adjustment will appear/apply to that image back in Lightroom, then you can SYNC that version with the rest of the images in Lightroom to apply the gamma.

USING ICC PROFILES

If you don't have Photoslop, then you should be able to just assign a LINEAR profile to your scans, and lightroom should recognize those ICC profiles. Then when you export, chosing an sRGB profile will apply the gamma curve for sRGB.

For some linear profiles see Elle's ICC profiles (The ones marked 1.0 are linear.)

This is a linear profile with sRGB primaries

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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