by traspler · 5y ago · 0 comments
Pages automatically defaulting to webp so you try to send the link through a messenger and you might notice that it doesn‘t work for everyone, either iOS users can‘t see it or the messenger interprets it strangely. So you try to save the image and send that, same problem, you get the webp image…
WebP in particular, as the name suggests, was conceived as an "image format for the web" and while I think it's good to have the web in mind when designing an image codec, I think it's a bad idea to limit the scope like that. Design decisions like limiting the maximum dimensions and bit depth at the codec level "because that's all the web needs" plus limited attention/focus to adoption outside browsers does lead to the phenomenon you describe where "it doesn't work for everyone", causing the small gain of improved compression to be dwarfed by the huge inconvenience of breaking workflows.
Any new codec of course has this problem even if they do target wide adoption (like JPEG XL): adoption is never instantaneous. It is a fact that the release cycle of browsers is more suitable for innovation than that of most other software, so it does make sense to start there even when it will still cause things to break in software that doesn't support it yet.
To mitigate that, I think it would help a lot of browsers would have a "Save As..." dialog box on images that gives users the choice to save the actual image in whatever format it is in, or to convert it to PNG or JPEG.
Also there is a huge financial incentive for large web hosting companies (e.g. Google, Facebook) to adopt compression formats that save bandwidth, using automated tools to apply those wherever possible.
People making e.g. image archives or building image capture hardware are going to be slower. They don’t want to use new untested technologies that might not succeed, and they don’t want to switch more frequently than necessary. When they do transition it will be by applying new technologies to new images but not immediately transforming older images to use the new technology.
Applying lossy recompression on already-lossy-compressed images is something you should avoid at all cost, since it inevitably causes generation loss (and it is also likely to not be very effective, since you're basically spending a lot of bits in the new codec on replicating compression artifacts of the old codec).
When image quality and observed latency are at a level where users don't care even subconsciously (say, images look like camera originals and load in 100 ms), then bandwidth cost optimization may become a good 2nd objective.
Browsers could allow a selection of all sources provided by the picture element (this would also include differently scaled variants based on media queries) in a download dialog.
JPEG XL on fly conversion to JPEG, offers a nice solution for this use case.
The images are converted and stored when they are uploaded or changed. I can see this being an issue with that kind of volume though. But it’s a performance gain for the clients while content doesn’t need to worry about it.
Dumping these raw pixels into a trivial intermediate format, like uncompressed PNG or BMP, should not increase the attack surface in any noticeable way.
In a way, they already do for images: right-click and "Copy". In some desktop environments, you can even paste that directly into a folder to save it as a file. Dolphin allows choosing which format (of those that the browser can convert to) to save it in.
Presumably the HTTP request that gets sent when you save an image sends different Accept headers.
Doesn't seem to work all the time, but presumably thats down to a combination of different Cloudflare settings, origin server configuration and what format the original image were in too.
Well, screenshot is a thing for images. Video is another story.
A better analogy would be if you make a painting of a painting without paying the original artist, is it stealing ?
It's not : it can be construed as counterfeiting though, and it might cause the artist to stop painting because he does not make enough money, but calling it stealing is simply wrong.
At least I cut the image so it's not obvious
Could WASM in an extension be good enough for some use cases like this?
Right click — "Copy image" — paste into any program that supports PNG.
On Android though this is not the case.
ImageMagick is just few keystroke away and you can convert to almost any format you like.
Very confused as to why this is done - anyone?