Update rotate_by_exif call.

This commit is contained in:
voussoir 2021-06-06 20:33:32 -07:00
parent 0de20a34c9
commit 1bbffb4964
No known key found for this signature in database
GPG key ID: 5F7554F8C26DACCB

View file

@ -29,9 +29,9 @@ def rejpg_argparse(args):
bytesio = io.BytesIO() bytesio = io.BytesIO()
image = PIL.Image.open(filename) 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) bytesio.seek(0)
new_bytes = bytesio.read() new_bytes = bytesio.read()