Re: [Tutor] [tutor]Imagechop error
"Varsha Purohit" <[EMAIL PROTECTED]> wrote > AttributeError: 'str' object has no attribute 'load'I am unable > to > understand what is the problem. Can any one help me understand this > imagechop module ?? When posting errors don't just post the last line. Post the whole error message since the stacv trace often contains the most useful data. > file1 = "Nearest.jpg" > file2 = "Bilinear.jpg" > > diff = ImageChops.difference(file1, file2) You are passing file names not files so it may be that you need to pass file objects? But I don't know because I've bnever used ImageChops Alan G. ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor
Re: [Tutor] [tutor]Imagechop error
> Hello everyone, >I am tryin to use the imagechop module but i am not able to > implement it successfully. I want to compare two images and give the > resultant of the image using difference module. i am tryin to save the > resultant image. But i am getting some wierd error. It gives error in the > line where i have used imagechop.difference and the error is > > AttributeError: 'str' object has no attribute 'load'I am unable to > understand what is the problem. Can any one help me understand this > imagechop module ?? I am 80% sure that this means it wants you to load the jpg files first, and then pass in those jpg objects into the difference function. > > import Image > import ImageChops > > file1 = "Nearest.jpg" > file2 = "Bilinear.jpg" > > diff = ImageChops.difference(file1, file2) > > ext = ".jpg" > diff.save("diff" + ext, "JPEG", quality =100) > > -- > Varsha Purohit, > Graduate Student > > ___ > Tutor maillist - Tutor@python.org > http://mail.python.org/mailman/listinfo/tutor > ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor
[Tutor] [tutor]Imagechop error
Hello everyone, I am tryin to use the imagechop module but i am not able to implement it successfully. I want to compare two images and give the resultant of the image using difference module. i am tryin to save the resultant image. But i am getting some wierd error. It gives error in the line where i have used imagechop.difference and the error is AttributeError: 'str' object has no attribute 'load'I am unable to understand what is the problem. Can any one help me understand this imagechop module ?? import Image import ImageChops file1 = "Nearest.jpg" file2 = "Bilinear.jpg" diff = ImageChops.difference(file1, file2) ext = ".jpg" diff.save("diff" + ext, "JPEG", quality =100) -- Varsha Purohit, Graduate Student ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor