Thumbnail-method for both photo and video.

This commit is contained in:
Joachim Tingvold 2015-05-05 00:08:37 +02:00
parent 80bb5258d6
commit ff7e540eb8

View File

@ -296,8 +296,11 @@ class Photo(object):
elif self._orientation == 8: elif self._orientation == 8:
# Rotation 90 # Rotation 90
mirror = image.transpose(Image.ROTATE_90) mirror = image.transpose(Image.ROTATE_90)
image = mirror image = mirror
self._thumbnail(image, original_path, thumb_path, original_path, size, square)
def _thumbnail(image, original_path, thumb_path, original_path, size, square):
thumb_path = os.path.join(thumb_path, image_cache(self._path, size, square)) thumb_path = os.path.join(thumb_path, image_cache(self._path, size, square))
info_string = "%s -> %spx" % (os.path.basename(original_path), str(size)) info_string = "%s -> %spx" % (os.path.basename(original_path), str(size))
if square: if square: