From 3d46829db9da51d991af8280842a57fac316aae6 Mon Sep 17 00:00:00 2001 From: Vinu Date: Fri, 8 Mar 2024 14:54:24 +0000 Subject: [PATCH] keep image orientation pt. 3 --- compression.py | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/compression.py b/compression.py index f575571..616a004 100644 --- a/compression.py +++ b/compression.py @@ -6,11 +6,7 @@ def compress(inputblob: func.InputStream, resolution: int) -> bytes: image = Image.open(inputblob) # Correct the orientation of the image according to its EXIF data - try: - ImageOps.exif_transpose(image, in_place=True) - except Exception as e: - print(f"Error transposing image: {e}") - # Handle the error appropriately or raise + ImageOps.exif_transpose(image, in_place=True) # Set max height and width max_size = (resolution, resolution)