as stated earlier flickr pics are simply URLs,
If you know these, its simpler...
Quote:
/*
* flickr grid
*
* Anthony Starks (ajstarks@gmail.com)
*/
String produce[] = {
"http://farm1.static.flickr.com/188/483711793_98433708a6_m.jpg",
"http://farm1.static.flickr.com/207/483712735_d1e1b39577_m.jpg",
"http://farm1.static.flickr.com/192/483681348_3cb61c4fba_m.jpg",
"http://farm1.static.flickr.com/217/483672774_906ca96d69_m.jpg",
"http://farm1.static.flickr.com/205/483702685_387ad1adee_m.jpg",
"http://farm1.static.flickr.com/185/483669600_7582612e5a_m.jpg",
"http://farm1.static.flickr.com/173/483699589_a69e64c625_m.jpg",
"http://farm1.static.flickr.com/193/483675096_9cdf5d62a3_m.jpg",
"http://farm1.static.flickr.com/202/485941307_0d177ae493_m.jpg",
"http://farm1.static.flickr.com/230/485948065_dd55b022b4_m.jpg",
"http://farm1.static.flickr.com/211/485949883_23c495eab2_m.jpg",
"http://farm1.static.flickr.com/175/483676186_65cbcd47b2_m.jpg"
};
PImage[] im;
PFont f1;
int gridX, gridY, rowWidth, colHeight, npics, margin, ncol, pw, ph;
void setup() {
size(1000,1000);
smooth();
//f1=loadFont("Copperplate-Light-48.vlw");
//textAlign(CENTER);
//textFont(f1);
npics = loadPicURLs(produce);
pw = im[0].width;
ph = im[0].height;
ncol = 4;
margin = 10;
rowWidth = (pw * ncol) + (ncol * margin);
colHeight = (npics / ncol) * ph;
gridX = (width - rowWidth) /2;
gridY = 10; // (height - colHeight) / 2;
//println(pw + " " + ph + " " + ncol+ " " + margin + " " + rowWidth + " " + gridX + " " + gridY);
frameRate(0);
//noLoop();
}
void draw() {
background(0);
picgrid(gridX, gridY, npics, ncol, margin, pw, ph);
}
int loadPicURLs(String[] s) {
int n = s.length;
im = new PImage[n];
for (int i = 0; i < n; i++)
im[i] = loadImage(s[i]);
return n;
}
void picgrid(int n, int col, int margin, int iw, int ih) {
picgrid(0, 0, n, col, margin, iw, ih);
}
void picgrid(int x, int y, int n, int col, int margin, int iw, int ih) {
int xp, yp, p;
xp = x + margin;
yp = y + margin;
for (int i = 0; i < n; i++) {
if (i % col == 0 && i > 0) {
yp += (ih + margin);
xp = x + margin;
}
p = int(random(n));
image(im[p], xp, yp);
xp += (iw + margin);
}
}