wok-current rev 21771
sane-backends/sane.cgi: libpng support
author | Pascal Bellard <pascal.bellard@slitaz.org> |
---|---|
date | Mon Jul 01 17:09:09 2019 +0200 (2019-07-01) |
parents | f1e92a9bbf08 |
children | f7a13af08fc7 |
files | sane-backends/stuff/tazpanel/sane.cgi |
line diff
1.1 --- a/sane-backends/stuff/tazpanel/sane.cgi Mon Jul 01 12:11:40 2019 +0200 1.2 +++ b/sane-backends/stuff/tazpanel/sane.cgi Mon Jul 01 17:09:09 2019 +0200 1.3 @@ -102,6 +102,8 @@ 1.4 1.5 imgformat() { 1.6 tmp=$(mktemp -u -t tazsane.XXXXXX) 1.7 +pnm2png=convert; pnm2png_cmd="> $tmp.pnm; convert $tmp.pnm png:-" 1.8 +[ "$(which pnm2png)" ] && pnm2png=pnm2png && pnm2png_cmd="|pnm2png" 1.9 while read key name type exe pkg cmd ; do 1.10 case "$key" in 1.11 \#*) continue 1.12 @@ -145,8 +147,7 @@ 1.13 esac ;; 1.14 esac 1.15 done <<EOT 1.16 -#png tazsane.png image/png pnm2png|convert imagemagick > $tmp.pnm; [ "$(which pnm2png)" ] && pnm2png < $tmp.pnm || convert $tmp.pnm png:- 1.17 -png tazsane.png image/png convert imagemagick > $tmp.pnm; convert $tmp.pnm png:- 1.18 +png tazsane.png image/png $pnm2png imagemagick $pnm2png_cmd 1.19 jpeg tazsane.jpg image/jpeg convert imagemagick > $tmp.pnm; convert $tmp.pnm jpg:- 1.20 jpeg2000 tazsane.jp2 image/jpeg2000-image convert imagemagick > $tmp.pnm; convert $tmp.pnm jp2:- 1.21 tiff tazsane.tiff image/tiff convert imagemagick > $tmp.pnm; convert $tmp.pnm tiff:- 1.22 @@ -384,7 +385,7 @@ 1.23 EOT 1.24 esac 1.25 [ "$name" == "resolution" ] && f="$f onchange=showGeometry()" 1.26 - echo "<td>$f type=\"text\" title=\"$min .. $max. $help\" size=4 maxlength=4>$u" 1.27 + echo "<td>$f type=\"text\" title=\"$min .. $max. $help\" size=5 maxlength=5>$u" 1.28 res_min=$min 1.29 res_max=$max 1.30 fi