Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- PImage img;
- void setup() {
- img = loadImage("image.jpg");
- size(img.width, img.height);
- image(img, 0, 0);
- }
- void draw() {
- int x = (int)random(width);
- int y = (int)random(height);
- float a = random(100, 200);
- fill(img.get(x, y), a);
- noStroke();
- float w = random(1, 10);
- float h = random(5, 100);
- rect(x, y, w, h);
- }
- void keyPressed() {
- saveFrame("image-####.jpg");
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement