Skip to content
This repository was archived by the owner on Jul 5, 2022. It is now read-only.

this code is giving me an arrayIndexOutOfBoundesException(processing 3.5.4) #3634

Closed
dezi9dezi opened this issue May 14, 2022 · 1 comment
Closed

Comments

@dezi9dezi
Copy link

PImage spain;

void setup() {
size(900, 600);
spain = loadImage("spain.png");
background(255);
}
void draw() {
for (int i = 0; i<100; i++) {
float x = random(width);
float y = random(height);
float loc = x+y*width;
color col = spain.pixels[int(loc)];
fill(col);
noStroke();
ellipse(x, y, 16, 16);
}
}

@KobeLiesenborgs
Copy link
Collaborator

Hey Dezi!
This repository manages the Coding Train website, it isn't the right place for questions.
The best things you can do is join our discord.

Hope to see you there!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants