Why a Lower PNG Row Score Can Still Yield a Larger File

A developer explains that PNG can store identical RGBA8 bytes in several forms, with the row filtering step applied before DEFLATE compression. The row filter desk tool exposes this stage for small grids of 1 to 32 pixels per side. Each row's filter type is chosen by a heuristic that sums absolute signed residuals, which measures local predictability rather than final compressed size. The article walks through the PNG Third Edition predictors and tie rules, and uses a white 4x3 example to show how the heuristic can pick a filter that compresses worse. The implementation and fixtures are released under Apache-2.0.
This is an AI-generated summary. ShortSingh links to the original source for the complete article.

Discussion (0)
Log in to join the discussion and vote.
Log in