[preview] Apply EXIF rotation

This commit is contained in:
Daniel Brötzmann
2020-12-17 17:08:38 +01:00
parent 7fbef8fad2
commit 9ba27bb47a

View File

@@ -182,6 +182,7 @@ def create_thumbnail_with_pil(data, size):
image.thumbnail((size, size))
image.save(output_file,
format=image.format,
exif=image.info.get('exif', b''),
optimize=True)
bytes_ = output_file.getvalue()
@@ -232,7 +233,7 @@ def pixbuf_from_data(data):
input_file.close()
return pixbuf
return loader.get_pixbuf()
return loader.get_pixbuf().apply_embedded_orientation()
def parse_fragment(fragment):