Awesome
Image Sequence Player for Processing
A Processing library to load, playback and display image sequences
There already is a gifAnimation library that loads, plays back and exports .gif animation, however there are cases where finer control is needed, such as:
- easily integrating image sequences into Processing sketches
- displaying animation sequences with more colours, but maintain transparency (e.g. animated png sequence with crisp colours)
- precisely controlling a timeline frame by frame where audio isn't needed (and video keyframes don't offer enough control)
Contributions welcome.
Installation:
Method 1: via Contribution Manager
- Go to Processing > Sketch > Import Library... > Add Library...
- Type Image Sequence Player in the search field
- Press Install
Method 2: Manual install:
- Download ImageSequencePlayer.zip
- Unzip into Documents > Processing > libraries
- Restart Processing (if it was already running)
Minimal Example:
// import library
import com.hirschandmann.image.*;
// create a reference to an image sequence
ISPlayer player;
void setup() {
size(640, 360);
// create instance and load all valid images from the data folder
player = new ISPlayer(this,dataPath("name-of-image-folder-in-data"));
}
void draw() {
// clear background with yellow
background(255, 204, 0);
// render image sequence, ISPlayer extends PImage, use it as such
image(player,mouseX,mouseY);
}
// image sequence events
// all frames loaded
void onSequenceLoaded(ISPlayer player){
println(player+" sequence fully loaded");
player.loop();
}
Credits
The library is heavily influenced by Patrick Meister's gifAnimation library
The examples include James Patterson's animation from Processing > Examples > Topics > Animation > AnimatedSprite
Developed by George Profenza at Hirsch & Mann and used on multiple projects such as:
-
Playable City Bristol(image credits: Jon Aitken)
-
and more