mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Fix passing data into remove_image_borders() not working
This commit is contained in:
parent
2c41c0f472
commit
3e686018d3
@ -250,7 +250,8 @@ def remove_borders_from_image(img, fuzz=None):
|
|||||||
what colors are considered identical (must be a number between 0 and 255 in
|
what colors are considered identical (must be a number between 0 and 255 in
|
||||||
absolute intensity units). Default is from a tweak whose default value is 10. '''
|
absolute intensity units). Default is from a tweak whose default value is 10. '''
|
||||||
fuzz = tweaks['cover_trim_fuzz_value'] if fuzz is None else fuzz
|
fuzz = tweaks['cover_trim_fuzz_value'] if fuzz is None else fuzz
|
||||||
ans = imageops.remove_borders(image_from_data(img), max(0, fuzz))
|
img = image_from_data(img)
|
||||||
|
ans = imageops.remove_borders(img, max(0, fuzz))
|
||||||
return ans if ans.size() != img.size() else img
|
return ans if ans.size() != img.size() else img
|
||||||
# }}}
|
# }}}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user