File: grace-thumbnailer

package info (click to toggle)
grace 1%3A5.1.25-9
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 14,192 kB
  • sloc: ansic: 102,044; sh: 5,492; makefile: 572; perl: 56; fortran: 56
file content (18 lines) | stat: -rwxr-xr-x 263 bytes parent folder | download | duplicates (11)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#!/bin/sh

size=128x96

if [ $1 = "-s" ]; then
	shift
	size=$1
	shift
fi

infile="$1"
outfile="$2"

tmppng=$(mktemp /tmp/grace-thumbnail-XXXXXX)

gracebat -hdevice PNG -printfile $tmppng "$infile"
convert -resize $size -sharpen 4 $tmppng "$outfile"
rm -f $tmppng