• ProdigalFrog@slrpnk.netOP
    link
    fedilink
    English
    arrow-up
    400
    ·
    4 months ago

    TL:DW, JPEG is getting old in the tooth, which prompted the creation of JPEG XL, which is a fairly future-proof new compression standard that can compress images to the same file size or smaller than regular JPEG while having massively higher quality.

    However, JPEG XL support was removed from Google Chrome based browsers in favor of AVIF, a standalone image compression derived from the AV1 video compression codec that is decidedly not future-proof, having some hard-coded limitations, as well as missing some very nice to have features that JPEG XL offers such as progressive image loading and lower hardware requirements. The result of this is that JPEG XL adoption will be severely hamstrung by Google’s decision, which is ultimately pretty lame.

    • Ghostalmedia@lemmy.world
      link
      fedilink
      English
      arrow-up
      169
      ·
      4 months ago

      I tried JPEG XL and it didn’t even make my files extra large. It actually made them SMALLER.

      False advertising.

    • reddig33@lemmy.world
      link
      fedilink
      English
      arrow-up
      74
      ·
      4 months ago

      Jpeg XL isn’t backwards compatible with existing JPEG renderers. If it was, it’d be a winner. We already have PNG and JPG and now we’ve got people using the annoying webP. Adding another format that requires new decoder support isn’t going to help.

      • MimicJar@lemmy.world
        link
        fedilink
        English
        arrow-up
        61
        ·
        4 months ago

        “the annoying webp” AFAIK is the same problem as JPEG XL, apps just didn’t implement it.

        It is supported in browsers, which is good, but not in third party apps. AVIF or whatever is going to have the same problem.

      • ProdigalFrog@slrpnk.netOP
        link
        fedilink
        English
        arrow-up
        40
        ·
        edit-2
        4 months ago

        Jpeg XL isn’t backwards compatible with existing JPEG renderers. If it was, it’d be a winner.

        According to the video, and this article, JPEG XL is backwards compatible with JPEG.

        But I’m not sure if that’s all that necessary. JPEG XL was designed to be a full, long term replacement to JPEG. Old JPEG’s compression is very lossy, while JPEG XL, with the same amount of computational power, speed, and size, outclasses it entirely. PNG is lossless, and thus is not comparable since the file size is so much larger.

        JPEG XL, at least from what I’m seeing, does appear to be the best full replacement for JPEG (and it’s not like they can’t co-exist).

        • reddig33@lemmy.world
          link
          fedilink
          English
          arrow-up
          28
          ·
          4 months ago

          It’s only backwards compatible in that it can re-encode existing jpeg content into the newer format without any image loss. Existing browsers and apps can’t render jpegXL without adding a new decoder.

          • ProdigalFrog@slrpnk.netOP
            link
            fedilink
            English
            arrow-up
            17
            ·
            4 months ago

            Existing browsers and apps can’t render jpegXL without adding a new decoder.

            Why is that a negative?

              • ProdigalFrog@slrpnk.netOP
                link
                fedilink
                English
                arrow-up
                15
                ·
                edit-2
                4 months ago

                The video actually references that comic at the end.

                But I don’t see how that applies in your example, since both JPEG and JPEG XL existing in parallel doesn’t really have any downsides, it’d just be nice to have the newer option available. The thrust of the video is that Google is kneecapping JPEG XL in favor of their own format, which is not backwards compatible with JPEG in any capacity. So we’re getting a brand new format either way, but a monopoly is forcing a worse format.

                • jmp242@sopuli.xyz
                  link
                  fedilink
                  English
                  arrow-up
                  2
                  ·
                  4 months ago

                  The other thing is, disk space and internet speeds just keep getting cheaper so… Why change just for disk space?

            • seaQueue@lemmy.world
              link
              fedilink
              English
              arrow-up
              6
              ·
              edit-2
              4 months ago

              Legacy client support. Old devices running old browser code can’t support a new format without software updates, and that’s not always possible. Decoding jxl on a 15yo device that’s not upgradable isn’t good UX. Sure, you probably can work around that with slow JavaScript decoding for many but it’ll be slow and processor intensive. Imagine decoding jxl on a low power arm device or something like a Celeron from the early 2010s and you’ll get the idea, it will not be anywhere near as fast as good old jpeg.

              • ProdigalFrog@slrpnk.netOP
                link
                fedilink
                English
                arrow-up
                4
                ·
                edit-2
                4 months ago

                That’s a good argument, and as a fan of permacomputing and reducing e-waste, I must admit I’m fairly swayed by it.

                However, are you sure JPEG XL decode/encode is more computationally heavy than JPEG to where it would struggle on older hardware? This measurement seems to show that it’s quite comparable to standard JPEG, unless I’m misunderstanding something (and I very well might be).

                That wouldn’t help the people stuck on an outdated browser (older, unsupported phones?), but for those who can change their OS, like older PC’s, a modern Linux distro with an updated browser would still allow that old hardware to decode JPEG XL’s fairly well, I would hope.

                • seaQueue@lemmy.world
                  link
                  fedilink
                  English
                  arrow-up
                  3
                  ·
                  edit-2
                  4 months ago

                  Optimized jpegxl decoding can be as fast as jpeg but only if the browser supports the format natively. If you’re trying to bolt jxl decoding onto a legacy browser your options become JavaScript and WASM decoding. WASM can be as fast but browsers released before like 2020 won’t support it and need to use JavaScript to do the job. Decoding jxl in JavaScript is, let’s just say it’s not fast and it’s not guaranteed to work on legacy browsers and older machines. Additionally any of these bolt on mechanisms require sending the decoder package on page load so unless you’re able to load that from the user’s cache you pay the bandwidth/time price of downloading and initializing the decoder code before images even start to render on the page. Ultimately bolting on support for the new format just isn’t worth the cost of the implementation in many cases so sites usually implement fallback to the older format as well.

                  Webp succeeded because Google rammed the format through and they did that because they controlled the standard. You’ll see the same thing happen with the jpegli format next, it lifts the majority of its featureset from jpegxl and Google controls the standard.

              • SkyeStarfall
                link
                fedilink
                English
                arrow-up
                3
                ·
                edit-2
                4 months ago

                The alternative is to never have anything better, which is not realistic

                Yes, it means more code, but that’s an inevitability. We already have lots of legacy stuff, like, say, floppy disk drivers

                • Morphit @feddit.uk
                  link
                  fedilink
                  English
                  arrow-up
                  1
                  ·
                  4 months ago

                  A balance has to be struck. The alternative isn’t not getting anything better, it’s being sure the benefits are worth the costs. The comment was “Why is [adding another decoder] a negative?” There is a cost to it, and while most people don’t think about this stuff, someone does.

                  The floppy code was destined to be removed from Linux because no one wanted to maintain it and it had such a small user base. Fortunately I think some people stepped up to look after it but that could have made preserving old software significantly harder.

                  If image formats get abandoned, browsers are going to face hard decisions as to whether to drop support. There has to be some push-back to over-proliferation of formats or we could be in a worse position than now, where there are only two or three viable browser alternatives that can keep up with the churn of web technologies.

                • Morphit @feddit.uk
                  link
                  fedilink
                  English
                  arrow-up
                  1
                  ·
                  4 months ago

                  I mean, the comic is even in the OP. The whole point is that AVIF is already out there, like it or not. I’m not happy about Google setting the standards but that has to be supported. Does JPEGXL cross the line where it’s really worth adding in addition to AVIF? It’s easy to yes when you’re not the one supporting it.

          • JackbyDev@programming.dev
            link
            fedilink
            English
            arrow-up
            3
            ·
            4 months ago

            They’re confusing backwards and forwards compatible. The new file format is backwards compatible but the old renderers are not forward compatible with the new format.

      • FaceDeer@fedia.io
        link
        fedilink
        arrow-up
        36
        ·
        4 months ago

        My understanding is that webp isn’t actually all that bad from a technical perspective, it was just annoying because it started getting used widely on the web before all the various tools caught up and implemented support for it.

      • ArchRecord@lemm.ee
        link
        fedilink
        English
        arrow-up
        21
        ·
        4 months ago

        I just wish more software would support webp files. I remember Reddit converting every image to webp to save on space and bandwidth (smart, imo) but not allowing you to directly upload webp files in posts because it wasn’t a supported file format.

        If webp was just more standardized, I’d love to use it more. It would certainly save me a ton of storage space.

      • KairuByte@lemmy.dbzer0.com
        link
        fedilink
        English
        arrow-up
        19
        ·
        4 months ago

        So… your solution is to stick with extremely dated and objectively bad file formats? You using Windows 95?

          • KairuByte@lemmy.dbzer0.com
            link
            fedilink
            English
            arrow-up
            19
            ·
            4 months ago

            For what it is? Nothing.

            Compared to something like JPEG XL? It is hands down worse in virtually all metrics.

            • NateNate60@lemmy.world
              link
              fedilink
              English
              arrow-up
              17
              ·
              4 months ago

              I think this might sound like a weird thing to say, but technical superiority isn’t enough to make a convincing argument for adoption. There are plenty of things that are undeniably superior but yet the case for adoption is weak, mostly because (but not solely because) it would be difficult to adopt.

              As an example, the French Republican Calendar (and the reformed calendar with 13 months) are both evidently superior to the Gregorian Calendar in terms of regularity but there is no case to argue for their adoption when the Gregorian calendar works well enough.

              Another example—metric time. Also proposed as part of the metric system around the same time as it was just gaining ground, 100 seconds in a minute and 100 minutes in an hour definitely makes more sense than 60, but it would be ridiculous to say that we should devote resources into switching to it.

              Final example—arithmetic in a dozenal (base-twelve) system is undeniably better than in decimal, but it would definitely not be worth the hassle to switch.

              For similar reasons, I don’t find the case for JPEG XL compelling. Yes, it’s better in every metric, but when the difference comes down to a measly one or two megabytes compared to PNG and WEBP, most people really just don’t care enough. That isn’t to say that I think it’s worthless, and I do think there are valid use cases, but I doubt it will unseat PNG on the Internet.

              • KairuByte@lemmy.dbzer0.com
                link
                fedilink
                English
                arrow-up
                11
                ·
                4 months ago

                I’m not under the impression it would unseat PNG anytime soon, but “we have a current standard” isn’t a good argument against it. As images get higher and higher quality, it’s going to increase the total size of images. And we are going to hit a point where it matters.

                This sounds so much like the misquoted “640K ought to be enough for anybody” that I honestly can’t take it seriously. There’s a reason new algorithms, formats and hardware are developed and released, because they improve upon the previous and generally improve things.

                • NateNate60@lemmy.world
                  link
                  fedilink
                  English
                  arrow-up
                  6
                  ·
                  4 months ago

                  My argument is not “we have a current standard”, it’s “people don’t give enough of a shit to change”.

              • AnUnusualRelic@lemmy.world
                link
                fedilink
                English
                arrow-up
                7
                ·
                4 months ago

                You’re thinking in terms of the individual user with a handful of files.

                When you look at it from a server point of view with tens of terabytes of images, or as a data center, the picture is very different.

                Shaving 5 or 10% off of files is a huge deal. And that’s not even taking into account the huge leap in quality.

              • Mike1576218@lemmy.ml
                link
                fedilink
                English
                arrow-up
                1
                ·
                4 months ago

                Soo they added webp and AV1, which aren’t that much better then old jpeg, especially with the modern jpeg encoder JpegLi. But JpegXL is out of the question.

                Those examples all have a good reason that does not apply here. Browsers already support multiple formats and added a few in the last decade.

            • TheRealKuni@lemmy.world
              link
              fedilink
              English
              arrow-up
              4
              ·
              4 months ago

              Compared to something like JPEG XL? It is hands down worse in virtually all metrics.

              Only thing I can think of is that PNG is inherently lossless. Whereas JPEG XL can be lossless or lossy.

              • hedgehog@ttrpg.network
                link
                fedilink
                English
                arrow-up
                3
                ·
                4 months ago

                I haven’t dug into the test data or methodology myself but I read a discussion thread recently (on Reddit - /r/jpegxl/comments/l9ta2u/how_does_lossless_jpegxl_compared_to_png) - across a 200+ image test suite, the lossless compression of PNG generates files that are 162% the size of those losslessly compressed with JPEG XL.

                However I also know that some tools have bad performance compressing PNG, and no certainty that those weren’t used

              • KairuByte@lemmy.dbzer0.com
                link
                fedilink
                English
                arrow-up
                2
                ·
                4 months ago

                It has a higher bit depth at orders of magnitude less file size. Admittedly it has a smaller max dimension, though the max for PNG is (I believe) purely theoretical.

            • hedgehog@ttrpg.network
              link
              fedilink
              English
              arrow-up
              1
              ·
              4 months ago

              Compared to something like JPEG XL? [PNG] is hands down worse in virtually all metrics.

              Until we circle back to “Jpeg XL isn’t backwards compatible with existing JPEG renderers. If it was, it’d be a winner.”

              APNG, as an example, is backwards compatible with PNG.

              If JPEG-XL rendered a tiny fallback JPEG (think quality 0 or even more compression) in browsers that don’t support JPEG-XL, then sites could use it without having to include a fallback option themselves.

              • KairuByte@lemmy.dbzer0.com
                link
                fedilink
                English
                arrow-up
                1
                ·
                4 months ago

                Why are you using PNG when it’s not backwards compatible with gif? They don’t even render a small low quality gif when a browser which doesn’t support it tries to load it.

                • hedgehog@ttrpg.network
                  link
                  fedilink
                  English
                  arrow-up
                  1
                  ·
                  4 months ago

                  Are you seriously asking why a commonly supported 27 year old format doesn’t need a fallback, but a 2 year old format does?

            • JackbyDev@programming.dev
              link
              fedilink
              English
              arrow-up
              1
              ·
              4 months ago

              Honest question, does JPEG XL support lossless compression? If so, then it’s probably objectively better than PNG. My understanding with JPEG is that there was no way to actually have lossless compression, it always compressed the image at least a little.

            • LifeInMultipleChoice@lemmy.world
              link
              fedilink
              English
              arrow-up
              1
              ·
              edit-2
              4 months ago

              So what your saying is that I should save everything as a BMP every time. Why compress images when I can be the anchor that holds us in place.

              By us I guess I mean the loading bar

      • cygnus@lemmy.ca
        link
        fedilink
        English
        arrow-up
        12
        ·
        4 months ago

        Forgive my ignorance, but isn’t this like complaining that a PlayStation 2 can’t play PS5 games?

        • tabular@lemmy.world
          link
          fedilink
          English
          arrow-up
          2
          ·
          edit-2
          4 months ago

          It’s a different culture between PCs and consoles. Consoles are standardized computers - they all have the same* hardware. Game developers can be confident in what functionality their games have access to, and so use the best they can.

          PCs in comparison are wildly different from user to user due to being modular: you can pick from many parts to create a computer. As such, devs tend to focus on what most PC’s can do and make them optionally better if the PC has access to supporting hardware (e.g. RTX ray-tracing cores).

          Besides, video games are drastically complex in comparison to static images 😛

      • AnUnusualRelic@lemmy.world
        link
        fedilink
        English
        arrow-up
        10
        ·
        4 months ago

        You can’t add new and better stuff while staying compatible with the old stuff. Especially not when your goal is compact files (or you’d just embed the old format).

      • southsamurai@sh.itjust.works
        link
        fedilink
        English
        arrow-up
        9
        ·
        4 months ago

        Isn’t that the same as other newer formats though?

        There’s always something new, and if the new thing is better, adding/switching to it is the better move.

        Or am I missing something about the other formats like webp?

        • reddig33@lemmy.world
          link
          fedilink
          English
          arrow-up
          6
          ·
          4 months ago

          You have to offer something compelling for everyone. Just coming out with yet another new standard™ isn’t enough. As pointed out earlier, we already have:

          • jpeg
          • Png
          • Webp
          • HEIC

          What’s the point of adding another encoder/decoder to the table when PNG and JPEG are still “good enough”?

          • Pennomi@lemmy.world
            link
            fedilink
            English
            arrow-up
            13
            ·
            4 months ago

            PNG and JPEG aren’t good enough, to be honest. If you run a content heavy site, you can see something like a 30-70% decrease in bandwidth usage by using WebP.

    • dezmd@lemmy.world
      link
      fedilink
      English
      arrow-up
      14
      ·
      4 months ago

      Look it’s all actually about re-encumberancing image file formats back into corporate controlled patented formats. If we would collectively just spend time and money and development resources expanding and improving PNG and gif formats that are no longer patent encumbered, we’d all live happily ever after.

    • seaQueue@lemmy.world
      link
      fedilink
      English
      arrow-up
      5
      ·
      4 months ago

      Google’s handling of jxl makes a lot more sense after the jpegli announcement. It’s apparent now that they declined to support jxl in favor of cloning many of jxl’s features in a format they control.

    • Moah
      link
      fedilink
      English
      arrow-up
      3
      ·
      4 months ago

      Why wasn’t PNG enough to replace jpeg?

      • ProdigalFrog@slrpnk.netOP
        link
        fedilink
        English
        arrow-up
        21
        ·
        4 months ago

        PNG is a lossless format, and hence results in fairly large file sized compared to compressed formats, so they’re solving different issues.

        JPEG XL is capable of being either lossy or lossless, so it sorta replaces both JPEG and PNG

    • Not a replicant@lemmy.world
      link
      fedilink
      English
      arrow-up
      1
      ·
      3 months ago

      And JPEG2000 is what’s used in Digital Cinema Package (DCP) - that’s the file format used to distribute feature films. That’s not going away soon.

  • rustydomino@lemmy.world
    link
    fedilink
    English
    arrow-up
    221
    ·
    4 months ago

    Without jpeg compression artifacts how the hell are we supposed to know which memes are fresh and which memes are vintage???

    • booly@sh.itjust.works
      link
      fedilink
      English
      arrow-up
      51
      ·
      4 months ago

      I still think it’s bullshit that 20-year-old photos now look the same as 20-second-old photos. Young people out there with baby pictures that look like they were taken yesterday.

        • III@lemmy.world
          link
          fedilink
          English
          arrow-up
          3
          ·
          4 months ago

          Could probably pull that off with meta information to determine the age of the photo.

  • hitwright@lemmy.world
    link
    fedilink
    English
    arrow-up
    19
    ·
    4 months ago

    Wasn’t there a licensing issue with jpeg xl for using Microsoft’s some sort of algo?

    • Linkerbaan@lemmy.world
      link
      fedilink
      English
      arrow-up
      8
      ·
      4 months ago

      Makes sense why AV1F isn’t supported in Windows. Likely a corrupt Microsoft backroom deal with proprietary algorithms makers.

        • Linkerbaan@lemmy.world
          link
          fedilink
          English
          arrow-up
          1
          ·
          4 months ago

          Oh cool I didn’t even know that. Thanks for the heads up. Wonder why the codec isn’t installed by default though

      • hitwright@lemmy.world
        link
        fedilink
        English
        arrow-up
        2
        ·
        3 months ago

        Then it’s absolutely soul-crushing to see Google abuse it’s market dominance like that…

    • erwan@lemmy.ml
      link
      fedilink
      English
      arrow-up
      58
      ·
      4 months ago

      I don’t know, because it sucks and has zero benefits over PNG?

      • hedgehog@ttrpg.network
        link
        fedilink
        English
        arrow-up
        9
        ·
        4 months ago

        Probably the least relevant benefit of APNG over GIF: Unlike GIF, I can even pronounce APNG with a soft G and not feel gross about it. (Like I’m betraying the peanut butter brand and my entire moral framework at the same time, y’know?)

    • Scio@lemmy.world
      link
      fedilink
      English
      arrow-up
      3
      ·
      4 months ago

      As an EXR elitist I deeply resent Google’s blatant sabotage of JXL.

      (And also laugh at the PNG elitists, as is custom.)

  • Martin@feddit.nu
    link
    fedilink
    English
    arrow-up
    1
    ·
    4 months ago

    Is chrome modular enough to make it feasible for Edge and other Chrome based browsers to add support for jpegxl themselves?