Is there a straightforward way to trim off the borders of an image, using PIL?
ImageMagick has a similar function called trim(), that looks at the 4 corner-pixels of the image, figures out what color the border is, and then trims out rows and columns from the image's edges until it reaches a portion of the image that doesn't match the border color. (I believe the function also has a variable tolerance setting, where you can specify a range of color where the matched border color would be considered to be a part of the border.) I see that there's a crop() function in PIL, but as you can see, the key to the trim() function is that the library automatically figures out where the border is and crops the image accordingly. Thanks for the help. -- Matt Howell
_______________________________________________ Image-SIG maillist - Image-SIG@python.org http://mail.python.org/mailman/listinfo/image-sig