So, I have this image, which has a filter applied: nothing fancy, it's just a reduction of blue intensity and maybe some temperature raise (I took a screenshot with Twilight enabled on my phone). If I have two identical images, one with the filter and one without, can I generate the curves' difference, and apply the filter backwards? How? I have Photoshop CS6 (and GIMP).
I know some quality is going to be lost, and I can probably do it by hand. I was wondering if there is a cleaner way to do it, and catch the opportunity to learn something useful.