diff --git a/mangle/image.py b/mangle/image.py index b9ba9e5..431afab 100644 --- a/mangle/image.py +++ b/mangle/image.py @@ -16,7 +16,7 @@ import os -from PIL import Image, ImageDraw, ImageStat, ImageChops +from PIL import Image, ImageDraw, ImageStat, ImageChops, ImageOps class ImageFlags: @@ -135,9 +135,7 @@ def quantizeImage(image, palette): @protect_bad_image def stretchImage(image, size): - widthDev, heightDev = size - - return image.resize((widthDev, heightDev), Image.ANTIALIAS) + return ImageOps.fit(image, size, Image.ANTIALIAS) @protect_bad_image diff --git a/mangle/ui/options.ui b/mangle/ui/options.ui index dded245..d82b049 100644 --- a/mangle/ui/options.ui +++ b/mangle/ui/options.ui @@ -217,7 +217,7 @@ - Stretch images to fill the screen + Scale and crop images to fill the screen