Is there a straightforward way to trim off the borders of an image, using PIL?<br><br>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&#39;s edges until it reaches a portion of the image that doesn&#39;t match the border color.&nbsp; (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.)<br>
<br>I see that there&#39;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.<br><br>Thanks for the help.<br>
<br>-- <br>Matt Howell