← Back

ofxImageSequencePlayback

github.com/jkosoy/ofxImageSequencePlayback · @jkosoy
OF 0.9 Video/Camera

An openFrameworks addon used in conjunction with ofxImageSequence for robust control over a sequence: play, reverse, loop, and ping pong and more.

5 10 Last commit 8y ago Created 13y ago

Forks

Forks pushed to more recently than jkosoy/ofxImageSequencePlayback itself, plus any admin-confirmed fork with commits of its own — worth checking if you're hitting issues with the original.

gallagher-tech/ofxImageSequencePlayback by @gallagher-tech · ★ 0 · pushed 3y ago
wasawi/ofxImageSequencePlayback by @wasawi · ★ 0 · pushed 8y ago

README

ofxImageSequencePlayback



An openFrameworks library for managing sequences of ofImages in a more robust way. ofxImageSequencePlayback is dependant on the awesome ofxImageSequence addon by Flightphase.

It is also heavily informed by the great work done by Red Paper Heart on their Cinder Block, rph-textureSequence. This addon is as much a port of their Cinder Block as anything.

Features



Play sequences in reverse. Loop the infinitely. Ping pong the sequences (forward->reverse->forward->reverse...) Notifications when a sequence completes and is not looping.

Simple Example



Assuming you have a folder in your data directory named "sequence" filled with PNGs...

In your .h file:

ofxImageSequencePlayback mySequence; void onSequenceCompleted(ofEventArgs &evt);

In your .cpp file:

void testApp::setup() { mySequence.loadSequence("sequence",24.0f); // 24 FPS

ofAddListener(mySequence.sequenceCompleted,this,&testApp::onSequenceCompleted);

mySequence.play(); }

void testApp::onSequenceCompleted(ofEventArgs &evt) { mySequence.stop(); ofLog(OF_LOG_VERBOSE,"The sequence is complete."); }

void testApp::update() { mySequence.update(); }

void testApp::draw() { mySequence.draw(); }

Get this addon

HTTPS
SSH