The most efficient Image format- WebP?
I always knew that PNG followed by JPEG were the most efficnent, lossy image compression format. However, there is a new image format, webP. It is developed by Google and comes in lossy as well as lossless format.
How is it better than PNG/JPEG?
- The webP image is ~30% smaller in storage size than its counterparts.
- It is supported by all major browsers.
Why is it better?
- It uses a borrowed techniques of vide compression, VP8.
- VP8 is a preditive lossy compression technique for intra & inter frames.
- webP uses intra-frame compression technique as we are dealing with images.
- A layman explanation of VP8 is that it will divide the image in a nxn matrix, each cell is called a macroblock.
- A macroblock is checked for motion. Some blocks have no motion, such as sky. These are called ‘key’ frames.
- A key frame checks its predicted frames and encoded as a diff.
- The diff is quantized and encoded using a better encoding (Arithmatic Encoding) than Huffman coding used in JPEG.
Should you use webP?
- Yes, it is well supported, always better compressed than PNG/JPEG.
- Uses slightly more RAM to encode than PNG
Written with StackEdit.