Skip to content
Permalink
Browse files
Copy EXIF data to resized images (fix #2204)
  • Loading branch information
ralsina committed Jan 4, 2016
1 parent 1b620db commit d31e8e6345b2e57848d93de7a4145426c0b3152c
Showing with 6 additions and 1 deletion.
  1. +2 −0 CHANGES.txt
  2. +4 −1 nikola/image_processing.py
@@ -14,6 +14,8 @@ Features
Bugfixes
--------

* Preserve EXIF data when resizing images (Issue #2204)

New in v7.7.4
=============

@@ -84,7 +84,10 @@ def resize_image(self, src, dst, max_size, bigger_panoramas=True):
break
try:
im.thumbnail(size, Image.ANTIALIAS)
im.save(dst)
if exif is not None:
im.save(dst, exif=exif)
else:
im.save(dst)
except Exception as e:
self.logger.warn("Can't thumbnail {0}, using original "
"image as thumbnail ({1})".format(src, e))

0 comments on commit d31e8e6

Please sign in to comment.