File: plug-in-compat.init

package info (click to toggle)
gimp 2.8.18-1%2Bdeb9u1
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 153,908 kB
  • sloc: ansic: 704,570; makefile: 10,969; lisp: 10,839; sh: 4,430; python: 3,793; perl: 3,411; xml: 1,307; yacc: 588; lex: 342
file content (24 lines) | stat: -rw-r--r-- 1,019 bytes parent folder | download | duplicates (9)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
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)
)