in
Core Library Questions
•
1 year ago
Hey guys! Why when i try to print this image as a PDF i get the original image and a partial scripted image of that instead of just the scripted image ina a PDF format?
Thanks!
PImage i;
import processing.pdf.*;
int w=100, h=180, sx=w, x, y;
void setup() {
size (200,200,PDF,"prova.pdf");
i=loadImage("a1.jpg");
image (i, 0,0, width, height);
}
void draw() {
if (sx-->10)for (y=0;y++<h;)for (x=0;(x+=sx)<w;) {
stroke(i.get(x, y));
line(x, y, x+sx, y+sx);
println ("Finished.");
exit ();
}
}
1