Я пытаюсь использовать Python для изменения размера изображения. С моей камерой все файлы записаны в альбомном виде.
Информация exif обрабатывает тег, чтобы попросить зрителя изображения так или иначе вращаться. Поскольку большая часть браузера не понимает эту информацию, я хочу повернуть изображение, используя эту информацию EXIF, и сохранить любую другую информацию EXIF.
Вы знаете, как я могу это сделать с помощью Python?
Считывая исходный код EXIF.py, я нашел что-то вроде этого:
0x0112: ('Orientation',
{1: 'Horizontal (normal)',
2: 'Mirrored horizontal',
3: 'Rotated 180',
4: 'Mirrored vertical',
5: 'Mirrored horizontal then rotated 90 CCW',
6: 'Rotated 90 CW',
7: 'Mirrored horizontal then rotated 90 CW',
8: 'Rotated 90 CCW'})
Как я могу использовать эту информацию и PIL для ее применения?