Last active
June 27, 2024 13:13
-
-
Save jduckles/29a7c5b0b8f91530af5ca3c22b897e10 to your computer and use it in GitHub Desktop.
Revisions
-
jduckles revised this gist
May 12, 2020 . 1 changed file with 4 additions and 2 deletions.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -1,7 +1,9 @@ #!/bin/bash # Make a PDF look scanned. # Extracted from https://github.com/baicunko/scanyourpdf and modified for smaller output files (compression lower density). INPUT_FILE=$1 /usr/local/bin/convert -density '80' ${INPUT_FILE} -colorspace 'gray' -linear-stretch '3.5%x10%' \ -blur '0x0.5' -attenuate '0.25' +noise Gaussian -rotate 0.5 \ -compress lzw -quality 50 scanned_${INPUT_FILE} -
jduckles created this gist
May 12, 2020 .There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,7 @@ #!/bin/bash # Make a PDF look scanned. INPUT_FILE=$1 /usr/local/bin/convert -density '150' ${INPUT_FILE} -colorspace 'gray' -linear-stretch '3.5%x10%' \ -blur '0x0.5' -attenuate '0.25' +noise Gaussian -rotate 0.5 scanned_${INPUT_FILE}