summaryrefslogtreecommitdiffstats
path: root/plug-ins/script-fu/scripts/plug-in-compat.init
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-19 03:13:10 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-19 03:13:10 +0000
commit3c57dd931145d43f2b0aef96c4d178135956bf91 (patch)
tree3de698981e9f0cc2c4f9569b19a5f3595e741f6b /plug-ins/script-fu/scripts/plug-in-compat.init
parentInitial commit. (diff)
downloadgimp-3c57dd931145d43f2b0aef96c4d178135956bf91.tar.xz
gimp-3c57dd931145d43f2b0aef96c4d178135956bf91.zip
Adding upstream version 2.10.36.upstream/2.10.36
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'plug-ins/script-fu/scripts/plug-in-compat.init')
-rw-r--r--plug-ins/script-fu/scripts/plug-in-compat.init24
1 files changed, 24 insertions, 0 deletions
diff --git a/plug-ins/script-fu/scripts/plug-in-compat.init b/plug-ins/script-fu/scripts/plug-in-compat.init
new file mode 100644
index 0000000..dd68c2c
--- /dev/null
+++ b/plug-ins/script-fu/scripts/plug-in-compat.init
@@ -0,0 +1,24 @@
+; The Scheme code in this file provides some compatibility with
+; scripts that were originally written for use with older versions of
+; GIMP.
+;
+; It provides PDB procedures that used to be provided by plug-ins that
+; were since then removed from the GIMP distribution. You should not
+; use these in newly written scripts as the functions defined here may
+; be removed at some later date.
+
+
+(define (plug-in-color-map run-mode img layer
+ src-color-1 src-color-2 dest-color-1 dest-color-2
+ map-mode)
+ (gimp-levels layer HISTOGRAM-RED
+ (car src-color-1) (car src-color-2) 1.0
+ (- 255 (car dest-color-1)) (- 255 (car dest-color-2)))
+ (gimp-levels layer HISTOGRAM-GREEN
+ (cadr src-color-1) (cadr src-color-2) 1.0
+ (- 255 (cadr dest-color-1)) (- 255 (cadr dest-color-2)))
+ (gimp-levels layer HISTOGRAM-BLUE
+ (caddr src-color-1) (caddr src-color-2) 1.0
+ (- 255 (caddr dest-color-1)) (- 255 (caddr dest-color-2)))
+ (gimp-levels layer HISTOGRAM-VALUE 0 255 1.0 255 0)
+)