Skip to content

v0.49.0 — a ceiling in bytes, and two pages that stopped coming back blank

Choose a tag to compare

@tannevaled tannevaled released this 26 Sep 21:54
· 44 commits to main since this release
1d7c5d0

Two pages that came back blank now draw, and faster than the judge

§24 of the conformance baseline found five pages returning from render in 4 to
15 ms against poppler's 1.6 to 2.8 seconds, with a third to a half of their pixels
wrong — blank pages, fast enough that a speed table read them as wins.

The cause was maxImagePixels: a ceiling of 64 Mpixel with four bytes a pixel
implied, so 256 MB. In pixels it refused what it had no reason to. A 400 dpi
bilevel newspaper scan is 7 779 × 10 699 — 83 Mpixel, past the ceiling — and it
holds in 83 MB when one byte a pixel is enough, which for a single component of at
most eight bits it is.

The ceiling is now expressed in bytes (256 MB, exactly what it always promised)
and a single-component picture is held as one byte a pixel plus a 256-entry palette.

Judged by the instrument, on the two pages it reaches

before after
pixels differing (median) 32.83% 0.94%
worst 44.89% 3.05%
identical byte for byte 41.32% 56.54%
colour, worst square mean 255.00 36.88
time 27 ms 972 ms — 0.284× of poppler's

A worst square mean of 255.00 is what a blank page scores against a printed one.
So: a 35-fold fidelity improvement, and still 3.5× faster than poppler.

Scope, plainly

Five pages were named and this reaches two. The other three are JPEG 2000 at
9 449 × 13 701, and the decoder builds a four-byte image internally before render
sees it. Memory on ordinary pages barely moves — the large images in that corpus
are JPEG 2000 and JBIG2, not single-component samples.

Unchanged elsewhere

3 213 of 3 215 corpus documents render byte-identical to v0.48.0; the two that
differ are the two pages above.