WebP is a method of lossy image compression and is an open source format like WebM. Due to its prediction coding and better entropy coding, it may save around 40% of bits, comparing to JPEG.
A WebP file consists of VP8 image data, i.e., a VP8 intra frame, and a container based on RIFF. JPEG uses JIF container.
WebP uses predictive coding to encode an image, the same methodology used by the VP8 video codec to compress keyframes in videos. Predictive coding uses the values in neighboring blocks of pixels to predict the values in a block, and then encodes only the difference (residual) between the actual values and the prediction. The residuals typically contain many zero values, which can be compressed much more effectively. The residuals are then transformed, quantized and entropy-coded as usual. WebP also uses variable block sizes, 4x4 and 16x16. However, 4x4 transform tends to blur and lose more image detail than JPEG 8x8 transform. JPEG does not support intra prediction, but JPEG has more features, such as YUV 444 and YUV 422, while WebP only supports YUV 420 which is not good for text encoding. JPEG also supports lossless coding.
Google provided a comparative study of JPEG, WebP, and JPEG 2000:
http://code.google.com/speed/webp/docs/c_study.html
Google released a conversion tool to convert images to WebP format.
No comments:
Post a Comment