3 ms·
Isn't JPEG XL superior to both of those? PNG was not made to store raster graphics, and AV1 doesn't do progressive loading.
by bobbylarrybobby 2y ago
Isn't JPEG XL superior to both of those? PNG was not made to store raster graphics, and AV1 doesn't do progressive loading.
- OuterVale 2y agoYeah, it is superior in everything except for support.
- tetris11 2y ago> PNG was not made to store raster graphics I did some searching, found nothing. What do you mean by this statement?
- mappu 2y agoThe PNG file format is essentially ZIP(BMP), trying to compress the raw pixels in a pretty naive way. It works extremely well for diagrams and large blocks of identical colours. But for real-world photos, AAA game screenshots, or even just linear gradients, it doesn't offer any size compression at all. The raster/vector dichotomy is a bit orthogonal to this and perhaps not quite the right choice of words. PNG is still a raster format as it stores the final pixels. Only that it's better suited for images that originated from a vector source, rather than images that have been rasterized out of a camera CCD or a video game engine.
- SigmundA 2y ago>But for real-world photos, AAA game screenshots, or even just linear gradients, it doesn't offer any size compression at all. PNG will normally get at least 2:1 compression on photos, I think worst case with a image of each pixel being a different color of 16 million pixels it still had around 35% compression. 2:1 is much less than jpeg which would probably be around 10:1 for photo, its definitely better than nothing, and the big thing here is its lossless unlike jpeg. It's not naive, it's just not lossy like jpeg. Jpeg XL also supports lossless with around 35% better compression than PNG so that means may 3:1 vs 2:1.
- gruez 2y ago>PNG will normally get at least 2:1 compression on photos "At least"? I tried with the first photo on the wikipedia home page: https://en.wikipedia.org/wiki/File:City_Building_Champaign_Illinois_from_west.jpg https://en.wikipedia.org/wiki/File:City_Building_Champaign_I... Saving it as a 24-bit bmp (ie. uncompressed) gets me 12,180KB. Saving it as a PNG gets me 7,157KB, which is 1.7:1
- SigmundA 2y agoI just did the same in preview on my Mac (export TIFF uncompressed - 12mb -> export PNG) and got 5.4mb so 2.2:1 and on https://cloudconvert.com https://cloudconvert.com 4.6mb with default settings. PNG does have some tuning parameters that can effect the final size usually just speed vs size.
- mappu 2y agoUsing plain gzip -9 on the 12MB uncompressed image, i get 6953 KiB, smaller than your PNG. Using a stronger gzip compressor (zopfli) i get as little as 6294 KiB.
- izacus 2y agoMaintaining a full third image pipeline and bug support it quite a big ask for a few % of superiority. For huge majority of (even picture heavy) websites you won't get more than 10% of loading time reduction even in the cases where JXL most superior.
- zigzag312 2y agoYou forgot about versatility. If anything, WebP and AVIF formats should never have been added to Chrome due to their glaring limitations.
- izacus 2y agoSure, but that's an argument for Chrome, not our websites.
- CuriousCosmic 2y agoBut that's kind of the thing with JPEG XL. It's designed specifically so you can store everything as JXL and "downcast" to older formats for little to no cost. JXL downscaling is practically a free operation that allows you to very effectively deliver multiple image sizes from a single copy. JXL -> JPEG re-encode is very cheap and results in nicer looking, better compressed JPEGs than using traditional JPEG encoders. And for formats like PNG, JXL should be able to hold that same data in roughly the same size (or less) without any visible data loss (or none at all for a slightly larger filesize). So converting down to PNGs at different sizes just becomes it's own pipeline if you still need that (over JPEGs or JXLs). It's the first thing close to a universal image format which is part of the reason some people push so heavily for it.
- wesamco 2y agoGoogle, (the Google Chrome team), have stated before that "[JPEG XL] doesn't provide significant benefits over existing image formats" [1] and have been vocal in there disinterest in shipping support for it (they deprecated experimental support) [1] My guess is that the newest/latest JPEG encoder developed by Google researchers, Jpegli[2], has a lot to do with this. Jpegli has been described in a Reddit comment as "a JPEG encoder that was developed by the JXL [JPEG XL] folks and the libjxl psychovisual model" and described to have superior performance to WebP (lossy WebP) [3]. that whole reddit thread has comments relevant to this discussion, specifically about the tradeoffs of supporting extra formats in browsers. [1] https://www.techspot.com/news/101764-google-once-again-accused-snubbing-jpeg-xl-image.html#:~:text=doesn%27t%20provide%20significant%20benefits%20over%20existing%20image%20formats https://www.techspot.com/news/101764-google-once-again-accus... [2] https://opensource.googleblog.com/2024/04/introducing-jpegli-new-jpeg-coding-library.html https://opensource.googleblog.com/2024/04/introducing-jpegli... [3] https://www.reddit.com/r/programming/comments/1ajq7bj/comment/kp43k7h/#:~:text=jpegli%2C%20a%20JPEG%20encoder%20that%20was%20developed%20by%20the%20JXL%20folks%20and%20the%20libjxl%20psychovisual%20model https://www.reddit.com/r/programming/comments/1ajq7bj/commen...