mirror of
https://github.com/gryf/ebook-converter.git
synced 2026-04-18 12:03:33 +02:00
Move fit_image to img utils module.
This commit is contained in:
@@ -1,9 +1,4 @@
|
||||
from ebook_converter import fit_image
|
||||
|
||||
|
||||
__license__ = 'GPL v3'
|
||||
__copyright__ = '2009, Kovid Goyal <kovid@kovidgoyal.net>'
|
||||
__docformat__ = 'restructuredtext en'
|
||||
from ebook_converter.utils import img as uimg
|
||||
|
||||
|
||||
class RescaleImages(object):
|
||||
@@ -57,7 +52,9 @@ class RescaleImages(object):
|
||||
except Exception:
|
||||
self.log.exception('Failed to convert image %s from CMYK to RGB' % item.href)
|
||||
|
||||
scaled, new_width, new_height = fit_image(width, height, page_width, page_height)
|
||||
scaled, new_width, new_height = uimg.fit_image(width, height,
|
||||
page_width,
|
||||
page_height)
|
||||
if scaled:
|
||||
new_width = max(1, new_width)
|
||||
new_height = max(1, new_height)
|
||||
|
||||
Reference in New Issue
Block a user