Tuesday, July 1st 2025
PNG Image Format Gets Native Animation and HDR in Version 3.0
Like most of us, you are probably taking your image file format for granted, without much thought about the technology behind it. However, one of the oldest image formats, Portable Network Graphics, aka PNG, has just received its version 3.0 update. After more than two decades of PNG v2.0, image file standards have evolved to meet the diverse needs of internet users who began sharing content such as GIFs online. Back in 2003, PNG 2.0 was insufficient for this purpose, and GIF took over the world of animated raster images. Today, 22 years later, PNG is making a comeback with the introduction of PNG version 3.0, released by the World Wide Web Consortium. Alongside animated raster images, PNG 3.0 is bringing HDR functionality to the image format, using only four (yes, four) additional bytes of overhead.
The PNG format is incredibly adaptable, capable of handling everything from simple graphics with a limited color palette to vibrant, full-color photographs. It's also a top choice for web design because it supports an alpha channel, which enables true transparency in images. PNG was specifically designed for the internet, as it can be streamed, allowing you to see a low-quality version of the picture that sharpens as it finishes loading. It's also a very reliable format, with built-in integrity checks that protect against glitches and corruption during transfer. Additionally, to ensure colors appear the same on your phone as they do on a designer's monitor, a PNG file can include its own color space data. This is why it's so widely used for both standard static images (image/png) and, as of today, even animated ones (image/apng). With HDR now supported, it will allow image sharing in the way it was meant to be seen.
Sources:
W3 Consortium, via Programmax.net
The PNG format is incredibly adaptable, capable of handling everything from simple graphics with a limited color palette to vibrant, full-color photographs. It's also a top choice for web design because it supports an alpha channel, which enables true transparency in images. PNG was specifically designed for the internet, as it can be streamed, allowing you to see a low-quality version of the picture that sharpens as it finishes loading. It's also a very reliable format, with built-in integrity checks that protect against glitches and corruption during transfer. Additionally, to ensure colors appear the same on your phone as they do on a designer's monitor, a PNG file can include its own color space data. This is why it's so widely used for both standard static images (image/png) and, as of today, even animated ones (image/apng). With HDR now supported, it will allow image sharing in the way it was meant to be seen.
35 Comments on PNG Image Format Gets Native Animation and HDR in Version 3.0
PNG uses the generic and obsolete Deflate algorithm.
It's time to move on to AVIF (or if there are better alternatives?).
It's got support from Adobe, Apple, BBC, Comcast/NBCUniversal, Google, MovieLabs, Chrome, Safari, Firefox. Supported on operating systems (iOS, macOS), and professional media tools Photoshop, DaVinci Resolve, Avid Media Composer.
JPG is still the pinnacle of image formats. PNG can stuff it..
Lossless formats have their place. It isn't in end distribution generally but they do have a use case like workflow and frequent edits (also, pixel art cares a lot about perfect accuracy). As an aside to my point, I'd note disk space and bandwidth aren't at the premium they once were. Not that you should post bloated files for the heck of it but yeah.
Anyhow, PNG isn't the best at anything except maybe being lossless with a side of web compatibility, but it's compression algorithm (DEFLATE) is basically a BMP wrapped in a ZIP file, so it's not horrid either. ZIP/DEFALTE is far from the best compression algorithm but there are far, far worse given PNG's age and lineage. It's hard to say ZIP still isn't widely used. Actually for images with large areas of constant colors or predictable, consistent gradients, this can be false, but it's a rare occurrence admitedly. Not many people out there compressing colored cubes, lol. Microsoft and the Windows Logo might be the one notable exception. JPG is good for what it is, but it too is getting old. It lacks HDR metadata support or greater than 8-bit-per-color support (JXR is meant to address this, from the same JPEG consortium), and personally I prefer AVIF. But browser support for HDR or >8bpc is horrid anyways, so JPG is here to stay as one of the better or maybe even best options on the web until that changes.
EDIT: Decided to post examples to illustrate.
Here's an image of a low profile 1050ti, in JPG;
46KB
Here's the same image in PNG;
977KB
Here's a screenshot of Spleens the Cat in JPG;
88KB
Here's the same image in PNG;
1.73MB(that's megabyte)
In both cases, image quality is identical, but file sizes are most certainly not. There is MUCH more than a 4KB difference. This is why I tend to ignore the PNG image format. It has almost zero image quality advantage and a severe file size disadvantage. Haven't seen this. Doesn't seem like they're succeeding.
storage.googleapis.com/demos.webmproject.org/webp/cmp/2021_12_15/index.html#08-2011-panthera-tigris-tigris-texas-park-lanzarote-tp04*1:1&AVIF-AOM=ll&HEIF=ll&subset1
That makes webp for me far superior for web stuff. AVIF wins with actual pictures though.
Zstd is a generic compression algorithm intended for filesystem compressions, we rather need algorithms tailored for graphics. Hardware decoding is probably coming sometime, as it's based on the same codec as AV1.
I haven't seen a proper deep-dive comparing lossy and lossless compression, and how much of an improvement it is over e.g. PNG. I believe AVIF is far better supported than JPEG XL at this point.
How about lossless compression, do you have anything showing it's better?
First off, Zstd is not "intended for filesystem compression". It is an entropy encoder, its purpose is to represent a sequence of symbols in as small a number of bits as possible. Just like the Huffman encoder used in Deflate, and the Daala encoder used in AV1, it is data-type agnostic. Entropy encoders form the core of all (modern) compression schemes.
Furthermore, experiments doing exactly what I have proposed (replacing Deflate with Zstd, with no other changes to the PNG format) have shown up in the range of 33% file size reduction. And it's low-hanging fruit, we're talking 10's of lines of code to implement it (PNG already has the functionality to support multiple entropy encoders, they just never used it). The speed of Zstd is a side benefit, but certainly not an unwelcome one.
As for your comment "we rather need algorithms tailored for graphics", the transformations that "tailor" a compression scheme to a certain data type happen at a higher level than entropy encoding. PNG, for example, uses the filter-predictor type of transformation: a linear filter predicts the value of a new pixel based on (some) of its neighbors, then the error in that prediction is compressed by the entropy coder. Simple and very effective for the types of imagery PNG was designed for. Not that it couldn't be improved, but that's orders of magnitude more effort than what I was proposing.