Live data from Hacker News

WebP - A new image format for the Web (by Google)

developers.google.com

51–58 of 58 posts

Re: WebP - A new image format for the Web (by Google)

#51
post #14

We could make the web a lot faster and/or do some really cool stuff if we had a lossy image format with an alpha channel. It'd be nice this got picked up by all browser vendors. Sadly, I fear that they'll be squabbling over it, just like they are with VP8/Ogg/h.264. I really believe that the companies involved in web standards are holding progress back at this point. At the same time, even if they all agreed to put t…

I haven't really tried it yet but I wonder if you might get ugly artifacts if the alpha channel is lossy. Maybe it has to be exact.

Artifacts in the alpha channel are surprisingly subtle. Well, it makes sense if you think about it: The opacity is low, which makes those little details very hard to see.

A gray-scale JPEG with medium quality (even if it was written by a somewhat crude encoder) will look perfect if used as alpha channel in the vast majority of cases.

Re: WebP - A new image format for the Web (by Google)

#52
post #12

No one needs smaller images anymore. With today's bandwidths getting higher, image sizes are irrelevant. One-time 25% decrease in image size, years in development and more years to widespread adoption, not worth it.

We don't have a lossy RGBA image format. WebP is about 20% of the size of a PNG32 image. That's a pretty big deal.

Re: WebP - A new image format for the Web (by Google)

#53
I assumed this was posted because they just redid the lossless support, but it's just a general link and the conversation has been therefore unfocused. The PDF describing the new lossless mode is here:

http://git.chromium.org/gitweb/?p=webm/libwebp.git;a=blob_pl...

It seems quite neat to me, particularly the way they encode the compression info as images though maybe it's just standard lossless image techniques, I'm no expert.

As for the format generally, I think better lossy compression than JPEG, better lossless with alpha compression than PNG, better animation than GIF, and a lossy with alpha mode and hardware encode/decode support is a reasonably powerful combination. Support from Chrome and Android means it's probably got niche uses already (on or off the web), support from Mozilla (which I'd like to see, since generally multiple vendors working together on something makes me happier, and seems to produce better end products, than one going it alone) could make it a standard practice for those trying to squeeze extra performance out of their web sites, which in turn disadvantages browsers that don't have it.

In the longer term there's probably going to be a shift sooner or later and webp is well placed by getting in early. Even if something better comes along later (and there does seem some kind of limit to the possible improvements), it'll have widespread installation on its side like png/jpeg/gif/etc. have today.

Re: WebP - A new image format for the Web (by Google)

#54
post #40
post #14

We could make the web a lot faster and/or do some really cool stuff if we had a lossy image format with an alpha channel. It'd be nice this got picked up by all browser vendors. Sadly, I fear that they'll be squabbling over it, just like they are with VP8/Ogg/h.264. I really believe that the companies involved in web standards are holding progress back at this point. At the same time, even if they all agreed to put t…

What keeps one from implementing a pure javascript implementation that renders to canvas? Do we need browsers to support formats anymore? With WebGL, WebCL, high speed JS and the canvas tag don't we have everything we need?

There's already such javascript libraries in existence for WebP (they also do WebM).

http://webpjs.appspot.com/

http://libwebpjs.hohenlimburg.org/vp8/webm-javascript-decode...

(There's also a shortcut in browsers like Firefox that support WebM and not WebP where you can turn a WebP file into a single frame WebM video and display it to canvas).

I would imagine that's a good route for lesser known image and audio formats (possibly even video formats) and backwards compatability but I'm not sure it's currently ideal for most image decoding on the web.

Someone should really try it out and see though, it's probably only a matter of time before things like this start moving into javascript.

Re: WebP - A new image format for the Web (by Google)

#55
post #21

So I downloaded libwebp-0.1.3-windows-x86.zip, there is cwebp.exe inside. I can't figure out how to compress PNGs losslessly into WebP. These are the options it gives: Usage: cwebp [-preset ] [options] in_file [-o out_file] If input size (-s) for an image is not specified, it is assumed to be a PNG or JPEG file. Windows builds can take as input any of the files handled by WIC options: -h / -help ............ short he…

You want the webp-experimental downloads from here (the one's updated 4 days ago with the new lossless encoder):

http://code.google.com/p/webp/downloads/list

I think png2webpll.exe is the one you want (webpll = webp lossless).

Re: WebP - A new image format for the Web (by Google)

#56
post #9

Earlier quoted context omitted.

Not just browsers, but all image editors (natively) like Photoshop. But at its core, WebP hasn't been shown to be more than marginally better than JPEG, so why bother modifying your tool chain and work flow? You generally need something to be an order of magnitude better for people to bother.

WebP support transparency with lossy compression which is a huge advantage over JPEG. When I was studying image compression back at university we wrote a whole bunch of lossy/lossless codecs. The issue is that most of the cool algorithms are protected by patents (such as Arithmetic coding). JPEG is quite old now and you can achieve much better results with wavelet coding as opposed to the traditional DCT approach. Pl…

I was under the impression that Wavelets were something of a dead-end. As far as I picked it up the wavelets need to be tuned for your output. People have tuned them for great PSNR output but not for SSIM or other perceptual outputs so you get output that is blurry sometimes even compared with JPEG. I'm not sure if this is a fundamental problem with the technique, or just something that's currently impracticable compared with less elegant but working alternatives.

There's more here (though it's talking about video issues too): http://x264dev.multimedia.cx/archives/317

Re: WebP - A new image format for the Web (by Google)

#57
post #36

Earlier quoted context omitted.

> We could make the web a lot faster and/or do some really cool stuff if we had a lossy image format with an alpha channel. We do! http://pngquant.org & http://pngmini.com/vs-webp/ Sadly, very few people know about it and make good use of it. Mostly it's lack of awareness and dominance of poor/outdated tools ( cough Photoshop cough ) that don't fully utilize formats we have.

Those are really nice, and the gallery goes a long way toward making the case for it. It's worth underlining the fact that "lossy" here means "really nicely dithered 256-RGBA-palette PNG8s", but (as the gallery examples demonstrate), that may be sufficient for most of the kinds of images that have significant transparency and that would be likely to be found on a webpage (even sprites for a canvas game). Honestly, I…

There's also a second option — adaptive posterization — that reduces PNGs by ~30%. Useful for images that are too "colorful" for 256-color RGBA.

WebP is a fine format, but establishing a new format on the web is really hard. There's a graveyard of better JPEGs, and after 16 years since PNG was published, GIF is still alive and well. http://ycombinator.com/images/y18.gif

The web has strong preference for "good enough that works everywhere". IE6 was enough to discourage devs from using PNG, nad you won't see Google's WebP in IE or iOS anytime soon.

Nowdays you can decode WebP with JS, but size of a JS decoder and CPU time to run it will most often offset any savings from the format.

Re: WebP - A new image format for the Web (by Google)

#58
post #9

Earlier quoted context omitted.

WebP support transparency with lossy compression which is a huge advantage over JPEG. When I was studying image compression back at university we wrote a whole bunch of lossy/lossless codecs. The issue is that most of the cool algorithms are protected by patents (such as Arithmetic coding). JPEG is quite old now and you can achieve much better results with wavelet coding as opposed to the traditional DCT approach. Pl…

I was under the impression that Wavelets were something of a dead-end. As far as I picked it up the wavelets need to be tuned for your output. People have tuned them for great PSNR output but not for SSIM or other perceptual outputs so you get output that is blurry sometimes even compared with JPEG. I'm not sure if this is a fundamental problem with the technique, or just something that's currently impracticable comp…

That is a big problem with the wavelet based approaches. They tend to be tuned for impressive PSNR numbers which doesn't always correspond well to perceptual image quality. I haven't seen that article in a while and he raised many valid points.

I think wavelets do have a future but it will just take more time and research. I'm not too sure what the state of it is at the moment as it has been a while since I've looked into it. It is my opinion that in time wavelet based compression will become more important though.

Edit: I forgot to mention that one really cool thing about wavelet codecs (for video especially) is that they are easy to scale by decoding portions of the bit stream. This is really useful for streaming as you can vary the image quality without too much work.

Post reply on HN