|
|
@@ -97,8 +97,15 @@ function run_scan {
|
|
|
yad --progress --text="Converting to $format..." --width=300 --no-buttons --auto-close
|
|
|
;;
|
|
|
pdf)
|
|
|
- if [[ $colmode != "Lineart" ]]; then
|
|
|
- tempname2="${tempname%.png}.jpg"
|
|
|
+ if [[ $colmode == "Lineart" ]]; then
|
|
|
+ # PNGs compress BW images better.
|
|
|
+ tempname2="${tempname%.tif}.png"
|
|
|
+ convert $tempname $tempname2 | \
|
|
|
+ yad --progress --text="Converting to png..." --width=300 --no-buttons --auto-close
|
|
|
+ rm $tempname
|
|
|
+ tempname=$tempname2
|
|
|
+ else
|
|
|
+ tempname2="${tempname%.tif}.jpg"
|
|
|
convert -quality 85 $tempname $tempname2 | \
|
|
|
yad --progress --text="Converting to jpg..." --width=300 --no-buttons --auto-close
|
|
|
rm $tempname
|