markdog12 a day ago

"Yes, re-opening.".

> Given these positive signals, we would welcome contributions to integrate a performant and memory-safe JPEG XL decoder in Chromium. In order to enable it by default in Chromium we would need a commitment to long-term maintenance. With those and our usual launch criteria met, we would ship it in Chrome.

https://groups.google.com/a/chromium.org/g/blink-dev/c/WjCKc...

  • concinds 15 hours ago

    Context: Mozilla has had the same stance and many devs (including Googlers) are already working on a Rust decoder which has made good progress.

  • bigbuppo 16 hours ago

    LOL. Google, the "yeah that thing we bought six months ago, we're killing it off 30 days for 4 weeks ago" company demanding "long-term" anything.

    • rjh29 4 hours ago

      That conversation doesn't apply to their core products: Search, Mail, Maps, Chrome, Android. Their commitment to maintaining these services over decades has been amazing. It's everything else that sucks.

      • professor_v 28 minutes ago

        Mail is dropping features left and right, like gmailify. I'm pretty sure they're trying to limit the maintenance costs as much as possible.

    • lonjil 16 hours ago

      long term support is actually being provided by google...

      just a different team in a different country :D

      most jxl devs are at google research in zurich, and already pledged to handle long tetm support

      • malfist 14 hours ago

        Just like google pledges long term support for everything until the next new and shiny comes along.

        • tyre 10 hours ago

          I think Chrome can safely be said to have a track record of long term investment.

          • bigiain 6 hours ago

            It is, after all, their primary ad delivery vector.

          • josefx 3 hours ago

            Very good track record there, native clients, floc, manifest v2, ...

wizee 21 hours ago

JPEG-XL provides the best migration path for image conversion from JPEG, with lossless recompression. It also supports arbitrary HDR bit depths (up to 32 bits per channel) unlike AVIF, and generally its HDR support is much better than AVIF. Other operating systems and applications were making strides towards adopting this format, but Google was up till now stubbornly holding the web back in their refusal to support JPEG-XL in favour of AVIF which they were pushing. I’m glad to hear they’re finally reconsidering. Let’s hope this leads to resources being dedicated to help build and maintain a performant and memory safe decoder (in Rust?).

  • homebrewer 19 hours ago

    It's not just Google, Mozilla has no desire to introduce a barely supported massive C++ decoder for marginal gains either:

    https://github.com/mozilla/standards-positions/pull/1064

    avif is just better for typical web image quality, it produces better looking images and its artifacts aren't as annoying (smoothing instead of blocking and ringing around sharp edges).

    You also get it for basically free because it's just an av1 key frame. Every browser needs an av1 decoder already unless it's willing to forego users who would like to be able to watch Netflix and YouTube.

    • lonjil 18 hours ago

      I don't understand what you're trying to say. Mozilla said over a year ago that they would support JXL as soon as there's a fast memory safe decoder that will be supported.

      Google on the other hand never expressed any desire to support JXL at all, regardless of the implementation. Only just now after the PDF Association announced that PDF would be using JXL, did they decide to support JXL on the web.

      > avif is just better for typical web image quality, it produces better looking images and its artifacts aren't as annoying (smoothing instead of blocking and ringing around sharp edges).

      AVIF is certainly better for the level of quality that Google wants you to use, but in reality, images on the web are much higher quality than that.

      And JXL is pretty good if you want smoothing, in fact libjxl's defaults have gotten so overly smooth recently that it's considered a problem which they're in the process of fixing.

      • bawolff 16 hours ago

        > I don't understand what you're trying to say. Mozilla said over a year ago that they would support JXL as soon as there's a fast memory safe decoder that will be supported.

        Did they actually say that? All the statements i've seen them have been much more guarded and vauge. More of a, maybe we will think about it if that happens.

        • lonjil 16 hours ago

          > If they successfully contribute an implementation that satisfies these properties and meets our normal production requirements, we would ship it.

          That's what they said a year ago. And a couple of Mozilla devs have been in regular contact with the JXL devs ever since then, helping with the integration. The patches to use jxl-rs with Firefox already exist, and will be merged as soon as a couple of prerequisite issues in Gecko are fixed.

          • magicalist 15 hours ago

            Their standards position is still neutral; what switched a year ago was that they said they would be open to shipping an implementation that met their requirements. The tracking bug hasn't been updated[2] The patches you mention are still part of the intent to prototype (behind a flag), similar to the earlier implementation that was removed in Chrome.

            They're looking at the same signals as Chrome of a format that's actually getting use, has a memory safe implementation, and that will stick around for decades to justify adding it to the web platform, all of which seem more and more positive since 2022.

            [1] https://mozilla.github.io/standards-positions/#jpegxl

            [2] https://bugzilla.mozilla.org/show_bug.cgi?id=1539075

    • wizee 18 hours ago

      I disagree about the image quality at typical sizes - I find JPEG-XL is generally similar or better than AVIF at any reasonable compression ratios for web images. See this for example: https://tonisagrista.com/blog/2023/jpegxl-vs-avif/

      AVIF only comes out as superior at extreme compression ratios at much lower bit rates than are typically used for web images, and the images generally look like smothered messes at those extreme ratios.

    • bananalychee 18 hours ago

      Even though AVIF decoding support is fairly widespread by now, it is still not ubiquitous like JPEG/PNG/GIF. So typically services will store or generate the same image in multiple formats including AVIF for bandwidth optimization and JPEG for universal client support. Browser headers help to determine compatibility, but it's still fairly complicated to implement, and users also end up having to deal with different platforms supporting different formats when they are served WebP or AVIF and want to reupload an image somewhere else that does not like those formats. As far as I can tell, JXL solves that issue for most websites since it is backwards-compatible and can be decoded into JPEG when a client does not support JXL. I would happily give up a few percent in compression efficiency to get back to a single all-purpose lossy image format.

      • hirako2000 17 hours ago

        Even Google photo does not support avif.

        It's almost as if Google had an interest in increased storage and bandwidth. Of course they don't but as paying Driver used I'm overcharged for the same thing.

        • magicalist 15 hours ago

          > Even Google photo does not support avif

          I have no previous first-hand knowledge of this, but I vaguely remember discussions of avif in google photos from reddit a while back so FWIW I just tried uploading some avif photos and it handled them just fine.

          Listed as avif in file info, downloads as the original file, though inspecting the network in the web frontend, it serves versions of it as jpg and webp, so there's obviously still transcoding going on.

          I'm not sure when they added support, the consumer documentation seem to be more landing site than docs unless I'm completely missing the right page, but the API docs list avif support[1], and according to the way back machine, "AVIF" was added to that page some time between August and November 2023.

          [1] https://developers.google.com/photos/library/guides/upload-m...

          • hirako2000 14 hours ago

            You are correct it is possible to upload avif files into Google Photo. But you lose the view and of course the thumbnail. Defeating the whole purpose of putting them into Photo.

            Given it's an app, they didn't even need Google chrome to add support. Avif is supported on Android natively.

        • lonjil 16 hours ago

          Some years ago, the Google Photos team asked the Chrome team to support JXL, so that they could use it for Photos. The request was ignored, of course.

          • hirako2000 14 hours ago

            They could have added support themselves to the app as it doesn't use the WebView

            • ascorbic 4 hours ago

              Google Photos isn't just the app

    • kps 19 hours ago

      Not everything in the world is passive end-of-the-line presentation. JPEG-XL is the only one that tries to be a general-purpose image format.

      • asadotzler 19 hours ago

        If that's the case, let it be a feature of image editing packages that can output formats that are for the web. It's a web standard we're talking about here, not a general-purpose image format, so asking browsers to carry that big code load seems unreasonable when existing formats do most of what we need and want for the web.

        • crote 18 hours ago

          People generally expect browsers to display general-purpose image formats. It's why they support formats like classical JPEG, instead of just GIF and PNG.

          Turns out people really like being able to just drag-and-drop an image from their camera into a website - being forced to re-encode first it isn't exactly popular.

          • robertoandred 18 hours ago

            > Turns out people really like being able to just drag-and-drop an image from their camera into a website - being forced to re-encode first it isn't exactly popular.

            That’s a function of the website, not the browser.

            • jyoung8607 18 hours ago

              > That’s a function of the website, not the browser.

              That's hand-waving away quite a lot. The task changes from serving a copy of a file on disk, as every other image format in common use, to needing a transcoding pipeline more akin to sites like YouTube. Technically possible, but lots of extra complexity in return for what gain?

    • danielheath 4 hours ago

      The killer feature of JXL is that most websites already have a whole bunch of images in JPEG format, and converting those to JXL shrinks them by about 30% without introducing any new artifacts.

    • magicalhippo 17 hours ago

      > Mozilla has no desire to introduce a barely supported massive C++ decoder for marginal gains

      On a slightly related note, I wanted to have a HDR background image in Windows 11. Should be a breeze in 2025 right?

      Well, Windows 11 only supports JPEG XR[1] for HDR background images. And my commonly used tools did either not support JPEG XR (Gimp fex) or they did not work correctly (ImageMagick).

      So I had a look at the JPEG XR reference implementation, which was hosted on Codeplex but has been mirrored on GitHub[2]. And boy, I sure hope that isn't the code that lives in Windows 11...

      Ok most of the gunk is in the encoder/decoder wrapper code, but still, for something that's supposedly still in active use by Microsoft... Though not even hosting their own copy of the reference implementation is telling enough I suppose.

      [1]: https://en.wikipedia.org/wiki/JPEG_XR

      [2]: https://github.com/4creators/jxrlib

      • infinet 16 hours ago

        Another JPEG XR user is Zeiss. It saves both grayscale and color microscope images with JPEG XR compression in a container format. Zeiss also released a C++ library (libczi) using the reference JPEG XR implementation to read/write these images. Somehow Zeiss is moving away from JPEG XR - its newer version of microscope control software saves with zstd compression by default.

    • xeeeeeeeeeeenu 19 hours ago

      >avif is just better for typical web image quality,

      What does "typical web image quality" even mean? I see lots of benchmarks with very low BPPs, like 0.5 or even lower, and that's where video-based image codecs shine.

      However, I just visited CNN.com and these are the BPPs of the first 10 images my browser loaded: 1.40, 2.29, 1.88, 18.03 (PNG "CNN headlines" logo), 1.19, 2.01, 2.21, 2.32, 1.14, 2.45.

      I believe people are underestimating the BPP values that are actually used on the web. I'm not saying that low-BPP images don't exist, but clearly it isn't hard to find examples of higher-quality images in the wild.

    • jnd-cz 19 hours ago

      Can AVIF display 10 bit HDR with larger color gamut that any modern phone nowadays is capable of capturing?

      • CharlesW 7 hours ago

        > Can AVIF display 10 bit HDR with larger color gamut that any modern phone nowadays is capable of capturing?

        Sure, 12-bit too, with HDR transfer functions (PQ and HLG), wide-gamut primaries (BT.2020, P3, etc.), and high-dynamic-range metadata (ITU/CTA mastering metadata, content light level metadata).

        JPEG XL matches or exceeds these capabilities on paper, but not in practice. The reality is that the world is going to support the JPEG XL capabilities that Apple supports, and probably not much more.

      • arccy 19 hours ago

        if you actually read your parent comment: "typical web image quality"

        • ansgri 19 hours ago

          Typical web image quality is like it is partly because of lack of support. It’s literally more difficult to show a static HDR photo than a whole video!

          • mort96 18 hours ago

            HDR should not be "typical web" anything. It's insane that websites are allowed to override my system brightness setting through HDR media. There's so much stuff out there that literally hurts my eyes if I've set my brightness such that pure white (SDR FFFFFF) is a comfortable light level.

            I want JXL in web browsers, but without HDR support.

            • magicalhippo 17 hours ago

              There's nothing stopping browsers from tone mapping[1] those HDR images using your tone mapping preference.

              [1]: https://en.wikipedia.org/wiki/Tone_mapping

              • mort96 16 hours ago

                What does that achieve? Isn't it simpler to just not support HDR than to support HDR but tone map away the HDR effect?

                Anyway, which web browsers have a setting to tone map HDR images such that they look like SDR images? (And why should "don't physically hurt my eyes" be an opt-in setting anyway instead of just the default?)

                • magicalhippo 14 hours ago

                  > What does that achieve?

                  Because then a user who wants to see the HDR image in all its full glory can do so. If the base image is not HDR, then there is nothing they can do about it.

                  > And why should "don't physically hurt my eyes" be an opt-in setting anyway instead of just the default?

                  While I very much support more HDR in the online world, I fully agree with you here.

                  However, I suspect the reason will boil down to what it usually does: almost no users change the default settings ever. And so, any default which goes the other way will invariably lead to a ton of support cases of "why doesn't this work".

                  However, web browsers are dark-mode aware, they could be HDR aware and do what you prefer based on that.

                  • mort96 an hour ago

                    What user wants the web to look like this? https://floss.social/@mort/115147174361502259

                    • magicalhippo 8 minutes ago

                      That video is clearly not encoded correctly. If it were the levels would match the background, given there is mo actual HDR content visible in that video frame.

                      Anyway, even if the video was of a lovely nature scene in proper HDR, you might still find it jarring compared to the surrounding non-HDR desktop elements. I might too, depending on the specifics.

                      However, like I said, it's up to the browser to handle this.

                      One suggestion I saw mentioned by some browser devs was to make the default to tone map HDR if the page is not viewed in fullscreen mode, and switch to full HDR range if it is fullscreen.

                      Even if that doesn't become the default, it could be a behavior the browser could let the user select.

                • Dylan16807 7 hours ago

                  If you want to avoid eye pain then you want caps on how much brightness can be in what percent of the image, not to throw the baby out with the bathwater and disable it entirely.

                  And if you're speaking from iphone experience, my understanding is the main problem there isn't extra bright things in the image, it's the renderer ignoring your brightness settings when HDR shows up, which is obviously stupid and not a problem with HDR in general.

                  • mort96 3 hours ago

                    If the brightness cap of the HDR image is full SDR brightness, what value remains in HDR? As far as I can see, it's all bath water, no baby

                    • Dylan16807 2 hours ago

                      > If the brightness cap of the HDR image is full SDR brightness, what value remains in HDR?

                      If you set #ffffff to be a comfortable max, then that would be the brightness cap for HDR flares that fill the entire screen.

                      But filling the entire screen like that rarely happens. Smaller flares would have a higher cap.

                      For example, let's say an HDR scene has an average brightness that's 55% of #ffffff, but a tenth of the screen is up at 200% of #ffffff. That should give you a visually impressive boosted range without blinding you.

                      • mort96 2 hours ago

                        Oh.

                        I don't want the ability for 10% of the screen to be so bright it hurts my eyes. That's the exact thing I want to avoid. I don't understand why you think your suggestion would help. I want SDR FFFFFF to be the brightest any part of my screen goes to, because that's what I've configured to be at a comfortable value using my OS brightness controls.

                        • Dylan16807 2 hours ago

                          I strongly doubt that the brightness to hurt your eyes is the same for 10% of the screen and 100% of the screen.

                          I am not suggesting eye hurting. The opposite really, I'm suggesting a curve that stays similarly comfortable at all sizes.

                          • mort96 2 hours ago

                            I don't want any one part of my screen to be a stupidly bright point light. It's not just the total amount of photons that matters.

                            • Dylan16807 2 hours ago

                              It is not just the total amount.

                              But it's not the brightest spot either.

                              It's in between.

                              • mort96 2 hours ago

                                I just don't want your "in between" "only hurt my eyes a little" solution. I don't see how that's so hard to understand. I set my brightness so that SDR FFFFFF is a comfortable max brightness. I don't understand why web content should be allowed to go brighter than that.

                                • Dylan16807 2 hours ago

                                  I'm suggesting something that WON'T hurt your eyes. I don't see how that's so hard to understand.

                                  You set a comfortable max brightness for the entire screen.

                                  Comfortable max brightness for small parts of the screen is a different brightness. Comfortable. NO eye hurting.

                                  • mort96 2 hours ago

                                    It's still uncomfortable to have 10% of the screen get ridiculously bright.

                                    • Dylan16807 2 hours ago

                                      Yes, it's uncomfortable to have it get "ridiculously" bright.

                                      But there's a level that is comfortable that is higher than what you set for FFFFFF.

                                      And the comfortable level for 1% of the screen is even higher.

                                      HDR could take advantage of that to make more realistic scenes without making you uncomfortable. If it was coded right to respect your limits. Which is probably isn't right now. But it could be.

                                      • mort96 2 hours ago

                                        I severely doubt that I could ever be comfortable with 10% of my screen getting much brighter than the value I set as max brightness.

                                        But say you're right. Now you've achieved images looking completely out of place. You've achieved making the surrounding GUI look grey instead of white. And the screen looks broken when it suddenly dims after switching tabs away from one with an HDR video. What's the point? Even ignoring the painful aspects (which is a big thing to ignore, since my laptop currently physically hurts me at night with no setting to make it not hurt me, which I don't appreciate), you're just making the experience of browsing the web worse. Why?

                                        • Dylan16807 2 hours ago

                                          In general, people report that HDR content looks more realistic and pretty. That's the point, if it can be done without hurting you.

                                          • mort96 2 hours ago

                                            Do they? Do people report that an HDR image on a web page that takes up roughly 10% of the screen looks more realistic? Do they report that an HDR YouTube video, which mostly consists of a screen recording with the recorded SDR FFF being mapped to the brightness of the sun, looks pretty? Do people like when their light-mode GUI suddenly turns grey as a part of it becomes 10x the brightness of what used to be white? (see e.g https://floss.social/@mort/115147174361502259)

                                            Because that's what HDR web content is.

                                            HDR movies playing on a livingroom TV? Sure, nothing against that. I mean it's stupid that it tries to achieve some kind of absolute brightness, but in principle, some form of "brighter than SDR FFF" could make sense there. But for web content, surrounded by an SDR GUI?

                                            • Dylan16807 an hour ago

                                              > when their light-mode GUI suddenly turns grey as a part of it becomes 10x the brightness of what used to be white

                                              I don't know why you're asking me about examples that violate the rules I proposed. No I don't want that.

                                              And obviously boosting the brightness of a screen capture is bad. It would look bad in SDR too. I don't know why you're even bringing it up. I am aware that HDR can be done wrong...

                                              But for HDR videos where the HDR actually makes sense, yeah it's fine for highlights in the video to be a little brighter than the GUI around them, or for tiny little blips to be significantly brighter. Not enough to make it look gray like the misbehavior you linked.

                                              • mort96 an hour ago

                                                > I don't know why you're asking me about examples that violate the rules I proposed. No I don't want that.

                                                Other than the exaggerated 10x, I don't understand how it violates the rules you proposed. You proposed a scheme where part of the screen should be allowed to be significantly brighter than the surrounding SDR GUI's FFF. That makes the surrounding GUI look grey.

                                                > And obviously boosting the brightness of a screen capture is bad. It would look bad in SDR too. I don't know why you're even bringing it up.

                                                I'm bringing it up because that's how HDR looks on the web. Most web content isn't made by professional movie studios.

                                                The example video I linked conforms with your suggested rules, FWIW: most of the image is near black, only a relatively smart part of it is white. The average brightness probably isn't over SDR FFF. Yet it still hurts.

                                                • Dylan16807 an hour ago

                                                  The whole chip in the middle is brighter than white. Half that video is super bright, making this example way more than I was suggesting in both area and average brightness.

                                                  > most of the image is near black, only a relatively smart part of it is white. The average brightness probably isn't over SDR FFF.

                                                  It's a lot more than I suggested, and I said average brightness half of FFF for my example.

                                                  Also if I knew you were going to hammer on the loose example numbers I would have said 2% or 1%.

                                                  > I'm bringing it up because that's how HDR looks on the web.

                                                  But I'm not defending how it looks. I'm defending how it could look, since you don't see why anyone would even want HDR on the web.

                                                  • mort96 an hour ago

                                                    This is going on for too long. Maybe you can somehow find a way to process all HDR content so that it's reasonable (i.e never makes the surrounding SDR GUI look grey, never makes bright pots which are bright enough to hurt) across all screens imaginable and all contexts. Maybe. I have my doubts, but go ahead.

                                                    Convince the web standards bodies and browser implementers and transform the world into one where HDR on the web is perfect and never causes issues.

                                                    But until that's done, there's a simple solution: Just don't support HDR. Until your hypothetical perfect solution is universally implemented, it does more harm than good on the web and should not be supported.

                                                    I don't see why anyone would want HDR on the web in its current form.

                                                    • Dylan16807 an hour ago

                                                      Well the reason I was talking about limits that way is because it's something screens already do when displaying HDR content. They can't go full power over much area, and the bigger you go the dimmer your limit gets. So repurposing those existing algorithms with some tweaking.

                                                      It's not very hard on a technical level.

                                                      And no it doesn't have to be universal and perfect to reach the point that HDR is a benefit. There are some blatant flaws that need fixing, and just a few fixes would get us a lot closer.

                                                      • mort96 43 minutes ago

                                                        It has to be universally not harmful.

                                                        Again, go convince standards bodies and browser implementers to implement those algorithms after doing studies to demonstrate that it fixes the issue. Until then, I just don't want it in my browser.

                  • adgjlsfhk1 5 hours ago

                    it actually is somewhat an HDR problem because the HDR standards made some dumb choices. SDR standardizes relative brightness, but HDR uses absolute brightness even though that's an obviously dumb idea and in practice no one with a brain actually implements it.

                • spider-mario 14 hours ago
                  • mort96 14 hours ago

                    How about websites just straight up aren't allowed to physically hurt me, by default?

                    • NetMageSCW 10 hours ago

                      Web sites aren’t made for just you. If images from your screen are causing you issues, that is a you / your device problem, not a web site problem.

                      • mort96 3 hours ago

                        I agree, it's not a web site problem. It's a web standards problem that it's possible for web sites to do that.

                    • spider-mario 13 hours ago

                      You asked “which web browsers have a setting to tone map HDR images such that they look like SDR images?”; I answered. Were you not actually looking for a solution?

                      • mort96 12 hours ago

                        I was looking for a setting, not a hack.

  • twotwotwo 19 hours ago

    Wanted to note https://issues.chromium.org/issues/40141863 on making the lossless JPEG recompression a Content-Encoding, which provides a way that, say, a CDN could deploy it in a way that's fully transparent to end users (if the user clicks Save it would save a .jpg).

    (And: this is great! I think JPEG XL has chance of being adopted with the recompression "bridge" and fast decoding options, and things like progressive decoding for its VarDCT mode are practical advantages too.)

  • kllrnohj 19 hours ago

    > and generally its HDR support is much better than AVIF

    Not anymore. JPEG had the best HDR support with ISO 21496-1 weirdly enough, but AVIF also just recently got that capability with 1.2 ( https://aomedia.org/blog%20posts/Libavif-Improves-Support-fo... ).

    The last discussion in libjxl about this was seemingly taking the stance it wasn't necessary since JXL has "native HDR" which completely fails to understand the problem space entirely.

    • lonjil 18 hours ago

      The JXL spec already has gainmaps...

      Also, just because there's a spec for using gainmaps with JPEG doesn't mean that it works well. With only 8 bits of precision, it really sucks for HDR, gainmap or no gainmap. You just get too much banding. JXL otoh is completely immune to banding, with or without gainmaps.

      • kllrnohj 18 hours ago

        > With only 8 bits of precision, it really sucks for HDR, gainmap or no gainmap. You just get too much banding.

        This is simply not true. In fact, you get less banding than you do with 10-bit bt2020 PQ.

        > JXL otoh is completely immune to banding

        Nonsense. It has a lossy mode (which is its primary mode so to speak), so of course it has banding. Only lossless codecs can plausibly be claimed to be "immune to banding".

        > The JXL spec already has gainmaps...

        Ah looks like they added that sometime last year but decided to call it "JHGM" and also made almost no mention of this in the issue tracker, and didn't bother updating the previous feature requests asking for this that are still open.

        • spaceducks 15 hours ago

          > Nonsense. It has a lossy mode (which is its primary mode so to speak), so of course it has banding. Only lossless codecs can plausibly be claimed to be "immune to banding".

          color banding is not a result of lossy compression*, it results from not having enough precision in the color channels to represent slow gradients. VarDCT, JPEG XL's lossy mode, encodes values as 32-bit floats. in fact, image bit depth in VarDCT is just a single value that tells the decoder what bit depth it should output to, not what bit depth the image is encoded as internally. optionally, the decoder can even blue-noise dither it for you if your image wants to be displayed in a higher bit depth than your display or software supports

          this is more than enough precision to prevent any color banding (assuming of course the source data that was encoded into a JXL didn't have any banding either). if you still want more precision for whatever reason, the spec just defines that the values in XYB color channels are a real number between 0 and 1, and the header supports signaling an internal depth up to 64 bit per channel

          * technically color banding could result from "lossy compression" if high bit depth values are quantized to lower bit depth values, however with sophisticated compression, higher bit depths often compress better because transitions are less harsh and as such need fewer high-frequency coefficients to be represented. even in lossless images, slow gradients can be compressed better if they're high bit depth, because frequent consistent changes in pixel values can be predicted better than sudden occasional changes (like suddenly transitioning from one color band to another)

  • 12_throw_away 16 hours ago

    > performant and memory safe decoder (in Rust?).

    Isn't this exactly the case that wuffs [1] is built for? I had the vague (and, looking into it now, probably incorrect) impression that Google was going to start building all their decoders with that.

    [1] https://github.com/google/wuffs

    • lonjil 16 hours ago

      WUFFS only works for very simple codecs. Basically useless for anything complex enough that memory bugs would be common.

FerritMans 20 hours ago

Love this, been waiting for Google to integrate this, from my experience with AVIF and JPEGXL, JPEGXL is much more promising for the next 20years.

masswerk 20 hours ago

Nice example for how a standard, like PDF, can even persuade/force one of the mighty to adopt a crucial bit of technology, so that this may become a common standard in its own right (i.e. "cascading standards").

gen2brain 17 hours ago

I like how even the nus product (jpegli) is a significant improvement. I am in the process of converting my comic book collection. I save a lot of space and still use JPEG, which is universally supported.

gethly 4 hours ago

jpg -> png -> webp -> avif

Why are we going backward?

Pxtl 20 hours ago

> Lossless JPEG recompression (byte-exact JPEG recompression, saving about 20%) for legacy images

Lossless recompression is the main interesting thing on offer here compared to other new formats... and honestly with only 20% improvement I can't say I'm super excited by this, compared to the pain of dealing with yet another new image format.

For example, ask a normal social media user how they feel about .webp and expect to get an earful. The problem is that even if your browser supports the new format, there's no guarantee that every other tool you use supports it, from the OS to every site you want to re-upload to, etc.

  • F3nd0 19 hours ago

    If I remember correctly, WebP was single-handedly forced into adoption by Chrome, while offering only marginal improvements over existing formats. Mozilla even worked on an improved JPEG encoder, MozJPEG, to show it could compete with WebP very well. Then came HEIF and AVIF, which, like WebP, were just repurposed video codecs.

    JPEG XL is the first image format in a long while that's been actually designed for images and brings a substantial improvement to quality while also covering a wide range of uses and preserving features that video codecs don't have. It supports progressive decoding, seamless very large image sizes, potentially large amount of channels, is reasonably resilient against generation loss, and more. The fact that it has no major drawbacks alone gives it much more merit than WebP has ever had. Lossless recompression is in addition to all of that.

    The difference is that this time around, Google has single-handedly held back the adoption of JPEG XL, while a number of other parties have expressed interest.

    • Dwedit 19 hours ago

      Having a PNG go from 164.5K to 127.1K as lossless WEBP is not what I'd call "marginal". An improvement of over 20% is huge for lossless compression.

      Going from lossless WEBP to lossless JXL is marginal though, and is not worth the big decode performance loss.

      • F3nd0 16 hours ago

        In context of the parent comment, 'only 20% improvement' is not super exciting, 'compared to the pain of dealing with yet another new image format'.

        You raise a good point, though; WebP certainly did (and continues to do) well in some areas, but at the cost of lacking in others. Moreover, when considering a format for adoption, one should compare it with other candidates for adoption, too. And years before WebP gained widespread support in browsers, it had competition from other interesting formats like FLIF, which addressed some of its flaws, and I have to wonder how it compares to the even older JPEG 2000.

      • lonjil 18 hours ago

        Since the person you replied to mentioned MozJPEG, I have to assume they meant that WebP's lossy capabilities were a marginal improvement.

    • halapro 17 hours ago

      You're not being fair. Webp has been the only choice for lossy image compression with alpha layer. Give it some credit.

      • F3nd0 16 hours ago

        Fair point, though not entirely true: you can run an image through lossy compression and store the result in a PNG, using tools like pngquant [1]. Likely not as efficient for many kinds of images, but totally doable.

        [1] https://pngquant.org/

  • tempest_ 18 hours ago

    20% is massive for those storing those social media images though.

    • Pxtl 17 hours ago

      I get that there are people who are super excited by this for very good reasons, but for those of us downstream this is just going to be a hassle.

  • spider-mario 16 hours ago

    Since the recompression is lossless, you don’t need every tool you use to support it, as long as one of them is one that can do the decompression back to JPEG. This sounds a bit like complaining that you can’t upload .7z everywhere.

    • Pxtl 15 hours ago

      AFAIK downconverting to jpeg is only an option for legacy jpegs that have been upconverted to jpegxl though. Many jpegxl images likely won't support downconverting if they were created as jxl from the get-go.

      Basically, jpeg->jxl->jpeg is perfectly lossless conversion, but a newly-made jxl->jpeg is not, even if it doesn't use modern jxl-only features like alpha channels.

      With that in mind I'd actually prefer if those were treated as separate file-formats with distinct file-extensions (backwards-compatible jpeg->jxls vs pure-jxl). The former could be trivially handled with automated tools, but the latter can't.

      • spaceducks 15 hours ago

        I'm not sure if that will be an issue in practice. in any case, you need a JPEG XL decoder to perform the transition from a recompressed-JPEG-JXL to the original JPEG, so whatever tool is doing this, it can already handle native-JXL too. it could be the conversion happens on the server side and the client always sees JPEG, in which case a native JXL can also be decoded to a JPEG (or if lossless a PNG), though obviously with information loss since JPEG is a subset of JXL (to put it lightly)

      • spider-mario 14 hours ago

        Well, sure, but wasn’t that the use case we were discussing?

        • Pxtl 13 hours ago

          Right. And that particular use-case sounds nice, but realistically this new format will not be exclusively used in that particular case.

          Dealing with basically another .webp-like format in those cases (one that might be a backwards-compatible jpeg or might not and determining that can only be done by inspecting the file contents) doesn't sound super fun.

          So ideally, to make up names, I wish they'd used separate extensions and so a ".jp3" is a file that can be downconverted to a jpg and you could get a browser extension to automate that for you if you wanted, and a ".jxl" is the new file format that's functionally another ".webp"-like thing to deal with and all the pain-points that implies.

          • spaceducks 2 hours ago

            The names and extensions of JPEG XL files aren't specified, except that the IANA media type is `image/jxl`. I think an argument could be made to use the double extension convention when the encoder performs lossless JPEG recompression, so image.jpg becomes image.jpg.jxl (while not entirely semantically correct, since it's not an additional layer of compression around the JPEG, it's a reimplementation of the image using identical coding features as JPEG, in JXL).

            But like I said in my other comment (which got hidden for some reason), it should be noted that a recompressed JPEG is also a valid JXL on its own. If you have the means to turn a recompressed JPEG into the original, you also have the means to view native JXLs.

            Hopefully adoption is widespread and we won't really have to worry about it. JPEG XL is a much more appealing format than WebP, and unlike WebP there are great arguments for software to support it other than "Google started using them, so they're everywhere now."

  • 7jjjjjjj 17 hours ago

    I think there's a difference here.

    If I right click save and get a webp, it was probably converted from JPG. Very very few images are uploaded in webp. So getting a webp image means you've downloaded an inferior version.

    JXL doesn't have this issue because conversion from jpeg is lossless. So you've still gotten the real, fully-quality image.

    • Pxtl 15 hours ago

      Let's be realistic - when most users are upset they got a .webp, they're not annoyed because of quality-loss, they're annoyed because they can't immediately use it in many other services & software.

      • mubou2 6 hours ago

        This is still a problem with AVIF, too. Image viewers that support the format often don't support animated AVIFs, and even GitHub still for some godforsaken reason treats .avif files in a repo/PR as binary files instead of images. I think Discord just recently started supporting AVIFs, so that's progress.

albert_e 19 hours ago

> Chrome Jpegxl Issue Reopened

> (this is the tracking bug for this feature)

Is it just me -- or it's confusing to use the terms issue / bug / feature interchangeably?

  • mort96 18 hours ago

    It's not really used interchangeably: "bug" is used to mean "entry in the bug tracker database", while "feature" is used to mean what we colloquially think of as a feature of a computer program.

    It's arguably a slight abuse of a bug tracking system to also track progress and discussion on features, but it's not exactly uncommon; it's just that many systems would call it an "issue" rather than a "bug".

  • mubou2 6 hours ago

    Google's internal issue tracker, Buganizer (which the Chromium Issue Tracker is based on), refers to everything as a "bug". It's confusing, yeah. You get used to it.

  • crazygringo 17 hours ago

    Not really -- they're all "potential todos" that need to be tracked and prioritized in the same place.

    And the difference between a bug and a feature is often in the eye of the beholder. I'll very often title a GitHub issue with "Bug/Feature Request:" since it's often debatable whether the existing behavior was by design or not, and I don't want to presume one way or the other.

    So I do consider them all pretty interchangeable at the end of the day, and therefore not really confusing.

claudiojulio 21 hours ago

[flagged]

  • fsflover 16 hours ago

    This comment is of course breaking the HN Guidelines as a shallow dismissal, but the parent is right: After Google killed Ublock Origin and turned Android into a nanny OS, I have no idea why anyone would stick to anything from them. Also Firefox is better in almost every way.