News for hackers. Stuff that matters.
Re:Chrome still hasn't changed its opinion about dropping JP... by vlovich123 on Tuesday June 06, 2023 @11:19AM (#36214193)
Devil's argument time. They add support and there's little adoption. Worse yet, it's a meaningful amount of adoption that deprecating is now it's own criticism cycle. So now Google is being forced to add support and maintain an image format because of evangelists?

I think the problem here is that W3C is lagging on listing which image formats are standard and vendors are shipping their own in-house tech in the vaccuum (and that W3C is composed of browser vendors means Google, Apple, Microsoft, Mozila & whoever is there from the community can't agree).

Re:Chrome still hasn't changed its opinion about dropping JP... by reaperducer on Tuesday June 06, 2023 @11:33AM (#36214423)
They add support and there's little adoption.

Who cares if there's little adoption? Why not be feature complete? It's not like Google is some cash-strapped startup.

Heck, macOS ships with terminal definitions so you can log into a Mac using a Commodore B-128 as a serial terminal. That's certainly going to have less adoption than JPEG XL.

https://en.m.wikipedia.org/wiki/Commodore_CBM-II

Re:Chrome still hasn't changed its opinion about dropping JP... by refulgentis on Tuesday June 06, 2023 @11:46AM (#36214632)
Then you fall on the sword of “google forces web standards!!” (See: WebP)
Re:Chrome still hasn't changed its opinion about dropping JP... by whywhywhywhy on Tuesday June 06, 2023 @12:02PM (#36214830)
Photoshop still can't open webp files, many websites still don't support uploading webp files. Do you not see how its annoying to drag a file out of Google image searches, see the extension is .jpg.webp then have to convert it back into jpeg to edit thus adding a 3rd layer of compression artifacts to the image.
Re:Chrome still hasn't changed its opinion about dropping JP... by arp242 on Tuesday June 06, 2023 @12:10PM (#36214959)
> many websites still don't support uploading webp files.

On GitHub if you rename your WebP file to "file.webp.png" it will upload just fine, and will use the correct Content-Type header when serving. It's really frustrating a simple \.(png|gif|jpe?g)$ check is preventing the uploading of these files. I found this is actually the case for a number of platforms.

Re:Chrome still hasn't changed its opinion about dropping JP... by bombcar on Tuesday June 06, 2023 @03:27PM (#36217889)
What's fun is when you can upload evilhacker.css.jpg and it correctly handles Content-Type as css and you exploit the tool ;)
Re:Chrome still hasn't changed its opinion about dropping JP... by George83728 on Tuesday June 06, 2023 @01:03PM (#36215873)
> Photoshop still can't open webp files,

Why is Adobe so bad at their job? GIMP added webp support about 5 years ago. Paint.NET added it 4 years ago.

> many websites still don't support uploading webp files.

4chan is the only such site I've heard of, and 4chan is notoriously bad at this sort of thing ever since they lost moot. It took them years to permit uploading of vp9/opus webms, for no good reason. 4chan's present administrators are incompetent, but 4chan is barely profitable (if at all) so that's not really unexpected.

But Adobe rakes in huge piles of cash, so what is Adobe's excuse?

Re:Chrome still hasn't changed its opinion about dropping JP... by Taywee on Tuesday June 06, 2023 @01:29PM (#36216225)
> It took them years to permit uploading of vp9/opus webms

Did they finally do that? I left permanently a couple years ago (after being there regularly since 2006) because the small "these kinds of threads are why I still hang around this place" threads got more and more infrequent and the regular users got more and more annoying and less fun. Most of the site just became a constant pool of angry racism, cynicism, and paranoia. I can handle seeing stupid racism, but the death of fun and the constant angry sarcasm just got old.

Anyway, I was constantly annoyed that I couldn't upload vp9 webms, and that apng was also not supported given how much better than gif it was. Webp would have been decent, too.

Re:Chrome still hasn't changed its opinion about dropping JP... by nemo on Tuesday June 06, 2023 @07:13PM (#36220405)
Re:Chrome still hasn't changed its opinion about dropping JP... by refulgentis on Tuesday June 06, 2023 @01:26PM (#36216176)
Honestly have 0 idea why I’m downvoted through the floor or why you’re responding aggressively. I definitely understand it’s bad, the message I hoped was clear is it’s a bad idea to support yet another format that will take a decade to perfuse.
Re:Chrome still hasn't changed its opinion about dropping JP... by arp242 on Tuesday June 06, 2023 @11:53AM (#36214724)
> Why not be feature complete?

Because this code will be exposed on every single webpage you load, and historically these kind of parsers have had a number of security problems.

Something something memory safety, but this is the situation that currently exists.

"All the image parsers" would be a very bad idea. Years ago there was a bug in some Linux setups where all gstreamer codecs were exposed in Firefox, and it was a huge problem (similar: https://lwn.net/Articles/708196/ – although the one I remember is much older, around 2010 or so).

It's not really comparable to all the old terminfo entries from decades ago: the vendor controls those terminfo entries, not $random_websites. Maybe the ncurses terminfo parser actually does have some buffer overflow (there's an entire mini-programming language in there), but if it does it's not really a huge acute problem.

Re:Chrome still hasn't changed its opinion about dropping JP... by r00fus on Tuesday June 06, 2023 @11:53AM (#36214733)
Features == potential bugs. That's why. You're increasing your attack surface for critical infrastructure for many - you better be doing a cost/benefit analysis.
Re:Chrome still hasn't changed its opinion about dropping JP... by reaperducer on Tuesday June 06, 2023 @12:03PM (#36214852)
You're increasing your attack surface for critical infrastructure for many

By that logic, Chrome shouldn't ever add any new features. WebP is also an additional attack surface.

Re:Chrome still hasn't changed its opinion about dropping JP... by burnished on Tuesday June 06, 2023 @12:21PM (#36215146)
Yeah, so features that don't have strong reasons to get implemented have a hard time being advocated for.
Re:Chrome still hasn't changed its opinion about dropping JP... by Timon3 on Tuesday June 06, 2023 @11:43AM (#36214586)
But they didn't add support - they added support behind a feature flag. That's a massive difference.
Re:Chrome still hasn't changed its opinion about dropping JP... by dpcx on Tuesday June 06, 2023 @11:47AM (#36214655)
Didn't they also add support for QUIC, WebP, and several others that (by nature of being internal tools at the time) had zero real world adoption?
Re:Chrome still hasn't changed its opinion about dropping JP... by karaterobot on Tuesday June 06, 2023 @11:56AM (#36214776)
Does anyone have an estimate on how much work it is to maintain support for JPEG XL in Chrome? Your comment sort of implies that it's the kind of thing they'd need to really weigh the pros and cons of before pushing their chips forward, but my (unfounded) assumption is that, having implemented it in the first place, the maintenance would be relatively low, essentially a dim star in the constellation of things a browser manufacturer has to maintain support for. So, it just feels odd that, faced with at least some criticism from the community, and in the face of growing support for the format (e.g. from Apple) they would choose to dig their heels in on this issue.
Re:Chrome still hasn't changed its opinion about dropping JP... by 13of40 on Tuesday June 06, 2023 @12:24PM (#36215199)
This might seem crazy, but I can imagine a world where the first time my browser encounters a file of some new format it gives me the option to download a codec to render it and it doesn't matter if it's google software or not, just that it's signed with a trusted cert.
Re:Chrome still hasn't changed its opinion about dropping JP... by arp242 on Tuesday June 06, 2023 @12:40PM (#36215487)
We tried the whole plugin thing with NPAPI and ActiveX, and it was a never-ending source of security holes.

This is one of those things that sound nice, but there's a lot of practical caveats, and in reality it would all be pretty complex. Who would provide the "trusted certs"? How do you decide between a "good and safe plugin" and "not so good and unsafe plugin"? How do you update these decoders? etc.

Re:Chrome still hasn't changed its opinion about dropping JP... by cesarb on Tuesday June 06, 2023 @12:38PM (#36215448)
> I can imagine a world where the first time my browser encounters a file of some new format it gives me the option to download a codec to render it

That world existed, in the 90s and early 2000s, and it was called "ActiveX". The codebase= attribute of the <object> element exists for that use case. It sucked, for two major reasons: first of all, it was a reliable way to get malware into user's machines (being "signed with a trusted cert" doesn't help when all you need for a trusted cert is money and/or hacking a trusted software publisher). Second, it was very Windows-specific, and a significant obstacle to the adoption of alternative operating systems, hardware architectures, and browsers.

Re:Chrome still hasn't changed its opinion about dropping JP... by 13of40 on Tuesday June 06, 2023 @01:40PM (#36216401)
I don't think it was the idea behind ActiveX that made it suck, it was the implementation. Back when we were making Windows XP I found a ton of exploits where you could load an arbitrary COM component from a web page and buffer overrun it. If the same thing was based on modern sandboxed IL it would be a lot safer and more portable between platforms.
Re:Chrome still hasn't changed its opinion about dropping JP... by Dylan16807 on Tuesday June 06, 2023 @02:34PM (#36217160)
Activex did way more than render things.
Re:Chrome still hasn't changed its opinion about dropping JP... by zdragnar on Tuesday June 06, 2023 @12:07PM (#36214912)
Supposedly, the person who initially submitted the patch to add jpeg xl support has been keeping it up to date in the event that chromium wants to re-introduce it.

If that's the case (and if the implementation is sufficient, rather than a leaky prototype) it would seem that the burden is quite low.

Re:Chrome still hasn't changed its opinion about dropping JP... by lonjil on Tuesday June 06, 2023 @12:10PM (#36214965)
The JXL team at Google Zurich offered to take on JXL-related maintenance work in Chrome, but they were rejected.
Re:Chrome still hasn't changed its opinion about dropping JP... by izacus on Tuesday June 06, 2023 @12:06PM (#36214892)
It's a C++ library that Google needs to secure and maintain security patches forever. If there's any bug in that library, it's Chrome and Google that will get blasted and blamed by rabid news media and HNers - so people here are essentially demanding that private company supports and patches their library for ever and ever. Once released, it's pretty much impossible to rollback support for media formats on the web.

Behaving like there's no cost in such maintenance is just whack.

Re:Chrome still hasn't changed its opinion about dropping JP... by josefx on Tuesday June 06, 2023 @01:10PM (#36215959)
> It's a C++ library that Google needs to secure and maintain security patches forever.

Compile it to wasm and run it in a sandbox? Or throw some rust groupies at it?

> Once released, it's pretty much impossible to rollback support for media formats on the web.

We must live in a time where flash still dominates short web animations, streaming providers use silver light and every enterprise user is stuck waiting for the companies 5GB Java applet to load right when IE6 suddenly pops up to kill everything with an ActiveX based Windows update that adds more video codecs instead of removing them from the system. The list goes on forever. Browsers are not above killing features and breaking things for security reasons or if they just feel like it.

Re:Chrome still hasn't changed its opinion about dropping JP... by magicalist on Tuesday June 06, 2023 @03:37PM (#36218024)
Maintaining your own rust fork of a codec or forcing the web through another painful breaking change drawn out over years seem like fantastic arguments to wait until the ecosystem is visibly moving to jpegxl before committing to it, actually.
Re:Chrome still hasn't changed its opinion about dropping JP... by spider-mario on Thursday June 08, 2023 @09:05AM (#36241215)
It wouldn’t be a fork, it would be another implementation. There are already a few.
Re:Chrome still hasn't changed its opinion about dropping JP... by jeffbee on Tuesday June 06, 2023 @02:23PM (#36217022)
Chrome uses WUFFS to decode GIFs. It could also use WUFFS to decode JXL, if WUFFS supported JXL.
Re:Chrome still hasn't changed its opinion about dropping JP... by whywhywhywhy on Tuesday June 06, 2023 @12:00PM (#36214804)
Weird how none of that mattered when webp was forced on us.
Re:Chrome still hasn't changed its opinion about dropping JP... by vlovich123 on Tuesday June 06, 2023 @07:46PM (#36220711)
Because that’s their own format and they’re willing to put in the maintenance effort. I don’t really see the equivalence.

Also webp is 13 years old now or something since the initial release as compared with jpegxl which is quite new.

Re:Chrome still hasn't changed its opinion about dropping JP... by worrycue on Tuesday June 06, 2023 @07:50PM (#36220743)
Google is a multi billion dollar company. They can’t spare a few developers to maintain a mostly isolated feature? (Changes and security updates to the JPEGXL will have no impact on the rest of Chrome.)

If after a decade no one really uses it, fine remove it - no one will care if it’s unused. But to kill it in its cradle is just BS. JPEGXL should have the same opportunities WebP had.