Created
July 10, 2020 05:09
-
-
Save shannietron/35009f35fda1730b9ded96870386832d to your computer and use it in GitHub Desktop.
make your files look like they went through dead trees.
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
function makeScanned | |
convert -density 150 $argv[1] -colorspace gray -linear-stretch 3.5%x10% -blur 0x0.5 -attenuate 0.25 +noise Gaussian -rotate 0.5 temp.pdf | |
gs -dSAFER -dBATCH -dNOPAUSE -dNOCACHE -sDEVICE=pdfwrite -sColorConversionStrategy=LeaveColorUnchanged dAutoFilterColorImages=true -dAutoFilterGrayImages=true -dDownsampleMonoImages=true -dDownsampleGrayImages=true -dDownsampleColorImages=true -sOutputFile=output.pdf temp.pdf | |
end | |
#idea from this HN thread | |
#https://news.ycombinator.com/item?id=23160387 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment