building images differences to get back to the original?
Posted: 2012-12-27T17:59:54-07:00
Hello to the Experts,
I have 1 image and a 2nd image and I´d like to build the difference between them as a 3rd image. After that I want to merge the 2nd and the 3rd image, and the result should give back EXACTLY the first image. This sounds easy but by using GIMP (2 layers and the modes subtraction/addition) the result does NOT match, because there´s simply a cut off (non-carrying) if the difference gets negative.
What I´d need is some kind of composite/compose magick that would roll-over negative values (e.g. dec. 5 - 10 = 250). I could also separate all images into three images (R,G,B) for the sake of having only values between 0 and 255, to make the calculating process easier. For getting back to the 1st image, there would also be the need for hopping over 255 and not cutting off there (e.g. dec. 240 + 25 = 10).
Does anyone know a solution to that problem, or does Image Magick behave different to GIMPs calculation?
Many thanks in advance & best regards!!
Didi
I have 1 image and a 2nd image and I´d like to build the difference between them as a 3rd image. After that I want to merge the 2nd and the 3rd image, and the result should give back EXACTLY the first image. This sounds easy but by using GIMP (2 layers and the modes subtraction/addition) the result does NOT match, because there´s simply a cut off (non-carrying) if the difference gets negative.
What I´d need is some kind of composite/compose magick that would roll-over negative values (e.g. dec. 5 - 10 = 250). I could also separate all images into three images (R,G,B) for the sake of having only values between 0 and 255, to make the calculating process easier. For getting back to the 1st image, there would also be the need for hopping over 255 and not cutting off there (e.g. dec. 240 + 25 = 10).
Does anyone know a solution to that problem, or does Image Magick behave different to GIMPs calculation?
Many thanks in advance & best regards!!
Didi