You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
v5.7.0: fix(images): keep transparency when view_image downscales and re-encodes
Transparent pixels are now only ever re-encoded as PNG — JPEG has no alpha
channel, so a transparent background used to be flattened onto black when
JPEG won the size comparison. An alpha channel that is fully opaque still
counts as opaque and may come back as JPEG.
Map channel counts to explicit stb resize layouts so grey+alpha images are
filtered with alpha weighting instead of bleeding transparent pixels into
the edge, reject decoded buffers outside 1–4 channels, and retry bigger
budget overflows with more halvings (16) until a PNG fits.
Add makePngPixels and tests covering transparency, grey+alpha, the budget
path and the opaque-alpha case; bump the version to 5.7.0.