Repository navigation
Fix png dtype at function ndarray_to_pil - #1186
Conversation
fallenmi
left a comment
There was a problem hiding this comment.
Disclosure: I used OpenAI Codex to assist with this review and verified the result against exact commit f0f306da0eed84b86dca0446c7a04a38f047a3dd.
I reproduced the reported prefer_uint8=False path against base c7f8249: a uint8 PNG is written as I;16 and byte values are scaled into uint16. On this head and current GitHub merge 03c9813, uint8 remains mode L with exact values.
A deterministic 1,570-case matrix covered fixed, randomized, strided, and Fortran-order arrays, both PNG spellings, both preference values, and uint16 controls; base failed the 783 intended uint8/preference cases, while head and merge had zero failures and identical digests. The owning Pillow legacy test file passed on head and merge with 11 passed, 2 expected xfails, and 1 deselected; Black 26.3.0, Flake8, and diff checks also passed.
GitHub currently shows only a green Read the Docs status and no upstream code-test matrix. I found no blocking issue.
|
LGTM. thanks for the contribution :) |
this pr is related to #624