mozilla-services / screenshots

Firefox Screenshots: the best way to take screenshots on the web.
https://screenshots.firefox.com
Mozilla Public License 2.0
620 stars 128 forks source link

Support for WebP format #5431

Open tripulse opened 4 years ago

tripulse commented 4 years ago

WebP is a both lossy/lossless codec for images. Firefox supports decoding WebP on most of the webpages, and it compresses better than PNG. So, there should be option to store the screenshot as WebP files.

tripulse commented 4 years ago

Why would that be terrible? I see nothing bad with it.

tripulse commented 4 years ago

The lossless is never big than PNG. Also those are called "quantization artefacts" not "JPEG like artefacts", well VP8 kind of makes those quantization artefacts hidden because it's a modern video codec but atleast it makes it look more plausible than JPEG.

tripulse commented 4 years ago

pngquant basically palletizes colours of the input image through libimagequant, then uses zopfli for DEFLATE compression. Still can't beat WebP in TrueColor (24-bit) as it uses a lot more complex algorithm than PNG.