Sunday, January 15, 2017

adobe photoshop - 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.


text layer



Answer



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.


enter image description here


Image 1: start with this gradient


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


enter image description here


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:



enter image description here


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:


enter image description here


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.



enter image description here


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.


No comments:

Post a Comment

technique - How credible is wikipedia?

I understand that this question relates more to wikipedia than it does writing but... If I was going to use wikipedia for a source for a res...