Comment by binaryturtle

8 hours ago

I don't see any advantage of any of the new formats over the good old and proven formats, so I stick with PNG and JPEG (properly optimized.) I can fire up any old browser and it will just work.

Unless you're targeting really old browsers, lossless WebP is absolutely worth it over PNG.

As a test, I have a set of 36 old MS paint Drawings, originally drawn on Windows 98SE, originally saved in bitmap format with a total size of 53.4 MB.

Transcoded to PNG format using FFmpeg and the highest -compression_level of 100, this same set of images takes up 403.8 kB.

Transcoded to -lossless WebP format using FFmpeg and libwebp with the maximum -quality value of 100 and maximum -compression_level of 6, the set of images takes up 174.8 kB.

Transcoded to lossless JPEG XL format using cjxl in the highest compression settings, the 36 images only takes up 126.6 kB.

Given the computing power required to decode JPEG XL images and their limited support, it may not make sense to use JPEG XL for non-archival purposes, but lossless WebP is an excellent middle-ground, achieving over 2x the compression level of PNG.

Lossless WebP has also been supported by all major web browsers since September 2022, when Apple finally added full support for lossless and animated WebP images. It really doesn't make sense to still be using PNG, unless you're targeting really out-of-date Mac or iOS devices. Having drawings and illustrations be 50% smaller (versus PNG) is huge!

  • Personally, I avoid WebP out of spite. While it has greatly improved over previous formats in certain uses, it has been lacking or offering only marginal improvements in others. That didn’t stop Google from pushing it hard on the web.

    I was left feeling like the next time we adopt a format that tries to do everything, it should actually do everything just as well or better than its predecessors. Lo and behold, JPEG XL is probably the first format which actually achieves this, covering all kinds of pictures you can think of and doing a pretty good job on all of them. So for the first time, I feel like the format has actually earned its place in the ecosystem, rather than just being some megacorporation’s personal favourite.

    Of course, this point of view is emotional more than rational. Technically, WebP is a sensible choice, so I don’t mean to discourage anyone from using it today.

    • It wasn't some one company's choice and push. Almost everyone wins when bandwidth is cut and you get higher quality for less space. I'd argue most people's hatred for webp purely comes down to a few other corporations like microsoft, not supporting it well in the early days and blaming the format instead.

JPEGXL literally is able to display images and colors that jpeg and png cannot (32-but floating point, layers, emission independent transparency, spot colors, built im depth maps). It’s not just about compression optimization. So for those use cases standard JPEG and PNG alone will never work. There are “updated” versions of JPEG that support some of these like HDR but those won’t work with any old browser either so back to the same issue.

  • Can the human eye even tell the difference? This feels like 8k vs 4k tv.

    • Yes, a hdr photo in heif or jxl is a night and day difference. And if you apply any kind of color edits to the photo it stretches the colors to the point visible banding occurs on jpeg.

    • Yes, and image editors absolutely can. If JXL lets me correct over/underexposed images by default everywhere I find them then it's worth it even just for that reason alone

    • Bottom line it can deliver greater quality at much smaller filesizes. Considering RAM and storage are more expensive per byte now than they have been in years, I think it's incumbent on everyone in a position to do so, to use those resources wisely.

      WebP and AVIF and HEIC had similar advantages but also some disadvantages (honestly chief disadvantage to WebP in my humble opinion was that nothing except web browsers -- to this day -- seem to support it!).

      Another important point in its favor is that JPEG XL is designed as a royalty‑free, open standard, and Google provides a perpetual, worldwide, royalty‑free patent license for its reference implementation.

      Avoiding JXL (once the rollout is sufficiently complete) seems, to me, like still shipping (non-animated) .GIF files where .PNG is better and smaller.

      1 reply →

    • > Can the human eye even tell the difference? This feels like 8k vs 4k tv.

      Even if it cannot, getting the same quality as 'classic' JPEG in fewer bits is still useful. So you have:

      * better quality in the same number of bits

      * same quality in fewer bits

  • Yes, but that’s still a niche use case. Web pages look fine using the colors we already have. Somewhat more vibrant colors are a luxury.

    • It looks fine sure, but that doesn't make it good either. Are you going to lock display technology to 8 bit forever? Most PC monitors already match or exceeding that limit, phones especially. HDR is something that needs to happen eventually, and for that new format is very important

I used to think this and then I saw how well webp reduced my website's bandwidth costs compared to optimized jpg or png. I felt a bit left behind at that moment, like I should have been paying attention to these great improvements over the years.

  • It is great to reduce file size but also the quality drops faster than it does with JPG. I did some testing and could confirm, it is quite documented.

    Which I think it might be one of the reasons why Instagram still uses JPG for their images. The rule of thumb is that if your product is picture quality sensitive (like photos in IG) then use JPG, if not then WebP is fine since the compression is higher.

JXL has clear advantages and saying you don't see them means you either didn't attempt to see them or willfully ignore them

  • I'm not sure if the parent comment means to say, but I could choose to interpret their meaning to be:

    PNG/JPEG have strong support (nearly everywhere). I think of them almost as the modern TIFF - relatively simple, and almost everything supports one or both of them (few to no issues).

    JXL may eventually get there (that indeed seems to be its goal), but for now I wouldn't drop e.g. PNG or JPEG support in favor of JXL now.

    And arguably, perhaps never drop support; its such a prevalent format, even if all software (prevalent or otherwise) supports the format in 10 years, there will be such a huge stockpile of JPEG/PNG that something will need to be used to read/convert.

    • > I think of them almost as the modern TIFF - relatively simple

      TIFF is not simple at all. There is a joke that it stands for “Thousands of Incompatible File Formats”.

  • Not everyone needs to be an early adopter of every technology.

    Even if JXL is superior in every single way, it doesn't make sense to throw out a perfectly functional graphics package and design language for a marginal bump in capability.

    • The industry already started throwing out jpeg for heif because jpeg is so woefully inadequate. Most camera brands have heif support now despite heif having horrible patent issues. Jpeg XL provides all the technical benefits without being patent encumbered.

    • It may or may not be marginal.

      For me now, its marginal.

      For a past customer, not at all. That customer really cared about delivering image-heavy pages quickly. There was a fairly big difference in customer perception at a timing threshold.

    • The very point of this topic is that JXL is leaving the "early adopter" realm. If your website begins serving JXL assets next month, you'll simply be an adopter.

I just switched over some machine vision code to use it for the lossless format, saving around 30% file size (~5 gigabytes per dataset) over optimized lossless PNG. I'll gladly take any storage donations you may be passing out though, so I can continue to use the good old and proven formats! ;)

James Brown recorded his music to sound good over an AM radio. It still sounds good on good equipment.

Meanwhile, there's a lot of modern music that takes full advantage of quality gear, but is basically unlistenable on bad speakers.

There's nothing wrong with either approach, but if you're not trying to raise the bar why not just stick with the lowest common denominator?

  • James Brown recorded his music to sound good over an AM radio. It still sounds good on good equipment.

    Dean Martin recorded his records to sound good on low-end tween girl 1960's record players. My wife has one, and his stuff sounds great on it.

    My wife also has two very high-end modern record players. Dean's old records sound like crap on that.

    Master the media for the method.

biggest advantage for me is file size and lossless conversion of existing jpg images. In a network scenario that can meaningfully impact load times. Others will care about e.g. bit depth

  • Yeah but file size and lossless conversion of existing JPEG are something done by many other codecs. Dropbox famously developed Lepton[0] to compress existing JPEGs losslessly. There need to be some other factors that would lead to increased mindshare.

    [0]: https://github.com/dropbox/lepton And Lepton is dead.

    • Being a well supported format on all OSs will allow that. One of the biggest failure of WebP was very poor native support beyond browsers. JXL is supported natively by pretty much all operating systems right now beside Android. JPEG recompression is simply an advantage

      1 reply →

    • well, lepton doesn't have browser support. I'm not married to jxl specifically, I just want something in the browser with those features, and jxl fills that niche

For one, it allowed me to fit several years of photos in a few gigabytes so I can easily back them up without going broke.