We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9f84c32 commit a0a2262Copy full SHA for a0a2262
mothra/preprocessing.py
@@ -20,10 +20,13 @@ def auto_rotate(image_rgb, image_path):
20
"""
21
angle = read_angle(image_path)
22
23
- print(f'Image angle: {angle} deg')
+ if angle:
24
+ print(f'Original EXIF image angle: {angle} deg')
25
+ else:
26
+ print(f"Couldn't determine EXIF image angle")
27
28
if angle not in (None, 0): # angle == 0 does not need untilting
- image_rgb = rotate(image_rgb, angle=angle, resize=True)
29
+ image_rgb = rotate(image_rgb, angle=angle, resize=True)
30
31
return img_as_ubyte(image_rgb)
32
0 commit comments