|
1 | 1 | // Cover.pde |
2 | 2 | // ImageRibbon.pde, Tag.pde |
3 | | -// |
| 3 | +// |
4 | 4 | // Generative Gestaltung, ISBN: 978-3-87439-759-9 |
5 | 5 | // First Edition, Hermann Schmidt, Mainz, 2009 |
6 | 6 | // Hartmut Bohnacker, Benedikt Groß, Julia Laub, Claudius Lazzeroni |
@@ -132,7 +132,11 @@ float tagBlockGapRatio = 0.25; |
132 | 132 |
|
133 | 133 |
|
134 | 134 | void setup() { |
135 | | - size(1310*qf, 822*qf); |
| 135 | + // Default values are: |
| 136 | + // width: 1310; |
| 137 | + // height: 822; |
| 138 | + // Multiply this values by qf to get the correct resolution. |
| 139 | + size(1310, 822); |
136 | 140 | frameRate(4); |
137 | 141 |
|
138 | 142 | smooth(); |
@@ -310,16 +314,16 @@ void setup() { |
310 | 314 | // ------ load files ------ |
311 | 315 | imageCount = 0; |
312 | 316 |
|
313 | | - File dir = new File(sketchPath, "data/images"); |
| 317 | + File dir = new File(sketchPath(), "data/images"); |
314 | 318 |
|
315 | 319 | if (dir.isDirectory()) { |
316 | 320 | String[] contents = dir.list(); |
317 | | - images = new PImage[contents.length]; |
| 321 | + images = new PImage[contents.length]; |
318 | 322 | //for (int i = 15 ; i < 60; i++) { |
319 | 323 | for (int i = 0 ; i < contents.length; i++) { |
320 | 324 | if (contents[i].charAt(0) == '.') continue; |
321 | 325 | else if (contents[i].toLowerCase().endsWith(".png") || contents[i].toLowerCase().endsWith(".jpg")) { |
322 | | - File childFile = new File(dir, contents[i]); |
| 326 | + File childFile = new File(dir, contents[i]); |
323 | 327 | images[imageCount] = loadImage(childFile.getPath()); |
324 | 328 | println(imageCount+" - "+contents[i]); |
325 | 329 | imageCount++; |
|
0 commit comments