From e6ce1f29f7fbdc6564d5c9ea75a4c833b2f4343b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Przemys=C5=82aw?= Date: Fri, 21 Feb 2025 19:59:05 +0100 Subject: przem-apply-sepia-v3.scm-2.250221-0 --- 3.0/przem-apply-sepia-v3.scm | 33 ++++++++++++++++++++++++--------- 1 file changed, 24 insertions(+), 9 deletions(-) (limited to '3.0/przem-apply-sepia-v3.scm') 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 . ; -(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") + ) -- cgit v1.2.3