I'm curious as to why my image is not rotating, it ends up in the same position every time.
img = Image.open(r'C:\Users\Brett\Downloads\testing.jpg')
exif_data = {
TAGS[k]: v
for k, v in img._getexif().items()
if k in TAGS
}
print(exif_data['Orientation'])
That outputs a '6'
No matter how many degrees I tell the image to rotate it ends up in the same position.
if exif_data['Orientation'] == 6:
img.rotate(90)
or
if exif_data['Orientation'] == 6:
img.rotate(270)
or
if exif_data['Orientation'] == 6:
img.rotate(180)
I always end up with an image rotated 90 degrees counter-clockwise. Am I doing something obviously wrong?