def remove_borders_from_image(img, fuzz=None):
 fuzz = (tweaks[u'cover_trim_fuzz_value'] if (fuzz is None) else fuzz)
 img = image_from_data(img)
 ans = imageops.remove_borders(img, max(0, fuzz))
 return (ans if (ans.size() != img.size()) else img)

def remove_borders_from_image ( img , fuzz = None ) : fuzz = ( tweaks [ u'cover_trim_fuzz_value' ] if ( fuzz is None ) else fuzz ) img = image_from_data ( img ) ans = imageops . remove_borders ( img , max ( 0 , fuzz ) ) return ( ans if ( ans . size ( ) != img . size ( ) ) else img )
try to auto-detect and remove any borders from the image .