Help! Can't export frames

#1

Hi, I’m pretty new to Processing. I’m trying to export frame images to create a movie but it’s not working. All I get is just one frame and just with the background.
What am I doing wrong?

import geomerative.*;
import processing.pdf.*;
boolean record;

PFont myFont;

void setup() {
  size (1080,1080);
  noStroke();
}

void draw(){
  if (record) {
    beginRecord(PDF, "pdf/capa-####.pdf");
  }
  noStroke();
  frameRate(12);
  myFont=createFont("Capa-Bold.ttf",48);
  background(#ffffff);
  for(int i= -0;i<1080;i=i+110){
  for(int j= -0;j<1080;j=j+110){
    
  
  fill(#0000F4,0,0,random(abs(i-150)));
  textFont(myFont, random(abs(i-330)));
  text("K", i, random(j));
  
  if (record) {
    endRecord();
    record = false;
  
    saveFrame("GIF/capa-######.png");
  
  }
  }
  }
}
1 Like

#2

Sorry, I’ve just figured out my mistake. “saveFrame” was misplaced.

2 Likes