diff options
author | Florian Pritz <bluewind@xinu.at> | 2014-09-13 00:08:33 +0200 |
---|---|---|
committer | Florian Pritz <bluewind@xinu.at> | 2014-09-13 00:08:33 +0200 |
commit | 5b5b338503b82cde42fb8cdd7791abb61b939111 (patch) | |
tree | 94b6aa445cc86976346b101d08277ac488cf36d3 /scan-multi | |
parent | 8450e9ac59dfb678ae3fc2adca5bb837804710f3 (diff) | |
download | bin-5b5b338503b82cde42fb8cdd7791abb61b939111.tar.gz bin-5b5b338503b82cde42fb8cdd7791abb61b939111.tar.xz |
misc changes
Signed-off-by: Florian Pritz <bluewind@xinu.at>
Diffstat (limited to 'scan-multi')
-rwxr-xr-x | scan-multi | 9 |
1 files changed, 6 insertions, 3 deletions
@@ -1,15 +1,18 @@ #!/bin/bash +jpeg_quality=70 +jpeg_size=1500x1500 + time=$(date +%Y-%m-%d_%H%M%S) -scanimage --resolution 200 -b -x 214.98 -y 294.973 +scanimage --resolution 200 -b -x 215 -y 297 i=1 while [[ -e "out$i.pnm" ]]; do img="out$i.pnm" newname="$(printf "%s_%03d" "$time" "$i")" - convert "$img" -normalize -quality 70 "$newname.jpg" && rm "$img" + convert "$img" -normalize -resize $jpeg_size -quality $jpeg_quality "$newname.jpg" && rm "$img" ((i++)) done if [[ $1 = "--pdf" ]]; then - convert "${time}"_*.jpg -resize 1500x1500 "${time}.pdf" && rm "${time}"_*.jpg + convert "${time}"_*.jpg -resize $jpeg_size -compress jpeg -quality $jpeg_quality -density 72x72 -repage 595x842 "${time}.pdf" && rm "${time}"_*.jpg fi |