Does anyone know how to convert the pixels[] index into x and y coordinates?
What I want to do is restrict the pixels[] values I update based on where the mouse is, but as the pixels[] indexes are just sequential, I can't figure out how this relates the the x and y coordinate of that pixel