diff options
-rw-r--r-- | 3.0/przem-apply-sepia-v3.scm | 33 | ||||
-rw-r--r-- | changelog.md | 3 |
2 files changed, 27 insertions, 9 deletions
diff --git a/3.0/przem-apply-sepia-v3.scm b/3.0/przem-apply-sepia-v3.scm index 6545787..532cf9e 100644 --- a/3.0/przem-apply-sepia-v3.scm +++ b/3.0/przem-apply-sepia-v3.scm @@ -2,7 +2,7 @@ ; author: PRP ; licencja: GPL v3 ; Gdańsk - 07-02-2025 -; ver. 2.2502019-0~alpha for GIMP 3 +; ver. 2.2502021-0~beta for GIMP 3 ; ; This program is free software: you can redistribute it and/or modify ; it under the terms of the GNU General Public License as published by @@ -18,7 +18,7 @@ ; along with this program. If not, see <https://www.gnu.org/licenses/>. ; -(define (przem-apply-sepia-v3 image drawable value-slider-sepia shadow-sepia gradient-reverse gradient-shape in-sepia) +(define (przem-apply-sepia-v3 image drawable value-slider-sepia shadow-sepia gradient-reverse in-sepia gradient-shape) (let* ( (image-width (car (gimp-image-get-width image))) (image-height (car (gimp-image-get-height image))) @@ -83,7 +83,8 @@ ;(gimp-selection-all image) ; tak było w v. 2.10 ;(gimp-edit-blend sepia-layer FG-BG-RGB-MODE NORMAL-MODE GRADIENT-LINEAR 100 0 REPEAT-NONE FALSE TRUE 3 0 TRUE 0 0 image-width image-height) - (if (= gradient-shape TRUE) + (gimp-context-set-gradient-fg-bg-rgb) + (if (= gradient-shape 0) (begin (gimp-context-set-gradient-reverse gradient-reverse) (gimp-drawable-edit-gradient-fill sepia-layer @@ -91,15 +92,28 @@ FALSE 1 0 TRUE 0 0 image-width image-height) - ) - (begin - (gimp-context-set-gradient-reverse gradient-reverse) - (gimp-drawable-edit-gradient-fill sepia-layer + ) ) + (if (= gradient-shape 1) + (begin + (gimp-context-set-gradient-reverse gradient-reverse) + (gimp-drawable-edit-gradient-fill sepia-layer GRADIENT-SHAPEBURST-DIMPLED (- 100 shadow-sepia) FALSE 1 0 TRUE 0 0 center-x center-y) - ) ) + ) + ) + (if (= gradient-shape 2) + (begin + (gimp-context-set-gradient-reverse gradient-reverse) + (gimp-drawable-edit-gradient-fill sepia-layer + GRADIENT-BILINEAR (- 100 shadow-sepia) + FALSE 1 0 + TRUE + (/ (+ (* 2 center-x) center-y -1) 2) 0 + 0 0) + ) + ) (gimp-context-pop) @@ -129,8 +143,9 @@ SF-ADJUSTMENT _"Sepia intensity" '(50 0 100 1 10 0 0) ; Suwak poziomy SF-ADJUSTMENT _"Shadow Sepia" '(30 0 100 1 10 0 0) ; Suwak poziomy SF-TOGGLE _"Gradient reverse" FALSE - SF-TOGGLE _"Shape" TRUE SF-TOGGLE _"Sepia" TRUE + SF-OPTION _"Shape" '("Bilinear" "Linear" "Shapeburst") + ) diff --git a/changelog.md b/changelog.md index 625b4bd..16278f9 100644 --- a/changelog.md +++ b/changelog.md @@ -1,3 +1,6 @@ +# [2.250221-0] przem-apply-sepia-v3.scm
+* Dodanie potrójnego pola wyboru dla rodzaju gradientu.
+
# [2.25021=20-0] przem-apply-sepia-v3.scm
* Przeniesienie 'gimp-layer-new' do wewnątrz skryptu - desaturate dalej zwraca błąd przy zdjęciach monochromatycznych
|