~ubuntu-branches/ubuntu/trusty/shutter/trusty

« back to all changes in this revision

Viewing changes to share/shutter/resources/system/plugins/bash/sptornedpaper/sptornedpaper

  • Committer: Bazaar Package Importer
  • Author(s): Ryan Niebur
  • Date: 2009-08-06 16:29:32 UTC
  • mfrom: (1.1.1 upstream)
  • Revision ID: james.westby@ubuntu.com-20090806162932-g00c3k4obbdddb4u
Tags: 0.80.1-1
* New Upstream Version
  - update copyright

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
#!/bin/bash
2
 
#torned paper
3
 
#shutter-plugin
4
 
 
5
 
 
6
 
TEXTDOMAIN=shutter-plugins
7
 
TEXTDOMAINDIR=$SHUTTER_INTL
8
 
PLUGIN_NAME=$"torned paper"
9
 
PLUGIN_SORT=$"effect"
10
 
PLUGIN_TIP=$"generates a torned-border"
11
 
PLUGIN_EXT="image/png"
12
 
 
13
 
if [[ "${1}" = "name" ]];then
14
 
        echo "${PLUGIN_NAME}"
15
 
    exit 0
16
 
elif [[ "${1}" = "sort" ]];then
17
 
    echo "${PLUGIN_SORT}"
18
 
    exit 0
19
 
elif [[ "${1}" = "tip" ]];then
20
 
    echo "${PLUGIN_TIP}"
21
 
    exit 0
22
 
elif [[ "${1}" = "ext" ]];then
23
 
    echo "${PLUGIN_EXT}"
24
 
    exit 0
25
 
elif [[ "${1}" = "lang" ]];then
26
 
    echo "shell"
27
 
    exit 0
28
 
fi
29
 
 
30
 
FILE="${1}"
31
 
#~ WIDTH="${2}"
32
 
#~ HEIGHT="${3}"
33
 
#FILEYTPE="${4}"
34
 
#GEO="${2}x${3}"
35
 
 
36
 
# Generate torned effect
37
 
 
38
 
convert "${FILE}" \( +clone -threshold -1 -virtual-pixel black \
39
 
-spread 10 -blur 0x3 -threshold 50% -spread 1 -blur 0x.7 \) \
40
 
+matte -compose Copy_Opacity -composite "${FILE}"
41
 
 
42
 
 
43
 
# Add hard shadow
44
 
 
45
 
convert "${FILE}" \( +clone -background black  -shadow 80x3+5+5 \) \
46
 
+swap -background none -mosaic +repage "${FILE}"
47
 
 
48
 
exit 0
49
 
 
50