This file is indexed.

/usr/share/gimp/2.0/scripts/cprogrammer-roy-richtenstein.scm is in gimp-plugin-registry 7.20140602ubuntu2.

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
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
;
; The GIMP -- an image manipulation program
; Copyright (C) 1995 Spencer Kimball and Peter Mattis
; 
; Roy Lichtenstein effect script  for GIMP 2.4
; Created by Cprogrammer
;
; Tags: photo, effect
;
; Author statement:
;
; A script-fu script that adds the "Roy Lichtenstein" effect to an image
; Adapted from tutorial by Funadium at http://www.flickr.com/photos/funadium/2354849007/
;
; --------------------------------------------------------------------
; Distributed by Gimp FX Foundry project
; --------------------------------------------------------------------
;   - Changelog -
; Revision 1.1  2008-04-06 15:31:32+05:30  Cprogrammer
; Initial revision
;
; --------------------------------------------------------------------
; 
;    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 (my-duplicate-layer image layer)
	(let* (
		(dup-layer (car (gimp-layer-copy layer 1))))
		(gimp-image-add-layer image dup-layer 0)
		dup-layer))

(define (photo-RoyLichtenstein
		inImage
		inCopy
		inFlatten
		baseOpacity
		BackGroundColour
		contrast
		edgeMethod
		edgeAmount
		erodeImage
		newsPrint
		pixelSize
		spotFunc
		blackAng
		cyanAng
		magentaAng
		yellowAng
		posterizeLevel
		NewsPrintOpacity
		DeSpeckle)

	; Initiate some variables
	(let*
	 	(
			(theImage 0)
			(base 0)
			(NewsPrintLayer 0)
			(BorderLayer 0)
			(layerRGB 0)
			(width 0)
			(height 0)
			(bottomlayer 0)
			(drawable 0)
			(old-fg 0)
			(old-bg 0)
		)
		; Return the Image ID
		(set! theImage (if (= inCopy TRUE)
			(car (gimp-image-duplicate inImage))
			inImage
			) 
		)
		(if (= inCopy FALSE)
			(begin
			; Start an undo group so the process can be undone with one undo
			(gimp-image-undo-group-start theImage)
			)
		)
		(set! drawable (car (gimp-image-get-active-drawable theImage)))
		; Detect if it is RGB. Change the image RGB if it isn't already
		(set! layerRGB (car (gimp-drawable-is-rgb drawable)))
		(if (= layerRGB 0) (gimp-image-convert-rgb theImage))

		; Read the image height and width so that we can create a new layer of the same
		; dimensions of the current image
		(set! old-fg (car (gimp-context-get-foreground)))
		(set! old-bg (car (gimp-context-get-background)))
		(set! width  (car (gimp-image-width  theImage)))
		(set! height (car (gimp-image-height theImage)))

		; Add a coloured layer to bottom. This I felt gives some punch to the image
		; You can play with different colours to get different effects.
		(set! bottomlayer (car (gimp-layer-new theImage width height RGB-IMAGE "Bottom" 100 NORMAL-MODE)))
		(gimp-image-add-layer theImage bottomlayer -1)
		(gimp-context-set-foreground BackGroundColour)
		(gimp-edit-bucket-fill bottomlayer FG-BUCKET-FILL NORMAL-MODE 100 255 0 1 1)
		(gimp-image-lower-layer-to-bottom theImage bottomlayer)

		; Add the NewsPrint layer to the image
		(if (= newsPrint TRUE)
			(begin
			(set! NewsPrintLayer (my-duplicate-layer theImage drawable 0))
			; Rename the layer to NewsPrint
			(gimp-drawable-set-name NewsPrintLayer "NewsPrint")
			(if (= DeSpeckle TRUE)
				(begin
				(gimp-posterize NewsPrintLayer posterizeLevel)
				(plug-in-gauss     RUN-NONINTERACTIVE theImage NewsPrintLayer 6 6 0)
				(plug-in-despeckle RUN-NONINTERACTIVE theImage NewsPrintLayer 5 2 2 254)
				)
			)
			(plug-in-newsprint RUN-NONINTERACTIVE theImage NewsPrintLayer pixelSize 
				 1 100 blackAng spotFunc cyanAng spotFunc magentaAng spotFunc yellowAng spotFunc 15)
			; Change the NewsPrint Layer's opacity
			(gimp-layer-set-opacity NewsPrintLayer NewsPrintOpacity)
			)
		)

		; Add Black Edge Border layer to the image
		(set! BorderLayer (my-duplicate-layer theImage drawable 0))
		(gimp-drawable-set-name BorderLayer "BorderLayer")

		(plug-in-gauss RUN-NONINTERACTIVE theImage BorderLayer 3 3 0)
		(plug-in-edge  RUN-NONINTERACTIVE theImage BorderLayer edgeAmount edgeMethod 0)
		(gimp-invert BorderLayer)
		(gimp-desaturate-full BorderLayer DESATURATE-LUMINOSITY)
		(gimp-brightness-contrast BorderLayer 0 contrast)

		(if (= erodeImage TRUE)
			(begin
			(plug-in-erode RUN-NONINTERACTIVE theImage BorderLayer 1 0 1 0 0 254)
			(plug-in-gauss RUN-NONINTERACTIVE theImage BorderLayer 3 3 0)
			)
		)
		; This makes only the edge visible and rest of the image becomes transparent
		(plug-in-colortoalpha RUN-NONINTERACTIVE theImage BorderLayer '(255 255 255))

		(gimp-layer-set-opacity drawable baseOpacity)

		(if (= inFlatten TRUE)
			(begin
			(gimp-image-flatten theImage)
			)
		)
		(if (= inCopy TRUE)
			(begin
			(gimp-image-clean-all theImage)
			(gimp-display-new theImage)
			)
		)
		(if (= inCopy FALSE)
			(begin
			; Finish the undo group for the process
			(gimp-image-undo-group-end theImage)
			)
		)

		; Ensure the updated image is displayed now
		(gimp-displays-flush)
		(gimp-context-set-foreground old-fg)
		(gimp-context-set-background old-bg)
	)
)

(script-fu-register "photo-RoyLichtenstein" 
	_"Roy Lichtenstein..."
	_"Add Roy Lichtenstein effect to an image"
	"Cprogrammer"
	"Cprogrammer"
	"Date: 2008-04-06 15:31:32+05:30"
	"RGB*"
	SF-IMAGE        "Image"                   0
	SF-TOGGLE       "Work on copy"            FALSE
	SF-TOGGLE       "Flatten image"           FALSE
	SF-ADJUSTMENT   "Base Layer Opacity"      '(80 0 100 5 10 1 0)
	SF-COLOR        "Background Colour"       '(255 255 255)
	SF-ADJUSTMENT   "Contrast"                '(55 -127 127 1 5 0 0)
	SF-OPTION       "Edge Detect Algorithm"   '("Sobel" "Prewitt Compass" "Gradient" "Roberts" "Differntial" "Laplace")
	SF-ADJUSTMENT   "Edge Amount"             '(4 1 10 1 5 0 0)
	SF-TOGGLE       "Erode image"             FALSE
	SF-TOGGLE       "News Print Effect"       TRUE
	SF-ADJUSTMENT   "Newsprint Pixel Size"    '(3 1 20 1 10 1 1)
	SF-OPTION       "Spot Function"           '("Round" "Line" "Diamond" "PS Square" "PS Diamond")
	SF-ADJUSTMENT   "Black Angle"             '(45 -90 90 1 10 1 1)
	SF-ADJUSTMENT   "Cyan Angle"              '(15 -90 90 1 10 1 1)
	SF-ADJUSTMENT   "Magenta  Angle"          '(75 -90 90 1 10 1 1)
	SF-ADJUSTMENT   "Yellow Angle"            '(0 -90 90 1 10 1 1)
	SF-ADJUSTMENT   "Posterize Level"         '(7 1 255 1 10 1 1)
	SF-ADJUSTMENT   "Newsprint Layer Opacity" '(50 0 100 5 10 1 1)
	SF-TOGGLE       "Despeckle"               TRUE
)

(script-fu-menu-register "photo-RoyLichtenstein"
                         "<Image>/FX-Foundry/Photo/Effects")