←back to thread

A new PNG spec

(www.programmax.net)
626 points bluedel | 2 comments | | HN request time: 0.417s | source
Show context
ProgramMax ◴[] No.44380761[source]
Author here. Hello everyone! Feel free to ask me anything. I'll go ahead and dispel some doubts I already see here:

- It isn't really a "new format". It's an update to the existing format. - It is very backwards compatible. -- Old programs will load new PNGs to the best of their capability. A user will still know "that is a picture of a red apple".

There also seems to be some confusion about how PNGs work internally. Short and sweet: - There are chunks of data. -- Chunks have a name, which says what data it contains. A program can skip a chunk it doesn't recognize. - There is only one image stream.

replies(7): >>44381338 #>>44381836 #>>44383578 #>>44383904 #>>44385382 #>>44386681 #>>44388462 #
1. LinAGKar ◴[] No.44388462[source]
>we'll be researching compression updates for PNG Fifth Edition.

What sort of improvements might we expect? Is there a chance of it rivalling lossless WebP and JPEG XL?

replies(1): >>44390401 #
2. ProgramMax ◴[] No.44390401[source]
Our first goal is to see what we can get for "free" right now. Most of the time, people save a PNG which is pretty far from optimally compressed. Then they compare that to another format which is closer to optimal and draw a poor comparison.

You can see this with PNG optimizers like OptiPNG and pngcrush.

So step 1 is to improve libpng. This requires no spec change.

Step 2 is to enable parallel encoding and decoding. We expect this to increase the file size, but aren't sure how much. It might be surprisingly small (a few hundred bytes?). It will be optional.

Step 3 is the major changes like zstd. This would prevent a new PNG from being viewable in old software, so there is a considerably higher bar for adoption. If we find step 1 got us within 1% of zstd, it might not be worth such a major change.

I don't yet know what results we'll find or if all the work will be done in time. So please don't take this as promises or something to expect. I'm just being open and honest about our intentions and goals.