mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-04-26 17:55:07 +02:00
If we have a valid PNG header with geometry info etc, we should still display it as *something*, even if the image data itself is missing or corrupted. This matches the behavior of other browsers, and is something that Cloudflare Turnstile checks for. To achieve this, we split the PNG decoder's initialization into two steps: "everything except reading frame data" and "reading frame data". If the latter step fails, we yield a transparent bitmap with the geometry from the PNG's IHDR chunk.
2 lines
28 B
Plaintext
2 lines
28 B
Plaintext
loaded, width=62, height=97
|