• Welcome to TechPowerUp Forums, Guest! Please check out our forum guidelines for info related to our community.
  • The forums have been upgraded with support for dark mode. By default it will follow the setting on your system/browser. You may override it by scrolling to the end of the page and clicking the gears icon.

PNG Image Format Gets Native Animation and HDR in Version 3.0

AleksandarK

News Editor
Staff member
Joined
Aug 19, 2017
Messages
3,218 (1.12/day)
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.



View at TechPowerUp Main Site | Source
 
Finally but given adoption of webp and heif formats might be the updates are a bit too late to market.
 
Why should we continue to expand on dead-end formats?
PNG uses the generic and obsolete Deflate algorithm.

It's time to move on to AVIF (or if there are better alternatives?).
 
HDR UHD PNG gif?? ;)
 
We need heif 10 bit to replace jpeg 8 bit.
 
Finally but given adoption of webp and heif formats might be the updates are a bit too late to market.
The new PNG version has a lot of industry support so it has a chance.

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.
 
Why should we continue to expand on dead-end formats?
PNG uses the generic and obsolete Deflate algorithm.

It's time to move on to AVIF (or if there are better alternatives?).

AVIF is awesome on compression, but it's not lossless and lacks GPU hardware decoding support at this point in time. There have been discussions around the decode and GPU acceleration workarounds. I'd love to see AVIF decode on GPU's though even though it's not lossless the compression is great and you can strike a pretty good balance if you don't get too carried away on compression quality. It's surprisingly decent even at like 50 or so quality compression and file sizes are so much smaller than a native PNG image while looking comparable enough to be easily forgivable in cases as far as quality vs file size trade offs. It arguably looks better at like 75 quality oddly enough or can with some subtle post process applied as well. AVIF starts to look very crude at certain point, but it's still crazy how good it can still be relative to file size itself.

PNG is already a bloated image format, now it's going to be more so? No thanks, I'll stick with JPGs.

Yes by a whole 4KB. :rolleyes: APNG will entail more size given additional frames of PNG images combined for animation, but having that option over GIF is still great given the quality discrepancy between the two. Overall GIF is fine for some stuff, but not other stuff given it's limitations.
 
Last edited:
PNG is already a bloated image format, now it's going to be more so? No thanks, I'll stick with JPGs.
That's mostly due to it being lossless unlike lossy jpeg, though the compression IS certainly not cutting edge.

but it's not lossless
Actually it has a lossless option. I know because 10bit lossless mode AVIFs is how I store my HDR10 screenshots.
 
That's mostly due to it being lossless unlike lossy jpeg, though the compression IS certainly not cutting edge.


Actually it has a lossless option. I know because 10bit lossless mode AVIFs is how I store my HDR10 screenshots.

Seems you're right and supports both. I think I ended up using lossy for my script purposes with testing. I may have tried the other option and didn't like the file size results, but not sure. I'd have to revisit the script. I think the lossy option is still good if you don't get carried away on the quantization and at higher quality settings can arguably look as good or better subjectively in places depending on the native image details. I had some other stuff happening too with a bit post process applied to the native image then using AVIF because I was playing around with what I can do at really low quality settings in conjunction with some of that.
 
Yes by a whole 4KB.
WHAT? When was the last time you compared a JPG to the very same image in PNG? Try it before being a smartass.

That's mostly due to it being lossless unlike lossy jpeg, though the compression IS certainly not cutting edge.
If you keep JPG quality above 96%, the "lossy" nature of it can only be noticed if examining an image on a pixel level and it's still much smaller than a PNG of the same image.

JPG is still the pinnacle of image formats. PNG can stuff it..
 
If you keep JPG quality above 96%, the "lossy" nature of it can only be noticed if examining an image on a pixel level and it's still much smaller than a PNG of the same image.
Save it 100 times while editing a document and get back to me.

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.

it's still much smaller than a PNG of the same image.
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 still the pinnacle of image formats. PNG can stuff it..
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.
 
Last edited:
Save it 100 times while editing a document and get back to me.

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.
Those are some decent points. Here's my take: If absolute quality is needed, one goes with BMP. If not, high quality JPG. PNG tried to fill a niche that didn't need filling BITD. It managed to be a reasonable middle-ground between BMP & JPG but it wasn't practical. Still isn't.
 
WHAT? When was the last time you compared a JPG to the very same image in PNG? Try it before being a smartass.


If you keep JPG quality above 96%, the "lossy" nature of it can only be noticed if examining an image on a pixel level and it's still much smaller than a PNG of the same image.

JPG is still the pinnacle of image formats. PNG can stuff it..

I was getting at it's only 4KB difference the HDR over the previous standard PNG was which just fine. Yes PNG is larger file size than JPG, but that's been the case all along. I'd use AVIF now over JPG anyway. One of AVIF's biggest negatives right now is just software support is more limited for import/export the GPU decoding hardware acceleration is another matter as well, but for just saving compressed stuff at small file sizes not so much.

The new PNG version has a lot of industry support so it has a chance.

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.

Those are all companies with a vested interested in high standards in the quality of content production so entirely makes sense.
 
Last edited:
Finally but given adoption of webp and heif formats might be the updates are a bit too late to market.
Webp isn't getting adopted, it's being forced by Google who penalizes you for not using Webp. I've seen maybe one site total that used native WebP, everything else just had a plugin installed so whenever you queried a jpg, it served a webp. Which means it is transcoding every lossy image to another lossy one, making the pictures look far lower quality.

Why should we continue to expand on dead-end formats?
PNG uses the generic and obsolete Deflate algorithm.

It's time to move on to AVIF (or if there are better alternatives?).
JPEG XL beats AVIF in both quality and speed iirc, but Google and consequently all browsers are pushing for AVIF since it is a successor of VP9 used in webp/webm. At this point it is becoming a risk of a vendor lock-in.
 
I was getting at it's only 4KB difference the HDR over the previous standard PNG was which just fine. Yes PNG is larger file size than JPG,
In most cases PNG files are MUCH larger than JPG files, even when the JPGs are 100% quality. I will concede that there are times when PNGs can be smaller than JPGs, but that doesn't happen very often and it depends greatly on the image content. Most of the time JPGs are smaller at similar quality settings.
I'd use AVIF now over JPG anyway. One of AVIF's biggest negatives right now is just software support is more limited for import/export the GPU decoding hardware acceleration is another matter as well, but for just saving compressed stuff at small file sizes not so much.
AVIF doesn't really have any advantages over JPG or even PNG, thus it's adoption is low.

EDIT: Decided to post examples to illustrate.
Here's an image of a low profile 1050ti, in JPG;
ASL-GTX-1050Ti.jpg
46KB

Here's the same image in PNG;
ASL-GTX-1050Ti.png
977KB

Here's a screenshot of Spleens the Cat in JPG;
SleensTheCat-MajesticDerp.jpg
88KB

Here's the same image in PNG;
SleensTheCat-MajesticDerp.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.

JPEG XL beats AVIF in both quality and speed iirc, but Google and consequently all browsers are pushing for AVIF since it is a successor of VP9 used in webp/webm. At this point it is becoming a risk of a vendor lock-in.
Haven't seen this. Doesn't seem like they're succeeding.
 
Last edited:
I see nobody here is talking about the HEIF file, which are the best in compression, half the size of the JPEG ones, while better quality. And they can be lossless format too for the same size as a compressed JPEG. PNG is perfect for it's lossless algorithm, while AVIF is also good, sadly is not supported on mobile phones as the default capuring format.
 
Why should we continue to expand on dead-end formats?
PNG uses the generic and obsolete Deflate algorithm.

It's time to move on to AVIF (or if there are better alternatives?).
Because PNG is lossless & also lossy if you want to and AVIF is lossy only. Also I still prefer webp over AVIF though. It's much faster and compresses nearly as good. and most of all has a transparency option for lossy images. AVIF only has a transparency option when the image is eaither 10 or 12 bit and is saved lossless.
That makes webp for me far superior for web stuff. AVIF wins with actual pictures though.
 
Last edited:
If absolute quality is needed, one goes with BMP.
PNG is equal to BMP quality without just literally wasting diskspace for no reason though.

AVIF is lossy only.
As I pointed out above, there's actually a lossless option. Anyways its certainly miles ahead of PNG for a lossless format, but thats not all that hard. And it actually bests jpg slightly for a lossy one but browser acceptance is quite sparse.
 
Last edited:
It's a shame they didn't take this opportunity to enable Zstd as an option.
We don't need a sidegrade, that would only make decoding slightly faster, not improve compression ratio.
Zstd is a generic compression algorithm intended for filesystem compressions, we rather need algorithms tailored for graphics.

AVIF is awesome on compression, but it's not lossless and lacks GPU hardware decoding support at this point in time.
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.

JPEG XL beats AVIF in both quality and speed iirc, but Google and consequently all browsers are pushing for AVIF since it is a successor of VP9 used in webp/webm. At this point it is becoming a risk of a vendor lock-in.
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?
 
We don't need a sidegrade, that would only make decoding slightly faster, not improve compression ratio.
Zstd is a generic compression algorithm intended for filesystem compressions, we rather need algorithms tailored for graphics.
Nonsense.

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.
 
We don't need a sidegrade, that would only make decoding slightly faster, not improve compression ratio.
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?

Had some example comparisons, but apparently AVIF uploads don't work on forums atm. On the AV1 and codec yeah hopefully, but for now it still needs to gain a better footing as a standard like even MS Paint doesn't allow AVIF export yet though it can import AVIF images fine and pretty common issue with software atm non existent or partially supported for the time being. :oops:
 
Last edited:
Back
Top