[Tutor] Finding difference in two .gif
Ertl, John
john.ertl at fnmoc.navy.mil
Fri Sep 30 17:50:52 CEST 2005
All,
Well I found the answer...getbox() gave me the bounding box and then I could
just plot that portion of the two images.
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")
diffbox = ImageChops.difference(file1,file2).getbbox()
diffImage = file1.crop(diffbox)
diffImage.save("diffOut.gif")
_______________________________________________
Tutor maillist - Tutor at python.org
http://mail.python.org/mailman/listinfo/tutor
More information about the Tutor
mailing list