Skip to content

Fix png dtype at function ndarray_to_pil - #1186

Merged
FirefoxMetzger merged 3 commits into
imageio:masterfrom
redhecker:fix-png-dtype
Sep 26, 2026
Merged

FirefoxMetzger merged 3 commits into
imageio:masterfrom
redhecker:fix-png-dtype

Conversation

@redhecker

Copy link
Copy Markdown
Contributor

this pr is related to #624

@fallenmi fallenmi left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@FirefoxMetzger

Copy link
Copy Markdown
Contributor

LGTM. thanks for the contribution :)

@FirefoxMetzger
FirefoxMetzger merged commit 00cd1e3 into imageio:master Sep 26, 2026
17 checks passed
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.

3 participants