4
4
;
5
5
; LASM ultra vivid solarize script for GIMP 2.4
6
6
; Original author: lasm <[email protected] >
7
- ; ;; http://www.godsimmediatecontact.com
8
- ; ;; http://www.godsdirectcontact.org
9
- ; ;; http://www.raindesigninc.com
7
+ ; ;; http://www. godsimmediatecontact.com
8
+ ; ;; http://www. godsdirectcontact.org
9
+ ; ;; http://www. raindesigninc.com
10
10
;
11
11
; Tags: color
12
12
;
83
83
(define (get-gm-solarize s-type curvestr )
84
84
(let* (
85
85
(curve-value (cons-array 4 'byte ))
86
+ (reducecurvestr 0 )
86
87
)
88
+
89
+ ; (gimp-message (number->string s-type))
90
+ ; (gimp-message (number->string curvestr))
91
+
92
+ (set! reducecurvestr (/ curvestr 255 ))
93
+
94
+ ; (gimp-message (number->string reducecurvestr))
95
+ ; (aset curve-value 0
96
+ ; (if (= s-type 0)
97
+ ; 0
98
+ ; curvestr))
99
+ ; (aset curve-value 1 0)
100
+ ; (aset curve-value 2 255)
101
+ ; (aset curve-value 3
102
+ ; (if (= s-type 0)
103
+ ; curvestr
104
+ ; 255))
105
+
87
106
(aset curve-value 0
88
107
(if (= s-type 0 )
89
- 0
90
- curvestr ))
91
- (aset curve-value 1 0 )
92
- (aset curve-value 2 255 )
108
+ 0.0
109
+ reducecurvestr ))
110
+ (aset curve-value 1 0.0 )
111
+ (aset curve-value 2 1.0 )
93
112
(aset curve-value 3
94
113
(if (= s-type 0 )
95
- curvestr
96
- 255 ))
114
+ reducecurvestr
115
+ 1.0 ))
116
+
97
117
curve-value ; return the curve
98
118
)
99
119
)
127
147
(gimp-drawable-curves-spline inLayer HISTOGRAM-GREEN 6 (get-gm-color))
128
148
(gimp-drawable-curves-spline inLayer HISTOGRAM-BLUE 6 (get-gm-color))
129
149
130
- (gimp-curves-spline inLayer HISTOGRAM-VALUE 4 (get-gm-solarize
150
+
151
+ (gimp-drawable-curves-spline inLayer HISTOGRAM-VALUE 4 (get-gm-solarize
131
152
(if (eqv? auto? TRUE)
132
153
(begin
133
154
(set! intense 127 )
139
160
intense)
140
161
)
141
162
142
- ; ; (gimp-message "got to here")
163
+ ; (gimp-message "got to here")
143
164
144
165
(if (eqv? auto? TRUE)
145
166
(begin
146
167
(if (eqv? ultra? TRUE)
147
168
(begin
148
169
(plug-in-color-enhance RUN-NONINTERACTIVE img inLayer)
149
- (gimp-drawable-levels-stretch inLayer))
170
+ (gimp-drawable-levels-stretch inLayer)
171
+ )
172
+ (begin
150
173
(gimp-drawable-equalize inLayer FALSE)
174
+ )
175
+ )
176
+ )
177
+ (begin
178
+ ; (gimp-message "Auto false")
179
+ (if (eqv? ultra? TRUE)
180
+ (begin
181
+ ; (gimp-message "auto false ultra true")
182
+ (plug-in-color-enhance RUN-NONINTERACTIVE img inLayer)
183
+ (gimp-drawable-levels-stretch inLayer)
184
+ )
185
+ (begin
186
+ ; (gimp-drawable-equalize inLayer FALSE)
187
+ )
151
188
)
152
189
)
153
190
)
165
202
166
203
(gimp-image-undo-group-end img)
167
204
(gimp-displays-flush)
168
- (gc) ; array was used; garbage cleanuo the memory
205
+ (gc) ; array was used; garbage cleanup the memory
169
206
)
170
207
)
171
208
172
209
; ; Register scripts
173
210
174
211
(script-fu-register " script-fu-gm-ultra-vivid-solarize-a"
175
212
" <Toolbox>/Script-Fu/Colors/Lasm/Lasm Asymmetric Ultra Vivid Solarize"
176
- " Version 2pt0 \n Lasm's fancy solarize effect. Toggle the Ultra Vivid button for a turbo-charged boost to the solarize effect. \n file:lasm-gm-ultra-vivid-solarize.scm"
213
+ " Version 2pt0. Lasm's fancy solarize effect. Toggle the Ultra Vivid button for a turbo-charged boost to the solarize effect. \n file:lasm-gm-ultra-vivid-solarize.scm"
177
214
" lasm"
178
215
" Copyright 2005, lasm"
179
216
" December 01, 2005"
182
219
SF-DRAWABLE " The Layer" 0
183
220
SF-TOGGLE " Automatic" TRUE
184
221
SF-TOGGLE " (Ultra)-Vivid" TRUE
185
- SF-ADJUSTMENT " Intensity" ' (127 0 255 1 10 0 0 )
222
+ SF-ADJUSTMENT " Intensity (requires Automatic off) " ' (127 0 255 1 10 0 0 )
186
223
)
187
224
188
225
; end of script
0 commit comments