-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathalpha.sh
executable file
·85 lines (85 loc) · 1.45 KB
/
alpha.sh
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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
#!/bin/bash
if ( [ -z "$RR" ] || [ -z "$RG" ] || [ -z "$RB" ] )
then
export RR=1
export RG=0
export RB=0
fi
if ( [ -z "$GR" ] || [ -z "$GG" ] || [ -z "$GB" ] )
then
export GR=0
export GG=1
export GB=0
fi
if ( [ -z "$BR" ] || [ -z "$BG" ] || [ -z "$BB" ] )
then
export BR=0
export BG=0
export BB=1
fi
if ( [ -z "$RLO" ] || [ -z "$RHI" ] )
then
export RLO=1
export RHI=1
fi
if ( [ -z "$GLO" ] || [ -z "$GHI" ] )
then
export GLO=1
export GHI=1
fi
if ( [ -z "$BLO" ] || [ -z "$BHI" ] )
then
export BLO=1
export BHI=1
fi
if [ -z "$RX"]
then
export RX="1-x1"
fi
if [ -z "$RPE" ]
then
export RPE=3.1415926
fi
if [ -z "$ROF" ]
then
export ROF=0
fi
if [ -z "$RPO" ]
then
export RPO=1
fi
if [ -z "$GX"]
then
export GX="1-x1"
fi
if [ -z "$GPE" ]
then
export GPE=3.1415926
fi
if [ -z "$GOF" ]
then
export GOF=0
fi
if [ -z "$GPO" ]
then
export GPO=1
fi
if [ -z "$BX"]
then
export BX="1-x1"
fi
if [ -z "$BPE" ]
then
export BPE=3.1415926
fi
if [ -z "$BOF" ]
then
export BOF=0
fi
if [ -z "$BPO" ]
then
export BPO=1
fi
# double complex alpha(double complex arg, double complex period, double complex offset, double complex power) {
echo "LIB=\"libjpegbw.so\" RC=1 GC=1 BC=1 NA=1 RF=\"alpha($RX, $RPE, $ROF, $RPO)\" GF=\"alpha($GX, $GPE, $GOF, $GPO)\" BF=\"alpha($BX, $BPE, $BOF, $BPO)\" jpeg [args]"
LIB="libjpegbw.so" RC=1 GC=1 BC=1 NA=1 RF="alpha($RX, $RPE, $ROF, $RPO)" GF="alpha($GX, $GPE, $GOF, $GPO)" BF="alpha($BX, $BPE, $BOF, $BPO)" jpeg $*