[Tutor] Finding difference in two .gif

Ertl, John john.ertl at fnmoc.navy.mil
Fri Sep 30 16:11:07 CEST 2005


I have two gif images that should be exactly the same...one static and the
other recreated from the same data. For months this has been working great
but yesterday the "new" image that I made was slightly different.  The image
size is 4 bytes different.  When I look at the image side by side I can not
see the difference.  I have very limited image manipulation software and I
was trying to isolate the image difference using PIL but all I get are black
images. I know nothing about how the imaging works so it could be as easy as
reseting the scale but I tried with no luck. 

Does anyone know how to isolate (hopefully small) image differences using

Thank you,

John Ertl

Python 2.4, PIL 1.1.5
The simple code I have tried:

import Image
import ImageChops

file1 = Image.open("/home/PT04_RH.2005072300.gif")

file2 = Image.open("/home/PT04_RH.2005093000.gif")

#diffImage = ImageChops.difference(file1,file2)

diffImage = ImageChops.subtract(file1,file2)


More information about the Tutor mailing list