diff --git a/mangle/image.py b/mangle/image.py index 2fe18b4..5fd7e38 100644 --- a/mangle/image.py +++ b/mangle/image.py @@ -135,6 +135,16 @@ def quantizeImage(image, palette): @protect_bad_image def scaleCropImage(image, size): + widthDev, heightDev = size + widthImg, heightImg = image.size + + imgRatio = float(widthImg) / float(heightImg) + devRatio = float(widthDev) / float(heightDev) + + # don't crop 2 page spreads. + if imgRatio > devRatio: + return resizeImage(image, size) + return ImageOps.fit(image, size, Image.ANTIALIAS) diff --git a/mangle/ui/options.ui b/mangle/ui/options.ui index 29cedbb..08cc082 100644 --- a/mangle/ui/options.ui +++ b/mangle/ui/options.ui @@ -217,7 +217,7 @@ - Scale and crop images to fill the screen + Scale and crop images to fill screen width