Mobile app version of vmapp.org
Login or Join
Angela777

: 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

@Angela777

Posted in: #AdobePhotoshop #LayerStyle #PhotoshopEffects

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.

10.02% popularity Vote Up Vote Down


Login to follow query

More posts by @Angela777

2 Comments

Sorted by latest first Latest Oldest Best

 

@Yeniel278

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.



Image 1: start with this gradient

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.

10% popularity Vote Up Vote Down


 

@Nimeshi706

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.

10% popularity Vote Up Vote Down


Back to top | Use Dark Theme