# Photoshop: Invert curves - Why doesn't it work?

• Question
• Updated 6 years ago
• (Edited)
It's easy, I add a curve adjustment layer and add a knot with input 120 output 150.
Now the values at 120 will be 150 and values around adapted to it

Now I do the reverse, add on top another curve adjustment layer, input 150 output 120. This should undo the aforementioned process yet result is very different from original, and I'm not talking about quantization, the actual algorithm differs (knots tension)

• 26 Posts
• frustrated

Posted 6 years ago

• 20280 Posts
First, those curves don't look remotely like the inverse of one another.

Second, you're dealing with spline interpolation of the points, and it won't be exact except for the points you set.

Third, yeah, quantization is going to make it impossible to get an exact inverse.
• 26 Posts
First, those curves don't look remotely like the inverse of one another.

Yes I know, that's what I'm asking.

I can accept small deviations due to in-range clipping or quantization, but not a random interpretation of an algorithm.

It's easy please test yourself, do a process.

Curve layer input:195 output:245 you get a nice curve
Curve layer input:245 output:195 totally different (straight down), despite the knot placement is exactly the same as above, just in another axis.

That's the concept right?
• 20280 Posts
No, the curves you show do not look like inverses, due to the points you entered.

There is nothing random, just spline interpolation of the points you enter.

Yes, entering a few points may result in different curves because it is interpolated as splines -- the splines do not necessarily invert. To behave as you seem to be requesting, Photoshop would have to calculate the inverse itself, or use linear interpolation to avoid the splines.
• 26 Posts
And what's the point of using splines?
What logical thinking should I take to make inverting a curve more predictable?

Just an example, what's the inverse of the curve described by the point x: 100 y:150?
In this case is there a one knot solution to inverse the curve using a function (for the calculation) or something?

christoph pfaffenbichler, Champion

• 1234 Posts
»What logical thinking should I take to make inverting a curve more predictable?«
May I ask why you need to invert the Curve in the first place?
• 26 Posts
Many reasons, the proper answer should be "why not?"
In this case I just had a mistake cloning out dust on a layer over an underexposed curve adjustment layer (to see artifacts better), where it should have been below the adjustment layer, or with the "ignore adj layers" option turn on.
Normally I'd like to invert curves as a manual profile substitution.

christoph pfaffenbichler, Champion

• 1234 Posts
I can certainly see how such touch up Layer mix ups can happen; I guess somebody with better math-skills than me might be able to use the »Draw to modify the curve«-mode to create a »point-by-point«-inverted version of a Curve via a Script.

In any case I guess your original assumption was identical directional behaviour of x- and y-axis changes (basically the 45 ̊ angle working like a mirror axis) – an assumption that you have disproved with your example.

For many of us Photoshop-users Curves have been a useful tool for our whole (or at least considerable parts of our) professional careers – so I guess we are accustomed to their behaviour and don’t expect it to be different.
• 26 Posts
Please, can someone explain me why doesn't it work?
• 20280 Posts
• 26 Posts
Yes, from a technical point of view ("we used splines")
but not from a power user point of view.

Please explain us what is so good about using splines that it's better than switching to linear or cubic interpolation and do all the stuff we imagine.

No complaining, just trying to take something positive from the discussion and not a plain "NO".
• 20280 Posts
The splines don't reflect, and won't give a mathematically inverted curve (especially with only 2 points specified).

Splines are cubic interpolation, and give smooth curves based on a few control points.

Linear interpolation of the points would give you invertible lines, but would not be smooth (not useful for most imaging).

To get a perfectly inverted curve you'd probably have to write code to create the curves, or use the freehand (pencil) mode and draw lines yourself.
• 26 Posts