-
Notifications
You must be signed in to change notification settings - Fork 13
Opacity information is lost when reading a P mode image with transparency information #48
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
Comments
Note: this may have a similar underlying cause/fix to bigcat88/pillow_heif#235, which I spotted while writing this issue. |
fdintino
added a commit
that referenced
this issue
Jul 7, 2024
fdintino
added a commit
that referenced
this issue
Jul 7, 2024
github-merge-queue bot
referenced
this issue
in BSStudio/bss-web-file-api
Jul 9, 2024
[](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [pillow-avif-plugin](https://github.com/fdintino/pillow-avif-plugin) | `1.4.3` -> `1.4.4` | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes <details> <summary>fdintino/pillow-avif-plugin (pillow-avif-plugin)</summary> ### [`v1.4.4`](https://github.com/fdintino/pillow-avif-plugin/releases/tag/v1.4.4) [Compare Source](https://github.com/fdintino/pillow-avif-plugin/compare/v1.4.3...v1.4.4) #### What's Changed - chore(ci): bump libavif to [`e10e6d9`](https://github.com/fdintino/pillow-avif-plugin/commit/e10e6d9)-2024-07-01; fix CI build issues by [@​fdintino](https://github.com/fdintino) in [https://github.com/fdintino/pillow-avif-plugin/pull/53](https://github.com/fdintino/pillow-avif-plugin/pull/53). See table below for new versions (all versions are upgrades from the 1.4.3 release). | | | |-------------|------------| | **libavif** | <b>1.0.3 ([e10e6d9](https://github.com/AOMediaCodec/libavif/commit/e10e6d98e6d1dbcdd409859a924d1b607a1e06dc))</b> | | **libaom** | **3.9.1** | | **dav1d** | **1.4.3** | | **SVT-AV1** | **2.1.1** | | **rav1e** | **0.7.1** | - feat: Allow users to pass `max_threads` to the avif encoder via `Image.save` by [@​yit-b](https://github.com/yit-b) in [https://github.com/fdintino/pillow-avif-plugin/pull/54](https://github.com/fdintino/pillow-avif-plugin/pull/54), originally in [https://github.com/fdintino/pillow-avif-plugin/pull/49](https://github.com/fdintino/pillow-avif-plugin/pull/49) - feat: Let users pass `max_threads` as an argument to `_avif.AvifDecoder` by [@​yit-b](https://github.com/yit-b) in [https://github.com/fdintino/pillow-avif-plugin/pull/50](https://github.com/fdintino/pillow-avif-plugin/pull/50) - chore(ci): build SVT-AV1 for aarch64 or arm64 by [@​RaphaelVRossi](https://github.com/RaphaelVRossi) in [https://github.com/fdintino/pillow-avif-plugin/pull/38](https://github.com/fdintino/pillow-avif-plugin/pull/38) - fix: keep alpha channel for images with mode P and custom transparency by [@​fdintino](https://github.com/fdintino) in [https://github.com/fdintino/pillow-avif-plugin/pull/56](https://github.com/fdintino/pillow-avif-plugin/pull/56); fixes [https://github.com/fdintino/pillow-avif-plugin/issues/48](https://github.com/fdintino/pillow-avif-plugin/issues/48) - fix: disable decoder strictness for `clap` and `pixi` properties by [@​fdintino](https://github.com/fdintino) in [https://github.com/fdintino/pillow-avif-plugin/pull/57](https://github.com/fdintino/pillow-avif-plugin/pull/57). fixes [https://github.com/fdintino/pillow-avif-plugin/issues/13](https://github.com/fdintino/pillow-avif-plugin/issues/13), fixes [https://github.com/fdintino/pillow-avif-plugin/issues/28](https://github.com/fdintino/pillow-avif-plugin/issues/28) - fix(ci): lint secrets permission error and macOS GHA runner homebrew `PATH` bug by [@​fdintino](https://github.com/fdintino) in [https://github.com/fdintino/pillow-avif-plugin/pull/55](https://github.com/fdintino/pillow-avif-plugin/pull/55) #### New Contributors - [@​RaphaelVRossi](https://github.com/RaphaelVRossi) made their first contribution in [https://github.com/fdintino/pillow-avif-plugin/pull/38](https://github.com/fdintino/pillow-avif-plugin/pull/38) **Full Changelog**: fdintino/pillow-avif-plugin@v1.4.3...v1.4.4 </details> --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Enabled. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://developer.mend.io/github/BSStudio/bss-web-file-api). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy40MjUuMSIsInVwZGF0ZWRJblZlciI6IjM3LjQyNS4xIiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6W119--> Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I spotted an instance where
pillow_avif
is losing transparency information about PNG images with modeP
and a customtransparency
value.Here's a sample program that reproduces the issue:
This is how the two images get rendered on my Mac. Notice that the PNG correctly has two transparent regions, whereas the AVIF is solid black:
I'm using
pillow==10.3.0
andpillow-avif-plugin==1.4.3
.The text was updated successfully, but these errors were encountered: