Skip to content

CI only: fix(images): embed 16-bit PNGs with alpha, palette PNGs and tRNS transparency - #2

Draft
ndbroadbent wants to merge 1 commit into
mainfrom
upstream/png-16-bit-alpha
Draft

ndbroadbent wants to merge 1 commit into
mainfrom
upstream/png-16-bit-alpha

Conversation

@ndbroadbent

Copy link
Copy Markdown
Member

Runs CI and the parity gate for an upstream PR to gastongouron/ironpress. Not for merging.

…sparency

The alpha path decoded a 16-bit PNG without stripping it to 8 bits, so each
pixel's samples were written as two 8-bit pixels under an 8-bit dictionary:
the image was garbled, in the wrong colors and transparency. parse_png
rejects palette PNGs, so a palette PNG as a CSS background drew nothing, and
the raw IDAT pass-through ignored a tRNS chunk's transparency.

The resource loader now re-encodes those PNGs as 8-bit RGB or RGBA once per
resource, so every image path (<img>, CSS backgrounds, border images, SVG
images) gets one it can embed, and the alpha decoder expands palettes and
strips 16-bit samples as well.

This branch has not been deployed

No deployments
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