44;
55; LASM ultra vivid solarize script for GIMP 2.4
66; 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
1010;
1111; Tags: color
1212;
8383(define (get-gm-solarize s-type curvestr )
8484 (let* (
8585 (curve-value (cons-array 4 'byte ))
86+ (reducecurvestr 0 )
8687 )
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+
87106 (aset curve-value 0
88107 (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 )
93112 (aset curve-value 3
94113 (if (= s-type 0 )
95- curvestr
96- 255 ))
114+ reducecurvestr
115+ 1.0 ))
116+
97117 curve-value ; return the curve
98118 )
99119)
127147 (gimp-drawable-curves-spline inLayer HISTOGRAM-GREEN 6 (get-gm-color))
128148 (gimp-drawable-curves-spline inLayer HISTOGRAM-BLUE 6 (get-gm-color))
129149
130- (gimp-curves-spline inLayer HISTOGRAM-VALUE 4 (get-gm-solarize
150+
151+ (gimp-drawable-curves-spline inLayer HISTOGRAM-VALUE 4 (get-gm-solarize
131152 (if (eqv? auto? TRUE)
132153 (begin
133154 (set! intense 127 )
139160 intense)
140161 )
141162
142- ; ; (gimp-message "got to here")
163+ ; (gimp-message "got to here")
143164
144165 (if (eqv? auto? TRUE)
145166 (begin
146167 (if (eqv? ultra? TRUE)
147168 (begin
148169 (plug-in-color-enhance RUN-NONINTERACTIVE img inLayer)
149- (gimp-drawable-levels-stretch inLayer))
170+ (gimp-drawable-levels-stretch inLayer)
171+ )
172+ (begin
150173 (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+ )
151188 )
152189 )
153190 )
165202
166203 (gimp-image-undo-group-end img)
167204 (gimp-displays-flush)
168- (gc) ; array was used; garbage cleanuo the memory
205+ (gc) ; array was used; garbage cleanup the memory
169206 )
170207)
171208
172209; ; Register scripts
173210
174211(script-fu-register " script-fu-gm-ultra-vivid-solarize-a"
175212 " <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"
177214 " lasm"
178215 " Copyright 2005, lasm"
179216 " December 01, 2005"
182219 SF-DRAWABLE " The Layer" 0
183220 SF-TOGGLE " Automatic" TRUE
184221 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 )
186223)
187224
188225; end of script
0 commit comments