diff options
| author | Przemysław R. Pietraszczyk <przem@prymula.ct8.pl> | 2026-08-02 15:50:18 +0200 |
|---|---|---|
| committer | Przemysław R. Pietraszczyk <przem@prymula.ct8.pl> | 2026-08-02 15:50:18 +0200 |
| commit | 0be5cd14b46703e4d3ac7c2c2accb0f5b5c0d8b2 (patch) | |
| tree | dcdb6ff5925e7db7431d59aa4d43317de19f06ed | |
| parent | 51e32e9cd78fe1137343edd643b9c47957ff2a6f (diff) | |
2.260802-1
| -rw-r--r-- | script-fu/3.x/przem-film-curves-v3x.scm | 68 | ||||
| -rw-r--r-- | script-fu/changelog.md | 4 |
2 files changed, 53 insertions, 19 deletions
diff --git a/script-fu/3.x/przem-film-curves-v3x.scm b/script-fu/3.x/przem-film-curves-v3x.scm index 0c95d9a..9791336 100644 --- a/script-fu/3.x/przem-film-curves-v3x.scm +++ b/script-fu/3.x/przem-film-curves-v3x.scm @@ -1,11 +1,11 @@ ; przem-film-curves-v3x Nakłada filmowe krzywe na obraz. ; Przmeysław R. Pietraszczyk ; 2026-08-01 -; ver 2.260802-0 +; ver 2.260802-1 ; editor: Kate -;; Filmowa krzywa luminancji - (define curve-luma +;; Krzywa luminancji + (define curve-luma-sepia #( 0 2 4 6 8 10 12 14 16 18 20 22 24 26 28 30 32 34 36 38 @@ -23,7 +23,7 @@ ) ;; Filmowy split-tone: ciepłe cienie, chłodne światła - (define curve-blue + (define curve-blue-sepia #( 0 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 @@ -47,7 +47,7 @@ ) ;; Ocieplenie średnich tonów - (define curve-red + (define curve-red-sepia #( 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 @@ -69,7 +69,7 @@ ) ;; Delikatne ochłodzenie świateł - (define curve-green + (define curve-green-sepia #( 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 @@ -95,9 +95,22 @@ ) ) + (define curve-red + #(0 0 64 55 128 120 192 185 255 255) + ) + (define curve-green + #(0 0 64 55 128 118 192 180 255 255) + ) + (define curve-blue + #(0 0 64 70 128 150 192 210 255 255) + ) + (define curve-luma + #(0 0 64 40 128 140 192 210 255 255) + ) + -(define (przem-film-curves-v3x img drawable mono) +(define (przem-film-curves-v3x img drawable mono sepia value) (gimp-context-push) (gimp-image-undo-group-start img) @@ -115,25 +128,39 @@ (green-layer (car (gimp-layer-copy base-layer TRUE))) (blue-layer (car (gimp-layer-copy base-layer TRUE)))) - (gimp-image-insert-layer img luma-layer 0 -1) - (gimp-image-insert-layer img red-layer 0 -1) - (gimp-image-insert-layer img green-layer 0 -1) - (gimp-image-insert-layer img blue-layer 0 -1) ;; Zastosowanie krzywych ;(gimp-drawable-curves-spline luma-layer HISTOGRAM-LUMINANCE curve-luma) ; Błąd w PDB Gimpa wyklucza HISTOGRAM-LUMINANCE i trzeba obchodzić przez HISTOGRAM-VALUE + (if (= value TRUE) (begin + (gimp-image-insert-layer img luma-layer 0 -1) + (if (= sepia TRUE) (begin + (gimp-drawable-curves-spline luma-layer HISTOGRAM-VALUE curve-luma-sepia)) + (begin + (gimp-drawable-curves-spline luma-layer HISTOGRAM-VALUE curve-luma))) + (gimp-layer-set-mode luma-layer LAYER-MODE-OVERLAY) + (gimp-layer-set-opacity luma-layer 100))) - ; Jednak bez HISTOGRAM-VALUE - wycodzi lepsza sepia - ;(gimp-drawable-curves-spline luma-layer HISTOGRAM-VALUE curve-luma) - ;(gimp-layer-set-mode luma-layer LAYER-MODE-OVERLAY) - ;(gimp-layer-set-opacity luma-layer 100) - (gimp-drawable-curves-spline red-layer HISTOGRAM-RED curve-red) + (gimp-image-insert-layer img red-layer 0 -1) + (if (= sepia TRUE) (begin + (gimp-drawable-curves-spline red-layer HISTOGRAM-RED curve-red-sepia)) + (begin + (gimp-drawable-curves-spline red-layer HISTOGRAM-RED curve-red))) (gimp-layer-set-mode red-layer LAYER-MODE-OVERLAY) (gimp-layer-set-opacity red-layer 90) - (gimp-drawable-curves-spline green-layer HISTOGRAM-GREEN curve-green) + + (gimp-image-insert-layer img green-layer 0 -1) + (if (= sepia TRUE) (begin + (gimp-drawable-curves-spline green-layer HISTOGRAM-GREEN curve-green-sepia)) + (begin + (gimp-drawable-curves-spline red-layer HISTOGRAM-GREEN curve-green))) (gimp-layer-set-mode green-layer LAYER-MODE-OVERLAY) (gimp-layer-set-opacity green-layer 80) - (gimp-drawable-curves-spline blue-layer HISTOGRAM-BLUE curve-blue) + + (gimp-image-insert-layer img blue-layer 0 -1) + (if (= sepia TRUE) (begin + (gimp-drawable-curves-spline blue-layer HISTOGRAM-BLUE curve-blue-sepia)) + (begin + (gimp-drawable-curves-spline red-layer HISTOGRAM-BLUE curve-blue))) (gimp-layer-set-mode blue-layer LAYER-MODE-OVERLAY) (gimp-layer-set-opacity blue-layer 70) ) @@ -157,6 +184,9 @@ "*" SF-ONE-OR-MORE-DRAWABLE SF-TOGGLE "_Monochromatic" TRUE + SF-TOGGLE "_Sepia" FALSE + SF-TOGGLE "_Value" FALSE + ) -(script-fu-menu-register "przem-film-curves-v3x" "<Image>/Filters/PIETRASZCZYK/") +(script-fu-menu-register "przem-film-curves-v3x" "<Image>/Filters/PIETRASZCZYK/") diff --git a/script-fu/changelog.md b/script-fu/changelog.md index 050e7c8..a0d8172 100644 --- a/script-fu/changelog.md +++ b/script-fu/changelog.md @@ -1,3 +1,7 @@ +# [2.260802-1] przem-film-curves-v3x.scm +* Dodanie pseudo szarej sepii +* Opcjonalny HISTOGRAM-VALUE + # [2.260802-0] przem-film-curves-v3x.scm * Uzyskanie użyteczności, jednak nie do końca o to chodziło |
