2
2
; Create a text effect that simulates an eerie alien glow around text
4
4
(define (apply-alien-glow-logo-effect img
8
(let* ((border (/ size 4))
11
(width (car (gimp-drawable-width logo-layer)))
12
(height (car (gimp-drawable-height logo-layer)))
13
(bg-layer (car (gimp-layer-new img
14
width height RGB-IMAGE
15
"Background" 100 NORMAL-MODE)))
16
(glow-layer (car (gimp-layer-new img
17
width height RGBA-IMAGE
18
"Alien Glow" 100 NORMAL-MODE))))
12
(width (car (gimp-drawable-width logo-layer)))
13
(height (car (gimp-drawable-height logo-layer)))
14
(bg-layer (car (gimp-layer-new img
15
width height RGB-IMAGE
16
"Background" 100 NORMAL-MODE)))
17
(glow-layer (car (gimp-layer-new img
18
width height RGBA-IMAGE
19
"Alien Glow" 100 NORMAL-MODE)))
20
22
(gimp-context-push)
23
25
(script-fu-util-image-resize-from-layer img logo-layer)
24
26
(gimp-image-add-layer img bg-layer 1)
25
27
(gimp-image-add-layer img glow-layer 1)
26
(gimp-layer-set-preserve-trans logo-layer TRUE)
28
(gimp-layer-set-lock-alpha logo-layer TRUE)
27
29
(gimp-context-set-background '(0 0 0))
28
30
(gimp-edit-fill bg-layer BACKGROUND-FILL)
29
31
(gimp-edit-clear glow-layer)
38
40
(gimp-context-set-foreground '(79 79 79))
40
42
(gimp-edit-blend logo-layer FG-BG-RGB-MODE NORMAL-MODE
41
GRADIENT-SHAPEBURST-ANGULAR 100 0 REPEAT-NONE FALSE
43
GRADIENT-SHAPEBURST-ANGULAR 100 0 REPEAT-NONE FALSE
47
52
(define (script-fu-alien-glow-logo-alpha img
52
57
(gimp-image-undo-group-start img)
53
58
(apply-alien-glow-logo-effect img logo-layer size glow-color)
54
59
(gimp-image-undo-group-end img)
55
(gimp-displays-flush)))
57
64
(script-fu-register "script-fu-alien-glow-logo-alpha"
59
"Create an X-Files-esque logo with the specified glow color"
65
SF-DRAWABLE "Drawable" 0
66
SF-ADJUSTMENT _"Glow size (pixels * 4)" '(150 2 1000 1 10 0 1)
67
SF-COLOR _"Glow color" '(63 252 0))
66
_"Add an eerie glow around the selected region (or alpha)"
72
SF-DRAWABLE "Drawable" 0
73
SF-ADJUSTMENT _"Glow size (pixels * 4)" '(150 2 1000 1 10 0 1)
74
SF-COLOR _"Glow color" '(63 252 0)
69
77
(script-fu-menu-register "script-fu-alien-glow-logo-alpha"
70
_"<Image>/Script-Fu/Alpha to Logo")
78
"<Image>/Filters/Alpha to Logo")
73
81
(define (script-fu-alien-glow-logo text
77
(let* ((img (car (gimp-image-new 256 256 RGB)))
81
(text-layer (car (gimp-text-fontname img
82
-1 0 0 text border TRUE
84
(width (car (gimp-drawable-width text-layer)))
85
(height (car (gimp-drawable-height text-layer))))
86
(img (car (gimp-image-new 256 256 RGB)))
90
(text-layer (car (gimp-text-fontname img
91
-1 0 0 text border TRUE
93
(width (car (gimp-drawable-width text-layer)))
94
(height (car (gimp-drawable-height text-layer)))
87
97
(gimp-image-undo-disable img)
88
(gimp-drawable-set-name text-layer text)
89
98
(apply-alien-glow-logo-effect img text-layer size glow-color)
90
99
(gimp-image-undo-enable img)
91
(gimp-display-new img)))
100
(gimp-display-new img)
93
104
(script-fu-register "script-fu-alien-glow-logo"
95
"Create an X-Files-esque logo with the specified glow color"
100
SF-STRING _"Text" "ALIEN"
101
SF-ADJUSTMENT _"Font size (pixels)" '(150 2 1000 1 10 0 1)
102
SF-FONT _"Font" "Sans Bold"
103
SF-COLOR _"Glow color" '(63 252 0))
106
_"Create a logo with an alien glow around the text"
111
SF-STRING _"Text" "ALIEN"
112
SF-ADJUSTMENT _"Font size (pixels)" '(150 2 1000 1 10 0 1)
113
SF-FONT _"Font" "Sans Bold"
114
SF-COLOR _"Glow color" '(63 252 0)
105
117
(script-fu-menu-register "script-fu-alien-glow-logo"
106
_"<Toolbox>/Xtns/Script-Fu/Logos")
118
"<Toolbox>/Xtns/Logos")