Skip to content

Instantly share code, notes, and snippets.

@hellocatfood
Last active August 17, 2020 00:51
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save hellocatfood/9587f1d83ad1e15bcf8a to your computer and use it in GitHub Desktop.
Save hellocatfood/9587f1d83ad1e15bcf8a to your computer and use it in GitHub Desktop.
Do feedback loops on an image with transparenty
#!/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