~kklimonda/ubuntu/lucid/shutter/lp.511942

« back to all changes in this revision

Viewing changes to share/shutter/resources/system/plugins/shell/spoffset/spoffset

  • Committer: Bazaar Package Importer
  • Author(s): Ryan Niebur
  • Date: 2009-08-06 16:29:32 UTC
  • mto: This revision was merged to the branch mainline in revision 4.
  • Revision ID: james.westby@ubuntu.com-20090806162932-09o533rntd026rq6
Tags: upstream-0.80.1
ImportĀ upstreamĀ versionĀ 0.80.1

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#! /usr/bin/env bash
 
2
 
 
3
###################################################
 
4
#
 
5
#  Copyright (C) 2008, 2009 Mario Kemper <mario.kemper@googlemail.com> and Shutter Team
 
6
#
 
7
#  This file is part of Shutter.
 
8
#
 
9
#  Shutter is free software; you can redistribute it and/or modify
 
10
#  it under the terms of the GNU General Public License as published by
 
11
#  the Free Software Foundation; either version 3 of the License, or
 
12
#  (at your option) any later version.
 
13
#
 
14
#  Shutter is distributed in the hope that it will be useful,
 
15
#  but WITHOUT ANY WARRANTY; without even the implied warranty of
 
16
#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
17
#  GNU General Public License for more details.
 
18
#
 
19
#  You should have received a copy of the GNU General Public License
 
20
#  along with Shutter; if not, write to the Free Software
 
21
#  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 
22
#
 
23
###################################################
 
24
 
 
25
TEXTDOMAIN=shutter-plugins
 
26
TEXTDOMAINDIR=$SHUTTER_INTL
 
27
PLUGIN_NAME=$"offset"
 
28
PLUGIN_SORT=$"effect"
 
29
PLUGIN_TIP=$"give the picture an offset with itself as background"
 
30
PLUGIN_EXT="image/png;image/bmp;image/jpeg"
 
31
 
 
32
if [[ "${1}" = "name" ]];then
 
33
        echo "${PLUGIN_NAME}"
 
34
    exit 0
 
35
elif [[ "${1}" = "sort" ]];then
 
36
    echo "${PLUGIN_SORT}"
 
37
    exit 0
 
38
elif [[ "${1}" = "tip" ]];then
 
39
    echo "${PLUGIN_TIP}"
 
40
    exit 0
 
41
elif [[ "${1}" = "ext" ]];then
 
42
    echo "${PLUGIN_EXT}"
 
43
    exit 0
 
44
fi
 
45
 
 
46
FILE="${1}"
 
47
#WIDTH="${2}"
 
48
#HEIGHT="${3}"
 
49
#FILEYTPE="${4}"
 
50
#GEO="${2}x${3}"
 
51
 
 
52
convert "${FILE}" \
 
53
\( -clone 0 -resize 130% -fill white -colorize 40% \) \
 
54
\( -clone 0 -bordercolor black -border 1x1 \) \
 
55
-delete 0 -gravity center -composite  "${FILE}"
 
56
 
 
57
exit 0