summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPrzemysław R. Pietraszczyk <przem@prymula.ct8.pl>2026-07-24 20:35:27 +0200
committerPrzemysław R. Pietraszczyk <przem@prymula.ct8.pl>2026-07-24 20:35:27 +0200
commit81d0533b23956f8b899f6121f8d6895d728cb550 (patch)
tree6bb21d2b7605b3ff1f56f2bef93e4e835ee21744
parent46b8cfdfe8e66eab8dfa560ec1e1d041d4cd6b9d (diff)
2.260724-1
-rw-r--r--script-fu/3.x/przem-dramatic-light-v3x.scm15
-rw-r--r--script-fu/3.x/przem-hitchcock-d400-film-effect-v3x.scm39
2 files changed, 32 insertions, 22 deletions
diff --git a/script-fu/3.x/przem-dramatic-light-v3x.scm b/script-fu/3.x/przem-dramatic-light-v3x.scm
index 849feca..2960f11 100644
--- a/script-fu/3.x/przem-dramatic-light-v3x.scm
+++ b/script-fu/3.x/przem-dramatic-light-v3x.scm
@@ -1,7 +1,7 @@
; przem-dramatic-light-3x Tworzy dramatyczne światło, wysoki kontrast.
; Przmeysław R. Pietraszczyk
; 2026-07-21
-; ver 2.260722-3
+; ver 2.260723-0
; editor: KWrite
@@ -13,14 +13,13 @@
(let* (
(base-layer (vector-ref drawable 0))
(type (car (gimp-drawable-type-with-alpha base-layer)))
- )
+ (grain-layer 0))
(if (= mono TRUE) (begin
(if (= type RGBA-IMAGE)
(gimp-drawable-desaturate base-layer DESATURATE-LUMINANCE))))
- (if (= grain TRUE) (begin
- (gimp-drawable-merge-new-filter base-layer "gegl:noise-hsv" "Noise-HSV" LAYER-MODE-REPLACE 1.0 "holdness" 2 "hue-distance" 0.3 "saturation-distance" 0.5 "value-distance" 0.5 "seed" 42)))
+ (set! grain-layer (car (gimp-layer-copy base-layer TRUE)))
;; Apply strong curves to push light from top
(let* (
@@ -36,11 +35,11 @@
(gimp-drawable-curves-spline contrast-layer HISTOGRAM-VALUE #(0 0 64 40 128 128 192 220 255 255))
(gimp-layer-set-mode contrast-layer LAYER-MODE-HARDLIGHT)
- (gimp-layer-set-opacity contrast-layer 85)
-
- ;; Add layers
+ (gimp-layer-set-opacity contrast-layer 85))
- )
+ (if (= grain TRUE) (begin
+ (gimp-drawable-merge-new-filter grain-layer "gegl:noise-hsv" "Noise-HSV" LAYER-MODE-NORMAL 0.7 "holdness" 2 "hue-distance" 0.3 "saturation-distance" 0.5 "value-distance" 0.5 "seed" 42)
+ (gimp-image-insert-layer img grain-layer 0 -1)))
(let* ((merged-layer (car (gimp-image-merge-visible-layers img CLIP-TO-IMAGE))))
(gimp-item-set-visible merged-layer TRUE))
diff --git a/script-fu/3.x/przem-hitchcock-d400-film-effect-v3x.scm b/script-fu/3.x/przem-hitchcock-d400-film-effect-v3x.scm
index ce60009..9d1f12a 100644
--- a/script-fu/3.x/przem-hitchcock-d400-film-effect-v3x.scm
+++ b/script-fu/3.x/przem-hitchcock-d400-film-effect-v3x.scm
@@ -1,12 +1,11 @@
; przem-hitchcock-d400-film-effect-v3x - Imitacja filmu chińskiego HITCHOCK D400: kontrast, ciepłe światła, chłodne cienie, bloom
-; author: PRP
+; author: Przemysław R. Pietraszczyk
; licencja: Public Domain
; Gdańsk - 14-06-2026
-; ver. 2.260615-0
+; ver. 2.260724-1
(define (przem-hitchcock-d400-film-effect-v3 image drawable
- contrast
- lift-blacks
+ lift-blacks-contrast
warm-highlights
cool-shadows
bloom-strength)
@@ -27,13 +26,26 @@
(gimp-image-insert-layer image work-layer 0 -1)
-
- (let* ((finish-layer (car (gimp-layer-copy layer TRUE)))
- (gimp-drawable-curves-spline finish-layer HISTOGRAM-VALUE 10 #( 0 lift-blacks 64 (+ 48 contrast) 128 128 192 (- 208 contrast) 255 255))
- (gimp-layer-set-opacity finish-layer 40)
-
- ))
-
+ (let* ((finish-layer (car (gimp-layer-copy layer TRUE))))
+ (gimp-image-insert-layer image finish-layer 0 -1)
+ ; lift-blacks 0-40 contrast 0-80
+ ;(gimp-drawable-curves-spline finish-layer HISTOGRAM-VALUE 10 #( 0 lift-blacks 64 (+ 48 contrast) 128 128 192 (- 208 contrast) 255 255))
+ (cond
+ ((= lift-blacks-contrast 0)
+ (gimp-drawable-curves-spline finish-layer HISTOGRAM-VALUE #(0 40 64 68 128 128 192 188 255 255))
+ )
+ ((= lift-blacks-contrast 1)
+ (gimp-drawable-curves-spline finish-layer HISTOGRAM-VALUE #(0 30 64 84 128 128 192 168 255 255))
+ )
+ ((= lift-blacks-contrast 2)
+ (gimp-drawable-curves-spline finish-layer HISTOGRAM-VALUE #(0 20 64 104 128 128 192 148 255 255))
+ )
+ ((= lift-blacks-contrast 4)
+ (gimp-drawable-curves-spline finish-layer HISTOGRAM-VALUE #(0 10 64 124 128 128 192 128 255 255))
+ ))
+ (gimp-layer-set-mode finish-layer LAYER-MODE-OVERLAY)
+ (gimp-layer-set-opacity finish-layer 80)
+ )
;; 2. Ciepłe światła – Color Balance (midtones + highlights)
; cyan-red - magenta-green - yellow-blue (ujemne = więcej żółtego, dodatnie = więcej niebieskiego)
(gimp-drawable-color-balance work-layer TRANSFER-SHADOWS FALSE 0 0 cool-shadows)
@@ -56,13 +68,12 @@
(script-fu-register-filter "przem-hitchcock-d400-film-effect-v3"
_"Hitchock d400 effect"
_"Imitacja filmu chińskiego HITCHCOCK D400: kontrast, ciepłe światła, chłodne cienie, bloom."
- _"P.R.P"
+ _"Przemysław R. Pietraszczyk"
"Public Domain"
"2026-06-14"
"*"
SF-ONE-OR-MORE-DRAWABLE
- SF-ADJUSTMENT "Contrast (0–80)" '(40 0 80 1 5 0 1)
- SF-ADJUSTMENT "Black up (0–40)" '(12 0 40 1 5 0 1)
+ SF-OPTION "Black up & Contrast" '("Lift Blacks Weak" "Lift Blacks Medium" "Lift Blacks Strong" "Lift Blacks Heavy")
SF-ADJUSTMENT "Warm lights (–50 do 50)" '(15 -50 50 1 5 0 1)
SF-ADJUSTMENT "Cool shadows (–50 do 50)" '(-10 -50 50 1 5 0 1)
SF-ADJUSTMENT "Bloom – power (0–100)" '(35 0 100 1 5 0 1)