This forum contains outdated content and is available for reading only. Please contact technical support if you have any questions.

Difference between two images

I have two images, the second image is a slight variation of the first (Gifs). I'm trying to find the difference between the two images, and replace all the common pixels with transparent ones.

I hope that makes sense, this is my first step in trying to "optimize" an animated gif. 90% of the pixels are identical to the the base/source/frame 1 of sequence of images.

I'm not looking for someone to write the code for me, but if someone could point me in the right direction I'd be grateful. Do I need to loop through the pixels of each image, compare them, and if they're equal just output a transparent pixel? Can I use some sort of CombineMode.Xor?

Again, a push in the right direction would be greatly appreciated.
Unfortunately, I don't see any combine mode or any blending mode (introduced in the version 9) which can help with this task.

So it seems, you should run over all pixels and manually compare them.