|
|
@@ -64,7 +64,8 @@ function run_scan {
|
|
|
scanimage --mode=$7 --resolution=$6 -x $x -y $y --format=png --output-file=$tempname | \
|
|
|
yad --progress --text="Scanning to PNG..." --width=300 --no-buttons --auto-close
|
|
|
if [[ $landscape == true ]] then
|
|
|
- convert $tempname -rotate 90 $tempname
|
|
|
+ convert $tempname -rotate 90 $tempname | \
|
|
|
+ yad --progress --text="Rotating to Landscape" --width=300 --no-buttons --auto-close
|
|
|
fi
|
|
|
|
|
|
case $4 in
|
|
|
@@ -73,7 +74,7 @@ function run_scan {
|
|
|
;;
|
|
|
jpg)
|
|
|
convert -quality 85 $tempname $filename | \
|
|
|
- yad --progress --text="Converting to $4..." --width=300 --no-buttons --auto-close
|
|
|
+ yad --progress --text="Converting to jpg..." --width=300 --no-buttons --auto-close
|
|
|
;;
|
|
|
pdf)
|
|
|
if [[ $7 != "Lineart" ]] then
|
|
|
@@ -84,13 +85,13 @@ function run_scan {
|
|
|
tempname=$tempname2
|
|
|
fi
|
|
|
convert $tempname $filename | \
|
|
|
- yad --progress --text="Converting to $4..." --width=300 --no-buttons --auto-close
|
|
|
+ yad --progress --text="Converting to pdf..." --width=300 --no-buttons --auto-close
|
|
|
;;
|
|
|
esac
|
|
|
|
|
|
size_raw=$(stat -c%s $filename)
|
|
|
size_kb=$((size_raw/1024))
|
|
|
- yad --picture --title="Filesize: $size_kb KB" --size=fit --width=750 --height=1000 --filename=$tempname
|
|
|
+ yad --picture --title="Filesize: $size_kb KB ($4)" --size=fit --width=750 --height=1000 --filename=$tempname
|
|
|
rm $tempname
|
|
|
}
|
|
|
export -f run_scan # Make function available to yad button command.
|