# I need an adjustment layer which will invert in the same way as when you select some text in a text layer

so there are some idiosyncrasies with the method they use to invert that part of the image which I can't figure out. It could be that they just invert the luminosity but I don't know how i would do that in a dynamic way.

• Good question. It is applying different thing for pixels under 50% intensity and 50 over. Maybe its a xor? Jul 10, 2016 at 9:11
• What idiosyncrasies are you talking about? It's mostly just a regular invert
– Cai
Jul 10, 2016 at 10:19
• @Cai n its not if you invert that text layer the brighter parts do different form inversion, in the image supplied most things are under 50% intensity so yes its inverse but the 50% brighter part gets a different treatment. So mostly is 50% of cases but that's hardly close enough. Jul 10, 2016 at 10:29

I have no clue but we can find out by reverse engineering. By applying a text selection on gradient we can see what find of curves layer it would be. So first let us create a linear gradient sideways.

Then apply text layer (filled with white space) on top, text selected select you get:

Image 2: apply text selection on it

Now we are starting to get there, lets visualize this as a curves graph. So we make a second gradient the other way on top of this layer:

Image 3: use this gradient to make the curve transfer stand out

Now for the magic step set this last gradient layer to hard mix and you will see the curve transfer we have more clearly:

Image 4: Set image 3 to hard mix and the curve transfer appears

So its a inverse mostly except fro a small region in the middle of the color range that is not. Now you can go ahead and generate a curve adjustment that matches the graph we have obtained and you should get the same result.

Note: Unfortunately that graph is non-invertible so it destroys data so that it can not be easily retrieved.

### Testing this:

After a painstaking process of writing the lookup values with a binary/hex editor into an amp file, I am ready test finally ready to test this with curves editor.

Image 5 Curves on a black and white layer.

After a bit of tweaking i get exactly the same values as the text layer (i can compare against the original with calculations until results have a 0 pixel difference).

Unfortunately after all this work it wont work on color images, it almost works but the lookup shifts by intensity.There is more going on than a simple curve lookup. So some more work is needed to reverse engineer this thing. Need more color plates, unfortunately this means its possibly hard/impossible to get exactly the same interactively with Photoshop functions without doing a plugin.

It is mostly just a regular invert. It seems there is something else going on in a small range but it's not entirely clear to me what. I'll show some examples:

Regular image:

Image inverted:

Image with a text selection over the entire image:

As you can see, a lot of the image looks the same as the inverted version, and what doesn't looks almost the same as the original. So...

An invert adjustment layer masked to only invert above and below a certain threshold:

This looks almost identical to the text selection, which made me think that is exactly what is happening, only a certain range is being inverted and the rest isn't. But if we take another example:

Regular image:

Image inverted:

Text selection over entire image:

As you can see, it mostly looks inverted again. But there is a mid-range where something else is going on again, only this time it doesn't like like the original.

This is the image inverted and with a text selection over the entire image:

So you can see, it's mostly a regular inversion with something else going on in a certain mid-range. What that something else is I have no idea though.

• mostly regular but not quite Jul 10, 2016 at 10:55