Corrected BLP1 alpha depth handling#8651
Conversation
There was a problem hiding this comment.
Wow, I didn't expect to hear from you this soon.
Thanks!
Everything seems fine. A bit confused about why you had to change things in the _openfunction. I think there is a way to call _read_blp_header so that you don't have that logic at two places, but this will go in another PR as this one seems to resolve the issue.
Happy New Year !
|
Thanks for pointing out the duplicate code. As you can see, I've pushed a commit to fix it. I can see you've approved this PR three times in the last ten minutes. I imagine you're experiencing a bug on your device and not seeing that it worked? If so, I can confirm you have approved this. |
|
Somehow GitHub was not checking the "#approved-reviews-by>=1" for auto merge check. |
|
This was a manual merge by me, so it didn't use automerge, which would have also needed the label adding and approval by a committer. |
Resolves #8650
https://www.hiveworkshop.com/threads/blp-specifications-wc3.279306/ describes the start of the 'BLP File Header' as
However, we don't currently perform different behaviour for BLP1, and only treat the data as if it was BLP2.
Pillow/src/PIL/BlpImagePlugin.py
Lines 300 to 303 in aa0f412
This PR fixes updates how the header data is handled for BLP1, for both reading and writing.