/usr/share/gimp/2.0/scripts/blended-logo.scm is in gimp-data 2.8.10-0ubuntu1.
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 | ; BLENDED-DROP-SHADOW-LOGO
; draw the specified text over a blended background using current gimp fg
; and bg colors. The finished blend has a drop shadow underneath that blends
; to the specified bg-color
; if the blend colors are specified as high intensity, the sharp option
; should be enabled or the logo will come out blurry
(define (blended-logo-scale size percent)
(* size percent)
)
(define (apply-blended-logo-effect img
logo-layer
b-size
bg-color
blend-mode
blend-fg
blend-bg
blend-gradient
blend-gradient-reverse)
(let* (
(b-size-2 (blended-logo-scale b-size 0.5))
(f-size (blended-logo-scale b-size 0.75))
(ds-size (blended-logo-scale b-size 0.5))
(ts-size (- b-size-2 3))
(width (car (gimp-drawable-width logo-layer)))
(height (car (gimp-drawable-height logo-layer)))
(blend-layer (car (gimp-layer-new img
width height RGBA-IMAGE
"Blend" 100 NORMAL-MODE)))
(shadow-layer (car (gimp-layer-new img
width height RGBA-IMAGE
"Shadow" 100 NORMAL-MODE)))
(text-shadow-layer (car (gimp-layer-new img
width height RGBA-IMAGE
"Text Shadow" 100 MULTIPLY-MODE)))
(tsl-layer-mask (car (gimp-layer-create-mask text-shadow-layer
ADD-BLACK-MASK)))
(drop-shadow-layer (car (gimp-layer-new img
width height RGBA-IMAGE
"Drop Shadow" 100 MULTIPLY-MODE)))
(dsl-layer-mask (car (gimp-layer-create-mask drop-shadow-layer
ADD-BLACK-MASK)))
)
(script-fu-util-image-resize-from-layer img logo-layer)
(script-fu-util-image-add-layers img text-shadow-layer drop-shadow-layer blend-layer shadow-layer)
(gimp-image-raise-item img text-shadow-layer)
(gimp-selection-none img)
(gimp-edit-clear text-shadow-layer)
(gimp-edit-clear drop-shadow-layer)
(gimp-edit-clear blend-layer)
(gimp-context-set-background bg-color)
(gimp-drawable-fill shadow-layer BACKGROUND-FILL)
(gimp-context-set-feather TRUE)
(gimp-context-set-feather-radius b-size-2 b-size-2)
(gimp-image-select-rectangle img CHANNEL-OP-REPLACE b-size-2 b-size-2 (- width b-size) (- height b-size))
(gimp-context-set-feather FALSE)
(gimp-context-set-background '(0 0 0))
(gimp-edit-fill shadow-layer BACKGROUND-FILL)
(gimp-image-select-item img CHANNEL-OP-REPLACE logo-layer)
(gimp-layer-add-mask text-shadow-layer tsl-layer-mask)
(gimp-context-set-background '(255 255 255))
(gimp-edit-fill tsl-layer-mask BACKGROUND-FILL)
(gimp-selection-feather img f-size)
(gimp-context-set-background '(63 63 63))
(gimp-edit-fill drop-shadow-layer BACKGROUND-FILL)
(gimp-context-set-background '(0 0 0))
(gimp-edit-fill text-shadow-layer BACKGROUND-FILL)
(gimp-context-set-foreground '(255 255 255))
(gimp-edit-blend text-shadow-layer FG-BG-RGB-MODE NORMAL-MODE
GRADIENT-SHAPEBURST-ANGULAR 100 0 REPEAT-NONE FALSE
FALSE 0 0 TRUE
0 0 1 1)
(gimp-selection-none img)
(gimp-context-set-foreground blend-fg)
(gimp-context-set-background blend-bg)
(gimp-context-set-gradient blend-gradient)
(gimp-edit-blend blend-layer blend-mode NORMAL-MODE
GRADIENT-LINEAR 100 0 REPEAT-NONE blend-gradient-reverse
FALSE 0 0 TRUE
0 0 width 0)
(gimp-layer-translate logo-layer (- b-size-2) (- b-size-2))
(gimp-layer-translate blend-layer (- b-size) (- b-size))
(gimp-layer-translate text-shadow-layer (- ts-size) (- ts-size))
(gimp-layer-translate drop-shadow-layer ds-size ds-size)
(gimp-image-select-item img CHANNEL-OP-REPLACE blend-layer)
(gimp-layer-add-mask drop-shadow-layer dsl-layer-mask)
(gimp-context-set-background '(255 255 255))
(gimp-edit-fill dsl-layer-mask BACKGROUND-FILL)
(gimp-layer-remove-mask drop-shadow-layer MASK-APPLY)
(gimp-selection-none img)
)
)
(define (script-fu-blended-logo-alpha img
logo-layer
b-size
bg-color
blend-mode
blend-fg
blend-bg
blend-gradient
blend-gradient-reverse)
(begin
(gimp-context-push)
(gimp-context-set-defaults)
(gimp-image-undo-group-start img)
(apply-blended-logo-effect img logo-layer b-size bg-color
blend-mode blend-fg blend-bg
blend-gradient blend-gradient-reverse)
(gimp-image-undo-group-end img)
(gimp-displays-flush)
(gimp-context-pop)
)
)
(script-fu-register "script-fu-blended-logo-alpha"
_"Blen_ded..."
_"Add blended backgrounds, highlights, and shadows to the selected region (or alpha)"
"Spencer Kimball"
"Spencer Kimball"
"1996"
"RGBA"
SF-IMAGE "Image" 0
SF-DRAWABLE "Drawable" 0
SF-ADJUSTMENT _"Offset (pixels)" '(15 1 100 1 10 0 1)
SF-COLOR _"Background color" "white"
SF-OPTION _"Blend mode" '(_"FG-BG-RGB"
_"FG-BG-HSV"
_"FG-Transparent"
_"Custom Gradient")
SF-COLOR _"Start blend" '(22 9 129)
SF-COLOR _"End blend" '(129 9 82)
SF-GRADIENT _"Gradient" "Golden"
SF-TOGGLE _"Gradient reverse" FALSE
)
(script-fu-menu-register "script-fu-blended-logo-alpha"
"<Image>/Filters/Alpha to Logo")
(define (script-fu-blended-logo text
size
font
text-color
bg-color
blend-mode
blend-fg
blend-bg
blend-gradient
blend-gradient-reverse)
(let* (
(img (car (gimp-image-new 256 256 RGB)))
(b-size (blended-logo-scale size 0.1))
(text-layer (car (gimp-text-fontname img -1 0 0 text b-size TRUE size PIXELS font)))
)
(gimp-context-push)
(gimp-context-set-antialias TRUE)
(gimp-context-set-feather FALSE)
(gimp-image-undo-disable img)
(gimp-context-set-foreground text-color)
(gimp-layer-set-lock-alpha text-layer TRUE)
(gimp-edit-fill text-layer FOREGROUND-FILL)
(apply-blended-logo-effect img text-layer b-size bg-color
blend-mode blend-fg blend-bg
blend-gradient blend-gradient-reverse)
(gimp-image-undo-enable img)
(gimp-display-new img)
(gimp-context-pop)
)
)
(script-fu-register "script-fu-blended-logo"
_"Blen_ded..."
_"Create a logo with blended backgrounds, highlights, and shadows"
"Spencer Kimball"
"Spencer Kimball"
"1996"
""
SF-STRING _"Text" "GIMP"
SF-ADJUSTMENT _"Font size (pixels)" '(150 2 1000 1 10 0 1)
SF-FONT _"Font" "Crillee"
SF-COLOR _"Text color" '(124 174 255)
SF-COLOR _"Background color" "white"
SF-OPTION _"Blend mode" '(_"FG-BG-RGB"
_"FG-BG-HSV"
_"FG-Transparent"
_"Custom Gradient")
SF-COLOR _"Start blend" '(22 9 129)
SF-COLOR _"End blend" '(129 9 82)
SF-GRADIENT _"Gradient" "Golden"
SF-TOGGLE _"Gradient reverse" FALSE
)
(script-fu-menu-register "script-fu-blended-logo"
"<Image>/File/Create/Logos")
|