Live data from Hacker News

Is WebP really better than JPEG?

siipo.la

211–220 of 319 posts

Re: Is WebP really better than JPEG?

#211
Question for people more knowledgeable on the topic: is it reasonable to expect a future where audio, image and video are easy to work with and compression / decompression / encoding / decoding is done transparently by the hardware? Like, an OS read call giving you a standard plain format directly? I know PS5 is doing something like that for 3d assets, but I wonder how difficult it would be to do this and just spare the rest of humanity from having to suffer with formats for the rest of our lives. Or would there be too many cons?

Re: Is WebP really better than JPEG?

#212

Earlier quoted context omitted.

Because JPEG 2000 was essentially a patent-covered mess that nobody wanted to touch

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.

AFAIK it's pretty standard in DCP files for Digital Cinema.

Re: Is WebP really better than JPEG?

#213
post #92

Earlier quoted context omitted.

can be supported in any browser via a Javascript I think you answered your own question right there. I'm not going to use a dumptruck to bring a single sack of sand to my garden.

For an image gallery, the balance could be the opposite: a small (56k) download of a decoder allowing to show many large (a few megs each) pictures. I wonder how good the performance of that decoder is, though; if the decoding delay is much longer that the network transfer delay, the approach becomes much less appealing.

It's also not common to need a ton of huge images all at once — in almost all applications you're either displaying thumbnails and JPEG is fine and will load faster thanks to the browser's preloader getting those requests in faster than the JavaScript can run or you're looking at something like pages where the latency is easily hidden by preloading.

That means that in most cases the main driver is lower network transfer and you need to be serving a LOT of images to outweigh the cost of having to support something new and complicated versus something as widely tested and supported as JPEG.

Re: Is WebP really better than JPEG?

#214
Regardless of whether it is better, I sure wish Macs would support them natively, such as in Preview and Finder. Really annoying that if you save an image from the web they aren't as usable as pngs and jpegs. Now, I typically save it locally, see it's a webP, then go back and screenshot it so it is a PNG. (and then find it on my desktop, rename it, move it where I want it to be, etc)

Re: Is WebP really better than JPEG?

#215

Earlier quoted context omitted.

WebP also supports animation, which is important because GIFs are notoriously large.

Animations should just be videos. No reason for an animated image format, an animated image is just a video with no audio track.

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?

#216
post #191

Earlier quoted context omitted.

Animations should just be videos. No reason for an animated image format, an animated image is just a video with no audio track.

My understanding is that webp is video. That is, it's a still frame using the vp8 codec.

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?

#217

One of the biggest barriers against adoption of these newer formats is the lack of pure java implementations for use server side. The Java wrappers around a native binary are helpful, but for many projects not very useful and this hinders adoption. https://github.com/haraldk/TwelveMonkeys/issues?q=is%3Aissue...

Is JAVA still a thing?

for sure and it is probably doing the heavy lifting behind many of the companies+governments you interact with.

Re: Is WebP really better than JPEG?

#218
post #192

Earlier quoted context omitted.

Animations should just be videos. No reason for an animated image format, an animated image is just a video with no audio track.

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

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?

#219
post #127

Earlier quoted context omitted.

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.

On the web you can do it with SVG. https://github.com/leni536/trans_jpg

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?

#220
post #117

Earlier quoted context omitted.

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.

If transparency was the main issue, adding transparency to JPEG sounds easier than coming up with a completely new encoding, especially a lossy one.

[deleted]
Post reply on HN