From 46b8cfdfe8e66eab8dfa560ec1e1d041d4cd6b9d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Przemys=C5=82aw=20R=2E=20Pietraszczyk?= Date: Thu, 23 Jul 2026 14:40:45 +0200 Subject: 2.260722-3 --- script-fu/3.x/przem-dramatic-light-3x.scm | 70 ------------------------------ script-fu/3.x/przem-dramatic-light-v3x.scm | 70 ++++++++++++++++++++++++++++++ 2 files changed, 70 insertions(+), 70 deletions(-) delete mode 100644 script-fu/3.x/przem-dramatic-light-3x.scm create mode 100644 script-fu/3.x/przem-dramatic-light-v3x.scm (limited to 'script-fu') diff --git a/script-fu/3.x/przem-dramatic-light-3x.scm b/script-fu/3.x/przem-dramatic-light-3x.scm deleted file mode 100644 index 849feca..0000000 --- a/script-fu/3.x/przem-dramatic-light-3x.scm +++ /dev/null @@ -1,70 +0,0 @@ -; przem-dramatic-light-3x Tworzy dramatyczne światło, wysoki kontrast. -; Przmeysław R. Pietraszczyk -; 2026-07-21 -; ver 2.260722-3 -; editor: KWrite - - -(define (przem-dramatic-light-3x img drawable grain mono) - - (gimp-context-push) - (gimp-image-undo-group-start img) - - (let* ( - (base-layer (vector-ref drawable 0)) - (type (car (gimp-drawable-type-with-alpha base-layer))) - ) - - (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))) - - ;; Apply strong curves to push light from top - (let* ( - (light-layer (car (gimp-layer-copy base-layer TRUE))) - (contrast-layer (car (gimp-layer-copy base-layer TRUE)))) - - (gimp-image-insert-layer img light-layer 0 -1) - (gimp-image-insert-layer img contrast-layer 0 -1) - - (gimp-drawable-curves-spline light-layer HISTOGRAM-VALUE #(0 0 64 180 128 230 255 255)) - (gimp-layer-set-mode light-layer LAYER-MODE-OVERLAY) - (gimp-layer-set-opacity light-layer 100) - - (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 - - ) - - (let* ((merged-layer (car (gimp-image-merge-visible-layers img CLIP-TO-IMAGE)))) - (gimp-item-set-visible merged-layer TRUE)) - ) - - (gimp-image-undo-group-end img) - (gimp-displays-flush) - (gimp-context-pop) -) - -(script-fu-register-filter "przem-dramatic-light-3x" - _"Dramatic Light Effect" - _"Tworzy dramatyczne światło, wysoki kontrast" - "Przemysław R. Pietraszczyk" - "Public Domain" - "21-07-2026" - "RGB* GRAY*" - SF-ONE-OR-MORE-DRAWABLE - SF-TOGGLE _"Grain" FALSE - SF-TOGGLE _"Monochromatic" TRUE - -) -(script-fu-menu-register "przem-dramatic-light-3x" - "/Filters/PIETRASZCZYK/") - - - diff --git a/script-fu/3.x/przem-dramatic-light-v3x.scm b/script-fu/3.x/przem-dramatic-light-v3x.scm new file mode 100644 index 0000000..849feca --- /dev/null +++ b/script-fu/3.x/przem-dramatic-light-v3x.scm @@ -0,0 +1,70 @@ +; przem-dramatic-light-3x Tworzy dramatyczne światło, wysoki kontrast. +; Przmeysław R. Pietraszczyk +; 2026-07-21 +; ver 2.260722-3 +; editor: KWrite + + +(define (przem-dramatic-light-3x img drawable grain mono) + + (gimp-context-push) + (gimp-image-undo-group-start img) + + (let* ( + (base-layer (vector-ref drawable 0)) + (type (car (gimp-drawable-type-with-alpha base-layer))) + ) + + (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))) + + ;; Apply strong curves to push light from top + (let* ( + (light-layer (car (gimp-layer-copy base-layer TRUE))) + (contrast-layer (car (gimp-layer-copy base-layer TRUE)))) + + (gimp-image-insert-layer img light-layer 0 -1) + (gimp-image-insert-layer img contrast-layer 0 -1) + + (gimp-drawable-curves-spline light-layer HISTOGRAM-VALUE #(0 0 64 180 128 230 255 255)) + (gimp-layer-set-mode light-layer LAYER-MODE-OVERLAY) + (gimp-layer-set-opacity light-layer 100) + + (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 + + ) + + (let* ((merged-layer (car (gimp-image-merge-visible-layers img CLIP-TO-IMAGE)))) + (gimp-item-set-visible merged-layer TRUE)) + ) + + (gimp-image-undo-group-end img) + (gimp-displays-flush) + (gimp-context-pop) +) + +(script-fu-register-filter "przem-dramatic-light-3x" + _"Dramatic Light Effect" + _"Tworzy dramatyczne światło, wysoki kontrast" + "Przemysław R. Pietraszczyk" + "Public Domain" + "21-07-2026" + "RGB* GRAY*" + SF-ONE-OR-MORE-DRAWABLE + SF-TOGGLE _"Grain" FALSE + SF-TOGGLE _"Monochromatic" TRUE + +) +(script-fu-menu-register "przem-dramatic-light-3x" + "/Filters/PIETRASZCZYK/") + + + -- cgit v1.2.3