Created
July 9, 2023 04:35
-
-
Save rittme/7554bca1e62cb25df44389c69df20b33 to your computer and use it in GitHub Desktop.
Make image look like it was scanned
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
# A few options | |
convert -density 130 input.pdf -rotate 0.2 -attenuate 0.25 +noise Laplacian -colorspace Gray output.pdf | |
convert -density 150 input.pdf -rotate "$([ $((RANDOM % 2)) -eq 1 ] && echo -)0.$(($RANDOM % 4 + 5))" -attenuate 0.4 +noise Laplacian -sharpen 0x1.0 -colorspace Gray output.pdf | |
convert -density 150 input.pdf -rotate "$([ $((RANDOM % 2)) -eq 1 ] && echo -)0.$(($RANDOM % 4 + 5))" -attenuate 0.4 +noise Gaussian -sharpen 0x1.0 -colorspace Gray output.pdf | |
convert -density 150 input.pdf -rotate "$([ $((RANDOM % 2)) -eq 1 ] && echo -)0.$(($RANDOM % 4 + 5))" -attenuate 0.4 +noise Gaussian -attenuate 0.03 +noise Laplacian -sharpen 0x1.0 -colorspace Gray output.pdf | |
convert -density 150 input.pdf -rotate "$([ $((RANDOM % 2)) -eq 1 ] && echo -)0.$(($RANDOM % 4 + 5))" -attenuate 0.4 +noise Multiplicative -attenuate 0.03 +noise Laplacian -colorspace Gray output.pdf | |
convert -density 150 input.pdf -rotate "$([ $((RANDOM % 2)) -eq 1 ] && echo -)0.$(($RANDOM % 4 + 5))" -attenuate 0.4 +noise Multiplicative -attenuate 0.03 +noise Laplacian -sharpen 0x1.0 -colorspace Gray output.pdf | |
convert -density 130 input.pdf -rotate 0.2 -attenuate 0.2 +noise Laplacian -colorspace Gray output.pdf |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment