Adds postscan
This commit is contained in:
parent
9de770c4bc
commit
110164b71e
|
@ -0,0 +1,9 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
# auto fix issues with my scanner
|
||||
input="$3"
|
||||
color=$(magick "$input" -format "%[hex:u.p{100,-1}]" info:)
|
||||
tmp=$(mktemp --suffix=.png)
|
||||
magick "$input" -page +0-100 -background \#$color -flatten -auto-level $tmp
|
||||
magick $tmp -quality 100 "${input%.*}.pdf"
|
||||
rm -rf $tmp "$input"
|
Loading…
Reference in New Issue