Loading...
Logo
Processing Forum
hey gang,
I want to grab the mean RGB values from all image files (.gifs or .jpegs) in a folder on my desktop. Is there a way to do this cleanly, without necessarily having to import all of these images, but rather just point Processing to the folder?

Replies(1)

you don't have to load the image from the data-folder of your sketch. loadimage also works with absolute paths

so you can load an image from your Desktop with the following code example (this is a linux system, adjust the path to your needs)

Copy code
  1. PImage img;
  2. void setup() {
  3.   size(300,300);
  4.   img = loadImage("/home/nikki/Desktop/apple.jpg");
  5. }

  6. void draw() {
  7.   image(img, 0,0 );
  8. }