Re: PIL: Getting a two color difference between images

2008-10-27 Thread Kevin D . Smith
On 2008-10-25 12:41:51 -0500, [EMAIL PROTECTED] said: Kevin D. Smith: What I want is a two color output image: black where the image wasn't different, and white where it was different.< There are several ways to do that. If speed isn't essential, then you can create a third blank image of the

Re: PIL: Getting a two color difference between images

2008-10-25 Thread Lie Ryan
> Kevin D. Smith: >> What I want is a two color output image: black where the image wasn't >> different, and white where it was different.< Use the ImageChops.difference, which would give a difference image. Then map all colors to white except black using Image.point() -- http://mail.python.org

Re: PIL: Getting a two color difference between images

2008-10-25 Thread bearophileHUGS
Kevin D. Smith: > What I want is a two color output image: black where the image wasn't > different, and white where it was different.< There are several ways to do that. If speed isn't essential, then you can create a third blank image of the right size, and then use the method that iterates on

Re: PIL: Getting a two color difference between images

2008-10-25 Thread Lie Ryan
On Fri, 24 Oct 2008 14:51:07 -0500, Kevin D. Smith wrote: > I'm trying to get the difference of two images using PIL. The > ImageChops.difference function does almost what I want, but it takes the > absolute value of the pixel difference. What I want is a two color > output image: black where th

PIL: Getting a two color difference between images

2008-10-24 Thread Kevin D . Smith
I'm trying to get the difference of two images using PIL. The ImageChops.difference function does almost what I want, but it takes the absolute value of the pixel difference. What I want is a two color output image: black where the image wasn't different, and white where it was different. Ri