PNG has been updated for the first time in 22 years — new spec supports HDR and animation
PNG has been updated for the first time in 22 years — new spec supports HDR and animation

PNG has been updated for the first time in 22 years — new spec supports HDR and animation

But is it backwards compatible with an old version that can't be updated?
Yeah, this was my first thought. How many slightly older, no-longer-being-updated pieces of software will fail to open the new version? Hopefully it’s built in a way that it just falls back to legacy and ignores the extra information so you can at least load the file.
This is all the article mentions. I hope you’re right about the backwards compatibility.
I mean, that's already how animated .gifs work. If somehow you manage to load one into a viewer that doesn't support the animation functionality it will at least dutifully display the first frame.
How the hell you would manage to do that in this day and age escapes me, but there were a fair few years in the early '90s where you might run into that sort of thing.
Speaking for animation, your browser probably already supports APNG. APNG is 21 years old and has decent adoption. But it’s officially part of the club.
That said, APNGs are fat as fuck and they’re a pretty old solution to animated graphics with an alpha channel. Don’t expect to see everyone making APNGs all of the sudden. There is a reason why people have kept it at a distance.
Some of this is paving the cowpath - the animated PNG stuff is 20 years old and e.g. Firefox has had support since March 2007.
Probably means there will be new PNGs that old software won't be able to open.
It makes sense, right? Is there a way around that when adding new features to a file format?
The alternative is to make another file format for clarity, but it's not really what you want to do.
The PNG format is made of chunks that have determined roles, and provides provisions for newer "standardized" chunks alongside the custom chunks it had supported until now. It is likely that PNG made with newer software that does not use new features, or uses only additional features, will remain readable by older software to some extent.
Yes that's why its so great
I'll tell you if I can find some new files for testing.
Even JPEG isn't always back compatible either. I loaded an image into my software which uses some ancient library internally, and it swapped the blue and red channels.
I'm probably gonna be massively downvoted for saying the forbidden word but I asked AI to do a summary with references of the forward and backward compatibility of PNG's new version:
Based on recent search results, the new PNG specification (Third Edition) and its reference library (libpng) maintain strong backward compatibility while introducing modern features. Here's a detailed compatibility analysis:
🔄 1. Backward Compatibility (Viewing Old PNGs with New Lib)
png_struct
/png_info
internals since 1.5.0) ensures older apps usingpng_get_*
/png_set_*
functions remain compatible. Direct struct access, deprecated since 1.4.x, may break in libpng 2.0.x (C99-only) .png_image_free()
) were patched in libpng 1.6.37+, making the new lib safer for decoding old files .⚠️ 2. Forward Compatibility (Viewing New PNGs with Old Lib)
IHDR
orIDAT
remain unchanged .mDCv
chunk. Older libs ignore HDR data, falling back to SDR, which may cause color inaccuracies .eXIf
chunks are ignored by legacy decoders, losing metadata like GPS or copyright info .📊 Compatibility Summary
🔧 3. Implementation and Industry Adoption
💎 Conclusion
For developers: Use
png_get_valid(png_ptr, info_ptr, PNG_INFO_mDCv)
to check HDR support and provide fallbacks .!<
I do not have downvotes on my instance, so please, have a 👎
downvoters: is it wrong?