Hi all, I am having some difficulty with a quick program I'm trying to make. My idea is to take all of the pixels in an image and order them based on the intensity of their colors (from here I want to try experimenting with Perlin Noise, using the colors that I collect from the image).
I can't tell if I am making any serious errors or not with my code; it seems to compile, but it freezes. Maybe it is too computationally intensive? If there is a way around using the draw function, that would be nice, but I'm not sure how else to update the pixels.
Here is my current code for reference:
PImage sunset;
int orderedRedColors[] = new int[1280*960];
void setup(){
size(1280,960,P2D);
sunset = loadImage("Sunset.jpg");
int redColorArray[] = new int[orderedRedColors.length];