/usr/share/gimp/2.0/scripts/xtns-bodor-chrominium.scm is in gimp-plugin-registry 7.20140602+b4.
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 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 | ;
; The GIMP -- an image manipulation program
; Copyright (C) 1995 Spencer Kimball and Peter Mattis
;
; Chrominium for GIMP 2.4
; Copyright (C) 2007 Denis Bodor <lefinnois@lefinnois.net>
;
; Tags: logo
;
; Author statement:
; A Script-Fu that create a Chrome effect with gradient shadow
;
;
; --------------------------------------------------------------------
; Distributed by Gimp FX Foundry project
; --------------------------------------------------------------------
; - Changelog -
; Updated to Gimp2.4 (11-2007) - http://www.gimpscripts.com
;
; --------------------------------------------------------------------
;
; 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 2 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, write to the Free Software
; Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(define (apply-chrominium-logo-effect img
basetext
bgradient
gradient
color
bg-color
bsparkles)
(define (chantext))
(define (basetextmask))
(define (shadmask))
(define (sparkmask))
(define (set-pt a index x y)
(prog1
(aset a (* index 2) x)
(aset a (+ (* index 2) 1) y)))
(define (spline-chrome)
(let* ((a (cons-array 12 'byte)))
(set-pt a 0 0 0)
(set-pt a 1 63 254)
(set-pt a 2 124 59)
(set-pt a 3 170 255)
(set-pt a 4 220 125)
(set-pt a 5 255 255)
a))
(let* ((width (car (gimp-drawable-width basetext)))
(height (car (gimp-drawable-height basetext)))
(fond (car (gimp-layer-new img
width height RGB-IMAGE
_"Background" 100 NORMAL-MODE)))
(mapeux (car (gimp-layer-new img
width height RGBA-IMAGE
_"Mapper" 100 NORMAL-MODE)))
(shad (car (gimp-layer-new img
width height RGBA-IMAGE
_"Shadow" 100 NORMAL-MODE)))
(spark (car (gimp-layer-new img
width height RGBA-IMAGE
_"Sparkle" 100 NORMAL-MODE)))
(XXbmapshrink (/ height 75)) ; blur size for bumpmap
(XXbmapblur (/ height 25)) ; blur size for bumpmap
(XXshadgrow (/ height 62)) ; blur size for bumpmap
(XXshadblur (/ height 17)) ; blur size for bumpmap
(XXsparklen (/ height 12)) ; blur size for bumpmap
)
(gimp-context-push)
(gimp-image-add-layer img shad 2)
(gimp-edit-clear shad)
(if(= bsparkles TRUE)
(begin
(gimp-image-add-layer img spark 3)
(gimp-edit-clear spark)
)
)
; (if(= bsparkles FALSE)
; (begin
; (set! XXshadgrow (* XXshadgrow 1.5))
; (set! XXshadblur (* XXshadblur 1.1))
; )
; )
(gimp-image-add-layer img fond 4)
(gimp-edit-clear fond)
(gimp-image-add-layer img mapeux 5)
(gimp-edit-clear mapeux)
; filling back with background
(gimp-context-set-foreground bg-color)
(gimp-edit-fill fond FOREGROUND-FILL)
(gimp-selection-none img)
(script-fu-util-image-resize-from-layer img basetext)
; create channel for text
(gimp-selection-layer-alpha basetext)
(set! chantext (car (gimp-selection-save img)))
(set! basetextmask (car (gimp-layer-create-mask basetext ADD-ALPHA-MASK)))
(gimp-layer-add-mask basetext basetextmask)
(gimp-selection-all img)
(gimp-context-set-foreground '(200 200 200))
(gimp-edit-fill basetext FOREGROUND-FILL)
; create bumpmap
(gimp-selection-none img)
(gimp-context-set-foreground '(0 0 0))
(gimp-edit-fill mapeux FOREGROUND-FILL)
(gimp-selection-load chantext)
(gimp-selection-shrink img XXbmapshrink) ; 4
(gimp-context-set-foreground '(255 255 255))
(gimp-edit-fill mapeux FOREGROUND-FILL)
(gimp-selection-none img)
(plug-in-gauss-rle2 1 img mapeux XXbmapblur XXbmapblur) ; 10 10
; bumpmapping
(plug-in-bump-map 1
img
basetext
mapeux
135.00 ; azimuth
45.00 ; elevation
8 ; depth
0 ; x offset
0 ; y offset
0 ; water level
0 ; ambient
TRUE ; compensate darky
FALSE ; invert
0 ; TYPE 0=LINEAR, 1=SPHERICAL, 2=SINUS
)
; curving to gain chrome effect
(gimp-curves-spline basetext
0 ; channel to modify 0=VALUE
12 ; nbr of values (point*2)
(spline-chrome) ; array of points
)
; back shadow
(if (= bgradient TRUE)
(begin
(gimp-context-set-gradient gradient)
(gimp-edit-blend shad
CUSTOM-MODE
NORMAL-MODE
GRADIENT-LINEAR ; gradient type
100 ; opacity
0 ; offset
REPEAT-NONE ; repeat
FALSE ; reverse
FALSE ; supersampling
0 0 ;
FALSE ; dithering
0 0 ; x1 y1
width ; x2
height ; y2
)
))
(if (= bgradient FALSE)
(begin
(gimp-context-set-foreground color)
(gimp-edit-fill shad FOREGROUND-FILL)
))
(gimp-selection-load chantext)
(gimp-selection-grow img XXshadgrow) ; 5
(set! shadmask (car (gimp-layer-create-mask shad 4))) ; 4=SELECTION MASK
(gimp-layer-add-mask shad shadmask)
(gimp-selection-none img)
(plug-in-gauss-rle2 1 img shadmask XXshadblur XXshadblur)
; back shadow sparkle
(if(= bsparkles TRUE)
(begin
(if (= bgradient TRUE)
(begin
(gimp-context-set-gradient gradient)
(gimp-edit-blend spark
CUSTOM-MODE
NORMAL-MODE
GRADIENT-LINEAR ; gradient type
100 ; opacity
0 ; offset
REPEAT-NONE ; repeat
FALSE ; reverse
FALSE ; supersampling
0 0 ;
FALSE ; dithering
0 0 ; x1 y1
width ; x2
height ; y2
)
))
(if (= bgradient FALSE)
(begin
(gimp-context-set-foreground color)
(gimp-edit-fill spark FOREGROUND-FILL)
))
(set! sparkmask (car (gimp-layer-create-mask spark 1))) ; 1=BLACK MASK
(gimp-layer-add-mask spark sparkmask)
(gimp-selection-load chantext)
(gimp-selection-grow img XXshadgrow) ; 5
(plug-in-randomize-hurl RUN-NONINTERACTIVE
img
sparkmask
50 ; randomization percentage
1 ; repeat
FALSE ; random seed
10 ; seed (graine)
)
(gimp-selection-none img)
(gimp-threshold sparkmask
253 ; low
255 ; high
)
(plug-in-sparkle RUN-NONINTERACTIVE
img
sparkmask
0.001 ; lum
0.50 ; intensity
XXsparklen ; spike len ; 20
4 ; spike nbr
15 ; angle
1.00 ; density
0 ; opacity
0 ; random hue
0 ; random saturation
FALSE ; preserve lum
FALSE ; invert
FALSE ; add border
0 ; color type 0=NATURAL
)
(gimp-context-pop))
)
)
)
(define (script-fu-chrominium-logo-alpha img
basetext
bgradient
gradient
color
bg-color
bsparkles)
(begin
(gimp-image-undo-group-start img)
(apply-chrominium-logo-effect img basetext bgradient gradient color bg-color bsparkles)
(gimp-image-undo-group-end img)
(gimp-displays-flush)))
(script-fu-register "script-fu-chrominium-logo-alpha"
_"Chrominium..."
_"Chrominium logo"
"Denis bodor"
"Denis bodor"
"2007"
"RGBA"
SF-IMAGE "Image" 0
SF-DRAWABLE "Drawable" 0
SF-TOGGLE _"Gradient Fill" TRUE
SF-GRADIENT _"Gradient" "Full saturation spectrum CCW"
SF-COLOR _"Color Fill" '(0 250 0)
SF-COLOR _"Background color" '(0 0 0)
SF-TOGGLE _"Sparkles" TRUE
)
(script-fu-menu-register "script-fu-chrominium-logo-alpha"
_"<Image>/FX-Foundry/Alpha to Logo")
(define (script-fu-chrominium-logo text
font
size
bgradient
gradient
color
bg-color
bsparkles)
(let* ((img (car (gimp-image-new 256 256 RGB)))
(border (/ size 4))
(basetext (car (gimp-text-fontname img
-1 0 0 text border TRUE
size PIXELS font))))
(gimp-image-undo-disable img)
(apply-chrominium-logo-effect img basetext bgradient gradient color bg-color bsparkles)
(gimp-image-undo-enable img)
(gimp-display-new img)))
(script-fu-register "script-fu-chrominium-logo"
_"Chrominium..."
_"Chrominium logo"
"Denis bodor"
"Denis bodor"
"2007"
""
SF-STRING _"Text" "Chrome"
SF-FONT _"Font" "Ethnocentric"
SF-ADJUSTMENT _"Font size (pixels)" '(150 2 1000 1 10 0 1)
SF-TOGGLE _"Gradient Fill" TRUE
SF-GRADIENT _"Gradient" _"Full saturation spectrum CCW"
SF-COLOR _"Color Fill" '(0 250 0)
SF-COLOR _"Background color" '(0 0 0)
SF-TOGGLE _"Sparkles" TRUE
)
(script-fu-menu-register "script-fu-chrominium-logo"
_"<Image>/File/Create/FX-Foundry/Logos")
|