Commit 1b171a4
committed
Apply EXIF orientation before resizing in optimize_image.py
Add ImageOps.exif_transpose() call after opening the image so that
JPEGs with EXIF Orientation metadata are correctly rotated/flipped
before mode conversion and resizing. Without this, output WebPs could
appear rotated compared to the original.
Fixes review feedback on PR #106.1 parent 947b846 commit 1b171a4
1 file changed
Lines changed: 4 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
23 | 23 | | |
24 | 24 | | |
25 | 25 | | |
26 | | - | |
| 26 | + | |
27 | 27 | | |
28 | 28 | | |
29 | 29 | | |
| |||
50 | 50 | | |
51 | 51 | | |
52 | 52 | | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
53 | 56 | | |
54 | 57 | | |
55 | 58 | | |
| |||
0 commit comments