Created
March 17, 2023 17:05
-
-
Save nilsandrey/c91306b0206c783fb80905ca86910359 to your computer and use it in GitHub Desktop.
Apply an "scanned" effect to a PDF. From https://news.ycombinator.com/item?id=35132018
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/sh | |
ROTATION=$(shuf -n 1 -e '-' '')$(shuf -n 1 -e $(seq 0.05 .5)) | |
convert -density 150 $1 \ | |
-linear-stretch '1.5%x2%' \ | |
-rotate ${ROTATION} \ | |
-attenuate '0.01' \ | |
+noise Multiplicative \ | |
-colorspace 'gray' $2 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment