Let image1
be:
And RGBA mask
be:
(45, 78, 251, 102)
Apply mask
on top of image1
to get image2
:
Now I need to do the reverse thing, given image1
and image2
, is there a formula or an algorithm (there has to be right?) to find the mask
?
Thanks in advance, first post in here I might lack vocabulary I'm sorry about that, my tags might be completely off.
EDIT: i program in Java. I get image2 by drawing image1 on some Windows native frame using Graphics#drawImage and then drawing the filter made of (45, 78, 251, 102) RGBA pixels on top of that image using the same function.