How to separate effects of merged layers after the fact if I have one of the layers?

I've been trying to figure this out for a while but can't seem to, so I'm asking here.

Imagine I have an original image, like for instance this one:

Then I mess with it a bit, add some tinting, add some clouds, and get this image at the end:

However, suppose I lost the history of the changes I made, so that at the end all I have is these two images and nothing else.

Is it possible to do something that will recover a layer that basically "applies the same changes" to the original image? That is, something like an image that is equivalent to applying a hue/saturation to every pixel of the original image that gets the new image?

Of course I can't recover anything that was "background", I won't be able to figure out what's "behind" Thanatos in the second image, but I'd like to at least have some way to regenerate the "mist" and the "tinting" that are in front of/on top of Thanatos so that I can generate the green tint and misty effects on him starting from the original image again. I had hoped that messing around with difference or subtraction layers and all that jazz would help, but no dice so far.

Clarification edit:

In principle, if I have an origin pixel with colour (R1, G1, B1) and a target pixel with colour (R2, G2, B2), there exists a unique tuple (x, y, z) such that (R2, G2, B2) = (R1, G1, B1) + (x, y, z), right? So what I'd like is a layer that has (x, y, z) for every pixel of the original image plus some way to combine the original layer with this new layer to obtain the final layer.

(And of course (x, y, z) would need to be mod 255 and so would the sum, since negative colour pixels don't exist.)

Of course if you include an alpha there the answer is no longer unique, right, since (x, y, z, 1) is the same as (2x, 2y, 2z, 0.5) in terms of what it adds to the original layer? As I understand it? But I'm fine with assuming alpha = 1 everywhere (and giving the original image a black background if that's necessary) to make the answer unique.

• I'm unsure if it's an exact duplicate, but isn't your question basically the same as this? And this more recent question which was closed as a duplicate of the first? In other words: I don't think it's possible. đź¤·â€Ťâ™‚ď¸Ź May 9, 2022 at 20:01
• ermmm... clouds filter and a mask... or clouds filter on a mask. May 9, 2022 at 20:18
• @Wolff yeah i saw both of those questions but they don't really answer the same thing i think? the more recent one is not what i want because like i said i don't actually care about the "background" parts, and the other one says it's impossible to restore layers if the alpha channel is not 0 or 1 but that's not an issue in principle, if i have an original pixel with some (R1, G1, B1) and a target pixel with some (R2, G2, B2), there is a unique tuple (x, y, z) such that (R2, G2, B2) = (R1, G1, B1) + (x, y, z). I want a layer that has (x, y, z) for every pixel in the original image
– Red
May 9, 2022 at 20:39
• @Pedro, you say yourself that there is only a unique answer if we assume alpha = 1. But the pixels of the green cloud covering the character must have many different opacities. Also see this question. If you have an image which is a blend of a background image and a top image with some alpha, you can recreate the top image if you can guess the alpha. But if all pixels have different alphas I don't think it's possible without some AI. Check out my JSFiddle which automates "unblending". May 9, 2022 at 21:20
• Do realise that the example image you are using is copyrighted, and anything you post on here is automatically released in CC BY-SA 4.0. You may want to remove this image and give another example. May 10, 2022 at 9:47