News for hackers. Stuff that matters.
Re:Is WebP really better than JPEG? by gruturo on Tuesday June 23, 2020 @11:58AM (#23615668)
Every time I run an image comparison, the webp version looks worse and yet Google insists it's the same quality. It's baffling.

Even if the above were just an individual... bafflement? and not an actual issue, the size savings really don't seem worth the compatibility hassle, the extra manpower/workflow complexity to support 2 formats, the additional storage (and caching) caused by this duplication.

And the above is if it's done RIGHT. 80% of people outside this forum won't understand that you're not supposed to convert from a lossy format to another, and just convert jpegs to webp.

Webp seems so pointless. A progressive jpeg with an optimized Huffman table can be understood by a 27 year old decoder without issues, achieves 90% of the quality/size claims of webp and can be produced losslessly from your source jpegs. This is without even touching Arithmetic Coding (also lossless, part of the official standard, but poorly supported due to some software patents, even though they all expired by now), or playing with customized DCT quantization matrices to get more compressible outputs (incurs a generation loss, but produces standard files).

Re:Is WebP really better than JPEG? by JimDabell on Tuesday June 23, 2020 @12:34PM (#23616308)
You can argue the toss over quality, but JPEG can't do transparency while WebP can. So if you need transparency, you need to compare the size savings to PNG, not JPEG. WebP is the clear winner there.
Re:Is WebP really better than JPEG? by surround on Tuesday June 23, 2020 @03:42PM (#23619224)
WebP also supports animation, which is important because GIFs are notoriously large.
Re:Is WebP really better than JPEG? by pornel on Tuesday June 23, 2020 @06:15PM (#23621047)
WebM (despite being closely related to WebP) can be 5-10x more efficient than WebP.

That's because WebP focused so strongly on being a GIF equivalent that it also dropped all things that made WebM efficient and instead adopted GIF's awfully inefficient architecture (just dumb frames overlaid on top of each other, without motion vectors or predicted frames).

Safari shows how it can be done: it supports silent MP4/H.264 straight in <img>. You get all the ease of use GIF, order of magnitude smaller file, and hardware acceleration.

It's unintuitive, but well-compressed videos are cheaper to decode than dumb "animation" formats, because file size differences are so massive that it's cheaper to decompress a small amount of complex data than to chew through vast amounts of poorly compressed data.

Re:Is WebP really better than JPEG? by catalogia on Tuesday June 23, 2020 @09:45PM (#23622978)
There's also the practical matter of network speed. In many common scenarios a 300kb webm can be fully downloaded and playing while a roughly equivalent 5mb gif is paused a few frames in, buffering.
Re:Is WebP really better than JPEG? by fomine3 on Tuesday June 23, 2020 @09:46PM (#23622991)
Also video decoding is cheaper because most GPU/SoCs supports hardware decoding.
Re:Is WebP really better than JPEG? by heavyset_go on Tuesday June 23, 2020 @10:03PM (#23623109)
This isn't a good assumption to make, many people own cheap phones that lack hardware codecs that can decode videos with modern encodings.
Re:Is WebP really better than JPEG? by fomine3 on Wednesday June 24, 2020 @01:24AM (#23624404)
I can't imagine any cheap SoC for smartphones without H.264 HW decoder because playing video is essential and it can record video. Possibly exists for low-feature phones without camera but it's not for web browsing.
Re:Is WebP really better than JPEG? by heavyset_go on Thursday June 25, 2020 @04:33PM (#23645357)
The licenses for codecs sometimes cut into the thin margins on budget phones. A large amount of people outside of the US and EU are stuck on low-end phones, and I'm pretty sure many of the government subsidized phones in the US are in the same boat.
Re:Is WebP really better than JPEG? by t0ughcritic on Wednesday June 24, 2020 @12:54AM (#23624251)
Do people really use Safari?
Re:Is WebP really better than JPEG? by bartread on Wednesday June 24, 2020 @02:03AM (#23624600)
Yes, lots of them... on iOS.

Also worth noting that all the alternative browsers on iOS are just reskinned versions of Safari as well.

Re:Is WebP really better than JPEG? by robin_reala on Wednesday June 24, 2020 @07:16AM (#23626583)
Somewhere between 25 and 50% globally based on your audience.
Re:Is WebP really better than JPEG? by crymer11 on Wednesday June 24, 2020 @01:15AM (#23624350)
Lots of folks using Mobile Safari.
Re:Is WebP really better than JPEG? by Andrex on Tuesday June 23, 2020 @04:43PM (#23619986)
As a point of data, Animated PNG is finally (as of ~2019) supported natively among all major browsers.

https://caniuse.com/#search=animated%20png

Edit- I was unaware the recently-announced Safari 14 Technical Preview adds support for WebP too! Making both formats viable for all browsers, finally.

Re:Is WebP really better than JPEG? by _AzMoo on Tuesday June 23, 2020 @06:59PM (#23621450)
Recently we've been going through the browser stats on our websites, and while globally apparently IE is dying, it's certainly not dead yet. In the specific industry I work in (Heavy Automotive Retailing, eg Truck Sales and Servicing), we see upwards of 30% of our users on browsers <= IE11. All of our sites are getting poor lighthouse scores on performance with the main suggestion to be changing to webp, but that would exclude 30% of our customers.
Re:Is WebP really better than JPEG? by amq on Wednesday June 24, 2020 @08:16AM (#23626988)
There is a way to offer both jpg and webp, letting the browser to choose.
Re:Is WebP really better than JPEG? by jjoonathan on Tuesday June 23, 2020 @05:14PM (#23620393)
Ooh, does that mean that slack supports WebP now?

Update: nope. Maybe another year :(

Re:Is WebP really better than JPEG? by arcticbull on Tuesday June 23, 2020 @04:15PM (#23619635)
Animations should just be videos. No reason for an animated image format, an animated image is just a video with no audio track.
Re:Is WebP really better than JPEG? by auxym on Tuesday June 23, 2020 @04:44PM (#23619998)
My understanding is that webp is video. That is, it's a still frame using the vp8 codec.
Re:Is WebP really better than JPEG? by TazeTSchnitzel on Tuesday June 23, 2020 @05:55PM (#23620850)
It only has VP8's intraframe compression, not VP8's interframe compression, so animated WebP is not a proper video codec and is a different beast to WebM video.
Re:Is WebP really better than JPEG? by catalogia on Tuesday June 23, 2020 @05:45PM (#23620736)
As far as I can tell though, it has to be VP8 and can't be VP9. Maybe I'm mistaken about that, but all the webp literature I've read or skimmed talks about VP8 specifically. So what's the advantage of an animated webp using VP8 over a webm using VP9?
Re:Is WebP really better than JPEG? by thinkloop on Tuesday June 23, 2020 @09:59PM (#23623068)
No need for image formats either as an image is just a very short single frame video.
Re:Is WebP really better than JPEG? by basilgohar on Tuesday June 23, 2020 @10:19PM (#23623219)
I think this a very poor comparison to make because it denies the time dimension of video completely, which fundamentally affects how we perceive and use video, and also ignores the fact that still images linger and have different requirements.
Re:Is WebP really better than JPEG? by coopsmgoops on Tuesday June 23, 2020 @06:52PM (#23621395)
The only advantage I can see it where videos are not allowed to autoplay you would want a gif to play somethig small.
Re:Is WebP really better than JPEG? by ehsankia on Wednesday June 24, 2020 @02:45PM (#23632157)
For me is all about sharing. The website itself usually displays the "video" as if it was a gif, but as soon as you go to share anywhere, you're sharing a video on platforms that handle it like a video. No looping, seek controls, complicated UI, etc. I just want to post a photo that auto plays and loops anywhere. I don't are about the internals, but I want all applications to recognize that file as an animated photo, not a video.
Re:Is WebP really better than JPEG? by spartanatreyu on Tuesday June 23, 2020 @07:19PM (#23621652)
Videos can autoplay on browsers if they are muted
Re:Is WebP really better than JPEG? by dtech on Tuesday June 23, 2020 @04:48PM (#23620047)
An animated WebP is basically a WebM video.

Or let me rephrase, why is WebP as a animated picture / video format insufficient?

Re:Is WebP really better than JPEG? by sk65535 on Tuesday June 23, 2020 @05:46PM (#23620751)
video format usually take up too much memory: what you gain in efficiency costs in resources. Conversely, animated WebP are dirt cheap: one buffer only, written over and over.

Then, there's optim being made in WebP to allow fast jump to keyframe, even when there's transparency. Video codec don't allow that, and you can have an arbitrary long torture sequence of transparent frame that needs to be decoded back when the video comes in the view again.

Last, animation are usually low-fps (~10fps): there, video codec don't perform very well and are basically keyframes. So the difference isn't as great as one would think.

Oh, and hardware need a 'reset' between decoding tasks, to reconfigure memory, and decoding can't be parallelized.

Re:Is WebP really better than JPEG? by bobbylarrybobby on Tuesday June 23, 2020 @05:40PM (#23620687)
Eh. An animated image (an image that contains some sort of video media, whether gif or h264 or whatever) is a hint to the browser to play it automatically and without sound. If everything were true video (say, mp4) you couldn’t make that distinction. As long as the video in the animated video is encoded properly — as real video and not a sequence of frames as gif does — then animated images definitely have their places.
Re:Is WebP really better than JPEG? by JoshTriplett on Tuesday June 23, 2020 @05:58PM (#23620885)
> An animated image (an image that contains some sort of video media, whether gif or h264 or whatever) is a hint to the browser to play it automatically and without sound. If everything were true video (say, mp4) you couldn’t make that distinction.

<video autoplay muted> says the same thing.

Re:Is WebP really better than JPEG? by sprokolopolis on Tuesday June 23, 2020 @04:05PM (#23619530)
Also, gif only supports one-bit transparency; Whereas webp and png allow partial/gradated transparency.
Re:Is WebP really better than JPEG? by moring on Tuesday June 23, 2020 @12:48PM (#23616500)
If transparency was the main issue, adding transparency to JPEG sounds easier than coming up with a completely new encoding, especially a lossy one.
Re:Is WebP really better than JPEG? by TylerE on Tuesday June 23, 2020 @01:07PM (#23616868)
How? Do you know how many binaries link to some old version of libjpeg? You're breaking 99.9% of the world and 80% of it is stuff that can't even be recompiled, probably.

In fact, JPEG 2000, which was standardized, in, well, 2000, already has transparency support, and 20 years later still have no meaningful support.

Re:Is WebP really better than JPEG? by moring on Tuesday June 23, 2020 @01:35PM (#23617326)
All that is true for WebP too, isn't it? If you cannot recompile a piece of software, how are you going to add WebP support to it?

And you aren't breaking it. In a theoretical world where transparency got added to JPEG, software that doesn't support it will show a fully opaque JPEG (adding transparency in a backwards compatible way isn't rocket science). Compare that to using WebP instead, where software that can't handle it won't even show the image.

Re:Is WebP really better than JPEG? by shuntress on Tuesday June 23, 2020 @04:56PM (#23620140)
It's not too unreasonable to assume that a given ancient program would have logic to differentiate between "This is a jpg and I know what to do with it" and "this is a something else and I don't know what to do with it" so it will technically handle webp images safely while it may not safely handle something that claims to be a jpg but apparently is not.
Re:Is WebP really better than JPEG? by pornel on Tuesday June 23, 2020 @06:18PM (#23621082)
> In a theoretical world where transparency got added to JPEG

It's not theoretical. It's the JPEG XT spec. It adds alpha channel and HDR to standard JPEG in a backwards-compatible manner.

Re:Is WebP really better than JPEG? by danudey on Wednesday June 24, 2020 @02:02PM (#23631551)
You offer two versions:

* A webp version with transparency, which won't be supported by most clients but the ones which do will support everything

* A JPEG version without transparency, or with "faked" transparency (i.e. baked-in background color), which will be supported by basically everyone but with less quality.

That way, if the client is capable of loading the "good" version it will, and if it can't then it will load the "good enough" version.

Re:Is WebP really better than JPEG? by TylerE on Tuesday June 23, 2020 @03:26PM (#23618969)
You don't have 15 year old binaries linking against an 18 year old version of libwebp.
Re:Is WebP really better than JPEG? by wizzwizz4 on Tuesday June 23, 2020 @03:42PM (#23619225)
No; you just have no compatibility whatsoever.
Re:Is WebP really better than JPEG? by leni536 on Tuesday June 23, 2020 @02:07PM (#23617823)
On the web you can do it with SVG.

https://github.com/leni536/trans_jpg

Re:Is WebP really better than JPEG? by pseudosavant on Tuesday June 23, 2020 @04:40PM (#23619935)
That is really cool. I had never thought about (ab)using SVG in that way.

SVG is such an underappreciated technology that is in every browser. Why do icon fonts exist when you could just use SVGs just like you do PNGs and JPEGs? You can even inline them in your HTML so there isn't an additional HTTP request if you want.

Re:Is WebP really better than JPEG? by coopsmgoops on Tuesday June 23, 2020 @06:58PM (#23621439)
Wouldn't it probably be one request per icon instead of just one request for a while font?
Re:Is WebP really better than JPEG? by pikelet on Tuesday June 23, 2020 @08:52PM (#23622586)
Not necessarily. You can have a single SVG file with multiple 'defs' that you can reference around the page, or just embed the SVG code in the HTML itself (via a templating language) if you're not using too many.
Re:Is WebP really better than JPEG? by cmroanirgo on Tuesday June 23, 2020 @05:51PM (#23620807)
Great idea, I love 'thinking outside the box' solutions, but doesn't seem to work on Firefox mobile. (Perhaps it's just me.)
Re:Is WebP really better than JPEG? by rndgermandude on Tuesday June 23, 2020 @01:37PM (#23617359)
Because JPEG 2000 was essentially a patent-covered mess that nobody wanted to touch
Re:Is WebP really better than JPEG? by jandrese on Tuesday June 23, 2020 @03:04PM (#23618637)
Shouldn't those patents be expiring soon?

Edit: Did some more research and the patent risk appears to have passed as of 2016. Still nobody seems to have interest in JPEG2000.

Re:Is WebP really better than JPEG? by rndgermandude on Tuesday June 23, 2020 @09:41PM (#23622952)
webp was around since 2010 and has google's backing. Microsoft tried their own thing (Jpeg XR; 2009) and the actual JPEG committee announced their work Jpeg XL (with google backing) a while ago, while Apple switched to HEIC/HEIF as of 2017 (HEIC is like webp just based on HEVC aka H.265 instead of vp8 i-frames; and it's a patent mess of course).

There is simply no reason why people in 2016 or now would be interested in a format from 2000 that was a patent minefield until at least 2016.

Re:Is WebP really better than JPEG? by jandrese on Thursday June 25, 2020 @03:24PM (#23644472)
Except for JPEG the alternatives are also patent minefields...

Are people just more cavalier about the patent risk these days? The problem with JPEG2000 wasn't the patents we knew about, it was the possibility of submarine patents. People were still wary after the GIF debacle. Nobody wanted to be charged $0.05/image after the fact when they've delivered literally billions of images. Plus the courts were seen as very favorable towards patent holders, even when they were acting in bad faith.

Re:Is WebP really better than JPEG? by duaoebg on Tuesday June 23, 2020 @03:55PM (#23619397)
It’s too compute intensive
Re:Is WebP really better than JPEG? by jandrese on Tuesday June 23, 2020 @04:05PM (#23619525)
That's kind of scary for something developed in the 90s. It was originally run on Pentiums, K6s, PPC 604s, and the like and it's still too expensive for a Ryzen 7?
Re:Is WebP really better than JPEG? by willglynn on Tuesday June 23, 2020 @04:31PM (#23619821)
Yep. There's a ton of data dependencies, where e.g. you can't begin decoding the next bit until you've finished decoding the current bit. It's all about progressive decoding so there's multiple passes over each group of wavelet coefficients, accessed in a data-dependent sequence. Each wavelet transform involves accessing and interleaving the same 2D arrays in both row- and column-oriented fashions.

These design decisions all made sense when clock rates were exponentiating, but they're all nightmares now that we rely on branch prediction and memory prefetching and superscalar execution units. The codec is simply not a good fit for the computing architectures we have today.

Re:Is WebP really better than JPEG? by blattimwind on Tuesday June 23, 2020 @05:16PM (#23620411)
> These design decisions all made sense when clock rates were exponentiating, but they're all nightmares now that we rely on branch prediction and memory prefetching and superscalar execution units. The codec is simply not a good fit for the computing architectures we have today.

Arguably not a good choice for the year 2000, either, considering that all high performance CPUs at that time were out-of-order, superscalar and deeply pipelined.

Re:Is WebP really better than JPEG? by duaoebg on Tuesday June 23, 2020 @04:22PM (#23619731)
Images got bigger... it’s not that it’s too expensive it’s just way more expensive that good enough alternatives. There are other reasons too but that’s a surprising one
Re:Is WebP really better than JPEG? by gsich on Tuesday June 23, 2020 @07:53PM (#23621997)
No.
Re:Is WebP really better than JPEG? by lozf on Tuesday June 23, 2020 @05:29PM (#23620565)
AFAIK it's pretty standard in DCP files for Digital Cinema.
Re:Is WebP really better than JPEG? by acdha on Tuesday June 23, 2020 @05:24PM (#23620504)
That was a little of it but the patents expired years ago. The big blockers I saw were basically that it was a very complex format with a specification behind a paywall and no good open-source implementation or test suite. Interoperability was bad until a couple of years ago and it took significant amounts of complex code to make it fast enough to use.

They've subsequently improved that — OpenJPEG is quite good now https://github.com/uclouvain/openjpeg — but probably missed the window for adoption barring a major upset, which is a shame because it's a very powerful codec and has some neat tricks like progressive decoding (imagine if you could have one file in storage and your responsive design simplify specified the HTTP range requests to get for successively large resolution images?). You could ship it in a browser using WASM but I think the browsers are — not without cause — being really reluctant to add new formats and the ensuing security risks without a good reason, and without browser support no format will be more than a niche.

Re:Is WebP really better than JPEG? by alwillis on Tuesday June 23, 2020 @05:57PM (#23620870)
In fact, JPEG 2000, which was standardized, in, well, 2000, already has transparency support, and 20 years later still have no meaningful support.

Every iOS and macOS device supports JPEG 2000… that should be pretty meaningful.

Re:Is WebP really better than JPEG? by kbenson on Tuesday June 23, 2020 @06:02PM (#23620925)
That accounts for significantly less than half the whole market, and half the mobile and desktop markets if you split it out. If it's also supported by other OS's and headsets and browsers that bring it significantly closer to 100%, then maybe we have something meaningful.
Re:Is WebP really better than JPEG? by alwillis on Wednesday June 24, 2020 @06:08PM (#23634423)
Well, 2 billion devices is a meaningful number of devices, no matter how you slice it.
Re:Is WebP really better than JPEG? by kbenson on Wednesday June 24, 2020 @06:38PM (#23634658)
That's entirely dependent on context. In the context of "can I use this and expect it to work most the time" it's nowhere close enough. All that matters in that respect is percentage of the whole, and at less than half, it's not really much.

As an example, we could talk about the number of connected IoT devices that are supported and up to date, and it's probably in the billions. But compared to the number of connected out of date and unsupported devices, it's likely inconsequential in comparison by metrics of total numbers, percentage of a whole, and importance (alternatively, total number of unsupported and possible exploitable devices does matter, because of what it implies about how they can be used destructively).

Re:Is WebP really better than JPEG? by dvhh on Wednesday June 24, 2020 @01:15AM (#23624347)
Is there still some licensing issues with jpeg 2000?
Re:Is WebP really better than JPEG? by TylerE on Tuesday June 23, 2020 @05:59PM (#23620892)
Chrome and Firefox don't.
Re:Is WebP really better than JPEG? by jws on Tuesday June 23, 2020 @03:29PM (#23619029)
I did some proof-of-concepts ages ago (October 2010) exploring different ways of embedding a PNG alpha channel in JPEG application specific fields to have 100% JPEG compliant files which web browsers could display with transparency. It worked just fine.

If you want transparent JPEGs on your web page that works.

Back then the number of GETs was really important, so stuffing the mask into the JPEG made sense. Now with our HTTP/3 and QUIC world that isn't such a big deal.You might be better off just using a CSS mask image.

Re:Is WebP really better than JPEG? by agumonkey on Tuesday June 23, 2020 @01:04PM (#23616808)
clearly we need to dig in past work to find who tried that
Re:Is WebP really better than JPEG? by asjw on Tuesday June 23, 2020 @03:04PM (#23618645)
Flash could do it
Re:Is WebP really better than JPEG? by mehrdadn on Tuesday June 23, 2020 @04:38PM (#23619906)
I think the idea is "if you're going to break compatibility, might as well make all the improvements at once".
Re:Is WebP really better than JPEG? by waheoo on Tuesday June 23, 2020 @10:31PM (#23623308)
Do you though? The transparent png use case is largely being replaced by svg.

There are some situations where transparency is legitimately needed but im not sold it can justify webp and all that comes with it.

Re:Is WebP really better than JPEG? by httpsterio on Tuesday June 23, 2020 @10:52PM (#23623473)
vector graphics and raster graphics aren't really comparable.
Re:Is WebP really better than JPEG? by waheoo on Tuesday June 23, 2020 @11:53PM (#23623896)
Why not?

They display an image. Bit if a weak argument to say they dont matter when theyre being used to create the same final outcome.

Re:Is WebP really better than JPEG? by httpsterio on Wednesday June 24, 2020 @12:32AM (#23624117)
How would you show a photographed image as a svg? Either you would have to "vectorize" the image which would look totally different or you'd create a grid of vectors with different hue values, ultimately representing pixels in an extremely inefficient format.

Raster graphics and vector graphics can't be compared because sure, you could create 2 million vector squares with individual positions, sizes and colors and align it into a 16:9 grid or you could just use a jpg. The latter being a fraction of the size and processing power needed to display it.

Re:Is WebP really better than JPEG? by waheoo on Wednesday June 24, 2020 @08:16AM (#23626991)
Why would you show a photograph as an svg? You wouldnt. Thats what jpegs are for.

We're discussing transparency and the use case for it. I dont think ive ever heard of someone wanting transparency in a photo. The only times i see the need is if theyre doing something that is better off in a vector format. I.e. png, which is being supplanted by svg, which alleviates the size problems raised about pngs.

I.e. webp is a format solution in search of a problem.

Downvoted, wow, petty.

Re:Is WebP really better than JPEG? by 013 on Wednesday June 24, 2020 @11:38AM (#23629181)
>I dont think ive ever heard of someone wanting transparency in a photo.

OK, but they do. It's pretty common for someone to cut out an object in a photo and have a transparent background.

Re:Is WebP really better than JPEG? by romwell on Tuesday June 23, 2020 @10:03PM (#23623106)
>JPEG can't do transparency

JPEG "can't" do depth maps either, and yet it manages to do them just fine.

"Portrait mode" on Android is simply JPEG + greyscale JPEG embedded in metadata.

If anyone really wanted transparency, it is very easy to add it to JPEG.

That said, in practice, transparency is not needed in non-vector / non-generated graphics formats. The nature doesn't really have an alpha channel, photographs certainly do not.

Transparency is extra information, and can be passed along as such.

Re:Is WebP really better than JPEG? by m45t3r on Tuesday June 23, 2020 @10:32PM (#23623318)
The problem is always standards. I want transparency to work correctly everywhere, not just in one application and broken everywhere else.

Even if transparency was add to JPEG right now, it would take sometime to become available everywhere, and you would have tons of legacy devices showing broken transparency.

The advantage of a new format that supports transparency from is interception is that every device that is compatible with it will display it correctly. So there is no issue with some devices supporting the format partially.

Re:Is WebP really better than JPEG? by romwell on Thursday June 25, 2020 @07:23PM (#23646923)
The larger picture is that you can use PNG or SVG anywhere you need transparency, which are also better suited for the content that has transparency.

JPEG is optimized for photos, which don't have transparent parts.

SVG and PNG are optimized for graphics.

So, if you need transparency, WEBP is probably not the format you'd choose anyway.

Re:Is WebP really better than JPEG? by m45t3r on Sunday June 28, 2020 @12:39PM (#23669999)
> The larger picture is that you can use PNG or SVG anywhere you need transparency, which are also better suited for the content that has transparency.

It is pretty common to have anime characters where you remove the background to use as reactions, and while you can use PNG in those cases it makes the images huge. WebP makes it ideal for those cases, this is even the case that I saw this being used in some image boards (specially also including animation, another thing that is popular).

Just because you can't think in a use case there isn't mean that there isn't a use case.

Re:Is WebP really better than JPEG? by ksec on Tuesday June 23, 2020 @12:20PM (#23616038)
And that is the reason why I dont like Open Media Alliance in General.

Not only does the best JPEG encoder perform as good if not better than the best WebP encoder. With a JPEG Repacker [1] JPEG file size could easily be 20% smaller. If you have to support a new format with relatively little benefits, why not just support using the repacked instead.

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

Re:Is WebP really better than JPEG? by gruturo on Tuesday June 23, 2020 @12:26PM (#23616152)
Absolutely. Simply unscrewing the Huffman stage from the bottom of JPEG and replacing it with a more effective, modern lossless stage kills webp's gains and does not incur in generation loss - the image is pixel accurate to the source jpeg.

You'll probably know this already, but Brunsli made it into the JPEG XL standard. I'm quite happy about it!

Re:Is WebP really better than JPEG? by jerryX on Tuesday June 23, 2020 @05:24PM (#23620509)
JPEG XL uses this new ANS coding as e.g. zstd: https://en.wikipedia.org/wiki/Asymmetric_numeral_systems
Re:Is WebP really better than JPEG? by chrismorgan on Tuesday June 23, 2020 @02:52PM (#23618474)
What has AOMedia to do with this? That alliance is what has made AV1 (and thus AVIF), which is clearly superior to JPEG. AOMedia had nothing to do with WebP (though Google is a member, and WebP is based on VP8, and AV1 is based in part on VP9 which was the successor to VP8).
Re:Is WebP really better than JPEG? by ubercow13 on Tuesday June 23, 2020 @05:22PM (#23620474)
Is it better? The AVIF examples in the article look even worse than the WebP ones
Re:Is WebP really better than JPEG? by jhoechtl on Wednesday June 24, 2020 @08:32AM (#23627111)
At 30% reduced size. The true comparison would be at the same file size, which format is able to squeeze more perceivable information into the same bucket?
Re:Is WebP really better than JPEG? by ubercow13 on Wednesday June 24, 2020 @01:48PM (#23631337)
Indeed. The article's comparisons seem a bit useless - neither the quality or the filesize is kept constant.
Re:Is WebP really better than JPEG? by SiVal on Tuesday June 23, 2020 @05:27PM (#23620538)
I thought the JPEG people were supposed to have JPEG XL [1] out by now, and it was supposed to be the open standard for JPEG's next generation. Anyone know what's happening there?

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

Re:Is WebP really better than JPEG? by jonsneyers on Wednesday June 24, 2020 @05:27AM (#23625890)
Yes, here's an update: https://cloudinary.com/blog/how_jpeg_xl_compares_to_other_im...

TL;DR: We're now at "Draft International Standard" stage; soon we'll enter "Final Draft International Standard" stage and at that point the bitstream is effectively frozen and adoption can start. The officially ISO-published International Standard will take until first half of 2021, but the codec should be ready to use before that.

Re:Is WebP really better than JPEG? by 9OzUIvDwF4LvfUM on Tuesday June 23, 2020 @02:58PM (#23618558)
Do you mean the Alliance for Open Media? WebP was created solely by Google years about AOM was founded.
Re:Is WebP really better than JPEG? by rokweom on Tuesday June 23, 2020 @02:26PM (#23618108)
It's the same situation with VP9. It's supposed to be a competitor to HEVC, but in reality lack of serious psychovisual optimizations in any of the publicly available encoders make it at best on par with x264 compression-wise, while being significantly more computationally expensive.

Its only appeal is that it's royalty-free, but since all devices that support VP9 decoding also support h.264, is it really worth it?

Re:Is WebP really better than JPEG? by vernie on Tuesday June 23, 2020 @04:16PM (#23619649)
Using VP9 recently has really made me appreciate how great x264 is both in terms of quality and speed.
Re:Is WebP really better than JPEG? by pseudosavant on Tuesday June 23, 2020 @05:12PM (#23620346)
The quality of encoders have a much bigger effect on whether or not a codec is 'good' or not. LAME, mozjpeg, and x264 are great examples.

MP3 is competitive with AAC and far more compatible, if you use LAME. Same with JPEG and WebP, or x264 and VP9. All 3 of those encoders deliver higher quality AND better encoding speed than their competitors.

Switch encoders before you switch formats.

Re:Is WebP really better than JPEG? by basilgohar on Tuesday June 23, 2020 @10:24PM (#23623253)
You are comparing an encoder (x264) with a format (VP9). While there is a reference encoder for VP9 (libvpx). x264 has been one of the most heavily optimized encoders whose development was sponsored by many different organizations, whereas libvpx did not see the same kind of love and most of the work came from Google's employees (with some from outside, I'm sure).

There exist other VP9 encoders, but all for specialized purposes.

Re:Is WebP really better than JPEG? by jbk on Wednesday June 24, 2020 @01:15AM (#23624349)
> x264 has been one of the most heavily optimized encoders whose development was sponsored by many different organizations

No, it did not.

> whereas libvpx did not see the same kind of love and most of the work came from Google's employees.

You're getting your facts wrong: x264 was developed by a very small open source community, with at most 5 developers on it, on their free time, while libvpx got quite a few people from Chrome Media Team paid to work for years on it.

Re:Is WebP really better than JPEG? by baxtr on Tuesday June 23, 2020 @02:37PM (#23618283)
What’s interesting is that Google’s Lighthouse tool for measuring site speed pushes for “Next Gen” image formats like WebP. But I often find that WebP files are larger than jpg, too. Yet Lighthouse recommends it. And, of course it’s a great idea to follow Google’s advice since they include the Lighthouse score in their ranking algorithm.
Re:Is WebP really better than JPEG? by gsnedders on Tuesday June 23, 2020 @05:07PM (#23620289)
> And, of course it’s a great idea to follow Google’s advice since they include the Lighthouse score in their ranking algorithm.

AFAIK they don't? They use some of the metrics which are provided in Lighthouse (Largest Contentful Paint, First Input Delay, Cumulative Layout Shift) all play a role in ranking, but the score itself is meaningless.

Re:Is WebP really better than JPEG? by hoten on Wednesday June 24, 2020 @01:04AM (#23624295)
You're both wrong, but you're only slightly wrong. It's been announced that those metrics will contribute to ranking in the bear future. Search for Core Web Vitals.
Re:Is WebP really better than JPEG? by gsnedders on Wednesday June 24, 2020 @01:15AM (#23624348)
You are, of course, technically correct, which is the best type of correct.

There's been some level of performance weighting for a while (but only very slight and mobile-only), but I don't actually know what metric they were using for that (this was from ~2018, before any of those metrics landed in Blink).

Re:Is WebP really better than JPEG? by 72deluxe on Tuesday June 23, 2020 @07:10PM (#23621562)
The irony is that the Lighthouse site itself scores really badly! Can you accept its advice?
Re:Is WebP really better than JPEG? by innocenat on Wednesday June 24, 2020 @08:35AM (#23627137)
Idk. I optimized the end-user facing part of my website heavily, while the backend part (which is used only by a few people), I don't really care. I didn't even minify the JS.
Re:Is WebP really better than JPEG? by tedunangst on Tuesday June 23, 2020 @12:42PM (#23616410)
And then there's times I want to save an image, and can't convince the web site to give me a jpeg, so I have to convert it again.
Re:Is WebP really better than JPEG? by viluon on Wednesday June 24, 2020 @03:32AM (#23625148)
> Every time I run an image comparison, the webp version looks worse and yet Google insists it's the same quality. It's baffling.

Could you share your comparisons? From the ones I've seen, it looks like WebP significantly outperforms JPEG encoders[0].

[0]: https://wyohknott.github.io/image-formats-comparison/#endeav...

Re:Is WebP really better than JPEG? by gsich on Tuesday June 23, 2020 @12:56PM (#23616650)
I also don't get it why people insist on the same quality with lesser size. How about more quality and the same filesize?
Re:Is WebP really better than JPEG? by jandrese on Tuesday June 23, 2020 @03:08PM (#23618707)
Because the files already looked fine for the most part. Assuming the JPEG is sensibly encoded the human eye probably won't be able to detect the quality improvements in a different algorithm.

So the only place they can target is where JPEG starts to break down: When you've cranked the quality knob down to 20 and you're seeing macroblocks and other artifacts in the image. But this is a niche use case as network speeds continue to improve every year.

The worst part is that they have to compete with free, and that's never easy, especially if you're talking about "well, it's still distorted, but the distortion is less displeasing to the eye", also you need to configure some pain in the ass licensing system and work out how to do the payments.

Re:Is WebP really better than JPEG? by MaxBarraclough on Tuesday June 23, 2020 @01:07PM (#23616866)
> people insist on the same quality with lesser size.

Because a great proportion of people browsing the web have slow connections and/or data caps.

> How about more quality and the same filesize?

We're already able to get acceptable quality.

Re:Is WebP really better than JPEG? by gsich on Tuesday June 23, 2020 @07:49PM (#23621960)
>Because a great proportion of people browsing the web have slow connections and/or data caps.

That doesn't matter one bit. See "webpages are doom".

>We're already able to get acceptable quality.

Apparently not when some examples are worse.

Re:Is WebP really better than JPEG? by Narishma on Wednesday June 24, 2020 @06:26AM (#23626283)
Maybe it's just me but I couldn't tell the difference between the comparison images in the article without zooming in a bunch.
Re:Is WebP really better than JPEG? by DavidSJ on Tuesday June 23, 2020 @01:33PM (#23617297)
If you can get one then you can get the other, for any compression format that allows varying compression ratios.
Re:Is WebP really better than JPEG? by m0dest on Tuesday June 23, 2020 @11:30PM (#23623713)
Part of it is about quality. These new formats now support 10+ bit color depth (which is critical for modern displays and for HDR) and full 4:4:4 chroma subsampling (to preserve pixel-level as needed). Many apps/services are currently evaluating or already migrating to AVIF or HEIC because these formats unlock those improvements in image quality, even without a major reduction in file size.
Re:Is WebP really better than JPEG? by TylerE on Tuesday June 23, 2020 @01:08PM (#23616881)
PNG already exists.
Re:Is WebP really better than JPEG? by leadingthenet on Tuesday June 23, 2020 @01:08PM (#23616904)
The answer is simple: money