-
Notifications
You must be signed in to change notification settings - Fork 1
/
effect16.bash
executable file
·51 lines (41 loc) · 1.16 KB
/
effect16.bash
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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
# Image Effect
# Espoo, Finland, August 2012
# Petri Leskinen, petri.leskinen@aalto.fi
# Locations of input and output images:
infile=$1
outfile=$2
# Size of input image, in format "%wx%h"
size=`convert $infile -format %G info:`
blurAmount=60
brightness=115
saturation=94
hue=0
convert $infile \
\
-channel R \
-function polynomial 0.6881,0,0.3119,0 \
-channel G \
-function polynomial 0.3789,-0.724,1.3451,0 \
-channel B \
-function polynomial -0.3966,1.3966,0 \
\
-channel RGB \
-function polynomial 1.5549,-0.1585 \
-function polynomial 0.7412,0.0118 \
\
\( +clone \
-resize 100%,5% \
-virtual-pixel mirror \
-morphology Convolve "1x10: 0.1 0.1 0.1 0.1 0.1 0.1 0.1 0.1 0.1 0.1" \
-morphology Convolve "1x10: 0.1 0.1 0.1 0.1 0.1 0.1 0.1 0.1 0.1 0.1" \
-morphology Convolve "1x10: 0.1 0.1 0.1 0.1 0.1 0.1 0.1 0.1 0.1 0.1" \
-morphology Convolve "1x10: 0.1 0.1 0.1 0.1 0.1 0.1 0.1 0.1 0.1 0.1" \
-morphology Convolve "1x10: 0.1 0.1 0.1 0.1 0.1 0.1 0.1 0.1 0.1 0.1" \
-modulate $brightness,$saturation,$hue \
-resize "${size}!" \
\) \
\
-compose blend -define compose:args=$blurAmount -composite \
-gamma 1.4 \
\
$outfile