Skip to content

Commit

Permalink
first commit
Browse files Browse the repository at this point in the history
  • Loading branch information
mrleemurray committed Jan 24, 2019
0 parents commit 7ff6d46
Show file tree
Hide file tree
Showing 26 changed files with 81 additions and 0 deletions.
31 changes: 31 additions & 0 deletions Label_maker.pde
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
PImage photo, sourceImage, maskImage;

IntList palette;

void setup(){
fullScreen();
smooth();

palette = new IntList();
palette.append(color(0, 10, 20));

photo = loadImage("Macaw-Feathers.jpg");
image(photo, 0, 0, width, height);
saveFrame("data/source.png");
background(0);
generateMaskShapes(50);
saveFrame("data/mask.png");
maskImage = loadImage("mask.png");
sourceImage = loadImage("source.png");
sourceImage.mask(maskImage);
background(random(0,255), random(0,255), random(0,255));
image(sourceImage, 0, 0);
//generateOverlayShapes(20);
saveFrame("data/output" + year() + month() + day() + hour() + minute() + second() + ".png");
println(width);
println(height);
}

void draw(){
exit();
}
50 changes: 50 additions & 0 deletions Shapes.pde
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@

void generateMaskShapes(int _num_shapes) {
fill(255);
noStroke();
for (int i = 0; i < _num_shapes; i++) {
float randX = random(0, width);
float randY = random(0, height);
float randDia = random(100, 400);
pushMatrix();
translate(randX, randY);
rotate(random(0, PI));

int randomiser = int(random(0, 3));
if (randomiser == 0) { //draw a rectangle
rectMode(CENTER);
rect(0, 0, randDia, randDia); // Black rectangle
} else if (randomiser == 1) { //draw a circle
ellipseMode(CENTER);
ellipse(0, 0, randDia, randDia); // Black ellipse
} else {
triangle(randX - randDia/2, randY + randDia/2, randX, randY - randDia/2, randX + randDia/2, randY + randDia/2);
}
popMatrix();
}
}

void generateOverlayShapes(int _num_shapes) {
noStroke();
for (int i = 0; i < _num_shapes; i++) {
fill(random(0, 255), random(0, 255), random(0, 255), 100);
float randX = random(0, width);
float randY = random(0, height);
float randDia = random(100, 400);
pushMatrix();
translate(randX, randY);
rotate(random(0, PI));

int randomiser = int(random(0, 3));
if (randomiser == 0) { //draw a rectangle
rectMode(CENTER);
rect(0, 0, randDia, randDia); // Black rectangle
} else if (randomiser == 1) { //draw a circle
ellipseMode(CENTER);
ellipse(0, 0, randDia, randDia); // Black ellipse
} else {
triangle(randX - randDia/2, randY + randDia/2, randX, randY - randDia/2, randX + randDia/2, randY + randDia/2);
}
popMatrix();
}
}
Binary file added data/.DS_Store
Binary file not shown.
Binary file added data/Macaw-Feathers.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added data/feather.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added data/flamingo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added data/green.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added data/mask.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added data/output20181014133934.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added data/output20181014134327.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added data/output20181014134411.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added data/output20181014134529.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added data/output2018101413464.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added data/output20181014144858.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added data/output20181014144955.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added data/output20181015123932.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added data/output20181015124034.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added data/output2018101512404.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added data/output20181015124042.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added data/output20181015124115.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added data/source.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added mask.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added output.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added output1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added output2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added output3.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 7ff6d46

Please sign in to comment.