image(), size()
in
Programming Questions
•
1 year ago
Is there a way to loadImage() and image() with the window width height adjusted automatically?
Cause each time I change the loadImage() filename, I have to find out it's exact size and change the size() instruction.
- void setup() {
size(577,594); // <<<< to be modified according to img LoadImage size
npix=width*height;
setupImage();
}//setup() - void setupImage() {
background(255);
smooth();
img=loadImage("gridQuad 120409-045813a.png"); //<<<< image source
image(img, 0, 0);
}//setupImage()
1