An openFrameworks addon for decoding and rendering animated WebP images using the libwebp image codec.
It supports frame extraction, timing, and GPU texture upload for smooth playback in creative coding environments.
- Load animated WebP files (
*.webp) - Decode all frames with proper duration metadata
- Upload frames to
ofTexturefor GPU-accelerated rendering - Play, loop, and draw animation in your OF app
- libwebp
- pkg-config (for auto-discovery of headers/libs)
cd openFrameworks/addons
git clone https://github.com/haradama/ofxWebpAnimation.gitbrew install webp pkg-configsudo apt-get install libwebp-dev pkg-configpacman -S mingw-w64-x86_64-libwebp mingw-w64-x86_64-pkg-configPlace an animated WebP file (e.g., animation.webp) in your app's bin/data/ folder.
#include "ofMain.h"
#include "ofxWebpAnimation.h"
class ofApp : public ofBaseApp {
ofxWebpAnimation anim;
void setup() {
anim.load(ofToDataPath("animation.webp"));
}
void update() {
anim.update();
}
void draw() {
anim.draw(0, 0);
}
};This project is licensed under the MIT License. See the LICENSE file for details.
Check out the included example-basic/ for a minimal working demo.