Skip to content

Commit

Permalink
Fix sphinx build errors (#140)
Browse files Browse the repository at this point in the history
  • Loading branch information
zerolab authored Jan 2, 2024
1 parent 0488441 commit a905f80
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion docs/changelog.rst
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ ICC profile and EXIF data when saving a JPEG to PNG, WebP, AVIF.


1.5.2 (2023-08-04)
----------------
------------------

- Fix ``NUMBER_PATTERN`` regex for parsing SVG viewboxes (Joshua Munn)

Expand Down
4 changes: 2 additions & 2 deletions willow/plugins/pillow.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@
except ImportError:
pass

from PIL import ImageOps

from willow.image import (
AvifImageFile,
BadImageOperationError,
Expand Down Expand Up @@ -354,6 +352,8 @@ def save_as_avif(self, f, quality=80, lossless=False, apply_optimizers=True):
def auto_orient(self):
# JPEG files can be orientated using an EXIF tag.
# Make sure this orientation is applied to the data
from PIL import ImageOps

image = ImageOps.exif_transpose(self.image)

return PillowImage(image)
Expand Down

0 comments on commit a905f80

Please sign in to comment.