[preview] Apply EXIF rotation
This commit is contained in:
@@ -182,6 +182,7 @@ def create_thumbnail_with_pil(data, size):
|
|||||||
image.thumbnail((size, size))
|
image.thumbnail((size, size))
|
||||||
image.save(output_file,
|
image.save(output_file,
|
||||||
format=image.format,
|
format=image.format,
|
||||||
|
exif=image.info.get('exif', b''),
|
||||||
optimize=True)
|
optimize=True)
|
||||||
|
|
||||||
bytes_ = output_file.getvalue()
|
bytes_ = output_file.getvalue()
|
||||||
@@ -232,7 +233,7 @@ def pixbuf_from_data(data):
|
|||||||
input_file.close()
|
input_file.close()
|
||||||
return pixbuf
|
return pixbuf
|
||||||
|
|
||||||
return loader.get_pixbuf()
|
return loader.get_pixbuf().apply_embedded_orientation()
|
||||||
|
|
||||||
|
|
||||||
def parse_fragment(fragment):
|
def parse_fragment(fragment):
|
||||||
|
|||||||
Reference in New Issue
Block a user