Created
October 9, 2013 17:57
-
-
Save nnarhinen/6905429 to your computer and use it in GitHub Desktop.
Scan documents as pdf with gamma correction
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 characters
#!/bin/bash | |
#find out scanner model with scanimage -L | |
scanimage -d hp3900:libusb:003:005 --resolution=600 --mode=Gray > raw.pnm | |
#gamma correction (fiddle around with the value suitable for your printer) | |
convert raw.pnm -gamma 0.5 out.pnm | |
#convert to pdf | |
gm convert out.pnm out.pdf | |
#cleanup | |
rm *.pnm |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment