Help!!!
in
Programming Questions
•
8 months ago
Sorry :) I'm new in the forum :) I wanted to ask someone more experienced than me if he could explain a few things in this code that I have not very clear.
import processing.pdf.*;
PImage lol;
lol = loadImage("pokerface.jpg");
println(lol.width);
println(lol.height);
int pop = 80;
size(lol.width*pop,lol.height*pop,PDF,"Pokerface.pdf");
background(255);
for( int x = 0; x < lol.width; x++) {
for(int y = 0; y < lol.height; y++) {
float r = random(255);
color c = lol.get(x,y);
float dim = 255 - brightness(c);
noStroke ();
colorMode(HSB, 255);
fill(r);
rect(x*pop,y*pop,dim*2, dim*2);
}
}
my questions are:
-the first 2 "println"are used to what?
-"for( int x = 0; x < lol.width; x++) {
for(int y = 0; y < lol.height; y++) {
float r = random(255);" what is meaning?
Thanks everyone :)
1