Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- PImage img;
- void setup()
- {
- size(877, 500);
- img = loadImage("foto.jpg");
- background(255);
- noStroke();
- }
- void draw(){
- for (int j = 0; j < height; j += 1)
- {
- for (int i = 0; i < width; i += 1)
- {
- color c = img.get(i, j);
- float red = red(c);
- float green = green(c);
- float blue = blue(c);
- //PAŠVIESINTAS
- if(key == 'a'){
- fill((int)red+80, (int)green+60, (int)blue+20);
- rect(i, j, 1, 1);
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement