Tuesday, May 24, 2011

Vliv support for WebP format

Now that WebP is supported widely, I have created the little plugin for Vliv that allows loading a webp image.
It is very simple, as only two API calls are necessary, WebPGetInfo and WebPDecodeBGRInto

On a sample image found on the web it seem to work fine, and is quite fast. The final plugin dll is only 106496 bytes thanks to a precompiled webp library for Windows (libwebp-0.1.2-windows).

Vliv framework is an ideal way of testing new formats as its API is very simple, the entire code for loading WebP images is 85 lines of C.

Source code is available on demand.