For the library, we’re actually just building libwebp without any changes whatsoever. Here’s the PlatformIO build configuration that we use in the firmware:
{
"name": "libwebp",
"build": {
"srcFilter": [
"+<src/**/*.c>"
],
"includeDir": "libwebp/src",
"srcDir": "libwebp",
"unflags": [
"-DHAVE_CONFIG_H"
]
}
}
Basically, just build libwebp without the -DHAVE_CONFIG_H flag and you’re good to go!
Here’s an example of how to use the API to iterate through all the frames in a WebP, which you can then draw with SmartMatrix: