File Formats Debunk – Why you should stop rendering to PNG (and use EXR instead)
skientia.co
skientia.co
Complains something about alpha channels but doesn't explain what (and the mentioned jpeg has no alpha support)
PNG supports 16 bit per channel and ICC color profiles so can do HDR.
JPEG is unacceptable for screenshots of text, unless you can disable chroma subsampling, which isn't always an exposed option.
As a quick test, I took a screenshot of this comment, and saved it as both a PNG and 100% quality 444 JPEG, exported from GIMP. The JPEG is 81477 bytes, and the PNG is 44212.
But on second read I think we're making a mistake because we work on a different domain. I think the article exclusively refers to images produced I'm the workflow of video/CGI/3D rendering and generation for the motion films/multimedia industry. And there it can probably make sense to use a format like that, same as when I use a DNG or similar for storage of my photos.
I think when he said "screen-grab" he wasn't referring to an screenshot of a computer app or desktop, but to a frame of a video or something similar.
original - ~200kB png. oxiPNG - ~107kB.
Browser Jpeg - 604kB, MozJPEG 100 - 538kB, MozJPEG 100 RGB - 669kB.
JpegXL lossless - 26kB.
AVIF lossless max effort - 306kB
1: https://web.archive.org/web/20160112000701/http://www.timecu...
Which makes this a highly opinionated piece. And why should I listen to the opinion of somebody who thinks it's necessary to disable context menus on their website?
Which also makes the line about JPEG noise make a lot more sense.
AFAICT, this is not a generic "PNG always bad and you should never use it to display images on the web" screen.
> Never ever PNG, not even for web
Alpha can be used in multiple ways, most commonly as a blend:
result = background * (1.0 - alpha) + forground * alpha;
If the alpha and forground is stored in the same image, you can notice that we can pre compute forground * alpha. This is known as pre-multiplication, and is a very common techniqe. An added benefit of this is that we get more dynamic range, and can add to the composit, without removing the background.
This is possible in both PNG and EXR. HOWEVER, if you dont intend to pre-multiply, then the forground is not used if alpha is zero. The people who implemented LibPNG, the most common implementation of PNG, figured that they could make an optimization by throwing away the forground and just store black if alpha is zero. This improves file sizes since run length encoding is used.
This means that while, PNG the format, can store forground data with zero alpha, any application using LibPNG or other implementation with the same optimization may throw away the data. Photohop is a prime example of this. This makes PNG very unreliable when working with alpha.
There are advantages to use EXR as listed on the website, but imo they are more geared toward people working in 3D/CGI/VFX
comparing something that was designed to replace GIF for Internet use to a professional-level image format designed for specific industrial (as in cinema) work... what the hell ?
if you/they want to push for EXR, make a proposal to the browser developers. and in the end, the website developers and public will choose.
how big those pictures are, how fast they load, how costly it is on the CPU (we are going in a world where how much power you use IS going to be important, and on fixed machines as much as phones).