summarylogtreecommitdiffstats
path: root/stripPicture
blob: 9c0319938dcc230e51eea2d965af98974a83459d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
#!/bin/sh
# Usage: stripPicture fullname mime exportPicture

fullname="$1"
mime="$2"
exportPicture="$3"

# thumbnail options by mime type
case "$mime" in

      application/x-krita)
      unzip -p "$fullname" preview.png > "$exportPicture"
      exit
      ;;
      
      image/openraster)
      unzip -p "$fullname" Thumbnails/thumbnail.png > "$exportPicture"
      exit
      ;;
      
      application/x-blender)
      blender-thumbnailer.py "$fullname" "$exportPicture"
      exit
      ;;

      *)
#     case trap
      exit
      
esac