Skip to content

Commit 8498967

Browse files
authored
Bug fixes.
1 parent 818331a commit 8498967

File tree

2 files changed

+18
-13
lines changed

2 files changed

+18
-13
lines changed

hdr-eff-plus.scm

Lines changed: 13 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
; HDR Fake Effect is a script for The GIMP
2-
;
2+
;
33
; This script produces a fake HDR effect + on an image
44
;
5-
; Follow the tut of [email protected]
5+
; Follow the tut of [email protected]
66
; here the link :
77
; http://gimpology.com/submission/view/fake_hdr_look_in_gimp/
88
;
@@ -62,7 +62,6 @@
6262
(merged)
6363
)
6464

65-
6665
;Rename the layer
6766
(gimp-drawable-set-name firstTemp "First temp")
6867

@@ -85,8 +84,12 @@
8584
;Change the mode of the thin layer to lighten
8685
(gimp-layer-set-mode thinTemp 10)
8786

88-
;Change the mode of the thin layer to darken
89-
(gimp-layer-set-mode thinTemp 9)
87+
;else
88+
(begin
89+
;Change the mode of the thin layer to darken
90+
;(gimp-layer-set-mode thinTemp 9)
91+
(gimp-layer-set-mode thinTemp LAYER-MODE-DARKEN-ONLY)
92+
)
9093
)
9194

9295

@@ -104,7 +107,8 @@
104107
(set! merged (car (gimp-image-merge-down myImage thinTemp 0)))
105108

106109
;Change the mode of the dodge copy layer to difference mode
107-
(gimp-layer-set-mode merged 6)
110+
;(gimp-layer-set-mode merged 6)
111+
(gimp-layer-set-mode merged LAYER-MODE-DIFFERENCE)
108112

109113
;Merge the top layer down and keep track of the newly merged layer
110114
(set! merged (car (gimp-image-merge-down myImage merged 0)))
@@ -186,7 +190,8 @@
186190

187191
(gimp-image-set-active-layer inImage theNewlayer3)
188192
(set! subdra (gimp-hue-saturation theNewlayer3 0 0 0 statunum))
189-
(set! subdra (gimp-levels theNewlayer3 HISTOGRAM-VALUE lev5min lev5max 1.0 0 255))
193+
;(set! subdra (gimp-levels theNewlayer3 HISTOGRAM-VALUE lev5min lev5max 1.0 0 255))
194+
(set! subdra (gimp-drawable-levels theNewlayer3 HISTOGRAM-VALUE (/ lev5min 255) (/ lev5max 255) FALSE 1.0 0.0 1.0 FALSE))
190195

191196
(gimp-image-flatten inImage)
192197
;Finish the undo group for the process
@@ -200,7 +205,7 @@
200205

201206
(script-fu-register
202207
"script-fu-fake-hdr-effect-plus"
203-
"<Image>/Script-Fu/Enhance/Fake HDR Effect plus..."
208+
"<Toolbox>/Script-Fu/Enhance/Fake HDR Effect plus..."
204209
"Make a photo to fake HDR with GIMP. This is the PLus version. \nfile:hdr-eff-plus.scm"
205210
"Bui The Thang <[email protected]>"
206211
"Bui The Thang"

hdr-eff.scm

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
;
33
; This script produces a fake HDR effect on an image
44
;
5-
; Follow the tut of [email protected]
5+
; Follow the tut of [email protected]
66
; here the link :
77
; http://gimpology.com/submission/view/fake_hdr_look_in_gimp/
88
;
@@ -151,7 +151,7 @@
151151

152152
(gimp-image-insert-layer inImage theNewlayer 0 0)
153153
(gimp-drawable-desaturate theNewlayer 2)
154-
(gimp-drawable-invert theNewlayer TRUE)
154+
(gimp-drawable-invert theNewlayer FALSE)
155155
(plug-in-softglow RUN-NONINTERACTIVE inImage theNewlayer 10 0.75 0.85)
156156
(gimp-layer-set-mode theNewlayer LAYER-MODE-SOFTLIGHT)
157157
(gimp-layer-set-opacity theNewlayer 50)
@@ -189,7 +189,7 @@
189189
;Finish the undo group for the process
190190
(gimp-image-undo-group-end inImage)
191191

192-
;Ensure the updated image is displayed now
192+
;Ensure the updated image is displayed now
193193
(gimp-displays-flush)
194194
)
195195

@@ -200,8 +200,8 @@
200200
"Bui The Thang"
201201
"Nov, 2008"
202202
"RGB*"
203-
SF-IMAGE "Image" 0
204-
SF-DRAWABLE "Drawable" 0
203+
SF-IMAGE "Image" 0
204+
SF-DRAWABLE "Drawable" 0
205205
SF-ADJUSTMENT "Dark Layer Opacity:" '(35 30 50 1 1 0 1)
206206
)
207207

0 commit comments

Comments
 (0)