From 1bbffb49649fe3700631730735f400d2f2f2270a Mon Sep 17 00:00:00 2001 From: Ethan Dalool Date: Sun, 6 Jun 2021 20:33:32 -0700 Subject: [PATCH] Update rotate_by_exif call. --- rejpg.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/rejpg.py b/rejpg.py index 461da5a..4eb1330 100644 --- a/rejpg.py +++ b/rejpg.py @@ -29,9 +29,9 @@ def rejpg_argparse(args): bytesio = io.BytesIO() image = PIL.Image.open(filename) - image = imagetools.rotate_by_exif(image) + (image, exif) = imagetools.rotate_by_exif(image) - image.save(bytesio, format='jpeg', exif=image.info.get('exif', b''), quality=args.quality) + image.save(bytesio, format='jpeg', exif=exif, quality=args.quality) bytesio.seek(0) new_bytes = bytesio.read()