aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorHsieh Chin Fan <pham@topo.tw>2023-07-21 23:14:48 +0800
committerHsieh Chin Fan <pham@topo.tw>2023-07-21 23:14:48 +0800
commitff3fd5cc53704ef1c219f4a5c97d8e69536bf2ac (patch)
treee50fb45678b00b0940d99ce7fc82e5bba7577f44
parent73526cac46e085e2e0769007d0910dc833e3f630 (diff)
Update
-rw-r--r--bin/image/shellrc6
1 files changed, 3 insertions, 3 deletions
diff --git a/bin/image/shellrc b/bin/image/shellrc
index 81e029b..a62dd70 100644
--- a/bin/image/shellrc
+++ b/bin/image/shellrc
@@ -2,13 +2,13 @@
2 2
3# Concatenate image vertically 3# Concatenate image vertically
4image.vertical() { 4image.vertical() {
5 if [ ! $# = 0 ]; then 5 if [ $# = 0 ]; then
6 echo 'Usage: image.vertical input1.jpg input2.jpg' 6 echo 'Usage: image.vertical input1.jpg input2.jpg'
7 return 0 7 return 0
8 fi 8 fi
9 9
10 ext=${1##*.} 10 ext=${1##*.}
11 convert "$@" -append $(basename -s .$ext $1)-$(basename -s .$ext ${@: -1}).${format:-$ext} 11 convert "$@" +append $(basename -s .$ext $1)-$(basename -s .$ext ${@: -1}).${format:-$ext}
12} 12}
13 13
14# Concatenate image horizontally 14# Concatenate image horizontally
@@ -19,7 +19,7 @@ image.horizontal() {
19 fi 19 fi
20 20
21 ext=${1##*.} 21 ext=${1##*.}
22 convert "$@" +append output.$ext 22 convert "$@" -append output.$ext
23} 23}
24 24
25# Export image with data url format 25# Export image with data url format