Last active
August 17, 2020 00:51
-
-
Save hellocatfood/9587f1d83ad1e15bcf8a to your computer and use it in GitHub Desktop.
Do feedback loops on an image with transparenty
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# applies a black and white feedback effect to still images. | |
# usage: ./feedback.sh image.png 18 | |
# this would apply the feedback effect 18 times to the image.png image and output the result as feedback.png | |
cp $1 feedback.png | |
loop=0 | |
while [ $loop -le $2 ] | |
do convert \( feedback.png -distort SRT 1.03,0 -threshold 50% \) \( feedback.png -negate \) -background none -composite feedback.png | |
loop=$(($loop + 1)) | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment