webif/var/mongoose/html/browse/thumbnail/_mk.jim

20 lines
304 B
Plaintext
Raw Normal View History

#!/mod/bin/jimsh
package require cgi
source /mod/webif/lib/setup
require ts.class cat
httpheader "image/bmp"
set rfile [cgi_get file]
set pos [cgi_get pos 0]
if {![catch {set ts [ts fetch $rfile]}]} {
$ts mkbmp $pos ".pos$pos"
set f "[file rootname $rfile].pos$pos.bmp"
cat $f
file delete $f
}