'How create a difference mask between two images and then superimpose that mask over another image

I have two textures in dds format, one original and the other with different colors (changed brightness, color saturation etc). Unfortunately, I don't know the color settings in this other texture altered so that I can transfer them to another similar dds texture. I would like to compare these two textures, the original and the changed one, and draw a difference from them, creating the so-called the mask. Then apply this mask to another texture with the same dimensions as the original but the wrong colors. So as to get the same color saturation, brightness, etc. as in the changed image. I tried to do this with compressonator. I managed to get a difference, but I can't combine my image with the difference to get the same effect as in the changed image.

Below I am adding a link to the original modified textures and the difference that I was able to extract from them, I would like to get the same effect as on the changed texture after applying the difference to the original

https://mega.nz/folder/G5AXjSAB#7NXZ0CVMJTs4mo0YgKwy3g

Thanks for help



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source