summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPrzemysław R. Pietraszczyk <przem@prymula.ct8.pl>2025-07-02 21:29:59 +0200
committerPrzemysław R. Pietraszczyk <przem@prymula.ct8.pl>2025-07-02 21:29:59 +0200
commitd3a67814158b280f14ed6c729bab56653d2f22fd (patch)
treeaabfe01e746905b3331e3564b2ec9a92198801ea
parente8d42b19bc5892de59924d108687bb09069a251a (diff)
Remixed old filter przem-soft-focus.scm ---> przem-soften-light.scm
-rw-r--r--script-fu/2.10/przem-soften-light.scm52
-rw-r--r--script-fu/changelog.md3
2 files changed, 55 insertions, 0 deletions
diff --git a/script-fu/2.10/przem-soften-light.scm b/script-fu/2.10/przem-soften-light.scm
new file mode 100644
index 0000000..f33bf20
--- /dev/null
+++ b/script-fu/2.10/przem-soften-light.scm
@@ -0,0 +1,52 @@
+; przem-soften-light - script-fu na rozjaśnienie światła / przyciemniania
+; author: PRP
+; licencja: Public Domain
+; Gdańsk - 02-07-2025
+; ver. 2.250702-0
+(define (przem-soften-light img drawable blur-radius opacity mode)
+
+ ; Tworzy kopię warstwy
+ (let* (
+ (copy-layer (car (gimp-layer-copy drawable TRUE)))
+ )
+
+ (gimp-context-push)
+ (gimp-image-undo-group-start img)
+
+ (gimp-image-insert-layer img copy-layer 0 -1)
+ (gimp-item-set-name copy-layer "Soft Light Blur")
+
+ ; Rozmywa kopię warstwy (Gaussian Blur)
+ (plug-in-gauss RUN-NONINTERACTIVE img copy-layer blur-radius blur-radius TRUE)
+
+ (if (= mode TRUE)
+ (gimp-layer-set-mode copy-layer ADDITION-MODE)
+ (gimp-layer-set-mode copy-layer OVERLAY-MODE)
+ )
+
+ (gimp-layer-set-opacity copy-layer opacity)
+ (gimp-image-merge-down img copy-layer CLIP-TO-IMAGE)
+
+ (gimp-image-undo-group-end img)
+ (gimp-context-pop)
+ (gimp-displays-flush)
+ )
+)
+
+; Rejestracja skryptu w menu GIMP
+(script-fu-register "przem-soften-light"
+ _"Soften Light..."
+ _"Tworzy efekt miękkiego światła"
+ "PRP"
+ "Public Domain"
+ "2025-07-02"
+ "RGB*, GRAY*"
+ SF-IMAGE "Image" 0
+ SF-DRAWABLE "Drawable" 0
+ SF-ADJUSTMENT "Blur Radius" '(15 1 100 1 10 0 1)
+ SF-ADJUSTMENT "Opacity (%)" '(70 0 100 1 10 0 1)
+ SF-TOGGLE "Addition mode" FALSE
+)
+
+(script-fu-menu-register "przem-soften-light"
+ "<Image>/Filters/PIETRASZCZYK/")
diff --git a/script-fu/changelog.md b/script-fu/changelog.md
index bca2d9e..6305365 100644
--- a/script-fu/changelog.md
+++ b/script-fu/changelog.md
@@ -1,3 +1,6 @@
+# [2.250702-2] przem-soften-light
+* Poprawiona wtyczka przem-soft-focus
+
# [2.250622-0] przem-prossian-blue-effect.scm
* Dodane filtra imitującego "pruski błękit"