This file is indexed.

/usr/share/gimp/2.0/scripts/melcher-selective-coloring.scm is in gimp-plugin-registry 7.20140602ubuntu3.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
;
; The GIMP -- an image manipulation program
; Copyright (C) 1995 Spencer Kimball and Peter Mattis
;
; selective-colouring script  for GIMP 2.4
; Original author: Alexander Melcher (a.melchers@planet.nl)
; At xMedia, The Netherlands
;
; Tags: photo, selection, color
;
; Author statement:
;
; Allows you to change the overall color or the color balance of a selection
; and all the area around it at the same time, using two different adjustments.
;
; --------------------------------------------------------------------
; Distributed by Gimp FX Foundry project
; --------------------------------------------------------------------
;   - Changelog -
;
; --------------------------------------------------------------------
;
;    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
;    the Free Software Foundation, either version 3 of the License, or
;    (at your option) any later version.
;
;    This program is distributed in the hope that it will be useful,
;    but WITHOUT ANY WARRANTY; without even the implied warranty of
;    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
;    GNU General Public License for more details.
;
;    You should have received a copy of the GNU General Public License
;    along with this program.  If not, see <http://www.gnu.org/licenses/>.
;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

; Define the function

(define (script-fu-selective-coloring inImage
                                  inLayer
                                  inIntCR
                                  inIntMG
                                  inIntYB
                                  inIntApply
                                  inIntPreserveLum
                                  inIntColor
                                  inIntColorify
                                  inExtCR
                                  inExtMG
                                  inExtYB
                                  inExtApply
                                  inExtPreserveLum
                                  inExtColor
                                  inExtColorify
                                  inCopy
                                  inFlatten
    )

    (if (= (car (gimp-selection-is-empty inImage)) TRUE)
        (begin
            (gimp-message _"This script needs a selection to work on.")
            (list -1 -1)
        )
        (begin
          (let* ((theImage 0)
                 (theLayer 0)) 
            
            ; Select the image; make a copy if needed
            (set! theImage (if (= inCopy TRUE)
                           (car (gimp-image-duplicate inImage))
                           inImage)
            )

            ; Group undo information
            (gimp-image-undo-group-start theImage)

            ; If requested to flatten image, do it now
            (if (= inFlatten TRUE)
                (gimp-image-flatten theImage)
                ()
            )

            ; Select the layer to which to apply the HSV changes
            (set! theLayer (if (= inFlatten TRUE)
                           (aref (cadr (gimp-image-get-layers theImage)) 0)
                           (if (= inCopy TRUE)
                           (car (gimp-image-get-active-layer theImage))
                           inLayer))
            )

            ; Invert the selection
            (gimp-selection-invert theImage)

            ; Colorify
            (if (= inExtColorify TRUE)
                (plug-in-colorify TRUE theImage theLayer inExtColor)
                (gimp-color-balance theLayer inExtApply
                                        inExtPreserveLum inExtCR
                                    inExtMG inExtYB)
            )

            ; Re-invert the selection to regain the original
            (gimp-selection-invert theImage)

            ; Colorify
            (if (= inIntColorify TRUE)
                (plug-in-colorify TRUE theImage theLayer inIntColor)
                (gimp-color-balance theLayer inIntApply
                                        inIntPreserveLum inIntCR
                                    inIntMG inIntYB)
            )

            ; Group undo information
            (gimp-image-undo-group-end theImage)

            ; If a copy was made, show the new image
            (if (= inCopy TRUE)
                (begin
                    (gimp-image-clean-all theImage)
                    (gimp-display-new theImage)
                )
                ()
            )

            ; Force updates
            (gimp-displays-flush)

            ; Return the results
            (list theImage inLayer)
          ) 
        )
    )
)

; Register script-fu-selective-coloring

(script-fu-register
    "script-fu-selective-coloring"
    _"xMedia Selective Coloring"
    _"Allows you to change the overall color or the color balance of a selection and all the area around it at the same time, using two different adjustments."
    "Alexander Melchers"
    "2002, Alexander Melchers, xMedia"
    "8th November 2002"
    "RGB*"
    SF-IMAGE      "The Image"           0
    SF-DRAWABLE   "The Layer"           0
    SF-ADJUSTMENT _"Internal Cyan/Red"   '(0 -100 100 1 1 0 0 0)
    SF-ADJUSTMENT _"Magenta/Green"       '(0 -100 100 1 1 0 0 0)
    SF-ADJUSTMENT _"Yellow/Blue"         '(0 -100 100 1 1 0 0 0)
    SF-OPTION     _"Apply To"            '(_"Shadows" _"Midtones" _"Highlights")
    SF-TOGGLE     _"Preserve Luminosity" TRUE
    SF-COLOR      _"Color"               '(255 255 0)
    SF-TOGGLE     _"Colorify"            FALSE
    SF-ADJUSTMENT _"External Cyan/Red"   '(0 -100 100 1 1 0 0 0)
    SF-ADJUSTMENT _"Magenta/Green"       '(0 -100 100 1 1 0 0 0)
    SF-ADJUSTMENT _"Yellow/Blue"         '(0 -100 100 1 1 0 0 0)
    SF-OPTION     _"Apply To"            '(_"Shadows" _"Midtones" _"Highlights")
    SF-TOGGLE     _"Preserve Luminosity" TRUE
    SF-COLOR      _"Color"               '(255 255 0)
    SF-TOGGLE     _"Colorify"            FALSE
    SF-TOGGLE     _"Work on Copy"        FALSE
    SF-TOGGLE     _"Flatten Image"       FALSE
)

(script-fu-menu-register "script-fu-selective-coloring"
                         "<Image>/FX-Foundry/Selection Effects")