Change parameter to trim() in comic processing, since the trim function was changed

This commit is contained in:
Kovid Goyal 2013-12-07 12:39:19 +05:30
parent b12cd7ab03
commit 4491fad3d7

View File

@ -50,7 +50,8 @@ def find_pages(dir, sort_on_mtime=False, verbose=False):
for datum in os.walk(dir):
for name in datum[-1]:
path = os.path.join(datum[0], name)
if '__MACOSX' in path: continue
if '__MACOSX' in path:
continue
for ext in extensions:
if path.lower().endswith('.'+ext):
pages.append(path)
@ -67,6 +68,7 @@ def find_pages(dir, sort_on_mtime=False, verbose=False):
return pages
class PageProcessor(list): # {{{
'''
Contains the actual image rendering logic. See :method:`render` and
:method:`process_pages`.
@ -81,7 +83,6 @@ class PageProcessor(list): # {{{
self.rotate = False
self.render()
def render(self):
from calibre.utils.magick import Image
img = Image()
@ -113,9 +114,8 @@ class PageProcessor(list): # {{{
if self.rotate:
wand.rotate(pw, -90)
# 25 percent fuzzy trim?
if not self.opts.disable_trim:
wand.trim(25*65535/100)
wand.trim(10)
wand.set_page(0, 0, 0, 0) # Clear page after trim, like a "+repage"
# Do the Photoshop "Auto Levels" equivalent
if not self.opts.dont_normalize: