Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: sync with changes from python-pillow/Pillow#5201 #70

Merged
merged 3 commits into from
Mar 5, 2025

Conversation

fdintino
Copy link
Owner

@fdintino fdintino commented Mar 5, 2025

Updates the pillow-avif-plugin code to more closely match the current state of the open Pillow PR, python-pillow/Pillow#5201. The differences that remain have to do with python 2.7 compatibility.

Most of the code changes from the Pillow PR are stylistic, not functional, but there are two bug fixes included:

  • AvifImagePlugin.CHROMA_UPSAMPLING is now actually used by the decoder. Previously, although it was passed into the decoder, it did not have any effect. Note that this is different from the Pillow PR, where this functionality was removed instead.
  • AVIF images with irot and imir now have those values converted to the equivalent EXIF orientation when decoded. EXIF orientation has been preserved by the encoder since 1.4.2, which is when we started setting irot and imir. But if such an image was converted to another format the orientation would have been lost.

fdintino added 3 commits March 5, 2025 12:46
Updates the pillow-avif-plugin code to more closely match the current
state of the open Pillow PR, python-pillow/Pillow#5201. The
differences that remain have to do with python 2.7 compatibility.

Most of the code changes from the Pillow PR are stylistic, not
functional, but there are two bug fixes included:

- AvifImagePlugin.CHROMA_UPSAMPLING is now actually used by the
  decoder. Previously, although it was passed into the decoder, it did
  not have any effect. Note that this is different from the Pillow PR,
  where this functionality was removed instead.
- AVIF images with irot and imir now have those values converted to
  an EXIF orientation when decoded. EXIF orientation has been
  preserved by the encoder since 1.4.2, which is when we started
  setting irot and imir. But if such an image was converted to another
  format, the orientation would have been lost.
@fdintino fdintino merged commit 62f7c94 into main Mar 5, 2025
89 checks passed
@fdintino fdintino deleted the upstream-sync branch March 5, 2025 19:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant