diff --git a/DCIM/.gitkeep b/DCIM/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/DCIM/foobar.jpg b/DCIM/foobar.jpg new file mode 100644 index 0000000..503e98c Binary files /dev/null and b/DCIM/foobar.jpg differ diff --git a/README.md b/README.md index e69de29..0e4c4a7 100644 --- a/README.md +++ b/README.md @@ -0,0 +1 @@ +none readme now \ No newline at end of file diff --git a/cam.jpg b/cam.jpg new file mode 100644 index 0000000..67a3a69 Binary files /dev/null and b/cam.jpg differ diff --git a/effects/Gotham.sh b/effects/Gotham.sh new file mode 100755 index 0000000..1a405af --- /dev/null +++ b/effects/Gotham.sh @@ -0,0 +1,2 @@ +#!/bin/bash +convert /home/pi/cam.jpg -modulate 120,10,100 -fill '#222b6d' -colorize 20 -gamma 0.5 /home/pi/DCIM/$(stat DCIM/* --printf "%i\n" | wc -l).jpg diff --git a/effects/Lomo.sh b/effects/Lomo.sh new file mode 100755 index 0000000..8897bb2 --- /dev/null +++ b/effects/Lomo.sh @@ -0,0 +1,3 @@ +#!/bin/bash +convert /home/pi/cam.jpg -channel R -level 33% -channel G -level 33% /home/pi/DCIM/$(stat DCIM/* --printf "%i\n" | wc -l).jpg + diff --git a/effects/Nashville.sh b/effects/Nashville.sh new file mode 100755 index 0000000..e23aeb4 --- /dev/null +++ b/effects/Nashville.sh @@ -0,0 +1,2 @@ +#!/bin/bash +convert -set colorspace RGB /home/pi/cam.jpg \( -clone 0 -fill '#222b6d' -colorize 100% \) \( -clone 0 -colorspace gray -negate \) -compose blend -define compose:args=100,0 -composite /home/pi/DCIM/$(stat DCIM/* --printf "%i\n" | wc -l).jpg diff --git a/effects/Redstone.sh b/effects/Redstone.sh new file mode 100755 index 0000000..1b20770 --- /dev/null +++ b/effects/Redstone.sh @@ -0,0 +1,2 @@ +#!/bin/bash +convert -set colorspace RGB /home/pi/cam.jpg \( -clone 0 -fill '#a159d3' -colorize 30% \) \( -clone 0 -colorspace gray -negate \) -compose blend -define compose:args=100,0 -composite /home/pi/DCIM/$(stat DCIM/* --printf "%i\n" | wc -l).jpg diff --git a/effects/Toaster.sh b/effects/Toaster.sh new file mode 100755 index 0000000..6c67498 --- /dev/null +++ b/effects/Toaster.sh @@ -0,0 +1,2 @@ +#!/bin/bash +convert -set colorspace RGB /home/pi/cam.jpg \( -clone 0 -fill '#330000' -colorize 100% \) \( -clone 0 -colorspace gray -negate \) -compose blend -define compose:args=100,0 -composite /home/pi/DCIM/$(stat DCIM/* --printf "%i\n" | wc -l).jpg diff --git a/effects/Vignette-1.sh b/effects/Vignette-1.sh new file mode 100755 index 0000000..5895957 --- /dev/null +++ b/effects/Vignette-1.sh @@ -0,0 +1,2 @@ +#!/bin/bash +composite -gravity center -resize 3908x2602 grad_vignette_1.png /home/pi/cam.jpg /home/pi/DCIM/$(stat DCIM/* --printf "%i\n" | wc -l).jpg diff --git a/effects/Vignette-2.sh b/effects/Vignette-2.sh new file mode 100755 index 0000000..a534bed --- /dev/null +++ b/effects/Vignette-2.sh @@ -0,0 +1,2 @@ +#!/bin/bash +composite -gravity center -resize 3908x2602 grad_vignette_2.png /home/pi/cam.jpg /home/pi/DCIM/$(stat DCIM/* --printf "%i\n" | wc -l).jpg diff --git a/effects/Vintage.sh b/effects/Vintage.sh new file mode 100755 index 0000000..180f752 --- /dev/null +++ b/effects/Vintage.sh @@ -0,0 +1,3 @@ +#!/bin/bash +convert -set colorspace RGB ../cam.jpg -channel R -level 33% \( -clone 0 -fill '#a159d3' -colorize 30% \) \( -clone 0 -colorspace gray -negate \) -compose blend -define compose:args=100,0 -composite ../DCIM/$(stat DCIM/* --printf "%i\n" | wc -l).jpg + diff --git a/effects/grad_vignette_1.png b/effects/grad_vignette_1.png new file mode 100644 index 0000000..d0f25e4 Binary files /dev/null and b/effects/grad_vignette_1.png differ diff --git a/effects/grad_vignette_2.png b/effects/grad_vignette_2.png new file mode 100644 index 0000000..89adfba Binary files /dev/null and b/effects/grad_vignette_2.png differ diff --git a/switch.py b/switch.py new file mode 100644 index 0000000..60d4e26 --- /dev/null +++ b/switch.py @@ -0,0 +1,18 @@ +import RPi.GPIO as GPIO +import time +import subprocess +import os +import random + +shell_list = ['/home/pi/effects/Gotham.sh', '/home/pi/effects/Lomo.sh', '/home/pi/effects/Lomo-vignette.sh', '/home/pi/effects/Nashville.sh', '/home/pi/effects/Redstone.sh', '/home/pi/effects/Toaster.sh', '/home/pi/effects/Vignette-1.sh', '/home/pi/effects/Vignette-2.sh', '/home/pi/effects/Vintage.sh'] + +GPIO.setmode(GPIO.BCM) + +GPIO.setup(18, GPIO.IN, pull_up_down=GPIO.PUD_UP) + +while True: + input_state = GPIO.input(18) + if input_state == False: + subprocess.call(["raspistill", "-w", "1251", "-h", "1039", "-vf", "-hf", "-ISO", "200", "-t", "1","-o", "cam.jpg"]) + os.system(random.choice(shell_list)) + time.sleep(0.2)