View Single Post
Old 10-26-2013, 12:42 PM   #4
SBT
Fanatic
SBT ought to be getting tired of karma fortunes by now.SBT ought to be getting tired of karma fortunes by now.SBT ought to be getting tired of karma fortunes by now.SBT ought to be getting tired of karma fortunes by now.SBT ought to be getting tired of karma fortunes by now.SBT ought to be getting tired of karma fortunes by now.SBT ought to be getting tired of karma fortunes by now.SBT ought to be getting tired of karma fortunes by now.SBT ought to be getting tired of karma fortunes by now.SBT ought to be getting tired of karma fortunes by now.SBT ought to be getting tired of karma fortunes by now.
 
SBT's Avatar
 
Posts: 580
Karma: 810184
Join Date: Sep 2010
Location: Norway
Device: prs-t1, tablet, Nook Simple, assorted kindles, iPad
I use imagemagick for batch processing. Sample from Unix shell, with typical numbers for b&w photos & drawings. Numbers vary depending on image exposure, dimensions etc.
Code:
mkdir clean
for x in *.jpg
do
convert $x -colorspace gray \ #convert to B&W
-level 10%,75%,0.6 \ # adjust B/W levels
-unsharpen 5x1+0.4+0.02 \ # makes lines less fuzzy
-fuzz 20% -trim \ # autocrop, but I seldom use it
-resize 25% \# shrink
-colors 16 \# ...since e-ink only has 16 shades anyway...
clean/${x%jpg}png \ # convert to png
done
... and then run them through pngcrush afterwards to save another few bytes.
SBT is offline   Reply With Quote