Loading...
Processing Forum
Recent Topics
All Forums
Screen name:
guiseiz
About Me:
Art Director @ Work Club
Blog:
http://chumpsview.tumblr.com
Website:
http://seiz.co.uk
guiseiz's Profile
1
Posts
3
Responses
0
Followers
Activity Trend
Last 30 days
Last 30 days
Date Interval
From Date :
To Date :
Go
Loading Chart...
Posts
Responses
PM
Show:
All
Discussions
Questions
Expanded view
List view
Private Message
Exporting Animated Gif's (glitch)
[6 Replies]
31-Jul-2010 03:24 PM
Forum:
Contributed Library Questions
Hi guys - sorry for the total noob question :)
i've just started messing about with Processing - and i'm teaching myself about loops right now.
i wrote a very pedestrian bit of code that draws an area of points
and then assigns these points a spectrum of color and then made them change slightly with every iteration of the loop
import gifAnimation.*;
GifMaker gifExport;
float a = (0);
float b = (255);
float changea = 2.5;
float changeb = -2.5;
void setup(){
size(500,500);
background(0);
rectMode(CENTER);
println("gifAnimation " + Gif.version());
gifExport = new GifMaker(this, "export-###.gif");
gifExport.setRepeat(0);
}
void draw(){
if (keyPressed == true) {
gifExport.finish();
}else{
//gifExport.setDelay(1);
gifExport.addFrame();
}
for (int i = 50; i <=450; i+=3) {
for (int j = 50; j<=450; j+=3){
stroke(255,0,i-a);
point(i,j);
a += changea;
b += changeb;
if((a<0)||(a>255)){
changea *= -1;
}
if((b<0)||(b>255)){
changeb *= -1;
}
}
}
}
i also imported a gif exporting library - and it all works great
but the gifs come with a blank frame at the end (??) (see below)
i was wondering if there's a way to tell it to not include that blank frame :)
thank you :)
«Prev
Next »
Moderate user : guiseiz
Forum