scripts: remove the entries registered in the create menu
This commit is contained in:
@ -12,8 +12,7 @@ scripts = \
|
||||
palette-to-gradient.py \
|
||||
py-slice.py \
|
||||
python-console.py \
|
||||
python-eval.py \
|
||||
text-brush.py
|
||||
python-eval.py
|
||||
|
||||
test_scripts = \
|
||||
benchmark-foreground-extract.py \
|
||||
|
@ -1,93 +0,0 @@
|
||||
#!/usr/bin/env python
|
||||
# coding: utf-8
|
||||
|
||||
# Author: João Sebastião de Oliveira Bueno
|
||||
# Copyright: João S. O. Bueno (2009), licensed under the GPL v 3.0
|
||||
|
||||
# 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/>.
|
||||
|
||||
from gimpfu import *
|
||||
import os
|
||||
|
||||
gettext.install("gimp20-python", gimp.locale_directory, unicode=True)
|
||||
|
||||
def text_brush(font_name, font_size, text):
|
||||
pdb.gimp_context_push()
|
||||
pdb.gimp_context_set_default_colors()
|
||||
|
||||
padding = font_size // 4
|
||||
img = gimp.Image(font_size + padding, font_size + padding, GRAY)
|
||||
img.undo_freeze()
|
||||
|
||||
text = text.decode("utf-8")
|
||||
for letter in reversed(text):
|
||||
layer = img.new_layer(fill_mode=BACKGROUND_FILL)
|
||||
text_floating_sel = \
|
||||
pdb.gimp_text_fontname(img, layer,
|
||||
padding // 2,
|
||||
padding // 2,
|
||||
letter.encode("utf-8"),
|
||||
0,
|
||||
True,
|
||||
font_size,
|
||||
PIXELS,
|
||||
font_name)
|
||||
if text_floating_sel:
|
||||
#whitespace don't generate a floating sel.
|
||||
pdb.gimp_edit_bucket_fill(text_floating_sel,
|
||||
FG_BUCKET_FILL,
|
||||
NORMAL_MODE, 100, 1.0,
|
||||
False,0 ,0)
|
||||
pdb.gimp_floating_sel_anchor(text_floating_sel)
|
||||
|
||||
file_name = text.lower().replace(" ", "_") + ".gih"
|
||||
file_path = os.path.join(gimp.directory, 'brushes', file_name)
|
||||
|
||||
pdb.file_gih_save(img, img.layers[0],
|
||||
file_path, file_path,
|
||||
100, #spacing
|
||||
text, #description,
|
||||
img.width, img.height,
|
||||
1, 1,
|
||||
1, #dimension
|
||||
[len(text)], #rank - number of cells
|
||||
1, # dimension again - actual size for the
|
||||
# array of the selection mode
|
||||
["incremental"])
|
||||
|
||||
pdb.gimp_brushes_refresh()
|
||||
pdb.gimp_image_delete(img)
|
||||
pdb.gimp_context_pop()
|
||||
|
||||
register(
|
||||
"brush-from-text",
|
||||
N_("Create a new brush with characters from a text sequence"),
|
||||
"""New dynamic brush where each cell is a character from
|
||||
the input text in the chosen font """,
|
||||
"Joao S. O. Bueno",
|
||||
"Copyright Joao S.O. Bueno 2009. GPL v3.0",
|
||||
"2009",
|
||||
N_("New Brush from _Text..."),
|
||||
"",
|
||||
[
|
||||
(PF_FONT, "font", _("Font"), "Sans"),
|
||||
(PF_SPINNER, "size", _("Pixel Size"), 50, (1, 8000, 1)),
|
||||
(PF_STRING, "text", _("Text"), "GNU Image Manipulation Program")
|
||||
],
|
||||
[],
|
||||
text_brush,
|
||||
menu="<Image>/File/Create",
|
||||
domain=("gimp20-python", gimp.locale_directory)
|
||||
)
|
||||
main()
|
@ -1,185 +0,0 @@
|
||||
; 3d-outlined-patterned-shadowed-and-bump-mapped-logo :)
|
||||
; creates outlined border of a text with patterns
|
||||
;
|
||||
; GIMP - The GNU Image Manipulation Program
|
||||
; Copyright (C) 1995 Spencer Kimball and Peter Mattis
|
||||
;
|
||||
; 3d-outline creates outlined border of a text with patterns
|
||||
; Copyright (C) 1998 Hrvoje Horvat
|
||||
;
|
||||
; 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 (apply-3d-outline-logo-effect img
|
||||
logo-layer
|
||||
text-pattern
|
||||
outline-blur-radius
|
||||
shadow-blur-radius
|
||||
bump-map-blur-radius
|
||||
noninteractive
|
||||
s-offset-x
|
||||
s-offset-y)
|
||||
(let* (
|
||||
(width (car (gimp-drawable-width logo-layer)))
|
||||
(height (car (gimp-drawable-height logo-layer)))
|
||||
(bg-layer (car (gimp-layer-new img width height
|
||||
RGB-IMAGE "Background" 100 NORMAL-MODE)))
|
||||
(pattern-layer (car (gimp-layer-new img width height
|
||||
RGBA-IMAGE "Pattern" 100 NORMAL-MODE)))
|
||||
(alpha-layer 0)
|
||||
(shadow-layer 0)
|
||||
(pattern-mask 0)
|
||||
(floating-sel 0)
|
||||
)
|
||||
|
||||
(gimp-context-push)
|
||||
|
||||
(gimp-selection-none img)
|
||||
(script-fu-util-image-resize-from-layer img logo-layer)
|
||||
(script-fu-util-image-add-layers img pattern-layer bg-layer)
|
||||
(gimp-context-set-background '(255 255 255))
|
||||
(gimp-edit-fill bg-layer BACKGROUND-FILL)
|
||||
(gimp-edit-clear pattern-layer)
|
||||
(gimp-layer-set-lock-alpha logo-layer TRUE)
|
||||
(gimp-context-set-foreground '(0 0 0))
|
||||
(gimp-edit-fill logo-layer FOREGROUND-FILL)
|
||||
(gimp-layer-set-lock-alpha logo-layer FALSE)
|
||||
(plug-in-gauss-iir RUN-NONINTERACTIVE img logo-layer outline-blur-radius TRUE TRUE)
|
||||
|
||||
(gimp-item-set-visible pattern-layer FALSE)
|
||||
(set! alpha-layer (car (gimp-image-merge-visible-layers img CLIP-TO-IMAGE)))
|
||||
(plug-in-edge RUN-NONINTERACTIVE img alpha-layer 2 1 0)
|
||||
(gimp-item-set-name alpha-layer "Bump map")
|
||||
(set! shadow-layer (car (gimp-layer-copy alpha-layer TRUE)))
|
||||
(gimp-item-set-name shadow-layer "Edges")
|
||||
(script-fu-util-image-add-layers img shadow-layer)
|
||||
(plug-in-gauss-iir RUN-NONINTERACTIVE img alpha-layer bump-map-blur-radius TRUE TRUE)
|
||||
|
||||
(gimp-selection-all img)
|
||||
(gimp-context-set-pattern text-pattern)
|
||||
(gimp-edit-bucket-fill pattern-layer
|
||||
PATTERN-BUCKET-FILL NORMAL-MODE 100 0 FALSE 0 0)
|
||||
(plug-in-bump-map noninteractive img pattern-layer alpha-layer
|
||||
110.0 45.0 4 0 0 0 0 TRUE FALSE 0)
|
||||
|
||||
(set! pattern-mask (car (gimp-layer-create-mask pattern-layer ADD-ALPHA-MASK)))
|
||||
(gimp-layer-add-mask pattern-layer pattern-mask)
|
||||
|
||||
(gimp-selection-all img)
|
||||
(gimp-edit-copy shadow-layer)
|
||||
(set! floating-sel (car (gimp-edit-paste pattern-mask FALSE)))
|
||||
(gimp-floating-sel-anchor floating-sel)
|
||||
|
||||
(gimp-layer-remove-mask pattern-layer MASK-APPLY)
|
||||
(gimp-invert shadow-layer)
|
||||
(gimp-item-set-name shadow-layer "Drop shadow")
|
||||
(plug-in-gauss-iir RUN-NONINTERACTIVE img shadow-layer shadow-blur-radius TRUE TRUE)
|
||||
|
||||
(gimp-drawable-offset shadow-layer
|
||||
FALSE OFFSET-BACKGROUND s-offset-x s-offset-y)
|
||||
|
||||
(gimp-item-set-visible alpha-layer FALSE)
|
||||
(gimp-item-set-visible pattern-layer TRUE)
|
||||
;;(set! final (car (gimp-image-flatten img)))
|
||||
|
||||
(gimp-context-pop)
|
||||
)
|
||||
)
|
||||
|
||||
(define (script-fu-3d-outline-logo-alpha img
|
||||
logo-layer
|
||||
text-pattern
|
||||
outline-blur-radius
|
||||
shadow-blur-radius
|
||||
bump-map-blur-radius
|
||||
noninteractive
|
||||
s-offset-x
|
||||
s-offset-y)
|
||||
(begin
|
||||
(gimp-image-undo-group-start img)
|
||||
(apply-3d-outline-logo-effect img logo-layer text-pattern
|
||||
outline-blur-radius shadow-blur-radius
|
||||
bump-map-blur-radius noninteractive
|
||||
s-offset-x s-offset-y)
|
||||
(gimp-image-undo-group-end img)
|
||||
(gimp-displays-flush)
|
||||
)
|
||||
)
|
||||
|
||||
(script-fu-register "script-fu-3d-outline-logo-alpha"
|
||||
_"3D _Outline..."
|
||||
_"Outline the selected region (or alpha) with a pattern and add a drop shadow"
|
||||
"Hrvoje Horvat (hhorvat@open.hr)"
|
||||
"Hrvoje Horvat"
|
||||
"07 April, 1998"
|
||||
"RGBA"
|
||||
SF-IMAGE "Image" 0
|
||||
SF-DRAWABLE "Drawable" 0
|
||||
SF-PATTERN _"Pattern" "Parque #1"
|
||||
SF-ADJUSTMENT _"Outline blur radius" '(5 1 200 1 10 0 1)
|
||||
SF-ADJUSTMENT _"Shadow blur radius" '(10 1 200 1 10 0 1)
|
||||
SF-ADJUSTMENT _"Bumpmap (alpha layer) blur radius" '(5 1 200 1 10 0 1)
|
||||
SF-TOGGLE _"Default bumpmap settings" TRUE
|
||||
SF-ADJUSTMENT _"Shadow X offset" '(0 0 200 1 5 0 1)
|
||||
SF-ADJUSTMENT _"Shadow Y offset" '(0 0 200 1 5 0 1)
|
||||
)
|
||||
|
||||
(script-fu-menu-register "script-fu-3d-outline-logo-alpha"
|
||||
"<Image>/Filters/Alpha to Logo")
|
||||
|
||||
|
||||
(define (script-fu-3d-outline-logo text-pattern
|
||||
text
|
||||
size
|
||||
font
|
||||
outline-blur-radius
|
||||
shadow-blur-radius
|
||||
bump-map-blur-radius
|
||||
noninteractive
|
||||
s-offset-x
|
||||
s-offset-y)
|
||||
(let* (
|
||||
(img (car (gimp-image-new 256 256 RGB)))
|
||||
(text-layer (car (gimp-text-fontname img -1 0 0 text 30 TRUE size PIXELS font)))
|
||||
)
|
||||
(gimp-image-undo-disable img)
|
||||
(apply-3d-outline-logo-effect img text-layer text-pattern
|
||||
outline-blur-radius shadow-blur-radius
|
||||
bump-map-blur-radius noninteractive
|
||||
s-offset-x s-offset-y)
|
||||
(gimp-image-undo-enable img)
|
||||
(gimp-display-new img)
|
||||
)
|
||||
)
|
||||
|
||||
(script-fu-register "script-fu-3d-outline-logo"
|
||||
_"3D _Outline..."
|
||||
_"Create a logo with outlined text and a drop shadow"
|
||||
"Hrvoje Horvat (hhorvat@open.hr)"
|
||||
"Hrvoje Horvat"
|
||||
"07 April, 1998"
|
||||
""
|
||||
SF-PATTERN _"Pattern" "Parque #1"
|
||||
SF-STRING _"Text" "GIMP"
|
||||
SF-ADJUSTMENT _"Font size (pixels)" '(100 2 1000 1 10 0 1)
|
||||
SF-FONT _"Font" "RoostHeavy"
|
||||
SF-ADJUSTMENT _"Outline blur radius" '(5 1 200 1 10 0 1)
|
||||
SF-ADJUSTMENT _"Shadow blur radius" '(10 1 200 1 10 0 1)
|
||||
SF-ADJUSTMENT _"Bumpmap (alpha layer) blur radius" '(5 1 200 1 10 0 1)
|
||||
SF-TOGGLE _"Default bumpmap settings" TRUE
|
||||
SF-ADJUSTMENT _"Shadow X offset" '(0 0 200 1 5 0 1)
|
||||
SF-ADJUSTMENT _"Shadow Y offset" '(0 0 200 1 5 0 1)
|
||||
)
|
||||
|
||||
(script-fu-menu-register "script-fu-3d-outline-logo"
|
||||
"<Image>/File/Create/Logos")
|
@ -1,242 +0,0 @@
|
||||
; GIMP - The GNU Image Manipulation Program
|
||||
; Copyright (C) 1995 Spencer Kimball and Peter Mattis
|
||||
;
|
||||
; 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/>.
|
||||
;
|
||||
; 3dTruchet - a script to create Truchet patterns
|
||||
; by Adrian Likins <aklikins@eos.ncsu.edu>
|
||||
; http://www4.ncsu.edu/~aklikins/
|
||||
; version about .8 give or take
|
||||
;
|
||||
; Lots of thanks to Quartic for his help.
|
||||
;
|
||||
;
|
||||
; The utility of this script is left as an exercise for the reader.
|
||||
|
||||
(define (center-ellipse img
|
||||
cx
|
||||
cy
|
||||
rx
|
||||
ry
|
||||
op
|
||||
aa
|
||||
feather
|
||||
frad)
|
||||
(gimp-context-push)
|
||||
(gimp-context-set-antialias aa)
|
||||
(gimp-context-set-feather feather)
|
||||
(gimp-context-set-feather-radius frad frad)
|
||||
(gimp-image-select-ellipse img op (- cx rx) (- cy ry) (+ rx rx) (+ ry ry))
|
||||
(gimp-context-pop)
|
||||
)
|
||||
|
||||
(define (use-tile img
|
||||
drawable
|
||||
height
|
||||
width
|
||||
img2
|
||||
drawable2
|
||||
xoffset
|
||||
yoffset)
|
||||
(gimp-edit-copy drawable2)
|
||||
(let (
|
||||
(floating-sel (car (gimp-edit-paste drawable FALSE)))
|
||||
)
|
||||
(gimp-layer-set-offsets floating-sel xoffset yoffset)
|
||||
(gimp-floating-sel-anchor floating-sel)
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
(define (create-tile img
|
||||
drawable1
|
||||
drawable2
|
||||
size
|
||||
thickness
|
||||
backcolor
|
||||
begincolor
|
||||
endcolor
|
||||
supersample)
|
||||
(let* (
|
||||
(half-thickness (/ thickness 2))
|
||||
(outer-radius (+ (/ size 2) half-thickness))
|
||||
(inner-radius (- (/ size 2) half-thickness))
|
||||
)
|
||||
|
||||
(gimp-selection-all img)
|
||||
(gimp-context-set-background backcolor)
|
||||
(gimp-edit-fill drawable1 BACKGROUND-FILL)
|
||||
|
||||
(let* (
|
||||
(tempSize (* size 3))
|
||||
(temp-img (car (gimp-image-new tempSize tempSize RGB)))
|
||||
(temp-draw (car (gimp-layer-new temp-img tempSize tempSize
|
||||
RGB-IMAGE "Jabar" 100 NORMAL-MODE)))
|
||||
(temp-draw2 (car (gimp-layer-new temp-img tempSize tempSize
|
||||
RGB-IMAGE "Jabar" 100 NORMAL-MODE)))
|
||||
)
|
||||
|
||||
(gimp-image-undo-disable temp-img)
|
||||
(gimp-image-insert-layer temp-img temp-draw 0 0)
|
||||
(gimp-image-insert-layer temp-img temp-draw2 0 0)
|
||||
(gimp-context-set-background backcolor)
|
||||
(gimp-edit-fill temp-draw BACKGROUND-FILL)
|
||||
(gimp-edit-fill temp-draw2 BACKGROUND-FILL)
|
||||
|
||||
;weird aint it
|
||||
(gimp-context-set-background begincolor)
|
||||
(gimp-context-set-foreground endcolor)
|
||||
|
||||
(center-ellipse temp-img size size outer-radius outer-radius
|
||||
CHANNEL-OP-REPLACE TRUE FALSE 0)
|
||||
(center-ellipse temp-img size size inner-radius inner-radius
|
||||
CHANNEL-OP-SUBTRACT TRUE FALSE 0)
|
||||
|
||||
(center-ellipse temp-img (* size 2) (* size 2) outer-radius outer-radius
|
||||
CHANNEL-OP-ADD TRUE FALSE 0)
|
||||
(center-ellipse temp-img (* size 2) (* size 2) inner-radius inner-radius
|
||||
CHANNEL-OP-SUBTRACT TRUE FALSE 0)
|
||||
|
||||
(gimp-edit-blend temp-draw FG-BG-RGB-MODE NORMAL-MODE
|
||||
GRADIENT-SHAPEBURST-ANGULAR 100 0 REPEAT-NONE FALSE
|
||||
supersample 3 0.2 TRUE
|
||||
size size (* size 2) (/ size 2))
|
||||
|
||||
(center-ellipse temp-img size (* size 2) outer-radius outer-radius
|
||||
CHANNEL-OP-REPLACE TRUE FALSE 0)
|
||||
(center-ellipse temp-img size (* size 2) inner-radius inner-radius
|
||||
CHANNEL-OP-SUBTRACT TRUE FALSE 0)
|
||||
|
||||
(center-ellipse temp-img (* size 2) size outer-radius outer-radius
|
||||
CHANNEL-OP-ADD TRUE FALSE 0)
|
||||
(center-ellipse temp-img (* size 2) size inner-radius inner-radius
|
||||
CHANNEL-OP-SUBTRACT TRUE FALSE 0)
|
||||
|
||||
;(gimp-edit-fill temp-img temp-draw2 BACKGROUND-FILL)
|
||||
|
||||
(gimp-edit-blend temp-draw2 FG-BG-RGB-MODE NORMAL-MODE
|
||||
GRADIENT-SHAPEBURST-ANGULAR 100 0 REPEAT-NONE FALSE
|
||||
supersample 3 0.2 TRUE
|
||||
size size (* size 2) (* size 2))
|
||||
|
||||
(gimp-selection-none temp-img)
|
||||
|
||||
(gimp-image-resize temp-img size size (- size) (- size))
|
||||
; woo hoo it works....finally...
|
||||
|
||||
|
||||
(gimp-selection-all temp-img)
|
||||
(gimp-edit-copy temp-draw)
|
||||
(let ((floating-sel (car (gimp-edit-paste drawable2 FALSE))))
|
||||
(gimp-floating-sel-anchor floating-sel))
|
||||
|
||||
(gimp-edit-copy temp-draw2)
|
||||
(let ((floating-sel (car (gimp-edit-paste drawable1 FALSE))))
|
||||
(gimp-floating-sel-anchor floating-sel))
|
||||
|
||||
;(let ((drawble (car (gimp-drawable-transform-flip-simple img drawable1
|
||||
; ORIENTATION-HORIZONTAL
|
||||
; TRUE 0 TRUE)))))
|
||||
|
||||
|
||||
;(gimp-display-new temp-img)
|
||||
(gimp-image-delete temp-img)
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
(define (script-fu-3dtruchet size
|
||||
thickness
|
||||
backcolor
|
||||
begincolor
|
||||
endcolor
|
||||
supersample
|
||||
xtiles
|
||||
ytiles)
|
||||
(let* (
|
||||
(width (* size xtiles))
|
||||
(height (* size ytiles))
|
||||
(img (car (gimp-image-new width height RGB)))
|
||||
(tile (car (gimp-image-new size size RGB)))
|
||||
(layer-one (car (gimp-layer-new img width height
|
||||
RGB-IMAGE "Rambis" 100 NORMAL-MODE)))
|
||||
(tiledraw1 (car (gimp-layer-new tile size size
|
||||
RGB-IMAGE "Johnson" 100 NORMAL-MODE)))
|
||||
(tiledraw2 (car (gimp-layer-new tile size size
|
||||
RGB-IMAGE "Cooper" 100 NORMAL-MODE)))
|
||||
(Xindex 0)
|
||||
(Yindex 0)
|
||||
)
|
||||
|
||||
(gimp-context-push)
|
||||
|
||||
(gimp-image-undo-disable img)
|
||||
(gimp-image-undo-disable tile)
|
||||
|
||||
(gimp-image-insert-layer img layer-one 0 0)
|
||||
(gimp-image-insert-layer tile tiledraw1 0 0)
|
||||
(gimp-image-insert-layer tile tiledraw2 0 0)
|
||||
|
||||
;just to look a little better
|
||||
(gimp-selection-all img)
|
||||
(gimp-context-set-background backcolor)
|
||||
(gimp-edit-fill layer-one BACKGROUND-FILL)
|
||||
(gimp-selection-none img)
|
||||
|
||||
(create-tile tile tiledraw1 tiledraw2 size thickness
|
||||
backcolor begincolor endcolor supersample)
|
||||
|
||||
|
||||
(while (<= Xindex xtiles)
|
||||
(while (<= Yindex ytiles)
|
||||
(if (= (rand 2) 0)
|
||||
(use-tile img layer-one height width tile
|
||||
tiledraw1 (* Xindex size) (* Yindex size))
|
||||
(use-tile img layer-one height width tile
|
||||
tiledraw2 (* Xindex size) (* Yindex size))
|
||||
)
|
||||
(set! Yindex (+ Yindex 1))
|
||||
)
|
||||
(set! Yindex 0)
|
||||
(set! Xindex (+ Xindex 1))
|
||||
)
|
||||
|
||||
(gimp-image-delete tile)
|
||||
(gimp-image-undo-enable img)
|
||||
(gimp-display-new img)
|
||||
|
||||
(gimp-context-pop)
|
||||
)
|
||||
)
|
||||
|
||||
(script-fu-register "script-fu-3dtruchet"
|
||||
_"3_D Truchet..."
|
||||
_"Create an image filled with a 3D Truchet pattern"
|
||||
"Adrian Likins <aklikins@eos.ncsu.edu>"
|
||||
"Adrian Likins"
|
||||
"1997"
|
||||
""
|
||||
SF-ADJUSTMENT _"Block size" '(64 5 1000 1 10 0 1)
|
||||
SF-ADJUSTMENT _"Thickness" '(12 2 100 1 10 0 1)
|
||||
SF-COLOR _"Background color" "white"
|
||||
SF-COLOR _"Start blend" "black"
|
||||
SF-COLOR _"End blend" "white"
|
||||
SF-TOGGLE _"Supersample" TRUE
|
||||
SF-ADJUSTMENT _"Number of X tiles" '(5 1 1000 1 10 0 1)
|
||||
SF-ADJUSTMENT _"Number of Y tiles" '(5 1 1000 1 10 0 1)
|
||||
)
|
||||
|
||||
(script-fu-menu-register "script-fu-3dtruchet"
|
||||
"<Image>/File/Create/Patterns")
|
@ -8,78 +8,41 @@ scripts = \
|
||||
script-fu.init \
|
||||
script-fu-compat.init \
|
||||
plug-in-compat.init \
|
||||
3d-outline.scm \
|
||||
3dTruchet.scm \
|
||||
add-bevel.scm \
|
||||
addborder.scm \
|
||||
alien-glow-arrow.scm \
|
||||
alien-glow-bar.scm \
|
||||
alien-glow-bullet.scm \
|
||||
alien-glow-button.scm \
|
||||
alien-glow-logo.scm \
|
||||
alien-neon-logo.scm \
|
||||
basic1-logo.scm \
|
||||
basic2-logo.scm \
|
||||
beveled-button.scm \
|
||||
beveled-pattern-arrow.scm \
|
||||
beveled-pattern-bullet.scm \
|
||||
beveled-pattern-button.scm \
|
||||
beveled-pattern-heading.scm \
|
||||
beveled-pattern-hrule.scm \
|
||||
blend-anim.scm \
|
||||
blended-logo.scm \
|
||||
bovinated-logo.scm \
|
||||
burn-in-anim.scm \
|
||||
camo.scm \
|
||||
carve-it.scm \
|
||||
carved-logo.scm \
|
||||
chalk.scm \
|
||||
chip-away.scm \
|
||||
chrome-it.scm \
|
||||
chrome-logo.scm \
|
||||
circuit.scm \
|
||||
clothify.scm \
|
||||
coffee.scm \
|
||||
comic-logo.scm \
|
||||
coolmetal-logo.scm \
|
||||
copy-visible.scm \
|
||||
crystal-logo.scm \
|
||||
difference-clouds.scm \
|
||||
distress-selection.scm \
|
||||
drop-shadow.scm \
|
||||
erase-rows.scm \
|
||||
flatland.scm \
|
||||
font-map.scm \
|
||||
frosty-logo.scm \
|
||||
fuzzyborder.scm \
|
||||
gimp-online.scm \
|
||||
glossy.scm \
|
||||
glowing-logo.scm \
|
||||
gradient-bevel-logo.scm \
|
||||
gradient-example.scm \
|
||||
grid-system.scm \
|
||||
guides-from-selection.scm \
|
||||
guides-new.scm \
|
||||
guides-new-percent.scm \
|
||||
guides-remove-all.scm \
|
||||
i26-gunya2.scm \
|
||||
land.scm \
|
||||
lava.scm \
|
||||
line-nova.scm \
|
||||
mkbrush.scm \
|
||||
neon-logo.scm \
|
||||
news-text.scm \
|
||||
old-photo.scm \
|
||||
palette-export.scm \
|
||||
paste-as-brush.scm \
|
||||
paste-as-pattern.scm \
|
||||
perspective-shadow.scm \
|
||||
predator.scm \
|
||||
pupi-button.scm \
|
||||
rendermap.scm \
|
||||
reverse-layers.scm \
|
||||
ripply-anim.scm \
|
||||
round-corners.scm \
|
||||
round-corners.scm \
|
||||
script-fu-set-cmap.scm \
|
||||
script-fu-util.scm \
|
||||
select-to-brush.scm \
|
||||
@ -87,19 +50,9 @@ scripts = \
|
||||
select-to-pattern.scm \
|
||||
selection-round.scm \
|
||||
slide.scm \
|
||||
sota-chrome-logo.scm \
|
||||
speed-text.scm \
|
||||
spinning-globe.scm \
|
||||
spyrogimp.scm \
|
||||
starscape-logo.scm \
|
||||
swirltile.scm \
|
||||
swirly-pattern.scm \
|
||||
t-o-p-logo.scm \
|
||||
text-circle.scm \
|
||||
textured-logo.scm \
|
||||
title-header.scm \
|
||||
tileblur.scm \
|
||||
truchet.scm \
|
||||
unsharp-mask.scm \
|
||||
waves-anim.scm \
|
||||
weave.scm \
|
||||
|
@ -1,189 +0,0 @@
|
||||
; GIMP - The GNU Image Manipulation Program
|
||||
; Copyright (C) 1995 Spencer Kimball and Peter Mattis
|
||||
;
|
||||
; Alien Glow themed arrows for web pages
|
||||
; Copyright (c) 1997 Adrian Likins
|
||||
; aklikins@eos.ncsu.edu
|
||||
;
|
||||
;
|
||||
; Based on code from
|
||||
; Federico Mena Quintero
|
||||
; federico@nuclecu.unam.mx
|
||||
;
|
||||
; 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 (script-fu-alien-glow-right-arrow size
|
||||
orientation
|
||||
glow-color
|
||||
bg-color
|
||||
flatten)
|
||||
|
||||
; some local helper functions, better to not define globally,
|
||||
; since otherwise the definitions could be clobbered by other scripts.
|
||||
(define (map proc seq)
|
||||
(if (null? seq)
|
||||
'()
|
||||
(cons (proc (car seq))
|
||||
(map proc (cdr seq))
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
(define (for-each proc seq)
|
||||
(if (not (null? seq))
|
||||
(begin
|
||||
(proc (car seq))
|
||||
(for-each proc (cdr seq))
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
(define (make-point x y)
|
||||
(cons x y)
|
||||
)
|
||||
|
||||
(define (point-x p)
|
||||
(car p)
|
||||
)
|
||||
|
||||
(define (point-y p)
|
||||
(cdr p)
|
||||
)
|
||||
|
||||
(define (point-list->double-array point-list)
|
||||
(define (convert points array pos)
|
||||
(if (not (null? points))
|
||||
(begin
|
||||
(aset array (* 2 pos) (point-x (car points)))
|
||||
(aset array (+ 1 (* 2 pos)) (point-y (car points)))
|
||||
(convert (cdr points) array (+ pos 1))
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
(let* (
|
||||
(how-many (length point-list))
|
||||
(a (cons-array (* 2 how-many) 'double))
|
||||
)
|
||||
(convert point-list a 0)
|
||||
a
|
||||
)
|
||||
)
|
||||
|
||||
(define (make-arrow size
|
||||
offset)
|
||||
(list (make-point offset offset)
|
||||
(make-point (- size offset) (/ size 2))
|
||||
(make-point offset (- size offset))
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
(define (rotate-points points size orientation)
|
||||
(map (lambda (p)
|
||||
(let ((px (point-x p))
|
||||
(py (point-y p)))
|
||||
(cond ((= orientation 0) (make-point px py)) ; right
|
||||
((= orientation 1) (make-point (- size px) py)) ; left
|
||||
((= orientation 2) (make-point py (- size px))) ; up
|
||||
((= orientation 3) (make-point py px)) ; down
|
||||
)
|
||||
)
|
||||
)
|
||||
points
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
; the main function
|
||||
|
||||
(let* (
|
||||
(img (car (gimp-image-new size size RGB)))
|
||||
(grow-amount (/ size 12))
|
||||
(blur-radius (/ size 3))
|
||||
(offset (/ size 6))
|
||||
(ruler-layer (car (gimp-layer-new img
|
||||
size size RGBA-IMAGE
|
||||
_"Arrow" 100 NORMAL-MODE)))
|
||||
(glow-layer (car (gimp-layer-new img
|
||||
size size RGBA-IMAGE
|
||||
_"Alien Glow" 100 NORMAL-MODE)))
|
||||
(bg-layer (car (gimp-layer-new img
|
||||
size size RGB-IMAGE
|
||||
_"Background" 100 NORMAL-MODE)))
|
||||
(big-arrow (point-list->double-array
|
||||
(rotate-points (make-arrow size offset)
|
||||
size orientation)))
|
||||
)
|
||||
|
||||
(gimp-context-push)
|
||||
(gimp-context-set-defaults)
|
||||
|
||||
(gimp-image-undo-disable img)
|
||||
;(gimp-image-resize img (+ length height) (+ height height) 0 0)
|
||||
(gimp-image-insert-layer img bg-layer 0 1)
|
||||
(gimp-image-insert-layer img glow-layer 0 -1)
|
||||
(gimp-image-insert-layer img ruler-layer 0 -1)
|
||||
|
||||
(gimp-edit-clear glow-layer)
|
||||
(gimp-edit-clear ruler-layer)
|
||||
|
||||
(gimp-image-select-polygon img CHANNEL-OP-REPLACE 6 big-arrow)
|
||||
|
||||
(gimp-context-set-foreground '(103 103 103))
|
||||
(gimp-context-set-background '(0 0 0))
|
||||
|
||||
(gimp-edit-blend ruler-layer FG-BG-RGB-MODE NORMAL-MODE
|
||||
GRADIENT-SHAPEBURST-ANGULAR 100 0 REPEAT-NONE FALSE
|
||||
FALSE 0 0 TRUE
|
||||
0 0 size size)
|
||||
|
||||
(gimp-selection-grow img grow-amount)
|
||||
(gimp-context-set-foreground glow-color)
|
||||
(gimp-edit-fill glow-layer FOREGROUND-FILL)
|
||||
|
||||
(gimp-selection-none img)
|
||||
|
||||
|
||||
(plug-in-gauss-rle RUN-NONINTERACTIVE img glow-layer blur-radius TRUE TRUE)
|
||||
|
||||
(gimp-context-set-background bg-color)
|
||||
(gimp-edit-fill bg-layer BACKGROUND-FILL)
|
||||
|
||||
(if (= flatten TRUE)
|
||||
(gimp-image-flatten img)
|
||||
)
|
||||
(gimp-image-undo-enable img)
|
||||
(gimp-display-new img)
|
||||
|
||||
(gimp-context-pop)
|
||||
)
|
||||
)
|
||||
|
||||
(script-fu-register "script-fu-alien-glow-right-arrow"
|
||||
_"_Arrow..."
|
||||
_"Create an arrow graphic with an eerie glow for web pages"
|
||||
"Adrian Likins"
|
||||
"Adrian Likins"
|
||||
"1997"
|
||||
""
|
||||
SF-ADJUSTMENT _"Size" '(32 5 150 1 10 0 1)
|
||||
SF-OPTION _"Orientation" '(_"Right" _"Left" _"Up" _"Down")
|
||||
SF-COLOR _"Glow color" '(63 252 0)
|
||||
SF-COLOR _"Background color" "black"
|
||||
SF-TOGGLE _"Flatten image" TRUE
|
||||
)
|
||||
|
||||
(script-fu-menu-register "script-fu-alien-glow-right-arrow"
|
||||
"<Image>/File/Create/Web Page Themes/Alien Glow")
|
@ -1,100 +0,0 @@
|
||||
; GIMP - The GNU Image Manipulation Program
|
||||
; Copyright (C) 1995 Spencer Kimball and Peter Mattis
|
||||
;
|
||||
; Alien Glow themed hrule for web pages
|
||||
; Copyright (c) 1997 Adrian Likins
|
||||
; aklikins@eos.ncsu.edu
|
||||
;
|
||||
;
|
||||
; 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 (script-fu-alien-glow-horizontal-ruler length
|
||||
height
|
||||
glow-color
|
||||
bg-color
|
||||
flatten)
|
||||
(let* (
|
||||
(img (car (gimp-image-new height length RGB)))
|
||||
(border (/ height 4))
|
||||
(ruler-layer (car (gimp-layer-new img
|
||||
(+ length height) (+ height height)
|
||||
RGBA-IMAGE _"Bar" 100 NORMAL-MODE)))
|
||||
(glow-layer (car (gimp-layer-new img
|
||||
(+ length height) (+ height height)
|
||||
RGBA-IMAGE _"Alien Glow" 100 NORMAL-MODE)))
|
||||
(bg-layer (car (gimp-layer-new img
|
||||
(+ length height) (+ height height)
|
||||
RGB-IMAGE _"Background" 100 NORMAL-MODE)))
|
||||
)
|
||||
|
||||
(gimp-context-push)
|
||||
(gimp-context-set-feather FALSE)
|
||||
|
||||
(gimp-image-undo-disable img)
|
||||
(gimp-image-resize img (+ length height) (+ height height) 0 0)
|
||||
(gimp-image-insert-layer img bg-layer 0 1)
|
||||
(gimp-image-insert-layer img glow-layer 0 -1)
|
||||
(gimp-image-insert-layer img ruler-layer 0 -1)
|
||||
|
||||
; (gimp-layer-set-lock-alpha ruler-layer TRUE)
|
||||
(gimp-context-set-background bg-color)
|
||||
(gimp-edit-fill bg-layer BACKGROUND-FILL)
|
||||
(gimp-edit-clear glow-layer)
|
||||
(gimp-edit-clear ruler-layer)
|
||||
|
||||
(gimp-image-select-rectangle img CHANNEL-OP-REPLACE
|
||||
(/ height 2) (/ height 2)
|
||||
length height)
|
||||
(gimp-context-set-foreground '(79 79 79))
|
||||
(gimp-context-set-background '(0 0 0))
|
||||
|
||||
(gimp-edit-blend ruler-layer FG-BG-RGB-MODE NORMAL-MODE
|
||||
GRADIENT-SHAPEBURST-ANGULAR 100 0 REPEAT-NONE FALSE
|
||||
FALSE 0 0 TRUE
|
||||
0 0 height height)
|
||||
|
||||
(gimp-context-set-foreground glow-color)
|
||||
(gimp-selection-grow img border)
|
||||
(gimp-edit-fill glow-layer FOREGROUND-FILL)
|
||||
(gimp-selection-none img)
|
||||
(plug-in-gauss-rle RUN-NONINTERACTIVE img glow-layer 25 TRUE TRUE)
|
||||
|
||||
(gimp-image-undo-enable img)
|
||||
|
||||
(if (= flatten TRUE)
|
||||
(gimp-image-flatten img))
|
||||
|
||||
(gimp-display-new img)
|
||||
|
||||
(gimp-context-pop)
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
(script-fu-register "script-fu-alien-glow-horizontal-ruler"
|
||||
_"_Hrule..."
|
||||
_"Create an Hrule graphic with an eerie glow for web pages"
|
||||
"Adrian Likins"
|
||||
"Adrian Likins"
|
||||
"1997"
|
||||
""
|
||||
SF-ADJUSTMENT _"Bar length" '(480 5 1500 1 10 0 1)
|
||||
SF-ADJUSTMENT _"Bar height" '(16 1 100 1 10 0 1)
|
||||
SF-COLOR _"Glow color" '(63 252 0)
|
||||
SF-COLOR _"Background color" "black"
|
||||
SF-TOGGLE _"Flatten image" TRUE
|
||||
)
|
||||
|
||||
(script-fu-menu-register "script-fu-alien-glow-horizontal-ruler"
|
||||
"<Image>/File/Create/Web Page Themes/Alien Glow")
|
@ -1,112 +0,0 @@
|
||||
; GIMP - The GNU Image Manipulation Program
|
||||
; Copyright (C) 1995 Spencer Kimball and Peter Mattis
|
||||
;
|
||||
; Alien Glow themed bullets for web pages
|
||||
; Copyright (c) 1997 Adrian Likins
|
||||
; aklikins@eos.ncsu.edu
|
||||
;
|
||||
; 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 (script-fu-alien-glow-bullet radius
|
||||
glow-color
|
||||
bg-color
|
||||
flatten)
|
||||
|
||||
(define (center-ellipse img cx cy rx ry op aa feather frad)
|
||||
(gimp-context-push)
|
||||
(gimp-context-set-antialias aa)
|
||||
(gimp-context-set-feather feather)
|
||||
(gimp-context-set-feather-radius frad frad)
|
||||
(gimp-image-select-ellipse img op (- cx rx) (- cy ry) (+ rx rx) (+ ry ry))
|
||||
(gimp-context-pop)
|
||||
)
|
||||
|
||||
|
||||
(let* (
|
||||
(img (car (gimp-image-new radius radius RGB)))
|
||||
(border (/ radius 4))
|
||||
(diameter (* radius 2))
|
||||
(half-radius (/ radius 2))
|
||||
(blend-start (+ half-radius (/ half-radius 2)))
|
||||
(bullet-layer (car (gimp-layer-new img
|
||||
diameter diameter RGBA-IMAGE
|
||||
_"Bullet" 100 NORMAL-MODE)))
|
||||
(glow-layer (car (gimp-layer-new img diameter diameter RGBA-IMAGE
|
||||
_"Alien Glow" 100 NORMAL-MODE)))
|
||||
(bg-layer (car (gimp-layer-new img diameter diameter RGB-IMAGE
|
||||
_"Background" 100 NORMAL-MODE)))
|
||||
)
|
||||
|
||||
(gimp-context-push)
|
||||
|
||||
(gimp-image-undo-disable img)
|
||||
(gimp-image-resize img diameter diameter 0 0)
|
||||
(gimp-image-insert-layer img bg-layer 0 1)
|
||||
(gimp-image-insert-layer img glow-layer 0 -1)
|
||||
(gimp-image-insert-layer img bullet-layer 0 -1)
|
||||
|
||||
; (gimp-layer-set-lock-alpha ruler-layer TRUE)
|
||||
(gimp-context-set-background bg-color)
|
||||
(gimp-edit-fill bg-layer BACKGROUND-FILL)
|
||||
(gimp-edit-clear glow-layer)
|
||||
(gimp-edit-clear bullet-layer)
|
||||
|
||||
(center-ellipse img radius radius half-radius half-radius
|
||||
CHANNEL-OP-REPLACE TRUE FALSE 0)
|
||||
|
||||
; (gimp-rect-select img (/ height 2) (/ height 2) length height CHANNEL-OP-REPLACE FALSE 0)
|
||||
(gimp-context-set-foreground '(90 90 90))
|
||||
(gimp-context-set-background '(0 0 0))
|
||||
|
||||
(gimp-edit-blend bullet-layer FG-BG-RGB-MODE NORMAL-MODE
|
||||
GRADIENT-RADIAL 100 0 REPEAT-NONE FALSE
|
||||
FALSE 0 0 TRUE
|
||||
blend-start blend-start
|
||||
(+ half-radius radius) (+ half-radius radius))
|
||||
|
||||
(gimp-context-set-foreground glow-color)
|
||||
(gimp-selection-grow img border)
|
||||
(gimp-selection-feather img border)
|
||||
(gimp-edit-fill glow-layer FOREGROUND-FILL)
|
||||
(gimp-selection-none img)
|
||||
(if (>= radius 16)
|
||||
(plug-in-gauss-rle RUN-NONINTERACTIVE img glow-layer 25 TRUE TRUE)
|
||||
(plug-in-gauss-rle RUN-NONINTERACTIVE img glow-layer 12 TRUE TRUE)
|
||||
)
|
||||
|
||||
(if (= flatten TRUE)
|
||||
(gimp-image-flatten img)
|
||||
)
|
||||
(gimp-image-undo-enable img)
|
||||
(gimp-display-new img)
|
||||
|
||||
(gimp-context-pop)
|
||||
)
|
||||
)
|
||||
|
||||
(script-fu-register "script-fu-alien-glow-bullet"
|
||||
_"_Bullet..."
|
||||
_"Create a bullet graphic with an eerie glow for web pages"
|
||||
"Adrian Likins"
|
||||
"Adrian Likins"
|
||||
"1997"
|
||||
""
|
||||
SF-ADJUSTMENT _"Radius" '(16 1 100 1 10 0 1)
|
||||
SF-COLOR _"Glow color" '(63 252 0)
|
||||
SF-COLOR _"Background color" "black"
|
||||
SF-TOGGLE _"Flatten image" TRUE
|
||||
)
|
||||
|
||||
(script-fu-menu-register "script-fu-alien-glow-bullet"
|
||||
"<Image>/File/Create/Web Page Themes/Alien Glow")
|
@ -1,168 +0,0 @@
|
||||
; GIMP - The GNU Image Manipulation Program
|
||||
; Copyright (C) 1995 Spencer Kimball and Peter Mattis
|
||||
;
|
||||
; Alien Glow themed button
|
||||
; Copyright (c) 1997 Adrian Likins
|
||||
; aklikins@eos.ncsu.edu
|
||||
;
|
||||
; based on code from Frederico Mena Quintero (Quartic)
|
||||
; federico@nuclecu.unam.mx
|
||||
;
|
||||
; 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 (script-fu-alien-glow-button text
|
||||
font
|
||||
size
|
||||
text-color
|
||||
glow-color
|
||||
bg-color
|
||||
padding
|
||||
glow-radius
|
||||
flatten)
|
||||
|
||||
(define (text-width extents)
|
||||
(car extents))
|
||||
|
||||
(define (text-height extents)
|
||||
(cadr extents))
|
||||
|
||||
(define (text-ascent extents)
|
||||
(caddr extents))
|
||||
|
||||
(define (text-descent extents)
|
||||
(cadr (cddr extents)))
|
||||
|
||||
(define (blend-bumpmap img
|
||||
drawable
|
||||
x1
|
||||
y1
|
||||
x2
|
||||
y2)
|
||||
(gimp-edit-blend drawable FG-BG-RGB-MODE DARKEN-ONLY-MODE
|
||||
GRADIENT-LINEAR 100 0 REPEAT-NONE FALSE
|
||||
FALSE 0 0 TRUE
|
||||
x1 y1 x2 y2)
|
||||
)
|
||||
|
||||
(let* (
|
||||
(text-extents (gimp-text-get-extents-fontname text
|
||||
size
|
||||
PIXELS
|
||||
font))
|
||||
(ascent (text-ascent text-extents))
|
||||
(descent (text-descent text-extents))
|
||||
|
||||
(img-width (+ (* 2 padding)
|
||||
(text-width text-extents)))
|
||||
(img-height (+ (* 2 padding)
|
||||
(+ ascent descent)))
|
||||
(layer-height img-height)
|
||||
(layer-width img-width)
|
||||
(img-width (+ img-width glow-radius))
|
||||
(img-height (+ img-height glow-radius))
|
||||
(img (car (gimp-image-new img-width img-height RGB)))
|
||||
(bg-layer (car (gimp-layer-new img
|
||||
img-width img-height RGBA-IMAGE
|
||||
_"Background" 100 NORMAL-MODE)))
|
||||
(glow-layer (car (gimp-layer-new img
|
||||
img-width img-height RGBA-IMAGE
|
||||
_"Glow" 100 NORMAL-MODE)))
|
||||
(button-layer (car (gimp-layer-new img
|
||||
layer-width layer-height RGBA-IMAGE
|
||||
_"Button" 100 NORMAL-MODE)))
|
||||
)
|
||||
|
||||
(gimp-context-push)
|
||||
(gimp-context-set-feather FALSE)
|
||||
|
||||
(gimp-image-undo-disable img)
|
||||
|
||||
; Create bumpmap layer
|
||||
|
||||
(gimp-image-insert-layer img bg-layer 0 -1)
|
||||
(gimp-context-set-foreground '(0 0 0))
|
||||
(gimp-context-set-background bg-color)
|
||||
(gimp-edit-fill bg-layer BACKGROUND-FILL)
|
||||
(gimp-image-insert-layer img glow-layer 0 -1)
|
||||
|
||||
; Create text layer
|
||||
|
||||
(gimp-image-insert-layer img button-layer 0 -1)
|
||||
(gimp-layer-set-offsets button-layer (/ glow-radius 2) (/ glow-radius 2))
|
||||
(gimp-selection-none img)
|
||||
(gimp-image-select-rectangle img CHANNEL-OP-REPLACE 0 0 img-width img-height)
|
||||
(gimp-context-set-foreground '(100 100 100))
|
||||
(gimp-context-set-background '(0 0 0))
|
||||
|
||||
(gimp-edit-blend button-layer FG-BG-RGB-MODE NORMAL-MODE
|
||||
GRADIENT-SHAPEBURST-ANGULAR 100 0 REPEAT-NONE FALSE
|
||||
FALSE 0 0 TRUE
|
||||
0 0 img-height img-width)
|
||||
|
||||
(gimp-edit-clear glow-layer)
|
||||
|
||||
(gimp-image-select-rectangle img
|
||||
CHANNEL-OP-REPLACE
|
||||
(/ glow-radius 4)
|
||||
(/ glow-radius 4)
|
||||
(- img-width (/ glow-radius 2))
|
||||
(- img-height (/ glow-radius 2)))
|
||||
|
||||
(gimp-context-set-foreground glow-color)
|
||||
(gimp-edit-fill glow-layer FOREGROUND-FILL)
|
||||
(gimp-selection-none img)
|
||||
(plug-in-gauss-rle RUN-NONINTERACTIVE img glow-layer glow-radius TRUE TRUE)
|
||||
(gimp-context-set-foreground text-color)
|
||||
(let (
|
||||
(textl (car (gimp-text-fontname
|
||||
img -1 0 0 text 0 TRUE size PIXELS font)))
|
||||
)
|
||||
(gimp-layer-set-offsets textl
|
||||
(+ padding (/ glow-radius 2))
|
||||
(+ (+ padding descent) (/ glow-radius 2)))
|
||||
)
|
||||
; Done
|
||||
(gimp-selection-none img)
|
||||
(gimp-image-undo-enable img)
|
||||
(if (= flatten TRUE)
|
||||
(gimp-image-flatten img)
|
||||
)
|
||||
|
||||
(gimp-display-new img)
|
||||
|
||||
(gimp-context-pop)
|
||||
)
|
||||
)
|
||||
|
||||
(script-fu-register "script-fu-alien-glow-button"
|
||||
_"B_utton..."
|
||||
_"Create a button graphic with an eerie glow for web pages"
|
||||
"Adrian Likins"
|
||||
"Adrian Likins"
|
||||
"July 1997"
|
||||
""
|
||||
SF-STRING _"Text" "Hello world!"
|
||||
SF-FONT _"Font" "Sans Bold"
|
||||
SF-ADJUSTMENT _"Font size (pixels)" '(22 2 100 1 1 0 1)
|
||||
SF-COLOR _"Text color" "black"
|
||||
SF-COLOR _"Glow color" '(63 252 0)
|
||||
SF-COLOR _"Background color" "black"
|
||||
SF-ADJUSTMENT _"Padding" '(6 1 100 1 10 0 1)
|
||||
SF-ADJUSTMENT _"Glow radius" '(10 1 200 1 10 0 1)
|
||||
SF-TOGGLE _"Flatten image" TRUE
|
||||
)
|
||||
|
||||
(script-fu-menu-register "script-fu-alien-glow-button"
|
||||
"<Image>/File/Create/Web Page Themes/Alien Glow")
|
@ -1,118 +0,0 @@
|
||||
; ALIEN-GLOW
|
||||
; Create a text effect that simulates an eerie alien glow around text
|
||||
|
||||
(define (apply-alien-glow-logo-effect img
|
||||
logo-layer
|
||||
size
|
||||
glow-color)
|
||||
(let* (
|
||||
(border (/ size 4))
|
||||
(grow (/ size 30))
|
||||
(feather (/ size 4))
|
||||
(width (car (gimp-drawable-width logo-layer)))
|
||||
(height (car (gimp-drawable-height logo-layer)))
|
||||
(bg-layer (car (gimp-layer-new img
|
||||
width height RGB-IMAGE
|
||||
"Background" 100 NORMAL-MODE)))
|
||||
(glow-layer (car (gimp-layer-new img
|
||||
width height RGBA-IMAGE
|
||||
"Alien Glow" 100 NORMAL-MODE)))
|
||||
)
|
||||
|
||||
(gimp-context-push)
|
||||
(gimp-context-set-defaults)
|
||||
|
||||
(gimp-selection-none img)
|
||||
(script-fu-util-image-resize-from-layer img logo-layer)
|
||||
(script-fu-util-image-add-layers img glow-layer bg-layer)
|
||||
(gimp-layer-set-lock-alpha logo-layer TRUE)
|
||||
(gimp-context-set-background '(0 0 0))
|
||||
(gimp-edit-fill bg-layer BACKGROUND-FILL)
|
||||
(gimp-edit-clear glow-layer)
|
||||
(gimp-image-select-item img CHANNEL-OP-REPLACE logo-layer)
|
||||
(gimp-selection-grow img grow)
|
||||
(gimp-selection-feather img feather)
|
||||
(gimp-context-set-foreground glow-color)
|
||||
(gimp-edit-fill glow-layer FOREGROUND-FILL)
|
||||
(gimp-selection-none img)
|
||||
|
||||
(gimp-context-set-background '(0 0 0))
|
||||
(gimp-context-set-foreground '(79 79 79))
|
||||
|
||||
(gimp-edit-blend logo-layer FG-BG-RGB-MODE NORMAL-MODE
|
||||
GRADIENT-SHAPEBURST-ANGULAR 100 0 REPEAT-NONE FALSE
|
||||
FALSE 0 0 TRUE
|
||||
0 0 1 1)
|
||||
|
||||
(gimp-context-pop)
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
(define (script-fu-alien-glow-logo-alpha img
|
||||
logo-layer
|
||||
size
|
||||
glow-color)
|
||||
(begin
|
||||
(gimp-image-undo-group-start img)
|
||||
(apply-alien-glow-logo-effect img logo-layer size glow-color)
|
||||
(gimp-image-undo-group-end img)
|
||||
(gimp-displays-flush)
|
||||
)
|
||||
)
|
||||
|
||||
(script-fu-register "script-fu-alien-glow-logo-alpha"
|
||||
_"Alien _Glow..."
|
||||
_"Add an eerie glow around the selected region (or alpha)"
|
||||
"Spencer Kimball"
|
||||
"Spencer Kimball"
|
||||
"1997"
|
||||
"RGBA"
|
||||
SF-IMAGE "Image" 0
|
||||
SF-DRAWABLE "Drawable" 0
|
||||
SF-ADJUSTMENT _"Glow size (pixels * 4)" '(150 2 1000 1 10 0 1)
|
||||
SF-COLOR _"Glow color" '(63 252 0)
|
||||
)
|
||||
|
||||
(script-fu-menu-register "script-fu-alien-glow-logo-alpha"
|
||||
"<Image>/Filters/Alpha to Logo")
|
||||
|
||||
|
||||
(define (script-fu-alien-glow-logo text
|
||||
size
|
||||
font
|
||||
glow-color)
|
||||
(let* (
|
||||
(img (car (gimp-image-new 256 256 RGB)))
|
||||
(border (/ size 4))
|
||||
(grow (/ size 30))
|
||||
(feather (/ size 4))
|
||||
(text-layer (car (gimp-text-fontname img
|
||||
-1 0 0 text border TRUE
|
||||
size PIXELS font)))
|
||||
(width (car (gimp-drawable-width text-layer)))
|
||||
(height (car (gimp-drawable-height text-layer)))
|
||||
)
|
||||
|
||||
(gimp-image-undo-disable img)
|
||||
(apply-alien-glow-logo-effect img text-layer size glow-color)
|
||||
(gimp-image-undo-enable img)
|
||||
(gimp-display-new img)
|
||||
)
|
||||
)
|
||||
|
||||
(script-fu-register "script-fu-alien-glow-logo"
|
||||
_"Alien _Glow..."
|
||||
_"Create a logo with an alien glow around the text"
|
||||
"Spencer Kimball"
|
||||
"Spencer Kimball"
|
||||
"1997"
|
||||
""
|
||||
SF-STRING _"Text" "ALIEN"
|
||||
SF-ADJUSTMENT _"Font size (pixels)" '(150 2 1000 1 10 0 1)
|
||||
SF-FONT _"Font" "Sans Bold"
|
||||
SF-COLOR _"Glow color" '(63 252 0)
|
||||
)
|
||||
|
||||
(script-fu-menu-register "script-fu-alien-glow-logo"
|
||||
"<Image>/File/Create/Logos")
|
@ -1,187 +0,0 @@
|
||||
; GIMP - The GNU Image Manipulation Program
|
||||
; Copyright (C) 1995 Spencer Kimball and Peter Mattis
|
||||
;
|
||||
; alien-neon-logo.scm - creates multiple outlines around the letters
|
||||
; Copyright (C) 1999-2000 Raphael Quinet <quinet@gamers.org>
|
||||
;
|
||||
; 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/>.
|
||||
;
|
||||
; 1999-12-01 First version.
|
||||
; 2000-02-19 Do not discard the layer mask so that it can still be edited.
|
||||
; 2000-03-08 Adapted the script to my gimp-edit-fill changes.
|
||||
; 2000-04-02 Split the script in two parts: one using text, one using alpha.
|
||||
; 2000-05-29 More modifications for "Alpha to Logo" using a separate function.
|
||||
;
|
||||
; To do: use a channel mask for creating the bands, instead of working in the
|
||||
; image. gimp-invert would then work on one grayscale channel instead of
|
||||
; wasting CPU cycles on three identical R, G, B channels.
|
||||
;
|
||||
|
||||
(define (apply-alien-neon-logo-effect img
|
||||
logo-layer
|
||||
fg-color
|
||||
bg-color
|
||||
band-size
|
||||
gap-size
|
||||
num-bands
|
||||
do-fade)
|
||||
(let* (
|
||||
(fade-size (- (* (+ band-size gap-size) num-bands) 1))
|
||||
(width (car (gimp-drawable-width logo-layer)))
|
||||
(height (car (gimp-drawable-height logo-layer)))
|
||||
(bg-layer (car (gimp-layer-new img width height RGB-IMAGE "Background" 100 NORMAL-MODE)))
|
||||
(bands-layer (car (gimp-layer-new img width height RGBA-IMAGE "Bands" 100 NORMAL-MODE)))
|
||||
)
|
||||
|
||||
(gimp-context-push)
|
||||
(gimp-context-set-defaults)
|
||||
|
||||
(script-fu-util-image-resize-from-layer img logo-layer)
|
||||
(script-fu-util-image-add-layers img bands-layer bg-layer)
|
||||
(gimp-selection-none img)
|
||||
(gimp-context-set-background bg-color)
|
||||
(gimp-edit-fill bg-layer BACKGROUND-FILL)
|
||||
(gimp-context-set-background '(0 0 0))
|
||||
(gimp-edit-fill bands-layer BACKGROUND-FILL)
|
||||
; The text layer is never shown: it is only used to create a selection
|
||||
(gimp-image-select-item img CHANNEL-OP-REPLACE logo-layer)
|
||||
(gimp-context-set-foreground '(255 255 255))
|
||||
(gimp-edit-fill bands-layer FOREGROUND-FILL)
|
||||
|
||||
; Create multiple outlines by growing and inverting the selection
|
||||
; The bands are black and white because they will be used as a mask.
|
||||
(while (> num-bands 0)
|
||||
(gimp-selection-grow img band-size)
|
||||
(gimp-invert bands-layer)
|
||||
(gimp-selection-grow img gap-size)
|
||||
(gimp-invert bands-layer)
|
||||
(set! num-bands (- num-bands 1))
|
||||
)
|
||||
|
||||
; The fading effect is obtained by masking the image with a gradient.
|
||||
; The gradient is created by filling a bordered selection (white->black).
|
||||
(if (= do-fade TRUE)
|
||||
(let ((bands-layer-mask (car (gimp-layer-create-mask bands-layer
|
||||
ADD-BLACK-MASK))))
|
||||
(gimp-layer-add-mask bands-layer bands-layer-mask)
|
||||
(gimp-image-select-item img CHANNEL-OP-REPLACE logo-layer)
|
||||
(gimp-selection-border img fade-size)
|
||||
(gimp-edit-fill bands-layer-mask FOREGROUND-FILL)
|
||||
(gimp-layer-remove-mask bands-layer MASK-APPLY)))
|
||||
|
||||
; Transfer the resulting grayscale bands into the layer mask.
|
||||
(let ((bands-layer-mask (car (gimp-layer-create-mask bands-layer
|
||||
ADD-BLACK-MASK))))
|
||||
(gimp-layer-add-mask bands-layer bands-layer-mask)
|
||||
(gimp-selection-none img)
|
||||
(gimp-edit-copy bands-layer)
|
||||
(gimp-floating-sel-anchor (car (gimp-edit-paste bands-layer-mask
|
||||
FALSE))))
|
||||
|
||||
; Fill the layer with the foreground color. The areas that are not
|
||||
; masked become visible.
|
||||
(gimp-context-set-foreground fg-color)
|
||||
(gimp-edit-fill bands-layer FOREGROUND-FILL)
|
||||
;; (gimp-layer-remove-mask bands-layer MASK-APPLY)
|
||||
|
||||
; Clean up and exit.
|
||||
(gimp-item-set-visible logo-layer 0)
|
||||
(gimp-image-set-active-layer img bands-layer)
|
||||
(gimp-displays-flush)
|
||||
|
||||
(gimp-context-pop)
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
(define (script-fu-alien-neon-logo-alpha img
|
||||
logo-layer
|
||||
fg-color
|
||||
bg-color
|
||||
band-size
|
||||
gap-size
|
||||
num-bands
|
||||
do-fade)
|
||||
(begin
|
||||
(gimp-image-undo-group-start img)
|
||||
(apply-alien-neon-logo-effect img logo-layer fg-color bg-color
|
||||
band-size gap-size num-bands do-fade)
|
||||
(gimp-image-undo-group-end img)
|
||||
(gimp-displays-flush)
|
||||
)
|
||||
)
|
||||
|
||||
(script-fu-register "script-fu-alien-neon-logo-alpha"
|
||||
_"Alien _Neon..."
|
||||
_"Add psychedelic outlines to the selected region (or alpha)"
|
||||
"Raphael Quinet (quinet@gamers.org)"
|
||||
"Raphael Quinet"
|
||||
"1999-2000"
|
||||
"RGBA"
|
||||
SF-IMAGE "Image" 0
|
||||
SF-DRAWABLE "Drawable" 0
|
||||
SF-COLOR _"Glow color" "green"
|
||||
SF-COLOR _"Background color" "black"
|
||||
SF-ADJUSTMENT _"Width of bands" '(2 1 60 1 10 0 0)
|
||||
SF-ADJUSTMENT _"Width of gaps" '(2 1 60 1 10 0 0)
|
||||
SF-ADJUSTMENT _"Number of bands" '(7 1 100 1 10 0 1)
|
||||
SF-TOGGLE _"Fade away" TRUE
|
||||
)
|
||||
|
||||
(script-fu-menu-register "script-fu-alien-neon-logo-alpha"
|
||||
"<Image>/Filters/Alpha to Logo")
|
||||
|
||||
|
||||
(define (script-fu-alien-neon-logo text
|
||||
size
|
||||
fontname
|
||||
fg-color
|
||||
bg-color
|
||||
band-size
|
||||
gap-size
|
||||
num-bands
|
||||
do-fade)
|
||||
(let* (
|
||||
(img (car (gimp-image-new 256 256 RGB)))
|
||||
(fade-size (- (* (+ band-size gap-size) num-bands) 1))
|
||||
(text-layer (car (gimp-text-fontname img -1 0 0 text (+ fade-size 10) TRUE size PIXELS fontname)))
|
||||
)
|
||||
(gimp-image-undo-disable img)
|
||||
(apply-alien-neon-logo-effect img text-layer fg-color bg-color
|
||||
band-size gap-size num-bands do-fade)
|
||||
(gimp-image-undo-enable img)
|
||||
(gimp-display-new img)
|
||||
)
|
||||
)
|
||||
|
||||
(script-fu-register "script-fu-alien-neon-logo"
|
||||
_"Alien _Neon..."
|
||||
_"Create a logo with psychedelic outlines around the text"
|
||||
"Raphael Quinet (quinet@gamers.org)"
|
||||
"Raphael Quinet"
|
||||
"1999-2000"
|
||||
""
|
||||
SF-STRING _"Text" "GIMP"
|
||||
SF-ADJUSTMENT _"Font size (pixels)" '(150 2 1000 1 10 0 1)
|
||||
SF-FONT _"Font" "Blippo"
|
||||
SF-COLOR _"Glow color" "green"
|
||||
SF-COLOR _"Background color" "black"
|
||||
SF-ADJUSTMENT _"Width of bands" '(2 1 60 1 10 0 0)
|
||||
SF-ADJUSTMENT _"Width of gaps" '(2 1 60 1 10 0 0)
|
||||
SF-ADJUSTMENT _"Number of bands" '(7 1 100 1 10 0 1)
|
||||
SF-TOGGLE _"Fade away" TRUE
|
||||
)
|
||||
|
||||
(script-fu-menu-register "script-fu-alien-neon-logo"
|
||||
"<Image>/File/Create/Logos")
|
@ -1,106 +0,0 @@
|
||||
; DROP-SHADOW-LOGO
|
||||
; draw the specified text over a background with a drop shadow
|
||||
|
||||
(define (apply-basic1-logo-effect img
|
||||
logo-layer
|
||||
bg-color
|
||||
text-color)
|
||||
(let* (
|
||||
(width (car (gimp-drawable-width logo-layer)))
|
||||
(height (car (gimp-drawable-height logo-layer)))
|
||||
(bg-layer (car (gimp-layer-new img width height RGBA-IMAGE "Background" 100 NORMAL-MODE)))
|
||||
(shadow-layer (car (gimp-layer-new img width height RGBA-IMAGE "Shadow" 100 MULTIPLY-MODE)))
|
||||
)
|
||||
|
||||
(gimp-context-push)
|
||||
(gimp-context-set-defaults)
|
||||
|
||||
(gimp-selection-none img)
|
||||
(script-fu-util-image-resize-from-layer img logo-layer)
|
||||
(script-fu-util-image-add-layers img shadow-layer bg-layer)
|
||||
(gimp-context-set-foreground text-color)
|
||||
(gimp-layer-set-lock-alpha logo-layer TRUE)
|
||||
(gimp-edit-fill logo-layer FOREGROUND-FILL)
|
||||
(gimp-context-set-background bg-color)
|
||||
(gimp-edit-fill bg-layer BACKGROUND-FILL)
|
||||
(gimp-edit-clear shadow-layer)
|
||||
(gimp-image-select-item img CHANNEL-OP-REPLACE logo-layer)
|
||||
(gimp-context-set-background '(0 0 0))
|
||||
(gimp-selection-feather img 7.5)
|
||||
(gimp-edit-fill shadow-layer BACKGROUND-FILL)
|
||||
(gimp-selection-none img)
|
||||
(gimp-context-set-foreground '(255 255 255))
|
||||
|
||||
(gimp-edit-blend logo-layer FG-BG-RGB-MODE MULTIPLY-MODE
|
||||
GRADIENT-RADIAL 100 20 REPEAT-NONE FALSE
|
||||
FALSE 0 0 TRUE
|
||||
0 0 width height)
|
||||
|
||||
(gimp-layer-translate shadow-layer 3 3)
|
||||
|
||||
(gimp-context-pop)
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
(define (script-fu-basic1-logo-alpha img
|
||||
logo-layer
|
||||
bg-color
|
||||
text-color)
|
||||
(begin
|
||||
(gimp-image-undo-group-start img)
|
||||
(apply-basic1-logo-effect img logo-layer bg-color text-color)
|
||||
(gimp-image-undo-group-end img)
|
||||
(gimp-displays-flush)
|
||||
)
|
||||
)
|
||||
|
||||
(script-fu-register "script-fu-basic1-logo-alpha"
|
||||
_"_Basic I..."
|
||||
_"Add a gradient effect, a drop shadow, and a background to the selected region (or alpha)"
|
||||
"Spencer Kimball"
|
||||
"Spencer Kimball"
|
||||
"1996"
|
||||
"RGBA"
|
||||
SF-IMAGE "Image" 0
|
||||
SF-DRAWABLE "Drawable" 0
|
||||
SF-COLOR _"Background color" "white"
|
||||
SF-COLOR _"Text color" '(6 6 206)
|
||||
)
|
||||
|
||||
(script-fu-menu-register "script-fu-basic1-logo-alpha"
|
||||
"<Image>/Filters/Alpha to Logo")
|
||||
|
||||
(define (script-fu-basic1-logo text
|
||||
size
|
||||
font
|
||||
bg-color
|
||||
text-color)
|
||||
(let* (
|
||||
(img (car (gimp-image-new 256 256 RGB)))
|
||||
(text-layer (car (gimp-text-fontname img -1 0 0 text 10 TRUE size PIXELS font)))
|
||||
)
|
||||
|
||||
(gimp-image-undo-disable img)
|
||||
(apply-basic1-logo-effect img text-layer bg-color text-color)
|
||||
(gimp-image-undo-enable img)
|
||||
(gimp-display-new img)
|
||||
)
|
||||
)
|
||||
|
||||
(script-fu-register "script-fu-basic1-logo"
|
||||
_"_Basic I..."
|
||||
_"Create a plain text logo with a gradient effect, a drop shadow, and a background"
|
||||
"Spencer Kimball"
|
||||
"Spencer Kimball"
|
||||
"1996"
|
||||
""
|
||||
SF-STRING _"Text" "GIMP"
|
||||
SF-ADJUSTMENT _"Font size (pixels)" '(100 2 1000 1 10 0 1)
|
||||
SF-FONT _"Font" "Dragonwick"
|
||||
SF-COLOR _"Background color" "white"
|
||||
SF-COLOR _"Text color" '(6 6 206)
|
||||
)
|
||||
|
||||
(script-fu-menu-register "script-fu-basic1-logo"
|
||||
"<Image>/File/Create/Logos")
|
@ -1,128 +0,0 @@
|
||||
; HIGHLIGHT-DROP-SHADOW-LOGO
|
||||
; draw the specified text over a background with a drop shadow and a highlight
|
||||
|
||||
(define (apply-basic2-logo-effect img
|
||||
logo-layer
|
||||
bg-color
|
||||
text-color)
|
||||
|
||||
(define (color-highlight color)
|
||||
(let (
|
||||
(r (car color))
|
||||
(g (cadr color))
|
||||
(b (caddr color))
|
||||
)
|
||||
|
||||
(set! r (+ r (* (- 255 r) 0.75)))
|
||||
(set! g (+ g (* (- 255 g) 0.75)))
|
||||
(set! b (+ b (* (- 255 b) 0.75)))
|
||||
(list r g b)
|
||||
)
|
||||
)
|
||||
|
||||
(let* (
|
||||
(width (car (gimp-drawable-width logo-layer)))
|
||||
(height (car (gimp-drawable-height logo-layer)))
|
||||
(posx (- (car (gimp-drawable-offsets logo-layer))))
|
||||
(posy (- (cadr (gimp-drawable-offsets logo-layer))))
|
||||
(bg-layer (car (gimp-layer-new img width height RGB-IMAGE "Background" 100 NORMAL-MODE)))
|
||||
(highlight-layer (car (gimp-layer-copy logo-layer TRUE)))
|
||||
(shadow-layer (car (gimp-layer-new img width height RGBA-IMAGE "Shadow" 100 MULTIPLY-MODE)))
|
||||
)
|
||||
|
||||
(gimp-context-push)
|
||||
(gimp-context-set-defaults)
|
||||
|
||||
(gimp-selection-none img)
|
||||
(script-fu-util-image-resize-from-layer img logo-layer)
|
||||
(script-fu-util-image-add-layers img highlight-layer shadow-layer bg-layer)
|
||||
(gimp-context-set-foreground text-color)
|
||||
(gimp-layer-set-lock-alpha logo-layer TRUE)
|
||||
(gimp-edit-fill logo-layer FOREGROUND-FILL)
|
||||
(gimp-edit-clear shadow-layer)
|
||||
(gimp-context-set-foreground (color-highlight text-color))
|
||||
(gimp-layer-set-lock-alpha highlight-layer TRUE)
|
||||
(gimp-edit-fill highlight-layer FOREGROUND-FILL)
|
||||
(gimp-context-set-background bg-color)
|
||||
(gimp-drawable-fill bg-layer BACKGROUND-FILL)
|
||||
(gimp-image-select-item img CHANNEL-OP-REPLACE logo-layer)
|
||||
(gimp-context-set-background '(0 0 0))
|
||||
(gimp-selection-feather img 7.5)
|
||||
(gimp-edit-fill shadow-layer BACKGROUND-FILL)
|
||||
(gimp-selection-none img)
|
||||
(gimp-context-set-foreground '(255 255 255))
|
||||
|
||||
(gimp-edit-blend logo-layer FG-BG-RGB-MODE MULTIPLY-MODE
|
||||
GRADIENT-RADIAL 100 20 REPEAT-NONE FALSE
|
||||
FALSE 0 0 TRUE
|
||||
0 0 width height)
|
||||
|
||||
(gimp-layer-translate shadow-layer 3 3)
|
||||
(gimp-layer-translate highlight-layer (- posx 2) (- posy 2))
|
||||
(gimp-item-set-name highlight-layer "Highlight")
|
||||
|
||||
(gimp-context-pop)
|
||||
)
|
||||
)
|
||||
|
||||
(define (script-fu-basic2-logo-alpha img
|
||||
logo-layer
|
||||
bg-color
|
||||
text-color)
|
||||
(begin
|
||||
(gimp-image-undo-group-start img)
|
||||
(apply-basic2-logo-effect img logo-layer bg-color text-color)
|
||||
(gimp-image-undo-group-end img)
|
||||
(gimp-displays-flush)
|
||||
)
|
||||
)
|
||||
|
||||
(script-fu-register "script-fu-basic2-logo-alpha"
|
||||
_"B_asic II..."
|
||||
_"Add a shadow and a highlight to the selected region (or alpha)"
|
||||
"Spencer Kimball"
|
||||
"Spencer Kimball"
|
||||
"1996"
|
||||
"RGBA"
|
||||
SF-IMAGE "Image" 0
|
||||
SF-DRAWABLE "Drawable" 0
|
||||
SF-COLOR _"Background color" "white"
|
||||
SF-COLOR _"Text color" '(206 6 50)
|
||||
)
|
||||
|
||||
(define (script-fu-basic2-logo text
|
||||
size
|
||||
font
|
||||
bg-color
|
||||
text-color)
|
||||
(let* (
|
||||
(img (car (gimp-image-new 256 256 RGB)))
|
||||
(text-layer (car (gimp-text-fontname img -1 0 0 text 10 TRUE size PIXELS font)))
|
||||
)
|
||||
|
||||
(gimp-image-undo-disable img)
|
||||
(apply-basic2-logo-effect img text-layer bg-color text-color)
|
||||
(gimp-image-undo-enable img)
|
||||
(gimp-display-new img)
|
||||
)
|
||||
)
|
||||
|
||||
(script-fu-menu-register "script-fu-basic2-logo-alpha"
|
||||
"<Image>/Filters/Alpha to Logo")
|
||||
|
||||
(script-fu-register "script-fu-basic2-logo"
|
||||
_"B_asic II..."
|
||||
_"Create a simple logo with a shadow and a highlight"
|
||||
"Spencer Kimball"
|
||||
"Spencer Kimball"
|
||||
"1996"
|
||||
""
|
||||
SF-STRING _"Text" "SCRIPT-FU"
|
||||
SF-ADJUSTMENT _"Font size (pixels)" '(150 2 1000 1 10 0 1)
|
||||
SF-FONT _"Font" "Sans Bold"
|
||||
SF-COLOR _"Background color" "white"
|
||||
SF-COLOR _"Text color" '(206 6 50)
|
||||
)
|
||||
|
||||
(script-fu-menu-register "script-fu-basic2-logo"
|
||||
"<Image>/File/Create/Logos")
|
@ -1,160 +0,0 @@
|
||||
; GIMP - The GNU Image Manipulation Program
|
||||
; Copyright (C) 1995 Spencer Kimball and Peter Mattis
|
||||
;
|
||||
; Button00 --- create a simple beveled Web button
|
||||
; Copyright (C) 1997 Federico Mena Quintero
|
||||
; federico@nuclecu.unam.mx
|
||||
;
|
||||
; 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/>.
|
||||
; ************************************************************************
|
||||
; Changed on Feb 4, 1999 by Piet van Oostrum <piet@cs.uu.nl>
|
||||
; For use with GIMP 1.1.
|
||||
; All calls to gimp-text-* have been converted to use the *-fontname form.
|
||||
; The corresponding parameters have been replaced by an SF-FONT parameter.
|
||||
; ************************************************************************
|
||||
|
||||
|
||||
(define (text-width extents)
|
||||
(car extents))
|
||||
|
||||
(define (text-height extents)
|
||||
(cadr extents))
|
||||
|
||||
(define (text-ascent extents)
|
||||
(caddr extents))
|
||||
|
||||
(define (text-descent extents)
|
||||
(cadr (cddr extents)))
|
||||
|
||||
(define (blend-bumpmap img
|
||||
drawable
|
||||
x1
|
||||
y1
|
||||
x2
|
||||
y2)
|
||||
(gimp-edit-blend drawable FG-BG-RGB-MODE DARKEN-ONLY-MODE
|
||||
GRADIENT-LINEAR 100 0 REPEAT-NONE FALSE
|
||||
FALSE 0 0 TRUE
|
||||
x1 y1 x2 y2))
|
||||
|
||||
(define (script-fu-button00 text
|
||||
size
|
||||
font
|
||||
ul-color
|
||||
lr-color
|
||||
text-color
|
||||
padding
|
||||
bevel-width
|
||||
pressed)
|
||||
(let* (
|
||||
(text-extents (gimp-text-get-extents-fontname text
|
||||
size
|
||||
PIXELS
|
||||
font))
|
||||
(ascent (text-ascent text-extents))
|
||||
(descent (text-descent text-extents))
|
||||
|
||||
(img-width (+ (* 2 (+ padding bevel-width))
|
||||
(text-width text-extents)))
|
||||
(img-height (+ (* 2 (+ padding bevel-width))
|
||||
(+ ascent descent)))
|
||||
|
||||
(img (car (gimp-image-new img-width img-height RGB)))
|
||||
|
||||
(bumpmap (car (gimp-layer-new img
|
||||
img-width img-height RGBA-IMAGE
|
||||
_"Bumpmap" 100 NORMAL-MODE)))
|
||||
(gradient (car (gimp-layer-new img
|
||||
img-width img-height RGBA-IMAGE
|
||||
_"Gradient" 100 NORMAL-MODE)))
|
||||
)
|
||||
|
||||
(gimp-context-push)
|
||||
(gimp-context-set-feather FALSE)
|
||||
(gimp-image-undo-disable img)
|
||||
|
||||
; Create bumpmap layer
|
||||
|
||||
(gimp-image-insert-layer img bumpmap 0 -1)
|
||||
(gimp-context-set-foreground '(0 0 0))
|
||||
(gimp-context-set-background '(255 255 255))
|
||||
(gimp-edit-fill bumpmap BACKGROUND-FILL)
|
||||
|
||||
(gimp-image-select-rectangle img CHANNEL-OP-REPLACE 0 0 bevel-width img-height)
|
||||
(blend-bumpmap img bumpmap 0 0 (- bevel-width 1) 0)
|
||||
|
||||
(gimp-image-select-rectangle img CHANNEL-OP-REPLACE 0 0 img-width bevel-width)
|
||||
(blend-bumpmap img bumpmap 0 0 0 (- bevel-width 1))
|
||||
|
||||
(gimp-image-select-rectangle img CHANNEL-OP-REPLACE (- img-width bevel-width) 0 bevel-width img-height)
|
||||
(blend-bumpmap img bumpmap (- img-width 1) 0 (- img-width bevel-width) 0)
|
||||
|
||||
(gimp-image-select-rectangle img CHANNEL-OP-REPLACE 0 (- img-height bevel-width) img-width bevel-width)
|
||||
(blend-bumpmap img bumpmap 0 (- img-height 1) 0 (- img-height bevel-width))
|
||||
|
||||
(gimp-selection-none img)
|
||||
|
||||
; Create gradient layer
|
||||
|
||||
(gimp-image-insert-layer img gradient 0 -1)
|
||||
(gimp-context-set-foreground ul-color)
|
||||
(gimp-context-set-background lr-color)
|
||||
|
||||
(gimp-edit-blend gradient FG-BG-RGB-MODE NORMAL-MODE
|
||||
GRADIENT-LINEAR 100 0 REPEAT-NONE FALSE
|
||||
FALSE 0 0 TRUE
|
||||
0 0 (- img-width 1) (- img-height 1))
|
||||
|
||||
(plug-in-bump-map RUN-NONINTERACTIVE img gradient bumpmap
|
||||
135 45 bevel-width 0 0 0 0 TRUE pressed 0)
|
||||
|
||||
; Create text layer
|
||||
|
||||
(gimp-context-set-foreground text-color)
|
||||
(let ((textl (car (gimp-text-fontname
|
||||
img -1 0 0 text 0 TRUE size PIXELS font))))
|
||||
(gimp-layer-set-offsets textl
|
||||
(+ bevel-width padding)
|
||||
(+ bevel-width padding descent)))
|
||||
|
||||
; Done
|
||||
|
||||
(gimp-selection-none img)
|
||||
(gimp-image-undo-enable img)
|
||||
(gimp-display-new img)
|
||||
|
||||
(gimp-context-pop)
|
||||
)
|
||||
)
|
||||
|
||||
(script-fu-register "script-fu-button00"
|
||||
_"Simple _Beveled Button..."
|
||||
_"Create a simple, beveled button graphic for webpages"
|
||||
"Federico Mena Quintero"
|
||||
"Federico Mena Quintero"
|
||||
"June 1997"
|
||||
""
|
||||
SF-STRING _"Text" "Hello world!"
|
||||
SF-ADJUSTMENT _"Font size (pixels)" '(16 2 100 1 1 0 1)
|
||||
SF-FONT _"Font" "Sans"
|
||||
SF-COLOR _"Upper-left color" '(0 255 127)
|
||||
SF-COLOR _"Lower-right color" '(0 127 255)
|
||||
SF-COLOR _"Text color" "black"
|
||||
SF-ADJUSTMENT _"Padding" '(2 1 100 1 10 0 1)
|
||||
SF-ADJUSTMENT _"Bevel width" '(4 1 100 1 10 0 1)
|
||||
SF-TOGGLE _"Pressed" FALSE
|
||||
)
|
||||
|
||||
(script-fu-menu-register "script-fu-button00"
|
||||
"<Image>/File/Create/Buttons")
|
@ -1,161 +0,0 @@
|
||||
; GIMP - The GNU Image Manipulation Program
|
||||
; Copyright (C) 1995 Spencer Kimball and Peter Mattis
|
||||
;
|
||||
; Beveled pattern arrow for web pages
|
||||
; Copyright (C) 1997 Federico Mena Quintero
|
||||
; federico@nuclecu.unam.mx
|
||||
;
|
||||
; 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 (script-fu-beveled-pattern-arrow size orientation pattern)
|
||||
|
||||
(define (make-point x y)
|
||||
(cons x y)
|
||||
)
|
||||
|
||||
(define (point-x p)
|
||||
(car p)
|
||||
)
|
||||
|
||||
(define (point-y p)
|
||||
(cdr p)
|
||||
)
|
||||
|
||||
(define (point-list->double-array point-list)
|
||||
(let* (
|
||||
(how-many (length point-list))
|
||||
(a (cons-array (* 2 how-many) 'double))
|
||||
(count 0)
|
||||
)
|
||||
|
||||
(for-each (lambda (p)
|
||||
(aset a (* count 2) (point-x p))
|
||||
(aset a (+ 1 (* count 2)) (point-y p))
|
||||
(set! count (+ count 1)))
|
||||
point-list
|
||||
)
|
||||
a
|
||||
)
|
||||
)
|
||||
|
||||
(define (rotate-points points size orientation)
|
||||
(map (lambda (p)
|
||||
(let ((px (point-x p))
|
||||
(py (point-y p)))
|
||||
(cond ((= orientation 0) (make-point px py)) ; right
|
||||
((= orientation 1) (make-point (- size px) py)) ; left
|
||||
((= orientation 2) (make-point py (- size px))) ; up
|
||||
((= orientation 3) (make-point py px)) ; down
|
||||
)
|
||||
)
|
||||
)
|
||||
points
|
||||
)
|
||||
)
|
||||
|
||||
(define (make-arrow size offset)
|
||||
(list (make-point offset offset)
|
||||
(make-point (- size offset) (/ size 2))
|
||||
(make-point offset (- size offset)))
|
||||
)
|
||||
|
||||
; the main function
|
||||
|
||||
(let* (
|
||||
(img (car (gimp-image-new size size RGB)))
|
||||
(background (car (gimp-layer-new img size size RGB-IMAGE _"Arrow" 100 NORMAL-MODE)))
|
||||
(bumpmap (car (gimp-layer-new img size size RGB-IMAGE _"Bumpmap" 100 NORMAL-MODE)))
|
||||
(big-arrow (point-list->double-array (rotate-points (make-arrow size 6) size orientation)))
|
||||
(med-arrow (point-list->double-array (rotate-points (make-arrow size 7) size orientation)))
|
||||
(small-arrow (point-list->double-array (rotate-points (make-arrow size 8) size orientation)))
|
||||
)
|
||||
|
||||
(gimp-context-push)
|
||||
(gimp-context-set-defaults)
|
||||
|
||||
(gimp-image-undo-disable img)
|
||||
(gimp-image-insert-layer img background 0 -1)
|
||||
(gimp-image-insert-layer img bumpmap 0 -1)
|
||||
|
||||
; Create pattern layer
|
||||
|
||||
(gimp-context-set-background '(0 0 0))
|
||||
(gimp-edit-fill background BACKGROUND-FILL)
|
||||
(gimp-context-set-pattern pattern)
|
||||
(gimp-edit-bucket-fill background PATTERN-BUCKET-FILL NORMAL-MODE 100 0 FALSE 0 0)
|
||||
|
||||
; Create bumpmap layer
|
||||
|
||||
(gimp-edit-fill bumpmap BACKGROUND-FILL)
|
||||
|
||||
(gimp-context-set-background '(127 127 127))
|
||||
(gimp-image-select-rectangle img CHANNEL-OP-REPLACE 1 1 (- size 2) (- size 2))
|
||||
(gimp-edit-fill bumpmap BACKGROUND-FILL)
|
||||
|
||||
(gimp-context-set-background '(255 255 255))
|
||||
(gimp-image-select-rectangle img CHANNEL-OP-REPLACE 2 2 (- size 4) (- size 4))
|
||||
(gimp-edit-fill bumpmap BACKGROUND-FILL)
|
||||
|
||||
(gimp-context-set-background '(127 127 127))
|
||||
(gimp-image-select-polygon img CHANNEL-OP-REPLACE 6 big-arrow)
|
||||
(gimp-edit-fill bumpmap BACKGROUND-FILL)
|
||||
|
||||
(gimp-context-set-background '(0 0 0))
|
||||
(gimp-image-select-polygon img CHANNEL-OP-REPLACE 6 med-arrow)
|
||||
(gimp-edit-fill bumpmap BACKGROUND-FILL)
|
||||
|
||||
(gimp-selection-none img)
|
||||
|
||||
; Bumpmap
|
||||
|
||||
(plug-in-bump-map RUN-NONINTERACTIVE img background bumpmap 135 45 2 0 0 0 0 TRUE FALSE 0)
|
||||
|
||||
; Darken arrow
|
||||
|
||||
(gimp-context-set-background '(255 255 255))
|
||||
(gimp-edit-fill bumpmap BACKGROUND-FILL)
|
||||
|
||||
(gimp-context-set-background '(192 192 192))
|
||||
(gimp-image-select-polygon img CHANNEL-OP-REPLACE 6 small-arrow)
|
||||
(gimp-edit-fill bumpmap BACKGROUND-FILL)
|
||||
|
||||
(gimp-selection-none img)
|
||||
|
||||
(gimp-layer-set-mode bumpmap MULTIPLY-MODE)
|
||||
|
||||
(gimp-image-flatten img)
|
||||
|
||||
(gimp-image-undo-enable img)
|
||||
(gimp-display-new img)
|
||||
|
||||
(gimp-context-pop)
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
(script-fu-register "script-fu-beveled-pattern-arrow"
|
||||
_"_Arrow..."
|
||||
_"Create a beveled pattern arrow for webpages"
|
||||
"Federico Mena Quintero"
|
||||
"Federico Mena Quintero"
|
||||
"July 1997"
|
||||
""
|
||||
SF-ADJUSTMENT _"Size" '(32 5 150 1 10 0 1)
|
||||
SF-OPTION _"Orientation" '(_"Right" _"Left" _"Up" _"Down")
|
||||
SF-PATTERN _"Pattern" "Wood"
|
||||
)
|
||||
|
||||
(script-fu-menu-register "script-fu-beveled-pattern-arrow"
|
||||
"<Image>/File/Create/Web Page Themes/Beveled Pattern")
|
@ -1,96 +0,0 @@
|
||||
; GIMP - The GNU Image Manipulation Program
|
||||
; Copyright (C) 1995 Spencer Kimball and Peter Mattis
|
||||
;
|
||||
; Beveled pattern bullet for web pages
|
||||
; Copyright (C) 1997 Federico Mena Quintero
|
||||
; federico@nuclecu.unam.mx
|
||||
;
|
||||
; 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 (script-fu-beveled-pattern-bullet diameter pattern transparent)
|
||||
(let* (
|
||||
(img (car (gimp-image-new diameter diameter RGB)))
|
||||
(background (car (gimp-layer-new img diameter diameter RGBA-IMAGE _"Bullet" 100 NORMAL-MODE)))
|
||||
(bumpmap (car (gimp-layer-new img diameter diameter RGBA-IMAGE _"Bumpmap" 100 NORMAL-MODE)))
|
||||
)
|
||||
|
||||
(gimp-context-push)
|
||||
(gimp-context-set-defaults)
|
||||
|
||||
(gimp-image-undo-disable img)
|
||||
(gimp-image-insert-layer img background 0 -1)
|
||||
(gimp-image-insert-layer img bumpmap 0 -1)
|
||||
|
||||
; Create pattern layer
|
||||
|
||||
(gimp-context-set-background '(0 0 0))
|
||||
(gimp-edit-fill background BACKGROUND-FILL)
|
||||
(gimp-context-set-pattern pattern)
|
||||
(gimp-edit-bucket-fill background PATTERN-BUCKET-FILL NORMAL-MODE 100 0 FALSE 0 0)
|
||||
|
||||
; Create bumpmap layer
|
||||
|
||||
(gimp-edit-fill bumpmap BACKGROUND-FILL)
|
||||
|
||||
(gimp-context-set-background '(127 127 127))
|
||||
(gimp-image-select-ellipse img CHANNEL-OP-REPLACE 1 1 (- diameter 2) (- diameter 2))
|
||||
(gimp-edit-fill bumpmap BACKGROUND-FILL)
|
||||
|
||||
(gimp-context-set-background '(255 255 255))
|
||||
(gimp-image-select-ellipse img CHANNEL-OP-REPLACE 2 2 (- diameter 4) (- diameter 4))
|
||||
(gimp-edit-fill bumpmap BACKGROUND-FILL)
|
||||
|
||||
(gimp-selection-none img)
|
||||
|
||||
; Bumpmap
|
||||
|
||||
(plug-in-bump-map RUN-NONINTERACTIVE img background bumpmap 135 45 2 0 0 0 0 TRUE FALSE 0)
|
||||
|
||||
; Background
|
||||
|
||||
(gimp-context-set-background '(0 0 0))
|
||||
(gimp-image-select-ellipse img CHANNEL-OP-REPLACE 0 0 diameter diameter)
|
||||
(gimp-selection-invert img)
|
||||
(gimp-edit-clear background)
|
||||
(gimp-selection-none img)
|
||||
|
||||
(gimp-image-set-active-layer img background)
|
||||
(gimp-image-remove-layer img bumpmap)
|
||||
|
||||
(if (= transparent FALSE)
|
||||
(gimp-image-flatten img))
|
||||
|
||||
(gimp-image-undo-enable img)
|
||||
(gimp-display-new img)
|
||||
|
||||
(gimp-context-pop)
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
(script-fu-register "script-fu-beveled-pattern-bullet"
|
||||
_"_Bullet..."
|
||||
_"Create a beveled pattern bullet for webpages"
|
||||
"Federico Mena Quintero"
|
||||
"Federico Mena Quintero"
|
||||
"July 1997"
|
||||
""
|
||||
SF-ADJUSTMENT _"Diameter" '(16 1 150 1 10 0 1)
|
||||
SF-PATTERN _"Pattern" "Wood"
|
||||
SF-TOGGLE _"Transparent background" FALSE
|
||||
)
|
||||
|
||||
(script-fu-menu-register "script-fu-beveled-pattern-bullet"
|
||||
"<Image>/File/Create/Web Page Themes/Beveled Pattern")
|
@ -1,135 +0,0 @@
|
||||
; GIMP - The GNU Image Manipulation Program
|
||||
; Copyright (C) 1995 Spencer Kimball and Peter Mattis
|
||||
;
|
||||
; Beveled pattern button for web pages
|
||||
; Copyright (C) 1997 Federico Mena Quintero
|
||||
; federico@nuclecu.unam.mx
|
||||
;
|
||||
; 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/>.
|
||||
; ************************************************************************
|
||||
; Changed on Feb 4, 1999 by Piet van Oostrum <piet@cs.uu.nl>
|
||||
; For use with GIMP 1.1.
|
||||
; All calls to gimp-text-* have been converted to use the *-fontname form.
|
||||
; The corresponding parameters have been replaced by an SF-FONT parameter.
|
||||
; ************************************************************************
|
||||
|
||||
(define (text-width extents)
|
||||
(car extents))
|
||||
|
||||
(define (text-height extents)
|
||||
(cadr extents))
|
||||
|
||||
(define (text-ascent extents)
|
||||
(caddr extents))
|
||||
|
||||
(define (text-descent extents)
|
||||
(cadr (cddr extents)))
|
||||
|
||||
(define (script-fu-beveled-pattern-button
|
||||
text text-size font text-color pattern pressed)
|
||||
(let* (
|
||||
(text-extents (gimp-text-get-extents-fontname
|
||||
text text-size PIXELS font))
|
||||
(ascent (text-ascent text-extents))
|
||||
(descent (text-descent text-extents))
|
||||
|
||||
(xpadding 8)
|
||||
(ypadding 6)
|
||||
|
||||
(width (+ (* 2 xpadding)
|
||||
(text-width text-extents)))
|
||||
(height (+ (* 2 ypadding)
|
||||
(+ ascent descent)))
|
||||
|
||||
(img (car (gimp-image-new width height RGB)))
|
||||
(background (car (gimp-layer-new img width height RGBA-IMAGE _"Background" 100 NORMAL-MODE)))
|
||||
(bumpmap (car (gimp-layer-new img width height RGBA-IMAGE _"Bumpmap" 100 NORMAL-MODE)))
|
||||
(textl (car
|
||||
(gimp-text-fontname
|
||||
img -1 0 0 text 0 TRUE text-size PIXELS font)))
|
||||
)
|
||||
|
||||
(gimp-context-push)
|
||||
(gimp-context-set-feather FALSE)
|
||||
|
||||
(gimp-image-undo-disable img)
|
||||
(gimp-image-insert-layer img background 0 1)
|
||||
(gimp-image-insert-layer img bumpmap 0 1)
|
||||
|
||||
; Create pattern layer
|
||||
|
||||
(gimp-context-set-background '(0 0 0))
|
||||
(gimp-edit-fill background BACKGROUND-FILL)
|
||||
(gimp-context-set-pattern pattern)
|
||||
(gimp-edit-bucket-fill background PATTERN-BUCKET-FILL NORMAL-MODE 100 0 FALSE 0 0)
|
||||
|
||||
; Create bumpmap layer
|
||||
|
||||
(gimp-edit-fill bumpmap BACKGROUND-FILL)
|
||||
|
||||
(gimp-context-set-background '(127 127 127))
|
||||
(gimp-image-select-rectangle img CHANNEL-OP-REPLACE 1 1 (- width 2) (- height 2))
|
||||
(gimp-edit-fill bumpmap BACKGROUND-FILL)
|
||||
|
||||
(gimp-context-set-background '(255 255 255))
|
||||
(gimp-image-select-rectangle img CHANNEL-OP-REPLACE 2 2 (- width 4) (- height 4))
|
||||
(gimp-edit-fill bumpmap BACKGROUND-FILL)
|
||||
|
||||
(gimp-selection-none img)
|
||||
|
||||
; Bumpmap
|
||||
|
||||
(plug-in-bump-map RUN-NONINTERACTIVE img background bumpmap 135 45 2 0 0 0 0 TRUE pressed 0)
|
||||
|
||||
; Color and position text
|
||||
|
||||
(gimp-context-set-background text-color)
|
||||
(gimp-layer-set-lock-alpha textl TRUE)
|
||||
(gimp-edit-fill textl BACKGROUND-FILL)
|
||||
|
||||
(gimp-layer-set-offsets textl
|
||||
xpadding
|
||||
(+ ypadding descent))
|
||||
|
||||
; Clean up
|
||||
|
||||
(gimp-image-set-active-layer img background)
|
||||
(gimp-image-remove-layer img bumpmap)
|
||||
(gimp-image-flatten img)
|
||||
|
||||
(gimp-image-undo-enable img)
|
||||
(gimp-display-new img)
|
||||
|
||||
(gimp-context-pop)
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
(script-fu-register "script-fu-beveled-pattern-button"
|
||||
_"B_utton..."
|
||||
_"Create a beveled pattern button for webpages"
|
||||
"Federico Mena Quintero"
|
||||
"Federico Mena Quintero"
|
||||
"July 1997"
|
||||
""
|
||||
SF-STRING _"Text" "Hello world!"
|
||||
SF-ADJUSTMENT _"Font size (pixels)" '(32 2 1000 1 10 0 1)
|
||||
SF-FONT _"Font" "Sans"
|
||||
SF-COLOR _"Text color" "black"
|
||||
SF-PATTERN _"Pattern" "Wood"
|
||||
SF-TOGGLE _"Pressed" FALSE
|
||||
)
|
||||
|
||||
(script-fu-menu-register "script-fu-beveled-pattern-button"
|
||||
"<Image>/File/Create/Web Page Themes/Beveled Pattern")
|
@ -1,121 +0,0 @@
|
||||
; GIMP - The GNU Image Manipulation Program
|
||||
; Copyright (C) 1995 Spencer Kimball and Peter Mattis
|
||||
;
|
||||
; Beveled pattern heading for web pages
|
||||
; Copyright (C) 1997 Federico Mena Quintero
|
||||
; federico@nuclecu.unam.mx
|
||||
;
|
||||
; 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/>.
|
||||
; ************************************************************************
|
||||
; Changed on Feb 4, 1999 by Piet van Oostrum <piet@cs.uu.nl>
|
||||
; For use with GIMP 1.1.
|
||||
; All calls to gimp-text-* have been converted to use the *-fontname form.
|
||||
; The corresponding parameters have been replaced by an SF-FONT parameter.
|
||||
; ************************************************************************
|
||||
|
||||
|
||||
(define (script-fu-beveled-pattern-heading
|
||||
text text-size font pattern transparent)
|
||||
(let* (
|
||||
(img (car (gimp-image-new 10 10 RGB)))
|
||||
(textl
|
||||
(car
|
||||
(gimp-text-fontname img -1 0 0 text 0 TRUE text-size PIXELS font)))
|
||||
|
||||
(width (car (gimp-drawable-width textl)))
|
||||
(height (car (gimp-drawable-height textl)))
|
||||
|
||||
(background (car (gimp-layer-new img
|
||||
width height RGBA-IMAGE
|
||||
_"Background" 100 NORMAL-MODE)))
|
||||
(bumpmap (car (gimp-layer-new img
|
||||
width height RGBA-IMAGE
|
||||
_"Bumpmap" 100 NORMAL-MODE)))
|
||||
)
|
||||
|
||||
(gimp-context-push)
|
||||
(gimp-context-set-defaults)
|
||||
|
||||
(gimp-image-undo-disable img)
|
||||
(gimp-image-resize img width height 0 0)
|
||||
(gimp-image-insert-layer img background 0 1)
|
||||
(gimp-image-insert-layer img bumpmap 0 1)
|
||||
|
||||
; Create pattern layer
|
||||
|
||||
(gimp-context-set-background '(0 0 0))
|
||||
(gimp-edit-fill background BACKGROUND-FILL)
|
||||
(gimp-context-set-pattern pattern)
|
||||
(gimp-edit-bucket-fill background
|
||||
PATTERN-BUCKET-FILL NORMAL-MODE 100 0 FALSE 0 0)
|
||||
|
||||
; Create bumpmap layer
|
||||
|
||||
(gimp-edit-fill bumpmap BACKGROUND-FILL)
|
||||
|
||||
(gimp-context-set-background '(127 127 127))
|
||||
(gimp-image-select-item img CHANNEL-OP-REPLACE textl)
|
||||
(gimp-selection-shrink img 1)
|
||||
(gimp-edit-fill bumpmap BACKGROUND-FILL)
|
||||
|
||||
(gimp-context-set-background '(255 255 255))
|
||||
(gimp-image-select-item img CHANNEL-OP-REPLACE textl)
|
||||
(gimp-selection-shrink img 2)
|
||||
(gimp-edit-fill bumpmap BACKGROUND-FILL)
|
||||
|
||||
(gimp-selection-none img)
|
||||
|
||||
; Bumpmap
|
||||
|
||||
(plug-in-bump-map RUN-NONINTERACTIVE img background bumpmap 135 45 2 0 0 0 0 TRUE FALSE 0)
|
||||
|
||||
; Clean up
|
||||
|
||||
(gimp-context-set-background '(0 0 0))
|
||||
(gimp-image-select-item img CHANNEL-OP-REPLACE textl)
|
||||
(gimp-selection-invert img)
|
||||
(gimp-edit-clear background)
|
||||
(gimp-selection-none img)
|
||||
|
||||
(gimp-image-set-active-layer img background)
|
||||
(gimp-image-remove-layer img bumpmap)
|
||||
(gimp-image-remove-layer img textl)
|
||||
|
||||
(if (= transparent FALSE)
|
||||
(gimp-image-flatten img))
|
||||
|
||||
(gimp-image-undo-enable img)
|
||||
(gimp-display-new img)
|
||||
|
||||
(gimp-context-pop)
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
(script-fu-register "script-fu-beveled-pattern-heading"
|
||||
_"H_eading..."
|
||||
_"Create a beveled pattern heading for webpages"
|
||||
"Federico Mena Quintero"
|
||||
"Federico Mena Quintero"
|
||||
"July 1997"
|
||||
""
|
||||
SF-STRING _"Text" "Hello world!"
|
||||
SF-ADJUSTMENT _"Font size (pixels)" '(72 2 200 1 1 0 1)
|
||||
SF-FONT _"Font" "Sans"
|
||||
SF-PATTERN _"Pattern" "Wood"
|
||||
SF-TOGGLE _"Transparent background" FALSE
|
||||
)
|
||||
|
||||
(script-fu-menu-register "script-fu-beveled-pattern-heading"
|
||||
"<Image>/File/Create/Web Page Themes/Beveled Pattern")
|
@ -1,89 +0,0 @@
|
||||
; GIMP - The GNU Image Manipulation Program
|
||||
; Copyright (C) 1995 Spencer Kimball and Peter Mattis
|
||||
;
|
||||
; Beveled pattern hrule for web pages
|
||||
; Copyright (C) 1997 Federico Mena Quintero
|
||||
; federico@nuclecu.unam.mx
|
||||
;
|
||||
; 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 (script-fu-beveled-pattern-hrule width height pattern)
|
||||
(let* (
|
||||
(img (car (gimp-image-new width height RGB)))
|
||||
(background (car (gimp-layer-new img
|
||||
width height RGB-IMAGE
|
||||
_"Rule" 100 NORMAL-MODE)))
|
||||
(bumpmap (car (gimp-layer-new img
|
||||
width height RGBA-IMAGE
|
||||
_"Bumpmap" 100 NORMAL-MODE)))
|
||||
)
|
||||
|
||||
(gimp-context-push)
|
||||
(gimp-context-set-feather FALSE)
|
||||
|
||||
(gimp-image-undo-disable img)
|
||||
(gimp-image-insert-layer img background 0 -1)
|
||||
(gimp-image-insert-layer img bumpmap 0 -1)
|
||||
|
||||
; Create pattern layer
|
||||
|
||||
(gimp-context-set-background '(0 0 0))
|
||||
(gimp-edit-fill background BACKGROUND-FILL)
|
||||
(gimp-context-set-pattern pattern)
|
||||
(gimp-edit-bucket-fill background PATTERN-BUCKET-FILL NORMAL-MODE 100 0 FALSE 0 0)
|
||||
|
||||
; Create bumpmap layer
|
||||
|
||||
(gimp-edit-fill bumpmap BACKGROUND-FILL)
|
||||
|
||||
(gimp-context-set-background '(127 127 127))
|
||||
(gimp-image-select-rectangle img CHANNEL-OP-REPLACE 1 1 (- width 2) (- height 2))
|
||||
(gimp-edit-fill bumpmap BACKGROUND-FILL)
|
||||
|
||||
(gimp-context-set-background '(255 255 255))
|
||||
(gimp-image-select-rectangle img CHANNEL-OP-REPLACE 2 2 (- width 4) (- height 4))
|
||||
(gimp-edit-fill bumpmap BACKGROUND-FILL)
|
||||
|
||||
(gimp-selection-none img)
|
||||
|
||||
; Bumpmap
|
||||
|
||||
(plug-in-bump-map RUN-NONINTERACTIVE img background bumpmap 135 45 2 0 0 0 0 TRUE FALSE 0)
|
||||
|
||||
(gimp-image-set-active-layer img background)
|
||||
(gimp-image-remove-layer img bumpmap)
|
||||
|
||||
(gimp-image-undo-enable img)
|
||||
(gimp-display-new img)
|
||||
|
||||
(gimp-context-pop)
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
(script-fu-register "script-fu-beveled-pattern-hrule"
|
||||
_"_Hrule..."
|
||||
_"Create a beveled pattern hrule for webpages"
|
||||
"Federico Mena Quintero"
|
||||
"Federico Mena Quintero"
|
||||
"July 1997"
|
||||
""
|
||||
SF-ADJUSTMENT _"Width" '(480 5 1500 1 10 0 1)
|
||||
SF-ADJUSTMENT _"Height" '(16 1 100 1 10 0 1)
|
||||
SF-PATTERN _"Pattern" "Wood"
|
||||
)
|
||||
|
||||
(script-fu-menu-register "script-fu-beveled-pattern-hrule"
|
||||
"<Image>/File/Create/Web Page Themes/Beveled Pattern")
|
@ -1,206 +0,0 @@
|
||||
; 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")
|
@ -1,140 +0,0 @@
|
||||
; GIMP - The GNU Image Manipulation Program
|
||||
; Copyright (C) 1995 Spencer Kimball and Peter Mattis
|
||||
;
|
||||
; 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/>.
|
||||
;
|
||||
; Bovinated Logos v0.1 04/08/98
|
||||
; by Brian McFee <keebler@wco.com>
|
||||
; Creates Cow-spotted logs.. what else?
|
||||
|
||||
(define (apply-bovinated-logo-effect img
|
||||
logo-layer
|
||||
spots-x
|
||||
spots-y
|
||||
bg-color)
|
||||
(let* (
|
||||
(width (car (gimp-drawable-width logo-layer)))
|
||||
(height (car (gimp-drawable-height logo-layer)))
|
||||
(bg-layer (car (gimp-layer-new img
|
||||
width height RGBA-IMAGE
|
||||
"Background" 100 NORMAL-MODE)))
|
||||
(blur-layer (car (gimp-layer-new img
|
||||
width height RGBA-IMAGE
|
||||
"Blur" 100 NORMAL-MODE)))
|
||||
)
|
||||
|
||||
(gimp-context-push)
|
||||
(gimp-context-set-defaults)
|
||||
|
||||
(script-fu-util-image-resize-from-layer img logo-layer)
|
||||
(script-fu-util-image-add-layers img blur-layer bg-layer)
|
||||
|
||||
(gimp-selection-all img)
|
||||
(gimp-context-set-background bg-color)
|
||||
(gimp-edit-fill bg-layer BACKGROUND-FILL)
|
||||
(gimp-selection-none img)
|
||||
|
||||
(gimp-layer-set-lock-alpha blur-layer TRUE)
|
||||
(gimp-context-set-background '(255 255 255))
|
||||
(gimp-selection-all img)
|
||||
(gimp-edit-fill blur-layer BACKGROUND-FILL)
|
||||
(gimp-edit-clear blur-layer)
|
||||
(gimp-context-set-background '(191 191 191))
|
||||
(gimp-selection-none img)
|
||||
(gimp-layer-set-lock-alpha blur-layer FALSE)
|
||||
(gimp-image-select-item img CHANNEL-OP-REPLACE logo-layer)
|
||||
(gimp-edit-fill blur-layer BACKGROUND-FILL)
|
||||
(plug-in-gauss-rle RUN-NONINTERACTIVE img blur-layer 5.0 1 1)
|
||||
(gimp-selection-none img)
|
||||
(gimp-layer-set-lock-alpha logo-layer TRUE)
|
||||
(gimp-selection-all img)
|
||||
(plug-in-solid-noise RUN-NONINTERACTIVE img logo-layer 0 0 23 1 spots-x spots-y)
|
||||
(gimp-brightness-contrast logo-layer 0 127)
|
||||
(gimp-selection-none img)
|
||||
(gimp-layer-set-lock-alpha logo-layer FALSE)
|
||||
(plug-in-bump-map RUN-NONINTERACTIVE img logo-layer blur-layer
|
||||
135 50 10 0 0 0 30 TRUE FALSE 0)
|
||||
(gimp-layer-set-offsets blur-layer 5 5)
|
||||
(gimp-invert blur-layer)
|
||||
(gimp-layer-set-opacity blur-layer 50.0)
|
||||
(gimp-image-set-active-layer img logo-layer)
|
||||
|
||||
(gimp-context-pop)
|
||||
)
|
||||
)
|
||||
|
||||
(define (script-fu-bovinated-logo-alpha img
|
||||
logo-layer
|
||||
spots-x
|
||||
spots-y
|
||||
bg-color)
|
||||
(begin
|
||||
(gimp-image-undo-group-start img)
|
||||
(apply-bovinated-logo-effect img logo-layer spots-x spots-y bg-color)
|
||||
(gimp-image-undo-group-end img)
|
||||
(gimp-displays-flush)
|
||||
)
|
||||
)
|
||||
|
||||
(script-fu-register "script-fu-bovinated-logo-alpha"
|
||||
_"Bo_vination..."
|
||||
_"Add 'cow spots' to the selected region (or alpha)"
|
||||
"Brian McFee <keebler@wco.com>"
|
||||
"Brian McFee"
|
||||
"April 1998"
|
||||
"RGBA"
|
||||
SF-IMAGE "Image" 0
|
||||
SF-DRAWABLE "Drawable" 0
|
||||
SF-ADJUSTMENT _"Spots density X" '(16 1 16 1 10 0 1)
|
||||
SF-ADJUSTMENT _"Spots density Y" '(4 1 16 1 10 0 1)
|
||||
SF-COLOR _"Background Color" "white"
|
||||
)
|
||||
|
||||
(script-fu-menu-register "script-fu-bovinated-logo-alpha"
|
||||
"<Image>/Filters/Alpha to Logo")
|
||||
|
||||
|
||||
(define (script-fu-bovinated-logo text
|
||||
size
|
||||
font
|
||||
spots-x
|
||||
spots-y
|
||||
bg-color)
|
||||
(let* ((img (car (gimp-image-new 256 256 RGB)))
|
||||
(border (/ size 4))
|
||||
(text-layer (car (gimp-text-fontname img -1 0 0 text border TRUE size PIXELS font))))
|
||||
(gimp-image-undo-disable img)
|
||||
(apply-bovinated-logo-effect img text-layer spots-x spots-y bg-color)
|
||||
(gimp-image-undo-enable img)
|
||||
(gimp-display-new img)
|
||||
)
|
||||
)
|
||||
|
||||
(script-fu-register "script-fu-bovinated-logo"
|
||||
_"Bo_vination..."
|
||||
_"Create a logo with text in the style of 'cow spots'"
|
||||
"Brian McFee <keebler@wco.com>"
|
||||
"Brian McFee"
|
||||
"April 1998"
|
||||
""
|
||||
SF-STRING _"Text" "Fear the Cow"
|
||||
SF-ADJUSTMENT _"Font size (pixels)" '(80 2 1000 1 10 0 1)
|
||||
SF-FONT _"Font" "RoostHeavy"
|
||||
SF-ADJUSTMENT _"Spots density X" '(16 1 16 1 10 0 1)
|
||||
SF-ADJUSTMENT _"Spots density Y" '(4 1 16 1 10 0 1)
|
||||
SF-COLOR _"Background color" "white"
|
||||
)
|
||||
|
||||
(script-fu-menu-register "script-fu-bovinated-logo"
|
||||
"<Image>/File/Create/Logos")
|
@ -1,111 +0,0 @@
|
||||
;
|
||||
;
|
||||
;
|
||||
; Chris Gutteridge (cjg@ecs.soton.ac.uk)
|
||||
; At ECS Dept, University of Southampton, England.
|
||||
|
||||
; 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 (script-fu-camo-pattern inSize inGrain inColor1 inColor2 inColor3 inSmooth inFlatten)
|
||||
|
||||
(let* (
|
||||
(theWidth inSize)
|
||||
(theHeight inSize)
|
||||
(theImage (car (gimp-image-new theWidth theHeight RGB)))
|
||||
(baseLayer (car (gimp-layer-new theImage theWidth theHeight RGBA-IMAGE "Background" 100 NORMAL-MODE)))
|
||||
(thickLayer 0)
|
||||
(thinLayer 0)
|
||||
(theBlur 0)
|
||||
)
|
||||
|
||||
(gimp-context-push)
|
||||
(gimp-context-set-defaults)
|
||||
|
||||
(gimp-image-insert-layer theImage baseLayer 0 0)
|
||||
|
||||
(set! thickLayer (car (gimp-layer-new theImage theWidth theHeight RGBA-IMAGE "Camo Thick Layer" 100 NORMAL-MODE)))
|
||||
(gimp-image-insert-layer theImage thickLayer 0 0)
|
||||
|
||||
(set! thinLayer (car (gimp-layer-new theImage theWidth theHeight RGBA-IMAGE "Camo Thin Layer" 100 NORMAL-MODE)))
|
||||
(gimp-image-insert-layer theImage thinLayer 0 0)
|
||||
|
||||
(gimp-selection-all theImage)
|
||||
(gimp-context-set-background inColor1)
|
||||
(gimp-drawable-fill baseLayer BACKGROUND-FILL)
|
||||
|
||||
(plug-in-solid-noise RUN-NONINTERACTIVE
|
||||
theImage thickLayer 1 0 (rand 65536) 1 inGrain inGrain)
|
||||
(plug-in-solid-noise RUN-NONINTERACTIVE
|
||||
theImage thinLayer 1 0 (rand 65536) 1 inGrain inGrain)
|
||||
(gimp-threshold thickLayer 127 255)
|
||||
(gimp-threshold thinLayer 145 255)
|
||||
|
||||
(set! theBlur (- 16 inGrain))
|
||||
|
||||
(gimp-context-set-background inColor2)
|
||||
(gimp-image-select-color theImage CHANNEL-OP-REPLACE thickLayer '(0 0 0))
|
||||
(gimp-edit-clear thickLayer)
|
||||
(gimp-selection-invert theImage)
|
||||
(gimp-edit-fill thickLayer BACKGROUND-FILL)
|
||||
(gimp-selection-none theImage)
|
||||
(if (= inSmooth TRUE)
|
||||
(script-fu-tile-blur theImage thickLayer theBlur TRUE TRUE FALSE)
|
||||
)
|
||||
|
||||
|
||||
(gimp-context-set-background inColor3)
|
||||
(gimp-image-select-color theImage CHANNEL-OP-REPLACE thinLayer '(0 0 0))
|
||||
(gimp-edit-clear thinLayer)
|
||||
(gimp-selection-invert theImage)
|
||||
(gimp-edit-fill thinLayer BACKGROUND-FILL)
|
||||
(gimp-selection-none theImage)
|
||||
(if (= inSmooth TRUE)
|
||||
(script-fu-tile-blur theImage thinLayer (/ theBlur 2) TRUE TRUE FALSE)
|
||||
)
|
||||
|
||||
|
||||
(if (= inFlatten TRUE)
|
||||
(gimp-image-flatten theImage)
|
||||
)
|
||||
|
||||
(gimp-display-new theImage)
|
||||
|
||||
(gimp-context-pop)
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
; Register the function with GIMP:
|
||||
|
||||
(script-fu-register
|
||||
"script-fu-camo-pattern"
|
||||
_"_Camouflage..."
|
||||
_"Create an image filled with a camouflage pattern"
|
||||
"Chris Gutteridge: cjg@ecs.soton.ac.uk"
|
||||
"28th April 1998"
|
||||
"Chris Gutteridge / ECS @ University of Southampton, England"
|
||||
""
|
||||
SF-ADJUSTMENT _"Image size" '(256 10 1000 1 10 0 1)
|
||||
SF-ADJUSTMENT _"Granularity" '(7 0 15 1 1 0 0)
|
||||
SF-COLOR _"Color 1" '(33 100 58)
|
||||
SF-COLOR _"Color 2" '(170 170 60)
|
||||
SF-COLOR _"Color 3" '(150 115 100)
|
||||
SF-TOGGLE _"Smooth" FALSE
|
||||
SF-TOGGLE _"Flatten image" TRUE
|
||||
)
|
||||
|
||||
|
||||
(script-fu-menu-register "script-fu-camo-pattern"
|
||||
"<Image>/File/Create/Patterns")
|
@ -1,179 +0,0 @@
|
||||
; CARVE-TEXT
|
||||
; Carving, embossing, & stamping
|
||||
; Process taken from "The Photoshop 3 WOW! Book"
|
||||
; http://www.peachpit.com
|
||||
|
||||
|
||||
(define (carve-brush brush-size)
|
||||
(cond ((<= brush-size 5) "Circle (05)")
|
||||
((<= brush-size 7) "Circle (07)")
|
||||
((<= brush-size 9) "Circle (09)")
|
||||
((<= brush-size 11) "Circle (11)")
|
||||
((<= brush-size 13) "Circle (13)")
|
||||
((<= brush-size 15) "Circle (15)")
|
||||
((<= brush-size 17) "Circle (17)")
|
||||
((> brush-size 17) "Circle (19)")))
|
||||
|
||||
(define (carve-scale val scale)
|
||||
(* (sqrt val) scale))
|
||||
|
||||
(define (calculate-inset-gamma img layer)
|
||||
(let* ((stats (gimp-histogram layer 0 0 255))
|
||||
(mean (car stats)))
|
||||
(cond ((< mean 127) (+ 1.0 (* 0.5 (/ (- 127 mean) 127.0))))
|
||||
((>= mean 127) (- 1.0 (* 0.5 (/ (- mean 127) 127.0)))))))
|
||||
|
||||
(define (script-fu-carved-logo text size font bg-img carve-raised padding)
|
||||
(let* (
|
||||
(img (car (gimp-file-load 1 bg-img bg-img)))
|
||||
(offx (carve-scale size 0.33))
|
||||
(offy (carve-scale size 0.25))
|
||||
(feather (carve-scale size 0.3))
|
||||
(brush-size (carve-scale size 0.3))
|
||||
(b-size (+ (carve-scale size 0.5) padding))
|
||||
(layer1 (car (gimp-image-get-active-drawable img)))
|
||||
(mask-layer (car (gimp-text-fontname img -1 0 0 text b-size TRUE size PIXELS font)))
|
||||
(width (car (gimp-drawable-width mask-layer)))
|
||||
(height (car (gimp-drawable-height mask-layer)))
|
||||
(mask-fs 0)
|
||||
(mask (car (gimp-channel-new img width height "Engraving Mask" 50 '(0 0 0))))
|
||||
(inset-gamma (calculate-inset-gamma img layer1))
|
||||
(mask-fat 0)
|
||||
(mask-emboss 0)
|
||||
(mask-highlight 0)
|
||||
(mask-shadow 0)
|
||||
(shadow-layer 0)
|
||||
(highlight-layer 0)
|
||||
(cast-shadow-layer 0)
|
||||
(csl-mask 0)
|
||||
(inset-layer 0)
|
||||
(il-mask 0)
|
||||
)
|
||||
|
||||
(gimp-context-push)
|
||||
(gimp-context-set-defaults)
|
||||
|
||||
(gimp-image-undo-disable img)
|
||||
|
||||
(gimp-image-set-filename img "")
|
||||
|
||||
(gimp-image-insert-channel img mask -1 0)
|
||||
|
||||
(gimp-layer-set-lock-alpha mask-layer TRUE)
|
||||
(gimp-context-set-background '(255 255 255))
|
||||
(gimp-edit-fill mask-layer BACKGROUND-FILL)
|
||||
(gimp-context-set-background '(0 0 0))
|
||||
(gimp-edit-fill mask BACKGROUND-FILL)
|
||||
|
||||
(plug-in-tile RUN-NONINTERACTIVE img layer1 width height FALSE)
|
||||
|
||||
(gimp-edit-copy mask-layer)
|
||||
(set! mask-fs (car (gimp-edit-paste mask FALSE)))
|
||||
(gimp-floating-sel-anchor mask-fs)
|
||||
(if (= carve-raised TRUE)
|
||||
(gimp-invert mask)
|
||||
)
|
||||
|
||||
(gimp-image-remove-layer img mask-layer)
|
||||
|
||||
(set! mask-fat (car (gimp-channel-copy mask)))
|
||||
(gimp-image-insert-channel img mask-fat -1 0)
|
||||
(gimp-image-select-item img CHANNEL-OP-REPLACE mask-fat)
|
||||
(gimp-context-set-brush (carve-brush brush-size))
|
||||
(gimp-context-set-foreground '(255 255 255))
|
||||
(gimp-edit-stroke mask-fat)
|
||||
(gimp-selection-none img)
|
||||
|
||||
(set! mask-emboss (car (gimp-channel-copy mask-fat)))
|
||||
(gimp-image-insert-channel img mask-emboss -1 0)
|
||||
(plug-in-gauss-rle RUN-NONINTERACTIVE img mask-emboss feather TRUE TRUE)
|
||||
(plug-in-emboss RUN-NONINTERACTIVE img mask-emboss 315.0 45.0 7 TRUE)
|
||||
|
||||
(gimp-context-set-background '(180 180 180))
|
||||
(gimp-image-select-item img CHANNEL-OP-REPLACE mask-fat)
|
||||
(gimp-selection-invert img)
|
||||
(gimp-edit-fill mask-emboss BACKGROUND-FILL)
|
||||
(gimp-image-select-item img CHANNEL-OP-REPLACE mask)
|
||||
(gimp-edit-fill mask-emboss BACKGROUND-FILL)
|
||||
(gimp-selection-none img)
|
||||
|
||||
(set! mask-highlight (car (gimp-channel-copy mask-emboss)))
|
||||
(gimp-image-insert-channel img mask-highlight -1 0)
|
||||
(gimp-levels mask-highlight 0 180 255 1.0 0 255)
|
||||
|
||||
(set! mask-shadow mask-emboss)
|
||||
(gimp-levels mask-shadow 0 0 180 1.0 0 255)
|
||||
|
||||
(gimp-edit-copy mask-shadow)
|
||||
(set! shadow-layer (car (gimp-edit-paste layer1 FALSE)))
|
||||
(gimp-floating-sel-to-layer shadow-layer)
|
||||
(gimp-layer-set-mode shadow-layer MULTIPLY-MODE)
|
||||
|
||||
(gimp-edit-copy mask-highlight)
|
||||
(set! highlight-layer (car (gimp-edit-paste shadow-layer FALSE)))
|
||||
(gimp-floating-sel-to-layer highlight-layer)
|
||||
(gimp-layer-set-mode highlight-layer SCREEN-MODE)
|
||||
|
||||
(gimp-edit-copy mask)
|
||||
(set! cast-shadow-layer (car (gimp-edit-paste highlight-layer FALSE)))
|
||||
(gimp-floating-sel-to-layer cast-shadow-layer)
|
||||
(gimp-layer-set-mode cast-shadow-layer MULTIPLY-MODE)
|
||||
(gimp-layer-set-opacity cast-shadow-layer 75)
|
||||
(plug-in-gauss-rle RUN-NONINTERACTIVE img cast-shadow-layer feather TRUE TRUE)
|
||||
(gimp-layer-translate cast-shadow-layer offx offy)
|
||||
|
||||
(set! csl-mask (car (gimp-layer-create-mask cast-shadow-layer ADD-BLACK-MASK)))
|
||||
(gimp-layer-add-mask cast-shadow-layer csl-mask)
|
||||
(gimp-image-select-item img CHANNEL-OP-REPLACE mask)
|
||||
(gimp-context-set-background '(255 255 255))
|
||||
(gimp-edit-fill csl-mask BACKGROUND-FILL)
|
||||
|
||||
(set! inset-layer (car (gimp-layer-copy layer1 TRUE)))
|
||||
(gimp-image-insert-layer img inset-layer 0 1)
|
||||
|
||||
(set! il-mask (car (gimp-layer-create-mask inset-layer ADD-BLACK-MASK)))
|
||||
(gimp-layer-add-mask inset-layer il-mask)
|
||||
(gimp-image-select-item img CHANNEL-OP-REPLACE mask)
|
||||
(gimp-context-set-background '(255 255 255))
|
||||
(gimp-edit-fill il-mask BACKGROUND-FILL)
|
||||
(gimp-selection-none img)
|
||||
|
||||
(gimp-levels inset-layer 0 0 255 inset-gamma 0 255)
|
||||
|
||||
(gimp-image-remove-channel img mask)
|
||||
(gimp-image-remove-channel img mask-fat)
|
||||
(gimp-image-remove-channel img mask-highlight)
|
||||
(gimp-image-remove-channel img mask-shadow)
|
||||
|
||||
(gimp-item-set-name layer1 _"Carved Surface")
|
||||
(gimp-item-set-name shadow-layer _"Bevel Shadow")
|
||||
(gimp-item-set-name highlight-layer _"Bevel Highlight")
|
||||
(gimp-item-set-name cast-shadow-layer _"Cast Shadow")
|
||||
(gimp-item-set-name inset-layer _"Inset")
|
||||
|
||||
(gimp-display-new img)
|
||||
(gimp-image-undo-enable img)
|
||||
|
||||
(gimp-context-pop)
|
||||
)
|
||||
)
|
||||
|
||||
(script-fu-register "script-fu-carved-logo"
|
||||
_"Carved..."
|
||||
_"Create a logo with text raised above or carved in to the specified background image"
|
||||
"Spencer Kimball"
|
||||
"Spencer Kimball"
|
||||
"1997"
|
||||
""
|
||||
SF-STRING _"Text" "Marble"
|
||||
SF-ADJUSTMENT _"Font size (pixels)" '(100 2 1000 1 10 0 1)
|
||||
SF-FONT _"Font" "Engraver"
|
||||
SF-FILENAME _"Background Image"
|
||||
(string-append gimp-data-directory
|
||||
"/scripts/images/texture3.jpg")
|
||||
SF-TOGGLE _"Carve raised text" FALSE
|
||||
SF-ADJUSTMENT _"Padding around text" '(10 0 1000 1 10 0 1)
|
||||
)
|
||||
|
||||
(script-fu-menu-register "script-fu-carved-logo"
|
||||
"<Image>/File/Create/Logos")
|
@ -1,136 +0,0 @@
|
||||
; GIMP - The GNU Image Manipulation Program
|
||||
; Copyright (C) 1995 Spencer Kimball and Peter Mattis
|
||||
;
|
||||
; 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/>.
|
||||
;
|
||||
; chalk.scm version 0.11 10/10/97
|
||||
;
|
||||
; Copyright (C) 1997 Manish Singh <msingh@uclink4.berkeley.edu>
|
||||
;
|
||||
; Makes a logo with a chalk-like text effect.
|
||||
|
||||
(define (apply-chalk-logo-effect img
|
||||
logo-layer
|
||||
bg-color)
|
||||
(let* (
|
||||
(width (car (gimp-drawable-width logo-layer)))
|
||||
(height (car (gimp-drawable-height logo-layer)))
|
||||
(bg-layer (car (gimp-layer-new img
|
||||
width height RGB-IMAGE
|
||||
"Background" 100 NORMAL-MODE)))
|
||||
)
|
||||
|
||||
(gimp-context-push)
|
||||
(gimp-context-set-feather FALSE)
|
||||
|
||||
(gimp-selection-none img)
|
||||
(script-fu-util-image-resize-from-layer img logo-layer)
|
||||
(script-fu-util-image-add-layers img bg-layer)
|
||||
(gimp-context-set-background bg-color)
|
||||
(gimp-edit-fill bg-layer BACKGROUND-FILL)
|
||||
|
||||
; the actual effect
|
||||
(gimp-layer-set-lock-alpha logo-layer FALSE)
|
||||
(plug-in-gauss-rle RUN-NONINTERACTIVE img logo-layer 2.0 1 1)
|
||||
(plug-in-spread RUN-NONINTERACTIVE img logo-layer 5.0 5.0)
|
||||
(plug-in-ripple RUN-NONINTERACTIVE img logo-layer 27 2 0 0 0 TRUE TRUE)
|
||||
(plug-in-ripple RUN-NONINTERACTIVE img logo-layer 27 2 1 0 0 TRUE TRUE)
|
||||
|
||||
; sobel doesn't work on a layer with transparency, so merge layers:
|
||||
(let ((logo-layer
|
||||
(car (gimp-image-merge-down img logo-layer EXPAND-AS-NECESSARY))))
|
||||
(plug-in-sobel RUN-NONINTERACTIVE img logo-layer TRUE TRUE TRUE)
|
||||
(gimp-levels logo-layer 0 0 120 3.5 0 255)
|
||||
|
||||
; work-around for sobel edge detect screw-up (why does this happen?)
|
||||
; the top line of the image has some garbage instead of the bgcolor
|
||||
(gimp-image-select-rectangle img CHANNEL-OP-ADD 0 0 width 1)
|
||||
(gimp-edit-clear logo-layer)
|
||||
)
|
||||
|
||||
(gimp-selection-none img)
|
||||
|
||||
(gimp-context-pop)
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
(define (script-fu-chalk-logo-alpha img
|
||||
logo-layer
|
||||
bg-color)
|
||||
(begin
|
||||
(gimp-image-undo-group-start img)
|
||||
(apply-chalk-logo-effect img logo-layer bg-color)
|
||||
(gimp-image-undo-group-end img)
|
||||
(gimp-displays-flush)
|
||||
)
|
||||
)
|
||||
|
||||
(script-fu-register "script-fu-chalk-logo-alpha"
|
||||
_"_Chalk..."
|
||||
_"Create a chalk drawing effect for the selected region (or alpha)"
|
||||
"Manish Singh <msingh@uclink4.berkeley.edu>"
|
||||
"Manish Singh"
|
||||
"October 1997"
|
||||
"RGBA"
|
||||
SF-IMAGE "Image" 0
|
||||
SF-DRAWABLE "Drawable" 0
|
||||
SF-COLOR _"Background color" "black"
|
||||
)
|
||||
|
||||
(script-fu-menu-register "script-fu-chalk-logo-alpha"
|
||||
"<Image>/Filters/Alpha to Logo")
|
||||
|
||||
|
||||
(define (script-fu-chalk-logo text
|
||||
size
|
||||
font
|
||||
bg-color
|
||||
chalk-color)
|
||||
(let* (
|
||||
(img (car (gimp-image-new 256 256 RGB)))
|
||||
(border (/ size 4))
|
||||
(text-layer (car (gimp-text-fontname img -1 0 0 text border TRUE size PIXELS font)))
|
||||
)
|
||||
|
||||
(gimp-context-push)
|
||||
|
||||
(gimp-image-undo-disable img)
|
||||
(gimp-context-set-foreground chalk-color)
|
||||
(gimp-layer-set-lock-alpha text-layer TRUE)
|
||||
(gimp-edit-fill text-layer FOREGROUND-FILL)
|
||||
(apply-chalk-logo-effect img text-layer bg-color)
|
||||
(gimp-image-undo-enable img)
|
||||
(gimp-display-new img)
|
||||
|
||||
(gimp-context-pop)
|
||||
)
|
||||
)
|
||||
|
||||
(script-fu-register "script-fu-chalk-logo"
|
||||
_"_Chalk..."
|
||||
_"Create a logo resembling chalk scribbled on a blackboard"
|
||||
"Manish Singh <msingh@uclink4.berkeley.edu>"
|
||||
"Manish Singh"
|
||||
"October 1997"
|
||||
""
|
||||
SF-STRING _"Text" "CHALK"
|
||||
SF-ADJUSTMENT _"Font size (pixels)" '(150 2 1000 1 10 0 1)
|
||||
SF-FONT _"Font" "Sans"
|
||||
SF-COLOR _"Background color" "black"
|
||||
SF-COLOR _"Chalk color" "white"
|
||||
)
|
||||
|
||||
(script-fu-menu-register "script-fu-chalk-logo"
|
||||
"<Image>/File/Create/Logos")
|
@ -1,206 +0,0 @@
|
||||
; GIMP - The GNU Image Manipulation Program
|
||||
; Copyright (C) 1995 Spencer Kimball and Peter Mattis
|
||||
;
|
||||
; Supposed to look vaguely like roughly carved wood. Chipped away if you will.
|
||||
;
|
||||
; Options: Text String - the string to make the logo from
|
||||
; Font - which font to use
|
||||
; Font Size - how big
|
||||
; Chip Amount - how rought he chipping is (how spread the bump map is)
|
||||
; Blur Amount - the bump layer is blurred slighty by this amount
|
||||
; Invert - whether or not to invert the bumpmap (gives a carved in feel)
|
||||
; Drop Shadow - whether or not to draw a drop shadow
|
||||
; Keep bump layer? - whether to keep the layer used as the bump map
|
||||
; fill bg with pattern? - whether to fill the background with the pattern or leave it white
|
||||
; Keep Background - whether or not to remove the background layer
|
||||
;
|
||||
; Adrian Likins (Adrian@gimp.org)
|
||||
; Jan 11, 1998 v1
|
||||
;
|
||||
; see http://www.gimp.org/~adrian/script.html
|
||||
;
|
||||
; 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/>.
|
||||
;
|
||||
; Some suggested patterns: Dried mud, 3D green, Slate
|
||||
;
|
||||
|
||||
(define (apply-chip-away-logo-effect img
|
||||
logo-layer
|
||||
spread-amount
|
||||
blur-amount
|
||||
invert
|
||||
drop-shadow
|
||||
keep-bump
|
||||
bg-fill
|
||||
keep-back
|
||||
pattern)
|
||||
(let* (
|
||||
(width (car (gimp-drawable-width logo-layer)))
|
||||
(height (car (gimp-drawable-height logo-layer)))
|
||||
(bg-layer (car (gimp-layer-new img width height RGB-IMAGE "Background" 100 NORMAL-MODE)))
|
||||
(bump-layer (car (gimp-layer-new img width height RGBA-IMAGE "Bump Layer" 100 NORMAL-MODE)))
|
||||
)
|
||||
|
||||
(gimp-context-push)
|
||||
(gimp-context-set-defaults)
|
||||
|
||||
(script-fu-util-image-resize-from-layer img logo-layer)
|
||||
(script-fu-util-image-add-layers img bump-layer bg-layer)
|
||||
(gimp-layer-set-lock-alpha logo-layer TRUE)
|
||||
(gimp-context-set-pattern pattern)
|
||||
|
||||
(gimp-context-set-background '(255 255 255))
|
||||
(gimp-selection-all img)
|
||||
|
||||
(if (= bg-fill TRUE)
|
||||
(gimp-edit-bucket-fill bg-layer
|
||||
PATTERN-BUCKET-FILL NORMAL-MODE
|
||||
100 255 FALSE 1 1)
|
||||
(gimp-edit-fill bg-layer BACKGROUND-FILL)
|
||||
)
|
||||
|
||||
(gimp-selection-all img)
|
||||
(gimp-edit-clear bump-layer)
|
||||
(gimp-selection-none img)
|
||||
(gimp-image-select-item img CHANNEL-OP-REPLACE logo-layer)
|
||||
(gimp-edit-fill bump-layer BACKGROUND-FILL)
|
||||
(gimp-edit-bucket-fill logo-layer
|
||||
PATTERN-BUCKET-FILL NORMAL-MODE 100 255 FALSE 1 1)
|
||||
(gimp-selection-none img)
|
||||
|
||||
(gimp-layer-set-lock-alpha bump-layer FALSE)
|
||||
(plug-in-spread RUN-NONINTERACTIVE img bump-layer spread-amount spread-amount)
|
||||
(gimp-image-select-item img CHANNEL-OP-REPLACE bump-layer)
|
||||
(plug-in-gauss-rle RUN-NONINTERACTIVE img bump-layer blur-amount TRUE TRUE)
|
||||
|
||||
(gimp-selection-none img)
|
||||
|
||||
(plug-in-bump-map RUN-NONINTERACTIVE img logo-layer bump-layer
|
||||
135.00 25.0 60 0 0 0 0 TRUE invert 1)
|
||||
|
||||
(gimp-item-set-visible bump-layer FALSE)
|
||||
|
||||
(if (= drop-shadow TRUE)
|
||||
(begin
|
||||
(let* ((shadow-layer (car (gimp-layer-new img width height RGBA-IMAGE "Shadow layer" 100 NORMAL-MODE))))
|
||||
(gimp-image-set-active-layer img logo-layer)
|
||||
(script-fu-util-image-add-layers img shadow-layer)
|
||||
(gimp-selection-all img)
|
||||
(gimp-edit-clear shadow-layer)
|
||||
(gimp-selection-none img)
|
||||
(gimp-image-select-item img CHANNEL-OP-REPLACE logo-layer)
|
||||
(gimp-context-set-background '(0 0 0))
|
||||
(gimp-edit-fill shadow-layer BACKGROUND-FILL)
|
||||
(gimp-selection-none img)
|
||||
(plug-in-gauss-rle RUN-NONINTERACTIVE img shadow-layer 5 TRUE TRUE)
|
||||
(gimp-layer-translate shadow-layer 6 6))))
|
||||
|
||||
(if (= keep-bump FALSE)
|
||||
(gimp-image-remove-layer img bump-layer))
|
||||
|
||||
(if (= keep-back FALSE)
|
||||
(gimp-image-remove-layer img bg-layer))
|
||||
|
||||
(gimp-context-pop)
|
||||
)
|
||||
)
|
||||
|
||||
(define (script-fu-chip-away-logo-alpha img
|
||||
logo-layer
|
||||
spread-amount
|
||||
blur-amount
|
||||
invert
|
||||
drop-shadow
|
||||
keep-bump
|
||||
bg-fill
|
||||
keep-back
|
||||
pattern)
|
||||
(begin
|
||||
(gimp-image-undo-group-start img)
|
||||
(apply-chip-away-logo-effect img logo-layer spread-amount blur-amount
|
||||
invert drop-shadow keep-bump bg-fill
|
||||
keep-back pattern)
|
||||
(gimp-image-undo-group-end img)
|
||||
(gimp-displays-flush)
|
||||
)
|
||||
)
|
||||
|
||||
(script-fu-register "script-fu-chip-away-logo-alpha"
|
||||
_"Chip Awa_y..."
|
||||
_"Add a chipped woodcarving effect to the selected region (or alpha)"
|
||||
"Adrian Likins <adrian@gimp.org>"
|
||||
"Adrian Likins <adrian@gimp.org>"
|
||||
"1997"
|
||||
"RGBA"
|
||||
SF-IMAGE "Image" 0
|
||||
SF-DRAWABLE "Drawable" 0
|
||||
SF-ADJUSTMENT _"Chip amount" '(30 0 200 1 10 0 1)
|
||||
SF-ADJUSTMENT _"Blur amount" '(3 1 100 1 10 1 0)
|
||||
SF-TOGGLE _"Invert" FALSE
|
||||
SF-TOGGLE _"Drop shadow" TRUE
|
||||
SF-TOGGLE _"Keep bump layer" FALSE
|
||||
SF-TOGGLE _"Fill BG with pattern" TRUE
|
||||
SF-TOGGLE _"Keep background" TRUE
|
||||
SF-PATTERN _"Pattern" "Burlwood"
|
||||
)
|
||||
|
||||
(script-fu-menu-register "script-fu-chip-away-logo-alpha"
|
||||
"<Image>/Filters/Alpha to Logo")
|
||||
|
||||
|
||||
(define (script-fu-chip-away-logo text
|
||||
font
|
||||
font-size
|
||||
spread-amount
|
||||
blur-amount
|
||||
invert
|
||||
drop-shadow
|
||||
keep-bump
|
||||
bg-fill
|
||||
keep-back
|
||||
pattern)
|
||||
(let* ((img (car (gimp-image-new 256 256 RGB)))
|
||||
(text-layer (car (gimp-text-fontname img -1 0 0
|
||||
text 30 TRUE font-size PIXELS font))))
|
||||
(gimp-image-undo-disable img)
|
||||
(apply-chip-away-logo-effect img text-layer spread-amount blur-amount
|
||||
invert drop-shadow keep-bump bg-fill
|
||||
keep-back pattern)
|
||||
(gimp-image-undo-enable img)
|
||||
(gimp-display-new img)
|
||||
)
|
||||
)
|
||||
|
||||
(script-fu-register "script-fu-chip-away-logo"
|
||||
_"Chip Awa_y..."
|
||||
_"Create a logo resembling a chipped wood carving"
|
||||
"Adrian Likins <adrian@gimp.org>"
|
||||
"Adrian Likins <adrian@gimp.org>"
|
||||
"1997"
|
||||
""
|
||||
SF-STRING _"Text" "Sloth"
|
||||
SF-FONT _"Font" "RoostHeavy"
|
||||
SF-ADJUSTMENT _"Font size (pixels)" '(200 2 1000 1 10 0 1)
|
||||
SF-ADJUSTMENT _"Chip amount" '(30 0 200 1 10 0 1)
|
||||
SF-ADJUSTMENT _"Blur amount" '(3 1 100 1 10 1 0)
|
||||
SF-TOGGLE _"Invert" FALSE
|
||||
SF-TOGGLE _"Drop shadow" TRUE
|
||||
SF-TOGGLE _"Keep bump layer" FALSE
|
||||
SF-TOGGLE _"Fill BG with pattern" TRUE
|
||||
SF-TOGGLE _"Keep background" TRUE
|
||||
SF-PATTERN _"Pattern" "Burlwood"
|
||||
)
|
||||
|
||||
(script-fu-menu-register "script-fu-chip-away-logo"
|
||||
"<Image>/File/Create/Logos")
|
@ -1,133 +0,0 @@
|
||||
; CHROME-LOGOS
|
||||
|
||||
(define (apply-chrome-logo-effect img
|
||||
logo-layer
|
||||
offsets
|
||||
bg-color)
|
||||
(let* (
|
||||
(offx1 (* offsets 0.4))
|
||||
(offy1 (* offsets 0.3))
|
||||
(offx2 (* offsets (- 0.4)))
|
||||
(offy2 (* offsets (- 0.3)))
|
||||
(feather (* offsets 0.5))
|
||||
(width (car (gimp-drawable-width logo-layer)))
|
||||
(height (car (gimp-drawable-height logo-layer)))
|
||||
(layer1 (car (gimp-layer-new img width height RGBA-IMAGE "Layer 1" 100 DIFFERENCE-MODE)))
|
||||
(layer2 (car (gimp-layer-new img width height RGBA-IMAGE "Layer 2" 100 DIFFERENCE-MODE)))
|
||||
(layer3 (car (gimp-layer-new img width height RGBA-IMAGE "Layer 3" 100 NORMAL-MODE)))
|
||||
(shadow (car (gimp-layer-new img width height RGBA-IMAGE "Drop Shadow" 100 NORMAL-MODE)))
|
||||
(background (car (gimp-layer-new img width height RGB-IMAGE "Background" 100 NORMAL-MODE)))
|
||||
(layer-mask (car (gimp-layer-create-mask layer1 ADD-BLACK-MASK)))
|
||||
)
|
||||
|
||||
(gimp-context-push)
|
||||
(gimp-context-set-defaults)
|
||||
|
||||
(script-fu-util-image-resize-from-layer img logo-layer)
|
||||
(script-fu-util-image-add-layers img layer1 layer2 layer3 shadow background)
|
||||
(gimp-context-set-background '(255 255 255))
|
||||
(gimp-selection-none img)
|
||||
(gimp-edit-fill layer1 BACKGROUND-FILL)
|
||||
(gimp-edit-fill layer2 BACKGROUND-FILL)
|
||||
(gimp-edit-fill layer3 BACKGROUND-FILL)
|
||||
(gimp-edit-clear shadow)
|
||||
(gimp-image-select-item img CHANNEL-OP-REPLACE logo-layer)
|
||||
(gimp-item-set-visible logo-layer FALSE)
|
||||
(gimp-item-set-visible shadow FALSE)
|
||||
(gimp-item-set-visible background FALSE)
|
||||
(gimp-context-set-background '(0 0 0))
|
||||
(gimp-edit-fill layer1 BACKGROUND-FILL)
|
||||
(gimp-selection-translate img offx1 offy1)
|
||||
(gimp-selection-feather img feather)
|
||||
(gimp-edit-fill layer2 BACKGROUND-FILL)
|
||||
(gimp-selection-translate img (* 2 offx2) (* 2 offy2))
|
||||
(gimp-edit-fill layer3 BACKGROUND-FILL)
|
||||
(gimp-selection-none img)
|
||||
(set! layer1 (car (gimp-image-merge-visible-layers img CLIP-TO-IMAGE)))
|
||||
; if the original image contained more than one visible layer:
|
||||
(while (> (car (gimp-image-get-item-position img layer1))
|
||||
(car (gimp-image-get-item-position img shadow)))
|
||||
(gimp-image-raise-item img layer1)
|
||||
)
|
||||
(gimp-invert layer1)
|
||||
(gimp-layer-add-mask layer1 layer-mask)
|
||||
(gimp-image-select-item img CHANNEL-OP-REPLACE logo-layer)
|
||||
(gimp-context-set-background '(255 255 255))
|
||||
(gimp-selection-feather img feather)
|
||||
(gimp-edit-fill layer-mask BACKGROUND-FILL)
|
||||
(gimp-context-set-background '(0 0 0))
|
||||
(gimp-selection-translate img offx1 offy1)
|
||||
(gimp-edit-fill shadow BACKGROUND-FILL)
|
||||
(gimp-selection-none img)
|
||||
(gimp-context-set-background bg-color)
|
||||
(gimp-edit-fill background BACKGROUND-FILL)
|
||||
(gimp-item-set-visible shadow TRUE)
|
||||
(gimp-item-set-visible background TRUE)
|
||||
(gimp-item-set-name layer1 (car (gimp-item-get-name logo-layer)))
|
||||
(gimp-image-remove-layer img logo-layer)
|
||||
|
||||
(gimp-context-pop)
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
(define (script-fu-chrome-logo-alpha img
|
||||
logo-layer
|
||||
offsets
|
||||
bg-color)
|
||||
(begin
|
||||
(gimp-image-undo-group-start img)
|
||||
(apply-chrome-logo-effect img logo-layer offsets bg-color)
|
||||
(gimp-image-undo-group-end img)
|
||||
(gimp-displays-flush)
|
||||
)
|
||||
)
|
||||
|
||||
(script-fu-register "script-fu-chrome-logo-alpha"
|
||||
_"C_hrome..."
|
||||
_"Add a simple chrome effect to the selected region (or alpha)"
|
||||
"Spencer Kimball"
|
||||
"Spencer Kimball & Peter Mattis"
|
||||
"1997"
|
||||
"RGBA"
|
||||
SF-IMAGE "Image" 0
|
||||
SF-DRAWABLE "Drawable" 0
|
||||
SF-ADJUSTMENT _"Offsets (pixels * 2)" '(10 2 100 1 10 0 1)
|
||||
SF-COLOR _"Background Color" "lightgrey"
|
||||
)
|
||||
|
||||
(script-fu-menu-register "script-fu-chrome-logo-alpha"
|
||||
"<Image>/Filters/Alpha to Logo")
|
||||
|
||||
|
||||
(define (script-fu-chrome-logo text
|
||||
size
|
||||
font
|
||||
bg-color)
|
||||
(let* (
|
||||
(img (car (gimp-image-new 256 256 RGB)))
|
||||
(b-size (* size 0.2))
|
||||
(text-layer (car (gimp-text-fontname img -1 0 0 text b-size TRUE size PIXELS font)))
|
||||
)
|
||||
(gimp-image-undo-disable img)
|
||||
(apply-chrome-logo-effect img text-layer (* size 0.1) bg-color)
|
||||
(gimp-image-undo-enable img)
|
||||
(gimp-display-new img)
|
||||
)
|
||||
)
|
||||
|
||||
(script-fu-register "script-fu-chrome-logo"
|
||||
_"C_hrome..."
|
||||
_"Create a simplistic, but cool, chromed logo"
|
||||
"Spencer Kimball"
|
||||
"Spencer Kimball & Peter Mattis"
|
||||
"1997"
|
||||
""
|
||||
SF-STRING _"Text" "GIMP"
|
||||
SF-ADJUSTMENT _"Font size (pixels)" '(100 2 1000 1 10 0 1)
|
||||
SF-FONT _"Font" "Bodoni"
|
||||
SF-COLOR _"Background color" "lightgrey"
|
||||
)
|
||||
|
||||
(script-fu-menu-register "script-fu-chrome-logo"
|
||||
"<Image>/File/Create/Logos")
|
@ -1,169 +0,0 @@
|
||||
; GIMP - The GNU Image Manipulation Program
|
||||
; Copyright (C) 1995 Spencer Kimball and Peter Mattis
|
||||
;
|
||||
; 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/>.
|
||||
;
|
||||
; Comic Book Logo v0.1 04/08/98
|
||||
; by Brian McFee
|
||||
; Creates snazzy-looking text, inspired by watching a Maxx marathon :)
|
||||
|
||||
(define (apply-comic-logo-effect img
|
||||
logo-layer
|
||||
gradient
|
||||
gradient-reverse
|
||||
ol-width
|
||||
ol-color
|
||||
bg-color)
|
||||
(let* (
|
||||
(width (car (gimp-drawable-width logo-layer)))
|
||||
(height (car (gimp-drawable-height logo-layer)))
|
||||
(posx (- (car (gimp-drawable-offsets logo-layer))))
|
||||
(posy (- (cadr (gimp-drawable-offsets logo-layer))))
|
||||
(bg-layer (car (gimp-layer-new img width height RGBA-IMAGE
|
||||
"Background" 100 NORMAL-MODE)))
|
||||
(white-layer (car (gimp-layer-copy logo-layer 1)))
|
||||
(black-layer (car (gimp-layer-copy logo-layer 1)))
|
||||
)
|
||||
|
||||
(gimp-context-push)
|
||||
|
||||
(script-fu-util-image-resize-from-layer img logo-layer)
|
||||
(script-fu-util-image-add-layers img black-layer white-layer bg-layer)
|
||||
(gimp-layer-translate white-layer posx posy)
|
||||
(gimp-item-set-name white-layer "White")
|
||||
(gimp-layer-translate black-layer posx posy)
|
||||
(gimp-item-set-name black-layer "Black")
|
||||
|
||||
(gimp-selection-all img)
|
||||
(gimp-context-set-background bg-color)
|
||||
(gimp-edit-fill bg-layer BACKGROUND-FILL)
|
||||
(gimp-selection-none img)
|
||||
|
||||
(gimp-layer-set-lock-alpha white-layer TRUE)
|
||||
(gimp-context-set-background ol-color)
|
||||
(gimp-selection-all img)
|
||||
(gimp-edit-fill white-layer BACKGROUND-FILL)
|
||||
(gimp-layer-set-lock-alpha white-layer FALSE)
|
||||
(plug-in-spread RUN-NONINTERACTIVE img white-layer (* 3 ol-width) (* 3 ol-width))
|
||||
(plug-in-gauss-rle RUN-NONINTERACTIVE img white-layer (* 2 ol-width) 1 1)
|
||||
(plug-in-threshold-alpha RUN-NONINTERACTIVE img white-layer 0)
|
||||
(gimp-layer-set-lock-alpha white-layer TRUE)
|
||||
(gimp-edit-fill white-layer BACKGROUND-FILL)
|
||||
(gimp-selection-none img)
|
||||
|
||||
(gimp-context-set-background '(0 0 0))
|
||||
(gimp-layer-set-lock-alpha black-layer TRUE)
|
||||
(gimp-selection-all img)
|
||||
(gimp-edit-fill black-layer BACKGROUND-FILL)
|
||||
(gimp-selection-none img)
|
||||
(gimp-layer-set-lock-alpha black-layer FALSE)
|
||||
(plug-in-gauss-rle RUN-NONINTERACTIVE img black-layer ol-width 1 1)
|
||||
(plug-in-threshold-alpha RUN-NONINTERACTIVE img black-layer 0)
|
||||
|
||||
(gimp-context-set-gradient gradient)
|
||||
(gimp-layer-set-lock-alpha logo-layer TRUE)
|
||||
(gimp-selection-all img)
|
||||
|
||||
(gimp-edit-blend logo-layer CUSTOM-MODE NORMAL-MODE
|
||||
GRADIENT-LINEAR 100 0 REPEAT-NONE gradient-reverse
|
||||
FALSE 0 0 TRUE
|
||||
0 (* height 0.3) 0 (* height 0.78))
|
||||
|
||||
(plug-in-noisify RUN-NONINTERACTIVE img logo-layer 0 0.20 0.20 0.20 0.20)
|
||||
(gimp-selection-none img)
|
||||
(gimp-layer-set-lock-alpha logo-layer FALSE)
|
||||
(gimp-brightness-contrast logo-layer 0 30)
|
||||
(plug-in-threshold-alpha RUN-NONINTERACTIVE img logo-layer 60)
|
||||
(gimp-image-set-active-layer img logo-layer)
|
||||
|
||||
(gimp-context-pop)
|
||||
)
|
||||
)
|
||||
|
||||
(define (script-fu-comic-logo-alpha img
|
||||
logo-layer
|
||||
gradient
|
||||
gradient-reverse
|
||||
ol-width
|
||||
ol-color
|
||||
bg-color)
|
||||
(begin
|
||||
(gimp-image-undo-group-start img)
|
||||
(apply-comic-logo-effect img logo-layer
|
||||
gradient gradient-reverse
|
||||
ol-width ol-color bg-color)
|
||||
(gimp-image-undo-group-end img)
|
||||
(gimp-displays-flush)
|
||||
)
|
||||
)
|
||||
|
||||
(script-fu-register "script-fu-comic-logo-alpha"
|
||||
_"Comic Boo_k..."
|
||||
_"Add a comic-book effect to the selected region (or alpha) by outlining and filling with a gradient"
|
||||
"Brian McFee <keebler@wco.com>"
|
||||
"Brian McFee"
|
||||
"April 1998"
|
||||
"RGBA"
|
||||
SF-IMAGE "Image" 0
|
||||
SF-DRAWABLE "Drawable" 0
|
||||
SF-GRADIENT _"Gradient" "Incandescent"
|
||||
SF-TOGGLE _"Gradient reverse" FALSE
|
||||
SF-ADJUSTMENT _"Outline size" '(5 1 100 1 10 0 1)
|
||||
SF-COLOR _"Outline color" "white"
|
||||
SF-COLOR _"Background color" "white"
|
||||
)
|
||||
|
||||
(script-fu-menu-register "script-fu-comic-logo-alpha"
|
||||
"<Image>/Filters/Alpha to Logo")
|
||||
|
||||
|
||||
(define (script-fu-comic-logo text
|
||||
size
|
||||
font
|
||||
gradient
|
||||
gradient-reverse
|
||||
ol-width
|
||||
ol-color
|
||||
bg-color)
|
||||
(let* ((img (car (gimp-image-new 256 256 RGB)))
|
||||
(border (/ size 4))
|
||||
(text-layer (car (gimp-text-fontname
|
||||
img -1 0 0 text border TRUE size PIXELS font))))
|
||||
(gimp-image-undo-disable img)
|
||||
(apply-comic-logo-effect img text-layer gradient gradient-reverse
|
||||
ol-width ol-color bg-color)
|
||||
(gimp-image-undo-enable img)
|
||||
(gimp-display-new img)
|
||||
)
|
||||
)
|
||||
|
||||
(script-fu-register "script-fu-comic-logo"
|
||||
_"Comic Boo_k..."
|
||||
_"Create a comic-book style logo by outlining and filling with a gradient"
|
||||
"Brian McFee <keebler@wco.com>"
|
||||
"Brian McFee"
|
||||
"April 1998"
|
||||
""
|
||||
SF-STRING _"Text" "Moo"
|
||||
SF-ADJUSTMENT _"Font size (pixels)" '(85 2 1000 1 10 0 1)
|
||||
SF-FONT _"Font" "Tribeca"
|
||||
SF-GRADIENT _"Gradient" "Incandescent"
|
||||
SF-TOGGLE _"Gradient reverse" FALSE
|
||||
SF-ADJUSTMENT _"Outline size" '(5 1 100 1 10 0 1)
|
||||
SF-COLOR _"Outline color" "white"
|
||||
SF-COLOR _"Background color" "white"
|
||||
)
|
||||
|
||||
(script-fu-menu-register "script-fu-comic-logo"
|
||||
"<Image>/File/Create/Logos")
|
@ -1,193 +0,0 @@
|
||||
; COOL-METAL
|
||||
; Create a text effect that looks like metal with a reflection of
|
||||
; the horizon, a reflection of the text in the mirrored ground, and
|
||||
; an interesting dropshadow
|
||||
; This script was inspired by Rob Malda's 'coolmetal.gif' graphic
|
||||
|
||||
(define (apply-cool-metal-logo-effect img
|
||||
logo-layer
|
||||
size
|
||||
bg-color
|
||||
gradient
|
||||
gradient-reverse)
|
||||
(let* (
|
||||
(feather (/ size 5))
|
||||
(smear 7.5)
|
||||
(period (/ size 3))
|
||||
(amplitude (/ size 40))
|
||||
(shrink (+ 1 (/ size 30)))
|
||||
(depth (/ size 20))
|
||||
(width (car (gimp-drawable-width logo-layer)))
|
||||
(height (car (gimp-drawable-height logo-layer)))
|
||||
(posx (- (car (gimp-drawable-offsets logo-layer))))
|
||||
(posy (- (cadr (gimp-drawable-offsets logo-layer))))
|
||||
(img-width (+ width (* 0.15 height) 10))
|
||||
(img-height (+ (* 1.85 height) 10))
|
||||
(bg-layer (car (gimp-layer-new img img-width img-height RGB-IMAGE "Background" 100 NORMAL-MODE)))
|
||||
(shadow-layer (car (gimp-layer-new img img-width img-height RGBA-IMAGE "Shadow" 100 NORMAL-MODE)))
|
||||
(reflect-layer (car (gimp-layer-new img width height RGBA-IMAGE "Reflection" 100 NORMAL-MODE)))
|
||||
(channel 0)
|
||||
(fs 0)
|
||||
(layer-mask 0)
|
||||
)
|
||||
|
||||
(gimp-context-push)
|
||||
(gimp-context-set-defaults)
|
||||
(gimp-context-set-feather FALSE)
|
||||
(gimp-context-set-interpolation INTERPOLATION-NONE)
|
||||
(gimp-context-set-transform-resize TRANSFORM-RESIZE-ADJUST)
|
||||
|
||||
(gimp-selection-none img)
|
||||
(gimp-image-resize img img-width img-height posx posy)
|
||||
(script-fu-util-image-add-layers img shadow-layer reflect-layer bg-layer)
|
||||
(gimp-layer-set-lock-alpha logo-layer TRUE)
|
||||
|
||||
(gimp-context-set-background bg-color)
|
||||
(gimp-edit-fill bg-layer BACKGROUND-FILL)
|
||||
(gimp-edit-clear reflect-layer)
|
||||
(gimp-context-set-background '(0 0 0))
|
||||
(gimp-edit-fill shadow-layer BACKGROUND-FILL)
|
||||
|
||||
(gimp-context-set-gradient gradient)
|
||||
|
||||
(gimp-edit-blend logo-layer CUSTOM-MODE NORMAL-MODE
|
||||
GRADIENT-LINEAR 100 0 REPEAT-NONE gradient-reverse
|
||||
FALSE 0 0 TRUE
|
||||
0 0 0 (+ height 5))
|
||||
|
||||
(gimp-image-select-rectangle img CHANNEL-OP-REPLACE 0 (- (/ height 2) feather) img-width (* 2 feather))
|
||||
(plug-in-gauss-iir RUN-NONINTERACTIVE img logo-layer smear TRUE TRUE)
|
||||
(gimp-selection-none img)
|
||||
(plug-in-ripple RUN-NONINTERACTIVE img logo-layer period amplitude 1 0 1 TRUE FALSE)
|
||||
(gimp-layer-translate logo-layer 5 5)
|
||||
(gimp-layer-resize logo-layer img-width img-height 5 5)
|
||||
|
||||
(gimp-image-select-item img CHANNEL-OP-REPLACE logo-layer)
|
||||
(set! channel (car (gimp-selection-save img)))
|
||||
(gimp-selection-shrink img shrink)
|
||||
(gimp-selection-invert img)
|
||||
(plug-in-gauss-rle RUN-NONINTERACTIVE img channel feather TRUE TRUE)
|
||||
(gimp-image-select-item img CHANNEL-OP-REPLACE logo-layer)
|
||||
(gimp-selection-invert img)
|
||||
(gimp-context-set-background '(0 0 0))
|
||||
(gimp-edit-fill channel BACKGROUND-FILL)
|
||||
(gimp-selection-none img)
|
||||
|
||||
(plug-in-bump-map RUN-NONINTERACTIVE img logo-layer channel 135 45 depth 0 0 0 0 FALSE FALSE 0)
|
||||
|
||||
(gimp-image-select-item img CHANNEL-OP-REPLACE logo-layer)
|
||||
(set! fs (car (gimp-selection-float shadow-layer 0 0)))
|
||||
(gimp-edit-clear shadow-layer)
|
||||
(gimp-item-transform-perspective fs
|
||||
(+ 5 (* 0.15 height)) (- height (* 0.15 height))
|
||||
(+ 5 width (* 0.15 height)) (- height (* 0.15 height))
|
||||
5 height
|
||||
(+ 5 width) height)
|
||||
(gimp-floating-sel-anchor fs)
|
||||
(plug-in-gauss-rle RUN-NONINTERACTIVE img shadow-layer smear TRUE TRUE)
|
||||
|
||||
(gimp-image-select-rectangle img CHANNEL-OP-REPLACE 5 5 width height)
|
||||
(gimp-edit-copy logo-layer)
|
||||
(set! fs (car (gimp-edit-paste reflect-layer FALSE)))
|
||||
(gimp-floating-sel-anchor fs)
|
||||
(gimp-item-transform-scale reflect-layer
|
||||
0 0 width (* 0.85 height))
|
||||
(gimp-context-set-transform-resize TRANSFORM-RESIZE-CLIP)
|
||||
(gimp-item-transform-flip-simple reflect-layer ORIENTATION-VERTICAL
|
||||
TRUE 0)
|
||||
(gimp-layer-set-offsets reflect-layer 5 (+ 3 height))
|
||||
|
||||
(set! layer-mask (car (gimp-layer-create-mask reflect-layer ADD-WHITE-MASK)))
|
||||
(gimp-layer-add-mask reflect-layer layer-mask)
|
||||
(gimp-context-set-foreground '(255 255 255))
|
||||
(gimp-context-set-background '(0 0 0))
|
||||
(gimp-edit-blend layer-mask FG-BG-RGB-MODE NORMAL-MODE
|
||||
GRADIENT-LINEAR 100 0 REPEAT-NONE FALSE
|
||||
FALSE 0 0 TRUE
|
||||
0 (- (/ height 2)) 0 height)
|
||||
|
||||
(gimp-image-remove-channel img channel)
|
||||
|
||||
(gimp-context-pop)
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
(define (script-fu-cool-metal-logo-alpha img
|
||||
logo-layer
|
||||
size
|
||||
bg-color
|
||||
gradient
|
||||
gradient-reverse)
|
||||
(begin
|
||||
(gimp-image-undo-group-start img)
|
||||
|
||||
(if (= (car (gimp-layer-is-floating-sel logo-layer)) TRUE)
|
||||
(begin
|
||||
(gimp-floating-sel-to-layer logo-layer)
|
||||
(set! logo-layer (car (gimp-image-get-active-layer img)))
|
||||
)
|
||||
)
|
||||
|
||||
(apply-cool-metal-logo-effect img logo-layer size bg-color
|
||||
gradient gradient-reverse)
|
||||
(gimp-image-undo-group-end img)
|
||||
(gimp-displays-flush)
|
||||
)
|
||||
)
|
||||
|
||||
(script-fu-register "script-fu-cool-metal-logo-alpha"
|
||||
_"Cool _Metal..."
|
||||
_"Add a metallic effect to the selected region (or alpha) with reflections and perspective shadows"
|
||||
"Spencer Kimball & Rob Malda"
|
||||
"Spencer Kimball & Rob Malda"
|
||||
"1997"
|
||||
"RGBA"
|
||||
SF-IMAGE "Image" 0
|
||||
SF-DRAWABLE "Drawable" 0
|
||||
SF-ADJUSTMENT _"Effect size (pixels)" '(100 2 1000 1 10 0 1)
|
||||
SF-COLOR _"Background color" "white"
|
||||
SF-GRADIENT _"Gradient" "Horizon 1"
|
||||
SF-TOGGLE _"Gradient reverse" FALSE
|
||||
)
|
||||
|
||||
(script-fu-menu-register "script-fu-cool-metal-logo-alpha"
|
||||
"<Image>/Filters/Alpha to Logo")
|
||||
|
||||
|
||||
(define (script-fu-cool-metal-logo text
|
||||
size
|
||||
font
|
||||
bg-color
|
||||
gradient
|
||||
gradient-reverse)
|
||||
(let* (
|
||||
(img (car (gimp-image-new 256 256 RGB)))
|
||||
(text-layer (car (gimp-text-fontname img -1 0 0 text 0 TRUE
|
||||
size PIXELS font)))
|
||||
)
|
||||
(gimp-image-undo-disable img)
|
||||
(apply-cool-metal-logo-effect img text-layer size bg-color
|
||||
gradient gradient-reverse)
|
||||
(gimp-image-undo-enable img)
|
||||
(gimp-display-new img)
|
||||
)
|
||||
)
|
||||
|
||||
(script-fu-register "script-fu-cool-metal-logo"
|
||||
_"Cool _Metal..."
|
||||
_"Create a metallic logo with reflections and perspective shadows"
|
||||
"Spencer Kimball & Rob Malda"
|
||||
"Spencer Kimball & Rob Malda"
|
||||
"1997"
|
||||
""
|
||||
SF-STRING _"Text" "Cool Metal"
|
||||
SF-ADJUSTMENT _"Font size (pixels)" '(100 2 1000 1 10 0 1)
|
||||
SF-FONT _"Font" "Crillee"
|
||||
SF-COLOR _"Background color" "white"
|
||||
SF-GRADIENT _"Gradient" "Horizon 1"
|
||||
SF-TOGGLE _"Gradient reverse" FALSE
|
||||
)
|
||||
|
||||
(script-fu-menu-register "script-fu-cool-metal-logo"
|
||||
"<Image>/File/Create/Logos")
|
@ -1,228 +0,0 @@
|
||||
; CRYSTAL
|
||||
; Create a text effect that simulates crystal
|
||||
|
||||
(define (script-fu-crystal-logo chrome-factor text size font bg-img env-map)
|
||||
|
||||
(define (set-pt a index x y)
|
||||
(begin
|
||||
(aset a (* index 2) x)
|
||||
(aset a (+ (* index 2) 1) y)
|
||||
)
|
||||
)
|
||||
|
||||
(define (spline1)
|
||||
(let* ((a (cons-array 18 'byte)))
|
||||
(set-pt a 0 0 0)
|
||||
(set-pt a 1 31 235)
|
||||
(set-pt a 2 63 23)
|
||||
(set-pt a 3 95 230)
|
||||
(set-pt a 4 127 25)
|
||||
(set-pt a 5 159 210)
|
||||
(set-pt a 6 191 20)
|
||||
(set-pt a 7 223 240)
|
||||
(set-pt a 8 255 31)
|
||||
a
|
||||
)
|
||||
)
|
||||
|
||||
(define (crystal-brush brush-size)
|
||||
(cond ((<= brush-size 5) "Circle (05)")
|
||||
((<= brush-size 7) "Circle (07)")
|
||||
((<= brush-size 9) "Circle (09)")
|
||||
((<= brush-size 11) "Circle (11)")
|
||||
((<= brush-size 13) "Circle (13)")
|
||||
((<= brush-size 15) "Circle (15)")
|
||||
((<= brush-size 17) "Circle (17)")
|
||||
((> brush-size 17) "Circle Fuzzy (19)")
|
||||
)
|
||||
)
|
||||
|
||||
(define (shadows val)
|
||||
(/ (* 0.96 val) 2.55)
|
||||
)
|
||||
|
||||
(define (midtones val)
|
||||
(/ val 2.55)
|
||||
)
|
||||
|
||||
(define (highlights val)
|
||||
(/ (* 1.108 val) 2.55)
|
||||
)
|
||||
|
||||
(define (rval col)
|
||||
(car col)
|
||||
)
|
||||
|
||||
(define (gval col)
|
||||
(cadr col)
|
||||
)
|
||||
|
||||
(define (bval col)
|
||||
(caddr col)
|
||||
)
|
||||
|
||||
(define (sota-scale val scale chrome-factor)
|
||||
(* (sqrt val) (* scale chrome-factor))
|
||||
)
|
||||
|
||||
(define (copy-layer-crystal dest-image dest-drawable source-image source-drawable)
|
||||
(gimp-selection-all dest-image)
|
||||
(gimp-edit-clear dest-drawable)
|
||||
(gimp-selection-none dest-image)
|
||||
(gimp-selection-all source-image)
|
||||
(gimp-edit-copy source-drawable)
|
||||
(let ((floating-sel (car (gimp-edit-paste dest-drawable FALSE))))
|
||||
(gimp-floating-sel-anchor floating-sel)
|
||||
)
|
||||
)
|
||||
|
||||
(let* (
|
||||
(img (car (gimp-image-new 256 256 GRAY)))
|
||||
(back-img (car (gimp-file-load 1 bg-img bg-img)))
|
||||
(back-layer (car (gimp-image-get-active-drawable back-img)))
|
||||
(banding-img (car (gimp-file-load 1 env-map env-map)))
|
||||
(banding-layer (car (gimp-image-get-active-drawable banding-img)))
|
||||
(banding-height (car (gimp-drawable-height banding-layer)))
|
||||
(banding-width (car (gimp-drawable-width banding-layer)))
|
||||
(banding-type (car (gimp-drawable-type banding-layer)))
|
||||
(b-size (sota-scale size 2 chrome-factor))
|
||||
(offx1 (sota-scale size 0.33 chrome-factor))
|
||||
(offy1 (sota-scale size 0.25 chrome-factor))
|
||||
(offx2 (sota-scale size (- 0.33) chrome-factor))
|
||||
(offy2 (sota-scale size (- 0.25) chrome-factor))
|
||||
(feather (sota-scale size 0.5 chrome-factor))
|
||||
(blur (sota-scale size 0.5 chrome-factor))
|
||||
(displace (sota-scale size 0.25 chrome-factor))
|
||||
(brush-size (sota-scale size 0.5 chrome-factor))
|
||||
(text-layer (car (gimp-text-fontname img -1 0 0 text b-size TRUE size PIXELS font)))
|
||||
(width (car (gimp-drawable-width text-layer)))
|
||||
(height (car (gimp-drawable-height text-layer)))
|
||||
(tile-ret (plug-in-tile RUN-NONINTERACTIVE back-img back-layer width height TRUE))
|
||||
(tile-img (car tile-ret))
|
||||
(tile-layer (cadr tile-ret))
|
||||
(tile-width (car (gimp-drawable-width tile-layer)))
|
||||
(tile-height (car (gimp-drawable-height tile-layer)))
|
||||
(tile-type (car (gimp-drawable-type tile-layer)))
|
||||
(bg-layer (car (gimp-layer-new img tile-width tile-height tile-type "BG-Layer" 100 NORMAL-MODE)))
|
||||
(layer1 (car (gimp-layer-new img banding-width banding-height banding-type "Layer1" 100 NORMAL-MODE)))
|
||||
(layer2 (car (gimp-layer-new img width height GRAYA-IMAGE "Layer 2" 100 DIFFERENCE-MODE)))
|
||||
(layer3 (car (gimp-layer-new img width height GRAYA-IMAGE "Layer 3" 100 NORMAL-MODE)))
|
||||
(layer-mask 0)
|
||||
(layer-mask2 0)
|
||||
(disp-map 0)
|
||||
)
|
||||
(gimp-context-push)
|
||||
(gimp-context-set-defaults)
|
||||
|
||||
(gimp-image-delete back-img)
|
||||
(gimp-image-undo-disable img)
|
||||
(gimp-image-resize img width height 0 0)
|
||||
(gimp-image-insert-layer img layer3 0 0)
|
||||
(gimp-image-insert-layer img layer2 0 0)
|
||||
(gimp-context-set-background '(255 255 255))
|
||||
(gimp-selection-none img)
|
||||
(gimp-edit-fill layer2 BACKGROUND-FILL)
|
||||
(gimp-edit-fill layer3 BACKGROUND-FILL)
|
||||
(gimp-item-set-visible text-layer FALSE)
|
||||
|
||||
(gimp-image-select-item img CHANNEL-OP-REPLACE text-layer)
|
||||
(gimp-context-set-background '(0 0 0))
|
||||
(gimp-selection-translate img offx1 offy1)
|
||||
(gimp-selection-feather img feather)
|
||||
(gimp-edit-fill layer2 BACKGROUND-FILL)
|
||||
(gimp-selection-translate img (* 2 offx2) (* 2 offy2))
|
||||
(gimp-edit-fill layer3 BACKGROUND-FILL)
|
||||
(gimp-selection-none img)
|
||||
(set! layer2 (car (gimp-image-merge-visible-layers img CLIP-TO-IMAGE)))
|
||||
(gimp-invert layer2)
|
||||
|
||||
(gimp-image-insert-layer img layer1 0 0)
|
||||
(copy-layer-crystal img layer1 banding-img banding-layer)
|
||||
(gimp-image-delete banding-img)
|
||||
(gimp-layer-scale layer1 width height FALSE)
|
||||
(plug-in-gauss-iir RUN-NONINTERACTIVE img layer1 10 TRUE TRUE)
|
||||
(gimp-layer-set-opacity layer1 50)
|
||||
(set! layer1 (car (gimp-image-merge-visible-layers img CLIP-TO-IMAGE)))
|
||||
(gimp-curves-spline layer1 0 18 (spline1))
|
||||
|
||||
(set! layer-mask (car (gimp-layer-create-mask layer1 ADD-BLACK-MASK)))
|
||||
(gimp-layer-add-mask layer1 layer-mask)
|
||||
(gimp-image-select-item img CHANNEL-OP-REPLACE text-layer)
|
||||
(gimp-context-set-background '(255 255 255))
|
||||
(gimp-edit-fill layer-mask BACKGROUND-FILL)
|
||||
|
||||
(set! disp-map (car (gimp-selection-save img)))
|
||||
(gimp-context-set-brush (crystal-brush brush-size))
|
||||
(gimp-context-set-foreground '(0 0 0))
|
||||
(gimp-edit-stroke disp-map)
|
||||
(gimp-selection-none img)
|
||||
|
||||
(plug-in-gauss-rle RUN-NONINTERACTIVE img disp-map blur TRUE TRUE)
|
||||
(gimp-levels disp-map 0 0 255 1.0 96 255)
|
||||
|
||||
(if (= (car (gimp-drawable-is-rgb bg-layer)) 1)
|
||||
(gimp-image-convert-rgb img))
|
||||
|
||||
|
||||
|
||||
(gimp-image-insert-layer img bg-layer 0 2)
|
||||
(copy-layer-crystal img bg-layer tile-img tile-layer)
|
||||
(gimp-image-delete tile-img)
|
||||
(set! layer2 (car (gimp-layer-copy bg-layer TRUE)))
|
||||
(gimp-image-insert-layer img layer2 0 1)
|
||||
|
||||
(plug-in-displace RUN-NONINTERACTIVE img layer2 displace displace TRUE TRUE disp-map disp-map 0)
|
||||
(set! layer-mask2 (car (gimp-layer-create-mask layer2 ADD-BLACK-MASK)))
|
||||
(gimp-layer-add-mask layer2 layer-mask2)
|
||||
(gimp-image-select-item img CHANNEL-OP-REPLACE text-layer)
|
||||
(gimp-context-set-background '(255 255 255))
|
||||
(gimp-edit-fill layer-mask2 BACKGROUND-FILL)
|
||||
|
||||
(gimp-selection-none img)
|
||||
(gimp-levels layer2 0 0 200 1.5 50 255)
|
||||
(gimp-layer-set-mode layer1 OVERLAY-MODE)
|
||||
|
||||
(plug-in-gauss-rle RUN-NONINTERACTIVE img text-layer blur TRUE TRUE)
|
||||
(gimp-layer-set-lock-alpha text-layer TRUE)
|
||||
(gimp-context-set-background '(0 0 0))
|
||||
(gimp-edit-fill text-layer BACKGROUND-FILL)
|
||||
(gimp-layer-set-mode text-layer OVERLAY-MODE)
|
||||
(gimp-layer-translate text-layer offx1 offy1)
|
||||
|
||||
(gimp-image-remove-channel img disp-map)
|
||||
|
||||
(gimp-item-set-visible text-layer TRUE)
|
||||
(gimp-item-set-name layer1 "Crystal")
|
||||
(gimp-item-set-name layer2 "Interior")
|
||||
(gimp-item-set-name bg-layer "Background")
|
||||
(gimp-item-set-name text-layer "Shadow")
|
||||
|
||||
(gimp-image-undo-enable img)
|
||||
(gimp-display-new img)
|
||||
|
||||
(gimp-context-pop)
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
(script-fu-register "script-fu-crystal-logo"
|
||||
_"Crystal..."
|
||||
_"Create a logo with a crystal/gel effect displacing the image underneath"
|
||||
"Spencer Kimball"
|
||||
"Spencer Kimball"
|
||||
"1997"
|
||||
""
|
||||
SF-ADJUSTMENT _"Chrome factor" '(1.0 0.2 4 0.1 1 1 0)
|
||||
SF-STRING _"Text" "Crystal"
|
||||
SF-ADJUSTMENT _"Font size (pixels)" '(150 2 1000 1 10 0 1)
|
||||
SF-FONT _"Font" "Engraver"
|
||||
SF-FILENAME _"Background image"
|
||||
(string-append gimp-data-directory
|
||||
"/scripts/images/texture1.jpg")
|
||||
SF-FILENAME _"Environment map"
|
||||
(string-append gimp-data-directory
|
||||
"/scripts/images/beavis.jpg")
|
||||
)
|
||||
|
||||
(script-fu-menu-register "script-fu-crystal-logo"
|
||||
"<Image>/File/Create/Logos")
|
@ -1,75 +0,0 @@
|
||||
|
||||
; GIMP - The GNU Image Manipulation Program
|
||||
; Copyright (C) 1995 Spencer Kimball and Peter Mattis
|
||||
;
|
||||
; FlatLand - creates a tileable pattern that looks like a map
|
||||
; Copyright (C) 1997 Adrian Likins
|
||||
;
|
||||
; 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/>.
|
||||
|
||||
;
|
||||
; FlatLand
|
||||
;
|
||||
; When used with the Land gradient It produces a tileble pattern that
|
||||
; looks a lot like a map.
|
||||
;
|
||||
; Should be really cool once map-sphere starts working again.
|
||||
;
|
||||
; To use: open gradient editor, load the Land gradient then run the script.
|
||||
;
|
||||
; Adrian Likins <aklikins@eos.ncsu.edu>
|
||||
;
|
||||
|
||||
|
||||
(define (script-fu-flatland width height seed detail xscale yscale)
|
||||
(let* (
|
||||
(img (car (gimp-image-new width height RGB)))
|
||||
(layer-one (car (gimp-layer-new img width height
|
||||
RGB-IMAGE "bottom" 100 NORMAL-MODE)))
|
||||
(layer-two 0)
|
||||
)
|
||||
|
||||
(gimp-image-undo-disable img)
|
||||
(gimp-image-insert-layer img layer-one 0 0)
|
||||
; (gimp-img-add-layer img layer-two 1)
|
||||
|
||||
(plug-in-solid-noise RUN-NONINTERACTIVE img layer-one 1 0 seed detail xscale yscale )
|
||||
(plug-in-c-astretch RUN-NONINTERACTIVE img layer-one)
|
||||
(set! layer-two (car (gimp-layer-copy layer-one TRUE)))
|
||||
(gimp-image-insert-layer img layer-two 0 -1)
|
||||
(gimp-image-set-active-layer img layer-two)
|
||||
|
||||
(plug-in-gradmap RUN-NONINTERACTIVE img layer-two)
|
||||
(gimp-image-undo-enable img)
|
||||
(gimp-display-new img)
|
||||
)
|
||||
)
|
||||
|
||||
(script-fu-register "script-fu-flatland"
|
||||
_"_Flatland..."
|
||||
_"Create an image filled with a Land Pattern"
|
||||
"Adrian Likins <aklikins@eos.ncsu.edu>"
|
||||
"Adrian Likins"
|
||||
"1997"
|
||||
""
|
||||
SF-ADJUSTMENT _"Image width" '(256 10 2000 1 10 0 1)
|
||||
SF-ADJUSTMENT _"Image height" '(256 10 2000 1 10 0 1)
|
||||
SF-ADJUSTMENT _"Random seed" '(80 1 2000000 1 10 0 1)
|
||||
SF-ADJUSTMENT _"Detail level" '(3 1 15 1 10 1 0)
|
||||
SF-ADJUSTMENT _"Scale X" '(4 0.1 16 0.1 2 1 1)
|
||||
SF-ADJUSTMENT _"Scale Y" '(4 0.1 16 0.1 2 1 1)
|
||||
)
|
||||
|
||||
(script-fu-menu-register "script-fu-flatland"
|
||||
"<Image>/File/Create/Patterns")
|
@ -1,210 +0,0 @@
|
||||
; FROZEN-TEXT effect
|
||||
; Thanks to Ed Mackey for this one
|
||||
; Written by Spencer Kimball
|
||||
|
||||
(define (apply-frosty-logo-effect img
|
||||
logo-layer
|
||||
size
|
||||
bg-color
|
||||
isnew) ; The parameter isnew is used
|
||||
; when the script is called
|
||||
; using the logo script (not
|
||||
; alpha to logo), in order to
|
||||
; make sure some actions are
|
||||
; performed only then
|
||||
(let* (
|
||||
(border (/ size 5))
|
||||
(width (+ (car (gimp-drawable-width logo-layer)) border))
|
||||
(height (+ (car (gimp-drawable-height logo-layer)) border))
|
||||
(logo-layer-mask (car (gimp-layer-create-mask logo-layer
|
||||
ADD-BLACK-MASK)))
|
||||
(sparkle-layer (car (gimp-layer-new img width height RGBA-IMAGE
|
||||
"Sparkle" 100 NORMAL-MODE)))
|
||||
(matte-layer (car (gimp-layer-new img width height RGBA-IMAGE
|
||||
"Matte" 100 NORMAL-MODE)))
|
||||
(shadow-layer (car (gimp-layer-new img
|
||||
(+ border width)
|
||||
(+ border height)
|
||||
RGBA-IMAGE
|
||||
"Shadow" 90 MULTIPLY-MODE)))
|
||||
(bg-layer (car (gimp-layer-new img width height RGB-IMAGE
|
||||
"Background" 100 NORMAL-MODE)))
|
||||
(selection 0)
|
||||
(stack (car (gimp-image-get-item-position img logo-layer)))
|
||||
)
|
||||
|
||||
(gimp-context-push)
|
||||
(gimp-context-set-defaults)
|
||||
|
||||
(if ( = isnew 1) (script-fu-util-image-resize-from-layer img shadow-layer))
|
||||
|
||||
(gimp-layer-add-mask logo-layer logo-layer-mask)
|
||||
(gimp-image-insert-layer img sparkle-layer 0 (+ 1 stack))
|
||||
(gimp-image-insert-layer img matte-layer 0 (+ 2 stack))
|
||||
(gimp-image-insert-layer img shadow-layer 0 (+ 3 stack))
|
||||
(gimp-layer-translate shadow-layer (- border) (- border))
|
||||
(gimp-image-insert-layer img bg-layer 0 5)
|
||||
(gimp-selection-none img)
|
||||
(gimp-edit-clear sparkle-layer)
|
||||
(gimp-edit-clear matte-layer)
|
||||
(gimp-edit-clear shadow-layer)
|
||||
(gimp-image-select-item img CHANNEL-OP-REPLACE logo-layer)
|
||||
(set! selection (car (gimp-selection-save img)))
|
||||
(gimp-selection-feather img border)
|
||||
(gimp-context-set-background '(0 0 0))
|
||||
(gimp-edit-fill sparkle-layer BACKGROUND-FILL)
|
||||
(plug-in-noisify RUN-NONINTERACTIVE img sparkle-layer FALSE 0.2 0.2 0.2 0.0)
|
||||
(plug-in-c-astretch RUN-NONINTERACTIVE img sparkle-layer)
|
||||
(gimp-selection-none img)
|
||||
(plug-in-sparkle RUN-NONINTERACTIVE img sparkle-layer 0.03 0.5
|
||||
(/ (min width height) 2)
|
||||
6 15 1.0 0.0 0.0 0.0 FALSE FALSE FALSE 0)
|
||||
(gimp-levels sparkle-layer 1 0 255 0.2 0 255)
|
||||
(gimp-levels sparkle-layer 2 0 255 0.7 0 255)
|
||||
(gimp-image-select-item img CHANNEL-OP-REPLACE sparkle-layer)
|
||||
(gimp-context-set-foreground '(0 0 0))
|
||||
(gimp-context-set-brush "Circle Fuzzy (11)")
|
||||
(gimp-edit-stroke matte-layer)
|
||||
(gimp-selection-feather img border)
|
||||
(gimp-edit-fill shadow-layer BACKGROUND-FILL)
|
||||
(gimp-selection-none img)
|
||||
(gimp-context-set-background bg-color)
|
||||
(gimp-edit-fill bg-layer BACKGROUND-FILL)
|
||||
(gimp-context-set-background '(0 0 0))
|
||||
(gimp-edit-fill logo-layer BACKGROUND-FILL)
|
||||
(gimp-image-select-item img CHANNEL-OP-REPLACE selection)
|
||||
(gimp-context-set-background '(255 255 255))
|
||||
(gimp-edit-fill logo-layer-mask BACKGROUND-FILL)
|
||||
(gimp-selection-feather img border)
|
||||
(gimp-selection-translate img (/ border 2) (/ border 2))
|
||||
(gimp-edit-fill logo-layer BACKGROUND-FILL)
|
||||
(gimp-layer-remove-mask logo-layer 0)
|
||||
(gimp-image-select-item img CHANNEL-OP-REPLACE selection)
|
||||
(gimp-context-set-brush "Circle Fuzzy (07)")
|
||||
(gimp-context-set-paint-mode BEHIND-MODE)
|
||||
(gimp-context-set-foreground '(186 241 255))
|
||||
(gimp-edit-stroke logo-layer)
|
||||
(gimp-selection-none img)
|
||||
(gimp-image-remove-channel img selection)
|
||||
|
||||
(gimp-layer-translate shadow-layer border border)
|
||||
|
||||
(if ( = isnew 1) (script-fu-util-image-resize-from-layer img logo-layer))
|
||||
|
||||
(gimp-layer-translate bg-layer (- 0 border) (- 0 border))
|
||||
|
||||
(gimp-context-pop)
|
||||
)
|
||||
)
|
||||
|
||||
(define (script-fu-frosty-logo-alpha img
|
||||
logo-layer
|
||||
size
|
||||
bg-color)
|
||||
|
||||
(gimp-image-undo-group-start img)
|
||||
|
||||
;Checking if the effect size is to big or not
|
||||
(gimp-image-select-item img CHANNEL-OP-REPLACE logo-layer)
|
||||
(gimp-selection-feather img (/ size 5))
|
||||
(gimp-selection-sharpen img)
|
||||
|
||||
(if (= 1 (car(gimp-selection-is-empty img)))
|
||||
(begin
|
||||
(gimp-image-undo-group-end img)
|
||||
(gimp-selection-none img)
|
||||
(gimp-message "Your layer's opaque parts are either too small for
|
||||
this effect size, or they are not inside the canvas.")
|
||||
)
|
||||
)
|
||||
|
||||
(if (= 0 (car(gimp-selection-is-empty img)))
|
||||
(begin
|
||||
(gimp-selection-none img)
|
||||
(gimp-layer-resize-to-image-size logo-layer)
|
||||
(apply-frosty-logo-effect img logo-layer size bg-color 0)
|
||||
|
||||
(gimp-selection-none img)
|
||||
(gimp-image-undo-group-end img)
|
||||
(gimp-displays-flush)
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
(script-fu-register "script-fu-frosty-logo-alpha"
|
||||
_"_Frosty..."
|
||||
_"Add a frost effect to the selected region (or alpha) with an added drop shadow"
|
||||
"Spencer Kimball & Ed Mackey"
|
||||
"Spencer Kimball & Ed Mackey"
|
||||
"1997"
|
||||
"RGBA"
|
||||
SF-IMAGE "Image" 0
|
||||
SF-DRAWABLE "Drawable" 0
|
||||
SF-ADJUSTMENT _"Effect size (pixels)" '(100 2 1000 1 10 0 1)
|
||||
SF-COLOR _"Background color" "white"
|
||||
)
|
||||
|
||||
(script-fu-menu-register "script-fu-frosty-logo-alpha"
|
||||
"<Image>/Filters/Alpha to Logo")
|
||||
|
||||
|
||||
(define (script-fu-frosty-logo text
|
||||
size
|
||||
font
|
||||
bg-color)
|
||||
(let* (
|
||||
(img (car (gimp-image-new 256 256 RGB)))
|
||||
(border (/ size 5))
|
||||
(text-layer (car (gimp-text-fontname img -1 0 0 text (* border 2) TRUE size PIXELS font)))
|
||||
(error-string "The text you entered contains only spaces.")
|
||||
)
|
||||
|
||||
(if (= text-layer -1) ; checking that the text layer was created
|
||||
; succesfully - it has more then just
|
||||
; empty charcters
|
||||
(begin
|
||||
(gimp-image-delete img)
|
||||
(gimp-message error-string)
|
||||
)
|
||||
(begin ; Checking if the effect size is too big or not
|
||||
(gimp-image-undo-disable img)
|
||||
(gimp-image-select-item img CHANNEL-OP-REPLACE text-layer)
|
||||
(gimp-selection-feather img border)
|
||||
(gimp-selection-sharpen img)
|
||||
|
||||
(if (= 0 (car(gimp-selection-is-empty img))) ; Checking whether
|
||||
; the effect size
|
||||
; is too big
|
||||
(begin
|
||||
(apply-frosty-logo-effect img text-layer size bg-color 1)
|
||||
(gimp-selection-all img)
|
||||
(gimp-image-undo-enable img)
|
||||
(gimp-display-new img)
|
||||
)
|
||||
)
|
||||
(if (= 1 (car(gimp-selection-is-empty img)))
|
||||
(begin
|
||||
(gimp-image-delete img)
|
||||
(gimp-message error-string)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
(script-fu-register "script-fu-frosty-logo"
|
||||
_"_Frosty..."
|
||||
_"Create frozen logo with an added drop shadow"
|
||||
"Spencer Kimball & Ed Mackey"
|
||||
"Spencer Kimball & Ed Mackey"
|
||||
"1997"
|
||||
""
|
||||
SF-STRING _"Text" "GIMP"
|
||||
SF-ADJUSTMENT _"Font size (pixels)" '(100 2 1000 1 10 0 1)
|
||||
SF-FONT _"Font" "Becker"
|
||||
SF-COLOR _"Background color" "white"
|
||||
)
|
||||
|
||||
(script-fu-menu-register "script-fu-frosty-logo"
|
||||
"<Image>/File/Create/Logos")
|
@ -1,295 +0,0 @@
|
||||
; glossy-patterned-shadowed-and-bump-mapped-logo
|
||||
; creates anything you can create with it :)
|
||||
; (use it wisely, use it in peace...)
|
||||
;
|
||||
; GIMP - The GNU Image Manipulation Program
|
||||
; Copyright (C) 1995 Spencer Kimball and Peter Mattis
|
||||
;
|
||||
; glossy gives a glossy outlook to your fonts (unlogical name, isn't it?)
|
||||
; Copyright (C) 1998 Hrvoje Horvat
|
||||
;
|
||||
; 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 (apply-glossy-logo-effect img
|
||||
logo-layer
|
||||
blend-gradient-text
|
||||
blend-gradient-text-reverse
|
||||
blend-gradient-outline
|
||||
blend-gradient-outline-reverse
|
||||
grow-size
|
||||
bg-color
|
||||
use-pattern-text
|
||||
pattern-text
|
||||
use-pattern-outline
|
||||
pattern-outline
|
||||
use-pattern-overlay
|
||||
pattern-overlay
|
||||
noninteractive
|
||||
shadow-toggle
|
||||
s-offset-x
|
||||
s-offset-y)
|
||||
(let* (
|
||||
(width (car (gimp-drawable-width logo-layer)))
|
||||
(height (car (gimp-drawable-height logo-layer)))
|
||||
(posx (- (car (gimp-drawable-offsets logo-layer))))
|
||||
(posy (- (cadr (gimp-drawable-offsets logo-layer))))
|
||||
(bg-layer (car (gimp-layer-new img width height RGB-IMAGE "Background" 100 NORMAL-MODE)))
|
||||
(grow-me (car (gimp-layer-copy logo-layer TRUE)))
|
||||
(dont-drop-me 0)
|
||||
)
|
||||
|
||||
(gimp-context-push)
|
||||
(gimp-context-set-defaults)
|
||||
|
||||
(script-fu-util-image-resize-from-layer img logo-layer)
|
||||
(script-fu-util-image-add-layers img grow-me bg-layer)
|
||||
(gimp-item-set-name grow-me "Grow-me")
|
||||
(gimp-layer-translate grow-me posx posy)
|
||||
|
||||
(gimp-context-set-background bg-color)
|
||||
(gimp-selection-all img)
|
||||
(gimp-edit-bucket-fill bg-layer BG-BUCKET-FILL NORMAL-MODE 100 0 FALSE 0 0)
|
||||
(gimp-selection-none img)
|
||||
|
||||
(gimp-image-select-item img CHANNEL-OP-REPLACE logo-layer)
|
||||
|
||||
; if we are going to use transparent gradients for text, we will (maybe) need to uncomment this
|
||||
; this clears black letters first so you don't end up with black where the transparent should be
|
||||
; (gimp-edit-clear img logo-layer)
|
||||
|
||||
(if (= use-pattern-text TRUE)
|
||||
(begin
|
||||
(gimp-context-set-pattern pattern-text)
|
||||
(gimp-edit-bucket-fill logo-layer
|
||||
PATTERN-BUCKET-FILL NORMAL-MODE 100 0 FALSE 0 0)
|
||||
)
|
||||
)
|
||||
|
||||
(if (= use-pattern-text FALSE)
|
||||
(begin
|
||||
(gimp-context-set-gradient blend-gradient-text)
|
||||
|
||||
(gimp-edit-blend logo-layer CUSTOM-MODE NORMAL-MODE
|
||||
GRADIENT-LINEAR 100 0 REPEAT-NONE
|
||||
blend-gradient-text-reverse
|
||||
FALSE 0 0 TRUE
|
||||
0 0 0 (+ height 5))
|
||||
)
|
||||
)
|
||||
|
||||
(gimp-selection-none img)
|
||||
|
||||
(gimp-image-select-item img CHANNEL-OP-REPLACE grow-me)
|
||||
(gimp-selection-grow img grow-size)
|
||||
|
||||
; if we are going to use transparent gradients for outline, we will (maybe) need to uncomment this
|
||||
; I didn't put it in the options because there are already enough settings there and anyway, transparent
|
||||
; gradients will be used very rarely (if ever)
|
||||
; (gimp-edit-clear img grow-me)
|
||||
|
||||
(if (= use-pattern-outline TRUE)
|
||||
(begin
|
||||
(gimp-context-set-pattern pattern-outline)
|
||||
(gimp-edit-bucket-fill grow-me
|
||||
PATTERN-BUCKET-FILL NORMAL-MODE 100
|
||||
0 FALSE 0 0)
|
||||
)
|
||||
)
|
||||
|
||||
(if (= use-pattern-outline FALSE)
|
||||
(begin
|
||||
(gimp-context-set-gradient blend-gradient-outline)
|
||||
|
||||
(gimp-edit-blend grow-me CUSTOM-MODE NORMAL-MODE
|
||||
GRADIENT-LINEAR 100 0 REPEAT-NONE
|
||||
blend-gradient-outline-reverse
|
||||
FALSE 0 0 TRUE
|
||||
0 0 0 (+ height 5))
|
||||
)
|
||||
)
|
||||
|
||||
(gimp-selection-none img)
|
||||
|
||||
(plug-in-bump-map (if (= noninteractive TRUE)
|
||||
RUN-NONINTERACTIVE
|
||||
RUN-INTERACTIVE)
|
||||
img grow-me logo-layer
|
||||
110.0 45.0 3 0 0 0 0 TRUE FALSE 0)
|
||||
(gimp-layer-set-mode logo-layer SCREEN-MODE)
|
||||
|
||||
(if (= use-pattern-overlay TRUE)
|
||||
(begin
|
||||
(gimp-image-select-item img CHANNEL-OP-REPLACE grow-me)
|
||||
(gimp-context-set-pattern pattern-overlay)
|
||||
(gimp-edit-bucket-fill grow-me PATTERN-BUCKET-FILL
|
||||
OVERLAY-MODE 100 0 FALSE 0 0)
|
||||
(gimp-selection-none img)
|
||||
)
|
||||
)
|
||||
|
||||
(if (= shadow-toggle TRUE)
|
||||
(begin
|
||||
(gimp-image-select-item img CHANNEL-OP-REPLACE logo-layer)
|
||||
(set! dont-drop-me (car (script-fu-drop-shadow img logo-layer
|
||||
s-offset-x s-offset-y
|
||||
15 '(0 0 0) 80 TRUE)))
|
||||
(set! width (car (gimp-image-width img)))
|
||||
(set! height (car (gimp-image-height img)))
|
||||
(gimp-selection-none img)
|
||||
)
|
||||
)
|
||||
|
||||
(gimp-context-pop)
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
(define (script-fu-glossy-logo-alpha img
|
||||
logo-layer
|
||||
blend-gradient-text
|
||||
blend-gradient-text-reverse
|
||||
blend-gradient-outline
|
||||
blend-gradient-outline-reverse
|
||||
grow-size
|
||||
bg-color
|
||||
use-pattern-text
|
||||
pattern-text
|
||||
use-pattern-outline
|
||||
pattern-outline
|
||||
use-pattern-overlay
|
||||
pattern-overlay
|
||||
noninteractive
|
||||
shadow-toggle
|
||||
s-offset-x
|
||||
s-offset-y)
|
||||
(begin
|
||||
(gimp-image-undo-group-start img)
|
||||
(apply-glossy-logo-effect img logo-layer
|
||||
blend-gradient-text
|
||||
blend-gradient-text-reverse
|
||||
blend-gradient-outline
|
||||
blend-gradient-outline-reverse
|
||||
grow-size bg-color
|
||||
use-pattern-text pattern-text
|
||||
use-pattern-outline pattern-outline
|
||||
use-pattern-overlay pattern-overlay
|
||||
noninteractive shadow-toggle
|
||||
s-offset-x s-offset-y)
|
||||
(gimp-image-undo-group-end img)
|
||||
(gimp-displays-flush)
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
(script-fu-register "script-fu-glossy-logo-alpha"
|
||||
_"Glo_ssy..."
|
||||
_"Add gradients, patterns, shadows, and bump maps to the selected region (or alpha)"
|
||||
"Hrvoje Horvat (hhorvat@open.hr)"
|
||||
"Hrvoje Horvat"
|
||||
"14/04/1998"
|
||||
"RGBA"
|
||||
SF-IMAGE "Image" 0
|
||||
SF-DRAWABLE "Drawable" 0
|
||||
SF-GRADIENT _"Blend gradient (text)" "Shadows 2"
|
||||
SF-TOGGLE _"Text gradient reverse" FALSE
|
||||
SF-GRADIENT _"Blend gradient (outline)" "Shadows 2"
|
||||
SF-TOGGLE _"Outline gradient reverse" FALSE
|
||||
SF-ADJUSTMENT _"Outline size" '(5 0 250 1 10 0 1)
|
||||
SF-COLOR _"Background color" "white"
|
||||
SF-TOGGLE _"Use pattern for text instead of gradient" FALSE
|
||||
SF-PATTERN _"Pattern (text)" "Electric Blue"
|
||||
SF-TOGGLE _"Use pattern for outline instead of gradient" FALSE
|
||||
SF-PATTERN _"Pattern (outline)" "Electric Blue"
|
||||
SF-TOGGLE _"Use pattern overlay" FALSE
|
||||
SF-PATTERN _"Pattern (overlay)" "Parque #1"
|
||||
SF-TOGGLE _"Default bumpmap settings" TRUE
|
||||
SF-TOGGLE _"Shadow" TRUE
|
||||
SF-ADJUSTMENT _"Shadow X offset" '(8 0 100 1 10 0 1)
|
||||
SF-ADJUSTMENT _"Shadow Y offset" '(8 0 100 1 10 0 1)
|
||||
)
|
||||
|
||||
(script-fu-menu-register "script-fu-glossy-logo-alpha"
|
||||
"<Image>/Filters/Alpha to Logo")
|
||||
|
||||
|
||||
(define (script-fu-glossy-logo text
|
||||
size
|
||||
font
|
||||
blend-gradient-text
|
||||
blend-gradient-text-reverse
|
||||
blend-gradient-outline
|
||||
blend-gradient-outline-reverse
|
||||
grow-size
|
||||
bg-color
|
||||
use-pattern-text
|
||||
pattern-text
|
||||
use-pattern-outline
|
||||
pattern-outline
|
||||
use-pattern-overlay
|
||||
pattern-overlay
|
||||
noninteractive
|
||||
shadow-toggle
|
||||
s-offset-x
|
||||
s-offset-y)
|
||||
(let* (
|
||||
(img (car (gimp-image-new 256 256 RGB)))
|
||||
(text-layer (car (gimp-text-fontname img -1 0 0 text 30 TRUE size PIXELS font)))
|
||||
)
|
||||
(gimp-image-undo-disable img)
|
||||
(apply-glossy-logo-effect img text-layer
|
||||
blend-gradient-text
|
||||
blend-gradient-text-reverse
|
||||
blend-gradient-outline
|
||||
blend-gradient-outline-reverse
|
||||
grow-size bg-color
|
||||
use-pattern-text pattern-text
|
||||
use-pattern-outline pattern-outline
|
||||
use-pattern-overlay pattern-overlay
|
||||
noninteractive shadow-toggle
|
||||
s-offset-x s-offset-y)
|
||||
(gimp-image-undo-enable img)
|
||||
(gimp-display-new img)
|
||||
)
|
||||
)
|
||||
|
||||
(script-fu-register "script-fu-glossy-logo"
|
||||
_"Glo_ssy..."
|
||||
_"Create a logo with gradients, patterns, shadows, and bump maps"
|
||||
"Hrvoje Horvat (hhorvat@open.hr)"
|
||||
"Hrvoje Horvat"
|
||||
"14/04/1998"
|
||||
""
|
||||
SF-STRING _"Text" "Galaxy"
|
||||
SF-ADJUSTMENT _"Font size (pixels)" '(100 2 1000 1 10 0 1)
|
||||
SF-FONT _"Font" "Eras"
|
||||
SF-GRADIENT _"Blend gradient (text)" "Shadows 2"
|
||||
SF-TOGGLE _"Text gradient reverse" FALSE
|
||||
SF-GRADIENT _"Blend gradient (outline)" "Shadows 2"
|
||||
SF-TOGGLE _"Outline gradient reverse" FALSE
|
||||
SF-ADJUSTMENT _"Outline size" '(5 0 250 1 10 0 1)
|
||||
SF-COLOR _"Background color" "white"
|
||||
SF-TOGGLE _"Use pattern for text instead of gradient" FALSE
|
||||
SF-PATTERN _"Pattern (text)" "Electric Blue"
|
||||
SF-TOGGLE _"Use pattern for outline instead of gradient" FALSE
|
||||
SF-PATTERN _"Pattern (outline)" "Electric Blue"
|
||||
SF-TOGGLE _"Use pattern overlay" FALSE
|
||||
SF-PATTERN _"Pattern (overlay)" "Parque #1"
|
||||
SF-TOGGLE _"Default bumpmap settings" TRUE
|
||||
SF-TOGGLE _"Shadow" TRUE
|
||||
SF-ADJUSTMENT _"Shadow X offset" '(8 0 100 1 10 0 1)
|
||||
SF-ADJUSTMENT _"Shadow Y offset" '(8 0 100 1 10 0 1)
|
||||
)
|
||||
|
||||
(script-fu-menu-register "script-fu-glossy-logo"
|
||||
"<Image>/File/Create/Logos")
|
@ -1,122 +0,0 @@
|
||||
; GLOWING
|
||||
; Create a text effect that simulates a glowing hot logo
|
||||
|
||||
(define (apply-glowing-logo-effect img
|
||||
logo-layer
|
||||
size
|
||||
bg-color)
|
||||
(let* (
|
||||
(grow (/ size 4))
|
||||
(feather1 (/ size 3))
|
||||
(feather2 (/ size 7))
|
||||
(feather3 (/ size 10))
|
||||
(width (car (gimp-drawable-width logo-layer)))
|
||||
(height (car (gimp-drawable-height logo-layer)))
|
||||
(posx (- (car (gimp-drawable-offsets logo-layer))))
|
||||
(posy (- (cadr (gimp-drawable-offsets logo-layer))))
|
||||
(glow-layer (car (gimp-layer-copy logo-layer TRUE)))
|
||||
(bg-layer (car (gimp-layer-new img width height RGB-IMAGE "Background" 100 NORMAL-MODE)))
|
||||
)
|
||||
|
||||
(gimp-context-push)
|
||||
(gimp-context-set-defaults)
|
||||
|
||||
(script-fu-util-image-resize-from-layer img logo-layer)
|
||||
(script-fu-util-image-add-layers img glow-layer bg-layer)
|
||||
(gimp-layer-translate glow-layer posx posy)
|
||||
|
||||
(gimp-selection-none img)
|
||||
(gimp-context-set-background bg-color)
|
||||
(gimp-edit-fill bg-layer BACKGROUND-FILL)
|
||||
|
||||
(gimp-layer-set-lock-alpha logo-layer TRUE)
|
||||
(gimp-context-set-background '(0 0 0))
|
||||
(gimp-edit-fill logo-layer BACKGROUND-FILL)
|
||||
|
||||
(gimp-image-select-item img CHANNEL-OP-REPLACE logo-layer)
|
||||
(gimp-selection-feather img feather1)
|
||||
(gimp-context-set-background '(221 0 0))
|
||||
(gimp-edit-fill glow-layer BACKGROUND-FILL)
|
||||
(gimp-edit-fill glow-layer BACKGROUND-FILL)
|
||||
(gimp-edit-fill glow-layer BACKGROUND-FILL)
|
||||
|
||||
(gimp-image-select-item img CHANNEL-OP-REPLACE logo-layer)
|
||||
(gimp-selection-feather img feather2)
|
||||
(gimp-context-set-background '(232 217 18))
|
||||
(gimp-edit-fill glow-layer BACKGROUND-FILL)
|
||||
(gimp-edit-fill glow-layer BACKGROUND-FILL)
|
||||
|
||||
(gimp-image-select-item img CHANNEL-OP-REPLACE logo-layer)
|
||||
(gimp-selection-feather img feather3)
|
||||
(gimp-context-set-background '(255 255 255))
|
||||
(gimp-edit-fill glow-layer BACKGROUND-FILL)
|
||||
(gimp-selection-none img)
|
||||
|
||||
(gimp-layer-set-mode logo-layer OVERLAY-MODE)
|
||||
(gimp-item-set-name glow-layer "Glow Layer")
|
||||
|
||||
(gimp-context-pop)
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
(define (script-fu-glowing-logo-alpha img
|
||||
logo-layer
|
||||
size
|
||||
bg-color)
|
||||
(begin
|
||||
(gimp-image-undo-group-start img)
|
||||
(apply-glowing-logo-effect img logo-layer (* size 3) bg-color)
|
||||
(gimp-image-undo-group-end img)
|
||||
(gimp-displays-flush)
|
||||
)
|
||||
)
|
||||
|
||||
(script-fu-register "script-fu-glowing-logo-alpha"
|
||||
_"Glo_wing Hot..."
|
||||
_"Add a glowing hot metal effect to the selected region (or alpha)"
|
||||
"Spencer Kimball"
|
||||
"Spencer Kimball"
|
||||
"1997"
|
||||
"RGBA"
|
||||
SF-IMAGE "Image" 0
|
||||
SF-DRAWABLE "Drawable" 0
|
||||
SF-ADJUSTMENT _"Effect size (pixels)" '(50 1 500 1 10 0 1)
|
||||
SF-COLOR _"Background color" '(7 0 20)
|
||||
)
|
||||
|
||||
(script-fu-menu-register "script-fu-glowing-logo-alpha"
|
||||
"<Image>/Filters/Alpha to Logo")
|
||||
|
||||
|
||||
(define (script-fu-glowing-logo text
|
||||
size
|
||||
font
|
||||
bg-color)
|
||||
(let* (
|
||||
(img (car (gimp-image-new 256 256 RGB)))
|
||||
(border (/ size 4))
|
||||
(text-layer (car (gimp-text-fontname img -1 0 0 text border TRUE size PIXELS font)))
|
||||
)
|
||||
(gimp-image-undo-disable img)
|
||||
(apply-glowing-logo-effect img text-layer size bg-color)
|
||||
(gimp-image-undo-enable img)
|
||||
(gimp-display-new img)
|
||||
)
|
||||
)
|
||||
|
||||
(script-fu-register "script-fu-glowing-logo"
|
||||
_"Glo_wing Hot..."
|
||||
_"Create a logo that looks like glowing hot metal"
|
||||
"Spencer Kimball"
|
||||
"Spencer Kimball"
|
||||
"1997"
|
||||
""
|
||||
SF-STRING _"Text" "GLOWING"
|
||||
SF-ADJUSTMENT _"Font size (pixels)" '(150 2 1000 1 10 0 1)
|
||||
SF-FONT _"Font" "Slogan"
|
||||
SF-COLOR _"Background color" '(7 0 20)
|
||||
)
|
||||
|
||||
(script-fu-menu-register "script-fu-glowing-logo"
|
||||
"<Image>/File/Create/Logos")
|
@ -1,148 +0,0 @@
|
||||
; GIMP - The GNU Image Manipulation Program
|
||||
; Copyright (C) 1995 Spencer Kimball and Peter Mattis
|
||||
;
|
||||
; 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/>.
|
||||
;
|
||||
; Gradient Bevel v0.1 04/08/98
|
||||
; by Brian McFee <keebler@wco.com>
|
||||
; Create cool glossy bevelly text
|
||||
|
||||
(define (apply-gradient-bevel-logo-effect img
|
||||
logo-layer
|
||||
b-size
|
||||
bevel-height
|
||||
bevel-width
|
||||
bg-color)
|
||||
(let* (
|
||||
(width (car (gimp-drawable-width logo-layer)))
|
||||
(height (car (gimp-drawable-height logo-layer)))
|
||||
(indentX (+ b-size 12))
|
||||
(indentY (+ b-size (/ height 8)))
|
||||
(bg-layer (car (gimp-layer-new img width height RGBA-IMAGE "Background" 100 NORMAL-MODE)))
|
||||
(blur-layer (car (gimp-layer-new img width height RGBA-IMAGE "Blur" 100 NORMAL-MODE)))
|
||||
)
|
||||
|
||||
(gimp-context-push)
|
||||
(gimp-context-set-defaults)
|
||||
|
||||
(script-fu-util-image-resize-from-layer img logo-layer)
|
||||
(script-fu-util-image-add-layers img blur-layer bg-layer)
|
||||
|
||||
(gimp-selection-all img)
|
||||
(gimp-context-set-background bg-color)
|
||||
(gimp-edit-fill bg-layer BACKGROUND-FILL)
|
||||
(gimp-selection-none img)
|
||||
|
||||
(gimp-layer-set-lock-alpha blur-layer TRUE)
|
||||
(gimp-context-set-background '(255 255 255))
|
||||
(gimp-selection-all img)
|
||||
(gimp-edit-fill blur-layer BACKGROUND-FILL)
|
||||
(gimp-edit-clear blur-layer)
|
||||
(gimp-selection-none img)
|
||||
(gimp-layer-set-lock-alpha blur-layer FALSE)
|
||||
(gimp-image-select-item img CHANNEL-OP-REPLACE logo-layer)
|
||||
(gimp-edit-fill blur-layer BACKGROUND-FILL)
|
||||
(plug-in-gauss-rle RUN-NONINTERACTIVE img blur-layer bevel-width 1 1)
|
||||
(gimp-selection-none img)
|
||||
(gimp-context-set-background '(127 127 127))
|
||||
(gimp-context-set-foreground '(255 255 255))
|
||||
(gimp-layer-set-lock-alpha logo-layer TRUE)
|
||||
(gimp-selection-all img)
|
||||
|
||||
(gimp-edit-blend logo-layer FG-BG-RGB-MODE NORMAL-MODE
|
||||
GRADIENT-RADIAL 95 0 REPEAT-NONE FALSE
|
||||
FALSE 0 0 TRUE
|
||||
indentX indentY indentX (- height indentY))
|
||||
|
||||
(gimp-selection-none img)
|
||||
(gimp-layer-set-lock-alpha logo-layer FALSE)
|
||||
(plug-in-bump-map RUN-NONINTERACTIVE img logo-layer blur-layer 115 bevel-height 5 0 0 0 15 TRUE FALSE 0)
|
||||
(gimp-layer-set-offsets blur-layer 5 5)
|
||||
(gimp-invert blur-layer)
|
||||
(gimp-layer-set-opacity blur-layer 50.0)
|
||||
(gimp-image-set-active-layer img logo-layer)
|
||||
|
||||
(gimp-context-pop)
|
||||
)
|
||||
)
|
||||
|
||||
(define (script-fu-gradient-bevel-logo-alpha img
|
||||
logo-layer
|
||||
b-size
|
||||
bevel-height
|
||||
bevel-width
|
||||
bg-color)
|
||||
(gimp-image-undo-group-start img)
|
||||
(apply-gradient-bevel-logo-effect img logo-layer b-size
|
||||
bevel-height bevel-width bg-color)
|
||||
(gimp-image-undo-group-end img)
|
||||
(gimp-displays-flush)
|
||||
)
|
||||
|
||||
(script-fu-register "script-fu-gradient-bevel-logo-alpha"
|
||||
_"Gradient Beve_l..."
|
||||
_"Add a shiny look and bevel effect to the selected region (or alpha)"
|
||||
"Brian McFee <keebler@wco.com>"
|
||||
"Brian McFee"
|
||||
"April 1998"
|
||||
"RGBA"
|
||||
SF-IMAGE "Image" 0
|
||||
SF-DRAWABLE "Drawable" 0
|
||||
SF-ADJUSTMENT _"Border size (pixels)" '(22 1 300 1 10 0 1)
|
||||
SF-ADJUSTMENT _"Bevel height (sharpness)" '(40 1 250 1 10 0 1)
|
||||
SF-ADJUSTMENT _"Bevel width" '(2.5 1 200 1 10 1 1)
|
||||
SF-COLOR _"Background color" "white"
|
||||
)
|
||||
|
||||
(script-fu-menu-register "script-fu-gradient-bevel-logo-alpha"
|
||||
"<Image>/Filters/Alpha to Logo")
|
||||
|
||||
|
||||
(define (script-fu-gradient-bevel-logo text
|
||||
size
|
||||
font
|
||||
bevel-height
|
||||
bevel-width
|
||||
bg-color)
|
||||
(let* (
|
||||
(img (car (gimp-image-new 256 256 RGB)))
|
||||
(border (/ size 4))
|
||||
(text-layer (car (gimp-text-fontname img -1 0 0 text
|
||||
border TRUE size PIXELS font)))
|
||||
)
|
||||
(gimp-image-undo-disable img)
|
||||
(apply-gradient-bevel-logo-effect img text-layer border
|
||||
bevel-height bevel-width bg-color)
|
||||
(gimp-image-undo-enable img)
|
||||
(gimp-display-new img)
|
||||
)
|
||||
)
|
||||
|
||||
(script-fu-register "script-fu-gradient-bevel-logo"
|
||||
_"Gradient Beve_l..."
|
||||
_"Create a logo with a shiny look and beveled edges"
|
||||
"Brian McFee <keebler@wco.com>"
|
||||
"Brian McFee"
|
||||
"April 1998"
|
||||
""
|
||||
SF-STRING _"Text" "Moo"
|
||||
SF-ADJUSTMENT _"Font size (pixels)" '(90 2 1000 1 10 0 1)
|
||||
SF-FONT _"Font" "Sans Bold"
|
||||
SF-ADJUSTMENT _"Bevel height (sharpness)" '(40 1 250 1 10 0 1)
|
||||
SF-ADJUSTMENT _"Bevel width" '(2.5 1 200 1 10 1 1)
|
||||
SF-COLOR _"Background color" "white"
|
||||
)
|
||||
|
||||
(script-fu-menu-register "script-fu-gradient-bevel-logo"
|
||||
"<Image>/File/Create/Logos")
|
@ -1,107 +0,0 @@
|
||||
;;; i26-gunya2.scm -*-scheme-*-
|
||||
;;; Time-stamp: <1997/05/11 18:46:26 narazaki@InetQ.or.jp>
|
||||
;;; Author: Shuji Narazaki (narazaki@InetQ.or.jp)
|
||||
; ************************************************************************
|
||||
; Changed on Feb 4, 1999 by Piet van Oostrum <piet@cs.uu.nl>
|
||||
; For use with GIMP 1.1.
|
||||
; All calls to gimp-text-* have been converted to use the *-fontname form.
|
||||
; The corresponding parameters have been replaced by an SF-FONT parameter.
|
||||
; ************************************************************************
|
||||
|
||||
;;; Comment:
|
||||
;;; This is the first font decoration of Imigre-26 (i26)
|
||||
;;; Code:
|
||||
|
||||
(define (script-fu-i26-gunya2 text text-color frame-color font font-size frame-size)
|
||||
(let* (
|
||||
(img (car (gimp-image-new 256 256 RGB)))
|
||||
(border (/ font-size 10))
|
||||
(text-layer (car (gimp-text-fontname img -1 0 0 text (* border 2)
|
||||
TRUE font-size PIXELS font)))
|
||||
(width (car (gimp-drawable-width text-layer)))
|
||||
(height (car (gimp-drawable-height text-layer)))
|
||||
(dist-text-layer (car (gimp-layer-new img width height RGBA-IMAGE
|
||||
"Distorted text" 100 NORMAL-MODE)))
|
||||
(dist-frame-layer (car (gimp-layer-new img width height RGBA-IMAGE
|
||||
"Distorted text" 100 NORMAL-MODE)))
|
||||
(distortion-img (car (gimp-image-new width height GRAY)))
|
||||
(distortion-layer (car (gimp-layer-new distortion-img width height
|
||||
GRAY-IMAGE "temp" 100 NORMAL-MODE)))
|
||||
(radius (/ font-size 10))
|
||||
(prob 0.5)
|
||||
)
|
||||
|
||||
(gimp-context-push)
|
||||
(gimp-context-set-defaults)
|
||||
|
||||
(gimp-image-undo-disable img)
|
||||
(gimp-image-undo-disable distortion-img)
|
||||
(gimp-image-resize img width height 0 0)
|
||||
(gimp-image-insert-layer img dist-text-layer 0 -1)
|
||||
(gimp-image-insert-layer img dist-frame-layer 0 -1)
|
||||
(gimp-image-insert-layer distortion-img distortion-layer 0 -1)
|
||||
(gimp-selection-none img)
|
||||
(gimp-edit-clear dist-text-layer)
|
||||
(gimp-edit-clear dist-frame-layer)
|
||||
;; get the text shape
|
||||
(gimp-image-select-item img CHANNEL-OP-REPLACE text-layer)
|
||||
;; fill it with the specified color
|
||||
(gimp-context-set-foreground text-color)
|
||||
(gimp-edit-fill dist-text-layer FOREGROUND-FILL)
|
||||
;; get the border shape
|
||||
(gimp-selection-border img frame-size)
|
||||
(gimp-context-set-background frame-color)
|
||||
(gimp-edit-fill dist-frame-layer BACKGROUND-FILL)
|
||||
(gimp-selection-none img)
|
||||
;; now make the distortion data
|
||||
(gimp-context-set-background '(255 255 255))
|
||||
(gimp-edit-fill distortion-layer BACKGROUND-FILL)
|
||||
(plug-in-noisify RUN-NONINTERACTIVE distortion-img distortion-layer FALSE prob prob prob 0.0)
|
||||
(plug-in-gauss-rle RUN-NONINTERACTIVE distortion-img distortion-layer radius 1 1)
|
||||
(plug-in-c-astretch RUN-NONINTERACTIVE distortion-img distortion-layer)
|
||||
(plug-in-gauss-rle RUN-NONINTERACTIVE distortion-img distortion-layer radius 1 1)
|
||||
;; OK, apply it to dist-text-layer
|
||||
(plug-in-displace RUN-NONINTERACTIVE img dist-text-layer radius radius 1 1
|
||||
distortion-layer distortion-layer 0)
|
||||
;; make the distortion data once again fro the frame
|
||||
(gimp-edit-fill distortion-layer BACKGROUND-FILL)
|
||||
(plug-in-noisify RUN-NONINTERACTIVE distortion-img distortion-layer FALSE prob prob prob 0.0)
|
||||
(plug-in-gauss-rle RUN-NONINTERACTIVE distortion-img distortion-layer radius 1 1)
|
||||
(plug-in-c-astretch RUN-NONINTERACTIVE distortion-img distortion-layer)
|
||||
(plug-in-gauss-rle RUN-NONINTERACTIVE distortion-img distortion-layer radius 1 1)
|
||||
;; then, apply it to dist-frame-layer
|
||||
(plug-in-displace RUN-NONINTERACTIVE img dist-frame-layer radius radius 1 1
|
||||
distortion-layer distortion-layer 0)
|
||||
;; Finally, clear the bottom layer (text-layer)
|
||||
(gimp-selection-all img)
|
||||
(gimp-context-set-background '(255 255 255))
|
||||
(gimp-edit-fill text-layer BACKGROUND-FILL)
|
||||
;; post processing
|
||||
(gimp-image-set-active-layer img dist-text-layer)
|
||||
(gimp-selection-none img)
|
||||
(gimp-image-undo-enable img)
|
||||
(gimp-image-delete distortion-img)
|
||||
(gimp-display-new img)
|
||||
|
||||
(gimp-context-pop)
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
(script-fu-register "script-fu-i26-gunya2"
|
||||
_"Imigre-_26..."
|
||||
_"Create a logo in a two-color, scribbled text style"
|
||||
"Shuji Narazaki"
|
||||
"Shuji Narazaki"
|
||||
"1997"
|
||||
""
|
||||
SF-STRING _"Text" "GIMP"
|
||||
SF-COLOR _"Text color" "red"
|
||||
SF-COLOR _"Frame color" '(0 34 255)
|
||||
SF-FONT _"Font" "Becker"
|
||||
SF-ADJUSTMENT _"Font size (pixels)" '(100 2 1000 1 10 0 1)
|
||||
SF-ADJUSTMENT _"Frame size" '(2 1 20 1 5 0 1)
|
||||
)
|
||||
|
||||
(script-fu-menu-register "script-fu-i26-gunya2"
|
||||
"<Image>/File/Create/Logos")
|
@ -1,91 +0,0 @@
|
||||
; GIMP - The GNU Image Manipulation Program
|
||||
; Copyright (C) 1995 Spencer Kimball and Peter Mattis
|
||||
;
|
||||
; Land --- create a pattern that resembles a Topographic map
|
||||
; Copyright (C) 1997 Adrian Karstan Likins
|
||||
; aklikins@eos.ncsu.edu
|
||||
;
|
||||
;
|
||||
; This script works on the current gradient you have loaded.
|
||||
; Some suggested gradients:
|
||||
; Land (produces a earthlike map)
|
||||
; Brushed_aluminum (looks like the moon)
|
||||
;
|
||||
;
|
||||
; Thanks to Quartic for helping me debug this thing.
|
||||
;
|
||||
; 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 (script-fu-land width height seed detail landheight seadepth xscale yscale gradient)
|
||||
(let* (
|
||||
(img (car (gimp-image-new width height RGB)))
|
||||
(layer-one (car (gimp-layer-new img width height
|
||||
RGB-IMAGE "Bottom" 100 NORMAL-MODE)))
|
||||
(layer-two 0)
|
||||
)
|
||||
|
||||
(gimp-context-push)
|
||||
(gimp-context-set-defaults)
|
||||
(gimp-context-set-gradient gradient)
|
||||
(gimp-image-undo-disable img)
|
||||
(gimp-image-insert-layer img layer-one 0 0)
|
||||
|
||||
(plug-in-solid-noise RUN-NONINTERACTIVE img layer-one TRUE FALSE seed detail xscale yscale)
|
||||
(plug-in-c-astretch RUN-NONINTERACTIVE img layer-one)
|
||||
(set! layer-two (car (gimp-layer-copy layer-one TRUE)))
|
||||
(gimp-image-insert-layer img layer-two 0 -1)
|
||||
(gimp-image-set-active-layer img layer-two)
|
||||
|
||||
(plug-in-gradmap RUN-NONINTERACTIVE img layer-two)
|
||||
|
||||
(gimp-image-select-color img CHANNEL-OP-REPLACE layer-one '(190 190 190))
|
||||
(plug-in-bump-map RUN-NONINTERACTIVE img layer-two layer-one 135.0 35 landheight 0 0 0 0 TRUE FALSE 0)
|
||||
|
||||
;(plug-in-c-astretch RUN-NONINTERACTIVE img layer-two)
|
||||
(gimp-selection-invert img)
|
||||
(plug-in-bump-map RUN-NONINTERACTIVE img layer-two layer-one 135.0 35 seadepth 0 0 0 0 TRUE FALSE 0)
|
||||
|
||||
;(plug-in-c-astretch RUN-NONINTERACTIVE img layer-two)
|
||||
|
||||
; uncomment the next line if you want to keep a selection of the "land"
|
||||
(gimp-selection-none img)
|
||||
|
||||
(gimp-display-new img)
|
||||
(gimp-image-undo-enable img)
|
||||
(gimp-context-pop)
|
||||
)
|
||||
)
|
||||
|
||||
(script-fu-register "script-fu-land"
|
||||
_"_Land..."
|
||||
_"Create an image filled with a topographic map pattern"
|
||||
"Adrian Likins <aklikins@eos.ncsu.edu>"
|
||||
"Adrian Likins"
|
||||
"1997"
|
||||
""
|
||||
SF-ADJUSTMENT _"Image width" '(256 10 1000 1 10 0 1)
|
||||
SF-ADJUSTMENT _"Image height" '(256 10 1000 1 10 0 1)
|
||||
SF-ADJUSTMENT _"Random seed" '(32 0 15000000 1 10 0 1)
|
||||
SF-ADJUSTMENT _"Detail level" '(4 1 15 1 5 0 0)
|
||||
SF-ADJUSTMENT _"Land height" '(60 1 65 1 10 0 1)
|
||||
SF-ADJUSTMENT _"Sea depth" '(4 1 65 1 10 0 1)
|
||||
SF-ADJUSTMENT _"Scale X" '(4 0.1 16 1 5 0.1 0)
|
||||
SF-ADJUSTMENT _"Scale Y" '(4 0.1 16 1 5 0.1 0)
|
||||
SF-GRADIENT _"Gradient" "Land 1"
|
||||
)
|
||||
|
||||
(script-fu-menu-register "script-fu-land"
|
||||
"<Image>/File/Create/Patterns")
|
@ -1,295 +0,0 @@
|
||||
; GIMP - The GNU Image Manipulation Program
|
||||
; Copyright (C) 1995 Spencer Kimball and Peter Mattis
|
||||
;
|
||||
; 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/>.
|
||||
;
|
||||
; NEON
|
||||
; Create a text effect that simulates neon lighting
|
||||
|
||||
(define (apply-neon-logo-effect img
|
||||
tube-layer
|
||||
size
|
||||
bg-color
|
||||
glow-color
|
||||
shadow)
|
||||
|
||||
(define (set-pt a index x y)
|
||||
(begin
|
||||
(aset a (* index 2) x)
|
||||
(aset a (+ (* index 2) 1) y)))
|
||||
|
||||
(define (neon-spline1)
|
||||
(let* ((a (cons-array 6 'byte)))
|
||||
(set-pt a 0 0 0)
|
||||
(set-pt a 1 127 145)
|
||||
(set-pt a 2 255 255)
|
||||
a))
|
||||
|
||||
(define (neon-spline2)
|
||||
(let* ((a (cons-array 6 'byte)))
|
||||
(set-pt a 0 0 0)
|
||||
(set-pt a 1 110 150)
|
||||
(set-pt a 2 255 255)
|
||||
a))
|
||||
|
||||
(define (neon-spline3)
|
||||
(let* ((a (cons-array 6 'byte)))
|
||||
(set-pt a 0 0 0)
|
||||
(set-pt a 1 100 185)
|
||||
(set-pt a 2 255 255)
|
||||
a))
|
||||
|
||||
(define (neon-spline4)
|
||||
(let* ((a (cons-array 8 'byte)))
|
||||
(set-pt a 0 0 0)
|
||||
(set-pt a 1 64 64)
|
||||
(set-pt a 2 127 192)
|
||||
(set-pt a 3 255 255)
|
||||
a))
|
||||
|
||||
(define (find-hue-offset color)
|
||||
(let* (
|
||||
(R (car color))
|
||||
(G (cadr color))
|
||||
(B (caddr color))
|
||||
(max-val (max R G B))
|
||||
(min-val (min R G B))
|
||||
(delta (- max-val min-val))
|
||||
(hue 0)
|
||||
)
|
||||
(if (= delta 0)
|
||||
0
|
||||
(begin
|
||||
(cond
|
||||
((= max-val R)
|
||||
(set! hue (/ (- G B) (* 1.0 delta))))
|
||||
((= max-val G)
|
||||
(set! hue (+ 2 (/ (- B R) (* 1.0 delta)))))
|
||||
((= max-val B)
|
||||
(set! hue (+ 4 (/ (- R G) (* 1.0 delta)))))
|
||||
)
|
||||
(set! hue (* hue 60))
|
||||
(if (< hue 0) (set! hue (+ hue 360)))
|
||||
(if (> hue 360) (set! hue (- hue 360)))
|
||||
(if (> hue 180) (set! hue (- hue 360)))
|
||||
hue
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
(let* (
|
||||
(tube-hue (find-hue-offset glow-color))
|
||||
(shrink (/ size 14))
|
||||
(grow (/ size 40))
|
||||
(feather (/ size 5))
|
||||
(feather1 (/ size 25))
|
||||
(feather2 (/ size 12))
|
||||
(inc-shrink (/ size 100))
|
||||
(shadow-shrink (/ size 40))
|
||||
(shadow-feather (/ size 20))
|
||||
(shadow-offx (/ size 10))
|
||||
(shadow-offy (/ size 10))
|
||||
(width (car (gimp-drawable-width tube-layer)))
|
||||
(height (car (gimp-drawable-height tube-layer)))
|
||||
(glow-layer (car (gimp-layer-new img width height RGBA-IMAGE
|
||||
"Neon Glow" 100 NORMAL-MODE)))
|
||||
(bg-layer (car (gimp-layer-new img width height RGB-IMAGE
|
||||
"Background" 100 NORMAL-MODE)))
|
||||
(shadow-layer (if (= shadow TRUE)
|
||||
(car (gimp-layer-new img width height RGBA-IMAGE
|
||||
"Shadow" 100 NORMAL-MODE))
|
||||
0))
|
||||
(selection 0)
|
||||
(max_shrink 0)
|
||||
)
|
||||
|
||||
(gimp-context-push)
|
||||
(gimp-context-set-defaults)
|
||||
|
||||
; ensure that we don't shrink selection so much
|
||||
; that we create an empty selection.
|
||||
(gimp-image-select-item img CHANNEL-OP-REPLACE tube-layer)
|
||||
(while (= (car (gimp-selection-is-empty img)) FALSE)
|
||||
(begin
|
||||
(gimp-selection-shrink img 1)
|
||||
(set! max_shrink (+ max_shrink 1))
|
||||
; escape early if we know that we can perform
|
||||
; as much shrink steps as we want
|
||||
(if (> max_shrink shrink)
|
||||
(gimp-selection-none img))
|
||||
)
|
||||
)
|
||||
(if (= (car (gimp-selection-is-empty img)) TRUE)
|
||||
(if (> max_shrink 0)
|
||||
(set! max_shrink (- max_shrink 1))))
|
||||
; clamp upper bounds to valid shrink step range
|
||||
(if (> shrink max_shrink)
|
||||
(set! shrink max_shrink))
|
||||
(if (> inc-shrink (/ max_shrink 3))
|
||||
(set! inc-shrink (/ max_shrink 3)))
|
||||
(if (> shadow-shrink max_shrink)
|
||||
(set! shadow-shrink max_shrink))
|
||||
|
||||
(script-fu-util-image-resize-from-layer img tube-layer)
|
||||
(script-fu-util-image-add-layers img glow-layer bg-layer)
|
||||
(if (not (= shadow 0))
|
||||
(begin
|
||||
(gimp-image-insert-layer img shadow-layer 0 -1)
|
||||
(gimp-edit-clear shadow-layer)))
|
||||
|
||||
(gimp-context-set-background '(0 0 0))
|
||||
(gimp-image-select-item img CHANNEL-OP-REPLACE tube-layer)
|
||||
(set! selection (car (gimp-selection-save img)))
|
||||
(gimp-selection-none img)
|
||||
|
||||
(gimp-edit-clear glow-layer)
|
||||
(gimp-edit-clear tube-layer)
|
||||
|
||||
(gimp-context-set-background bg-color)
|
||||
(gimp-edit-fill bg-layer BACKGROUND-FILL)
|
||||
|
||||
(gimp-image-select-item img CHANNEL-OP-REPLACE selection)
|
||||
(gimp-context-set-background '(255 255 255))
|
||||
(gimp-edit-fill tube-layer BACKGROUND-FILL)
|
||||
(gimp-selection-shrink img shrink)
|
||||
(gimp-context-set-background '(0 0 0))
|
||||
(gimp-edit-fill selection BACKGROUND-FILL)
|
||||
(gimp-edit-clear tube-layer)
|
||||
|
||||
(gimp-selection-none img)
|
||||
(if (not (= feather1 0))
|
||||
(plug-in-gauss-rle RUN-NONINTERACTIVE img tube-layer feather1 TRUE TRUE))
|
||||
(gimp-image-select-item img CHANNEL-OP-REPLACE selection)
|
||||
(if (not (= feather2 0))
|
||||
(plug-in-gauss-rle RUN-NONINTERACTIVE img tube-layer feather2 TRUE TRUE))
|
||||
|
||||
(gimp-selection-feather img inc-shrink)
|
||||
(gimp-selection-shrink img inc-shrink)
|
||||
(gimp-curves-spline tube-layer 4 6 (neon-spline1))
|
||||
|
||||
(gimp-image-select-item img CHANNEL-OP-REPLACE selection)
|
||||
(gimp-selection-feather img inc-shrink)
|
||||
(gimp-selection-shrink img (* inc-shrink 2))
|
||||
(gimp-curves-spline tube-layer 4 6 (neon-spline2))
|
||||
|
||||
(gimp-image-select-item img CHANNEL-OP-REPLACE selection)
|
||||
(gimp-selection-feather img inc-shrink)
|
||||
(gimp-selection-shrink img (* inc-shrink 3))
|
||||
(gimp-curves-spline tube-layer 4 6 (neon-spline3))
|
||||
|
||||
(gimp-layer-set-lock-alpha tube-layer 1)
|
||||
(gimp-image-select-item img CHANNEL-OP-REPLACE tube-layer)
|
||||
(gimp-selection-invert img)
|
||||
(gimp-context-set-background glow-color)
|
||||
(gimp-edit-fill tube-layer BACKGROUND-FILL)
|
||||
|
||||
(gimp-selection-none img)
|
||||
(gimp-layer-set-lock-alpha tube-layer 0)
|
||||
(gimp-curves-spline tube-layer 4 8 (neon-spline4))
|
||||
|
||||
(gimp-image-select-item img CHANNEL-OP-REPLACE selection)
|
||||
(gimp-selection-grow img grow)
|
||||
(gimp-selection-invert img)
|
||||
(gimp-edit-clear tube-layer)
|
||||
(gimp-selection-invert img)
|
||||
|
||||
(gimp-selection-feather img feather)
|
||||
(gimp-edit-fill glow-layer BACKGROUND-FILL)
|
||||
|
||||
(if (not (= shadow 0))
|
||||
(begin
|
||||
(gimp-image-select-item img CHANNEL-OP-REPLACE selection)
|
||||
(gimp-selection-grow img grow)
|
||||
(gimp-selection-shrink img shadow-shrink)
|
||||
(gimp-selection-feather img shadow-feather)
|
||||
(gimp-selection-translate img shadow-offx shadow-offy)
|
||||
(gimp-context-set-background '(0 0 0))
|
||||
(gimp-edit-fill shadow-layer BACKGROUND-FILL)))
|
||||
(gimp-selection-none img)
|
||||
|
||||
(gimp-item-set-name tube-layer "Neon Tubes")
|
||||
(gimp-image-remove-channel img selection)
|
||||
|
||||
(gimp-context-pop)
|
||||
)
|
||||
)
|
||||
|
||||
(define (script-fu-neon-logo-alpha img
|
||||
tube-layer
|
||||
size
|
||||
bg-color
|
||||
glow-color
|
||||
shadow)
|
||||
(begin
|
||||
(gimp-image-undo-group-start img)
|
||||
(apply-neon-logo-effect img tube-layer (* size 5) bg-color glow-color shadow)
|
||||
(gimp-image-undo-group-end img)
|
||||
(gimp-displays-flush)
|
||||
)
|
||||
)
|
||||
|
||||
(script-fu-register "script-fu-neon-logo-alpha"
|
||||
_"N_eon..."
|
||||
_"Convert the selected region (or alpha) into a neon-sign like object"
|
||||
"Spencer Kimball"
|
||||
"Spencer Kimball"
|
||||
"1997"
|
||||
"RGBA"
|
||||
SF-IMAGE "Image" 0
|
||||
SF-DRAWABLE "Drawable" 0
|
||||
SF-ADJUSTMENT _"Effect size (pixels)" '(30 1 200 1 10 0 1)
|
||||
SF-COLOR _"Background color" "black"
|
||||
SF-COLOR _"Glow color" '(38 211 255)
|
||||
SF-TOGGLE _"Create shadow" FALSE
|
||||
)
|
||||
|
||||
(script-fu-menu-register "script-fu-neon-logo-alpha"
|
||||
"<Image>/Filters/Alpha to Logo")
|
||||
|
||||
(define (script-fu-neon-logo text
|
||||
size
|
||||
font
|
||||
bg-color
|
||||
glow-color
|
||||
shadow)
|
||||
(let* (
|
||||
(img (car (gimp-image-new 256 256 RGB)))
|
||||
(border (/ size 4))
|
||||
(tube-layer (car (gimp-text-fontname img -1 0 0 text border TRUE size PIXELS font)))
|
||||
)
|
||||
(gimp-image-undo-disable img)
|
||||
(apply-neon-logo-effect img tube-layer size bg-color glow-color shadow)
|
||||
(gimp-image-undo-enable img)
|
||||
(gimp-display-new img)
|
||||
)
|
||||
)
|
||||
|
||||
(script-fu-register "script-fu-neon-logo"
|
||||
_"N_eon..."
|
||||
_"Create a logo in the style of a neon sign"
|
||||
"Spencer Kimball"
|
||||
"Spencer Kimball"
|
||||
"1997"
|
||||
""
|
||||
SF-STRING _"Text" "NEON"
|
||||
SF-ADJUSTMENT _"Font size (pixels)" '(150 2 1000 1 10 0 1)
|
||||
SF-FONT _"Font" "Blippo"
|
||||
SF-COLOR _"Background color" "black"
|
||||
SF-COLOR _"Glow color" '(38 211 255)
|
||||
SF-TOGGLE _"Create shadow" FALSE
|
||||
)
|
||||
|
||||
(script-fu-menu-register "script-fu-neon-logo"
|
||||
"<Image>/File/Create/Logos")
|
@ -1,94 +0,0 @@
|
||||
; Newsprint text
|
||||
; Copyright (c) 1998 Austin Donnelly <austin@greenend.org.uk>
|
||||
;
|
||||
;
|
||||
; Based on alien glow code from Adrian Likins
|
||||
;
|
||||
; 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 (script-fu-newsprint-text string font font-size cell-size
|
||||
density blur-radius text-color bg-color)
|
||||
(let* (
|
||||
(text-ext (gimp-text-get-extents-fontname string font-size PIXELS font))
|
||||
(width (+ (car text-ext) 20 blur-radius))
|
||||
(height (+ (list-ref text-ext 1) 20 blur-radius))
|
||||
(img (car (gimp-image-new width height RGB)))
|
||||
(bg-layer (car (gimp-layer-new img width height RGB-IMAGE "Background" 100 NORMAL-MODE)))
|
||||
(text-layer (car (gimp-layer-new img width height RGBA-IMAGE "Text layer" 100 NORMAL-MODE)))
|
||||
(text-mask 0)
|
||||
(grey (/ (* density 255) 100))
|
||||
)
|
||||
|
||||
(gimp-context-push)
|
||||
(gimp-context-set-defaults)
|
||||
|
||||
(gimp-image-undo-disable img)
|
||||
(gimp-image-insert-layer img bg-layer 0 1)
|
||||
(gimp-image-insert-layer img text-layer 0 -1)
|
||||
|
||||
(gimp-context-set-background bg-color)
|
||||
(gimp-edit-clear bg-layer)
|
||||
(gimp-edit-clear text-layer)
|
||||
|
||||
(gimp-context-set-foreground text-color)
|
||||
(gimp-floating-sel-anchor
|
||||
(car (gimp-text-fontname img text-layer
|
||||
(/ (+ 20 blur-radius) 2) (/ (+ 20 blur-radius) 2)
|
||||
string 0 TRUE font-size PIXELS font)))
|
||||
|
||||
(set! text-mask (car (gimp-layer-create-mask text-layer ADD-ALPHA-MASK)))
|
||||
(gimp-layer-add-mask text-layer text-mask)
|
||||
|
||||
(gimp-image-select-item img CHANNEL-OP-REPLACE text-layer)
|
||||
(gimp-context-set-background (list grey grey grey))
|
||||
(gimp-edit-fill text-mask BACKGROUND-FILL)
|
||||
(gimp-selection-none img)
|
||||
(if (> blur-radius 0)
|
||||
(plug-in-gauss-iir RUN-NONINTERACTIVE img text-mask blur-radius 1 1)
|
||||
)
|
||||
|
||||
(plug-in-newsprint RUN-NONINTERACTIVE img text-mask cell-size
|
||||
0 0 45.0 3 45.0 0 45.0 0 45.0 0 3)
|
||||
|
||||
(gimp-edit-fill text-layer FOREGROUND-FILL)
|
||||
(gimp-layer-remove-mask text-layer MASK-APPLY)
|
||||
|
||||
(gimp-image-undo-enable img)
|
||||
|
||||
(gimp-display-new img)
|
||||
|
||||
(gimp-context-pop)
|
||||
)
|
||||
)
|
||||
|
||||
(script-fu-register "script-fu-newsprint-text"
|
||||
_"Newsprint Te_xt..."
|
||||
_"Create a logo in the style of newspaper printing"
|
||||
"Austin Donnelly"
|
||||
"Austin Donnelly"
|
||||
"1998"
|
||||
""
|
||||
SF-STRING _"Text" "Newsprint"
|
||||
SF-FONT _"Font" "Sans"
|
||||
SF-ADJUSTMENT _"Font size (pixels)" '(100 2 1000 1 10 0 1)
|
||||
SF-ADJUSTMENT _"Cell size (pixels)" '(7 1 100 1 10 0 1)
|
||||
SF-ADJUSTMENT _"Density (%)" '(60 0 100 1 10 0 0)
|
||||
SF-ADJUSTMENT _"Blur radius" '(0 0 100 1 5 0 0)
|
||||
SF-COLOR _"Text color" "black"
|
||||
SF-COLOR _"Background color" "white"
|
||||
)
|
||||
|
||||
(script-fu-menu-register "script-fu-newsprint-text"
|
||||
"<Image>/File/Create/Logos")
|
@ -1,212 +0,0 @@
|
||||
; GIMP - The GNU Image Manipulation Program
|
||||
; Copyright (C) 1995 Spencer Kimball and Peter Mattis
|
||||
;
|
||||
; Round Button --- create a round beveled Web button.
|
||||
; Copyright (C) 1998 Federico Mena Quintero & Arturo Espinosa Aldama
|
||||
; federico@nuclecu.unam.mx arturo@nuclecu.unam.mx
|
||||
; ************************************************************************
|
||||
; Changed on Feb 4, 1999 by Piet van Oostrum <piet@cs.uu.nl>
|
||||
; For use with GIMP 1.1.
|
||||
; All calls to gimp-text-* have been converted to use the *-fontname form.
|
||||
; The corresponding parameters have been replaced by an SF-FONT parameter.
|
||||
; ************************************************************************
|
||||
;
|
||||
; 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 (script-fu-round-button text
|
||||
size
|
||||
font
|
||||
ul-color
|
||||
lr-color
|
||||
text-color
|
||||
ul-color-high
|
||||
lr-color-high
|
||||
hlight-color
|
||||
xpadding
|
||||
ypadding
|
||||
bevel
|
||||
ratio
|
||||
notpressed
|
||||
notpressed-active
|
||||
pressed)
|
||||
|
||||
(cond ((eqv? notpressed TRUE)
|
||||
(do-pupibutton text size font ul-color lr-color
|
||||
text-color xpadding ypadding bevel ratio 0)))
|
||||
(cond ((eqv? notpressed-active TRUE)
|
||||
(do-pupibutton text size font ul-color-high lr-color-high
|
||||
hlight-color xpadding ypadding bevel ratio 0)))
|
||||
(cond ((eqv? pressed TRUE)
|
||||
(do-pupibutton text size font ul-color-high lr-color-high
|
||||
hlight-color xpadding ypadding bevel ratio 1))))
|
||||
|
||||
(define (do-pupibutton text
|
||||
size
|
||||
font
|
||||
ul-color
|
||||
lr-color
|
||||
text-color
|
||||
xpadding
|
||||
ypadding
|
||||
bevel
|
||||
ratio
|
||||
pressed)
|
||||
|
||||
(define (text-width extents)
|
||||
(car extents))
|
||||
|
||||
(define (text-height extents)
|
||||
(cadr extents))
|
||||
|
||||
(define (text-ascent extents)
|
||||
(caddr extents))
|
||||
|
||||
(define (text-descent extents)
|
||||
(cadr (cddr extents)))
|
||||
|
||||
(define (round-select img
|
||||
x
|
||||
y
|
||||
width
|
||||
height
|
||||
ratio)
|
||||
(let* ((diameter (* ratio height)))
|
||||
(gimp-image-select-ellipse img CHANNEL-OP-ADD x y diameter height)
|
||||
(gimp-image-select-ellipse img CHANNEL-OP-ADD (+ x (- width diameter)) y
|
||||
diameter height)
|
||||
(gimp-image-select-rectangle img CHANNEL-OP-ADD (+ x (/ diameter 2)) y
|
||||
(- width diameter) height)))
|
||||
|
||||
(let* (
|
||||
(text-extents (gimp-text-get-extents-fontname text
|
||||
size
|
||||
PIXELS
|
||||
font))
|
||||
(ascent (text-ascent text-extents))
|
||||
(descent (text-descent text-extents))
|
||||
|
||||
(height (+ (* 2 (+ ypadding bevel))
|
||||
(+ ascent descent)))
|
||||
|
||||
(radius (/ (* ratio height) 4))
|
||||
|
||||
(width (+ (* 2 (+ radius xpadding))
|
||||
bevel
|
||||
(text-width text-extents)))
|
||||
|
||||
(img (car (gimp-image-new width height RGB)))
|
||||
|
||||
(bumpmap (car (gimp-layer-new img width height
|
||||
RGBA-IMAGE "Bumpmap" 100 NORMAL-MODE)))
|
||||
(gradient (car (gimp-layer-new img width height
|
||||
RGBA-IMAGE "Button" 100 NORMAL-MODE)))
|
||||
)
|
||||
|
||||
(gimp-context-push)
|
||||
(gimp-context-set-antialias FALSE)
|
||||
(gimp-context-set-feather FALSE)
|
||||
(gimp-image-undo-disable img)
|
||||
|
||||
; Create bumpmap layer
|
||||
|
||||
(gimp-image-insert-layer img bumpmap 0 -1)
|
||||
(gimp-selection-none img)
|
||||
(gimp-context-set-background '(0 0 0))
|
||||
(gimp-edit-fill bumpmap BACKGROUND-FILL)
|
||||
|
||||
(round-select img (/ bevel 2) (/ bevel 2)
|
||||
(- width bevel) (- height bevel) ratio)
|
||||
(gimp-context-set-background '(255 255 255))
|
||||
(gimp-edit-fill bumpmap BACKGROUND-FILL)
|
||||
|
||||
(gimp-selection-none img)
|
||||
(plug-in-gauss-rle RUN-NONINTERACTIVE img bumpmap bevel 1 1)
|
||||
|
||||
; Create gradient layer
|
||||
|
||||
(gimp-image-insert-layer img gradient 0 -1)
|
||||
(gimp-edit-clear gradient)
|
||||
(round-select img 0 0 width height ratio)
|
||||
(gimp-context-set-foreground ul-color)
|
||||
(gimp-context-set-background lr-color)
|
||||
|
||||
(gimp-edit-blend gradient FG-BG-RGB-MODE NORMAL-MODE
|
||||
GRADIENT-LINEAR 100 0 REPEAT-NONE FALSE
|
||||
FALSE 0 0 TRUE
|
||||
0 0 0 (- height 1))
|
||||
|
||||
(gimp-selection-none img)
|
||||
|
||||
(plug-in-bump-map RUN-NONINTERACTIVE img gradient bumpmap
|
||||
135 45 bevel 0 0 0 0 TRUE pressed 0)
|
||||
|
||||
; Create text layer
|
||||
|
||||
(cond ((eqv? pressed 1) (set! bevel (+ bevel 1))))
|
||||
|
||||
(gimp-context-set-foreground text-color)
|
||||
(let ((textl (car (gimp-text-fontname
|
||||
img -1 0 0 text 0 TRUE size PIXELS
|
||||
font))))
|
||||
(gimp-layer-set-offsets textl
|
||||
(+ xpadding radius bevel)
|
||||
(+ ypadding descent bevel)))
|
||||
|
||||
; Delete some fucked-up pixels.
|
||||
|
||||
(gimp-selection-none img)
|
||||
(round-select img 1 1 (- width 1) (- height 1) ratio)
|
||||
(gimp-selection-invert img)
|
||||
(gimp-edit-clear gradient)
|
||||
|
||||
; Done
|
||||
|
||||
(gimp-image-remove-layer img bumpmap)
|
||||
(gimp-image-merge-visible-layers img EXPAND-AS-NECESSARY)
|
||||
|
||||
(gimp-selection-none img)
|
||||
(gimp-image-undo-enable img)
|
||||
(gimp-display-new img)
|
||||
|
||||
(gimp-context-pop)
|
||||
)
|
||||
)
|
||||
|
||||
(script-fu-register "script-fu-round-button"
|
||||
_"_Round Button..."
|
||||
_"Create images, each containing an oval button graphic"
|
||||
"Arturo Espinosa (stolen from quartic's beveled button)"
|
||||
"Arturo Espinosa & Federico Mena Quintero"
|
||||
"June 1998"
|
||||
""
|
||||
SF-STRING _"Text" "GIMP"
|
||||
SF-ADJUSTMENT _"Font size (pixels)" '(16 2 100 1 1 0 1)
|
||||
SF-FONT _"Font" "Sans"
|
||||
SF-COLOR _"Upper color" '(192 192 0)
|
||||
SF-COLOR _"Lower color" '(128 108 0)
|
||||
SF-COLOR _"Text color" "black"
|
||||
SF-COLOR _"Upper color (active)" '(255 255 0)
|
||||
SF-COLOR _"Lower color (active)" '(128 108 0)
|
||||
SF-COLOR _"Text color (active)" '(0 0 192)
|
||||
SF-ADJUSTMENT _"Padding X" '(4 0 100 1 10 0 1)
|
||||
SF-ADJUSTMENT _"Padding Y" '(4 0 100 1 10 0 1)
|
||||
SF-ADJUSTMENT _"Bevel width" '(2 0 100 1 10 0 1)
|
||||
SF-ADJUSTMENT _"Round ratio" '(1 0.05 20 0.05 1 2 1)
|
||||
SF-TOGGLE _"Not pressed" TRUE
|
||||
SF-TOGGLE _"Not pressed (active)" TRUE
|
||||
SF-TOGGLE _"Pressed" TRUE
|
||||
)
|
||||
|
||||
(script-fu-menu-register "script-fu-round-button"
|
||||
"<Image>/File/Create/Buttons")
|
@ -1,94 +0,0 @@
|
||||
; Chris Gutteridge (cjg@ecs.soton.ac.uk)
|
||||
; At ECS Dept, University of Southampton, England.
|
||||
|
||||
; 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 (script-fu-render-map inSize
|
||||
inGrain
|
||||
inGrad
|
||||
inWiden)
|
||||
|
||||
(let* (
|
||||
(theWidth inSize)
|
||||
(theHeight inSize)
|
||||
(theImage (car(gimp-image-new theWidth theHeight RGB)))
|
||||
(theLayer 0)
|
||||
(thinLayer 0)
|
||||
)
|
||||
|
||||
(gimp-context-push)
|
||||
|
||||
(gimp-selection-all theImage)
|
||||
|
||||
(set! theLayer (car (gimp-layer-new theImage theWidth theHeight
|
||||
RGBA-IMAGE
|
||||
"I've got more rubber ducks than you!"
|
||||
100 NORMAL-MODE)))
|
||||
(gimp-image-insert-layer theImage theLayer 0 0)
|
||||
(plug-in-solid-noise RUN-NONINTERACTIVE
|
||||
theImage theLayer 1 0 (rand 65536)
|
||||
inGrain inGrain inGrain)
|
||||
|
||||
(if (= inWiden 1)
|
||||
(begin
|
||||
(set! thinLayer (car (gimp-layer-new theImage theWidth theHeight
|
||||
RGBA-IMAGE "Camo Thin Layer"
|
||||
100 NORMAL-MODE)))
|
||||
(gimp-image-insert-layer theImage thinLayer 0 0)
|
||||
|
||||
(let ((theBigGrain (min 15 (* 2 inGrain))))
|
||||
(plug-in-solid-noise RUN-NONINTERACTIVE
|
||||
theImage thinLayer 1 0 (rand 65536)
|
||||
theBigGrain theBigGrain theBigGrain))
|
||||
|
||||
(gimp-context-set-background '(255 255 255))
|
||||
(gimp-context-set-foreground '(0 0 0))
|
||||
|
||||
(let ((theMask (car (gimp-layer-create-mask thinLayer 0))))
|
||||
(gimp-layer-add-mask thinLayer theMask)
|
||||
|
||||
(gimp-edit-blend theMask FG-BG-RGB-MODE NORMAL-MODE
|
||||
GRADIENT-LINEAR 100 0 REPEAT-TRIANGULAR FALSE
|
||||
FALSE 0 0 TRUE
|
||||
0 0 0 (/ theHeight 2)))
|
||||
|
||||
(set! theLayer (car(gimp-image-flatten theImage)))))
|
||||
|
||||
(gimp-selection-none theImage)
|
||||
(gimp-context-set-gradient inGrad)
|
||||
(plug-in-gradmap RUN-NONINTERACTIVE theImage theLayer)
|
||||
|
||||
(gimp-display-new theImage)
|
||||
|
||||
(gimp-context-pop)
|
||||
)
|
||||
)
|
||||
|
||||
(script-fu-register "script-fu-render-map"
|
||||
_"Render _Map..."
|
||||
_"Create an image filled with an Earth-like map pattern"
|
||||
"Chris Gutteridge: cjg@ecs.soton.ac.uk"
|
||||
"28th April 1998"
|
||||
"Chris Gutteridge / ECS @ University of Southampton, England"
|
||||
""
|
||||
SF-ADJUSTMENT _"Image size" '(256 0 2048 1 10 0 0)
|
||||
SF-ADJUSTMENT _"Granularity" '(4 0 15 1 1 0 0)
|
||||
SF-GRADIENT _"Gradient" "Land and Sea"
|
||||
SF-TOGGLE _"Gradient reverse" FALSE
|
||||
SF-OPTION _"Behavior" '(_"Tile" _"Detail in Middle")
|
||||
)
|
||||
|
||||
(script-fu-menu-register "script-fu-render-map"
|
||||
"<Image>/File/Create/Patterns")
|
@ -1,224 +0,0 @@
|
||||
; CHROME-LOGO2
|
||||
; State of the art chrome logos
|
||||
;
|
||||
|
||||
(define (script-fu-sota-chrome-logo chrome-saturation chrome-lightness
|
||||
chrome-factor text size fontname
|
||||
env-map hc cc)
|
||||
|
||||
(define (set-pt a index x y)
|
||||
(begin
|
||||
(aset a (* index 2) x)
|
||||
(aset a (+ (* index 2) 1) y)
|
||||
)
|
||||
)
|
||||
|
||||
(define (spline1)
|
||||
(let* ((a (cons-array 18 'byte)))
|
||||
(set-pt a 0 0 0)
|
||||
(set-pt a 1 31 235)
|
||||
(set-pt a 2 63 23)
|
||||
(set-pt a 3 95 230)
|
||||
(set-pt a 4 127 25)
|
||||
(set-pt a 5 159 210)
|
||||
(set-pt a 6 191 20)
|
||||
(set-pt a 7 223 240)
|
||||
(set-pt a 8 255 31)
|
||||
a
|
||||
)
|
||||
)
|
||||
|
||||
(define (brush brush-size)
|
||||
(cond ((<= brush-size 5) "Circle Fuzzy (05)")
|
||||
((<= brush-size 7) "Circle Fuzzy (07)")
|
||||
((<= brush-size 9) "Circle Fuzzy (09)")
|
||||
((<= brush-size 11) "Circle Fuzzy (11)")
|
||||
((<= brush-size 13) "Circle Fuzzy (13)")
|
||||
((<= brush-size 15) "Circle Fuzzy (15)")
|
||||
((<= brush-size 17) "Circle Fuzzy (17)")
|
||||
(else "Circle Fuzzy (19)")
|
||||
)
|
||||
)
|
||||
|
||||
(define (shadows val)
|
||||
(/ (* 0.96 val) 2.55)
|
||||
)
|
||||
|
||||
(define (midtones val)
|
||||
(/ val 2.55)
|
||||
)
|
||||
|
||||
(define (highlights val)
|
||||
(let ((h (/ (* 1.108 val) 2.55)))
|
||||
(if (> h 100) 100 h)
|
||||
)
|
||||
)
|
||||
|
||||
(define (rval col)
|
||||
(car col)
|
||||
)
|
||||
|
||||
(define (gval col)
|
||||
(cadr col)
|
||||
)
|
||||
|
||||
(define (bval col)
|
||||
(caddr col)
|
||||
)
|
||||
|
||||
(define (sota-scale val scale chrome-factor)
|
||||
(* (sqrt val) (* scale chrome-factor))
|
||||
)
|
||||
|
||||
(define (copy-layer-sota dest-image dest-drawable source-image source-drawable)
|
||||
(gimp-selection-all dest-image)
|
||||
(gimp-edit-clear dest-drawable)
|
||||
(gimp-selection-none dest-image)
|
||||
(gimp-selection-all source-image)
|
||||
(gimp-edit-copy source-drawable)
|
||||
(let ((floating-sel (car (gimp-edit-paste dest-drawable FALSE))))
|
||||
(gimp-floating-sel-anchor floating-sel)
|
||||
)
|
||||
)
|
||||
|
||||
(let* (
|
||||
(img (car (gimp-image-new 256 256 GRAY)))
|
||||
(banding-img (car (gimp-file-load 1 env-map env-map)))
|
||||
(banding-layer (car (gimp-image-get-active-drawable banding-img)))
|
||||
(banding-height (car (gimp-drawable-height banding-layer)))
|
||||
(banding-width (car (gimp-drawable-width banding-layer)))
|
||||
(banding-type (car (gimp-drawable-type banding-layer)))
|
||||
(b-size (sota-scale size 2 chrome-factor))
|
||||
(offx1 (sota-scale size 0.33 chrome-factor))
|
||||
(offy1 (sota-scale size 0.25 chrome-factor))
|
||||
(offx2 (sota-scale size (- 0.33) chrome-factor))
|
||||
(offy2 (sota-scale size (- 0.25) chrome-factor))
|
||||
(feather (sota-scale size 0.5 chrome-factor))
|
||||
(brush-size (sota-scale size 0.5 chrome-factor))
|
||||
(text-layer (car (gimp-text-fontname img -1 0 0 text (* b-size 2) TRUE size PIXELS fontname)))
|
||||
(width (car (gimp-drawable-width text-layer)))
|
||||
(height (car (gimp-drawable-height text-layer)))
|
||||
(layer1 (car (gimp-layer-new img banding-width banding-height banding-type "Layer1" 100 NORMAL-MODE)))
|
||||
(layer2 (car (gimp-layer-new img width height GRAYA-IMAGE "Layer 2" 100 DIFFERENCE-MODE)))
|
||||
(layer3 (car (gimp-layer-new img width height GRAYA-IMAGE "Layer 3" 100 NORMAL-MODE)))
|
||||
(shadow (car (gimp-layer-new img width height GRAYA-IMAGE "Drop Shadow" 100 NORMAL-MODE)))
|
||||
(layer-mask 0)
|
||||
)
|
||||
|
||||
(gimp-context-push)
|
||||
(gimp-context-set-defaults)
|
||||
|
||||
(gimp-image-undo-disable img)
|
||||
(gimp-image-resize img width height 0 0)
|
||||
(gimp-image-insert-layer img shadow 0 0)
|
||||
(gimp-image-insert-layer img layer3 0 0)
|
||||
(gimp-image-insert-layer img layer2 0 0)
|
||||
(gimp-context-set-background '(255 255 255))
|
||||
(gimp-selection-none img)
|
||||
(gimp-edit-fill layer2 BACKGROUND-FILL)
|
||||
(gimp-edit-fill layer3 BACKGROUND-FILL)
|
||||
(gimp-edit-clear shadow)
|
||||
(gimp-item-set-visible text-layer FALSE)
|
||||
(gimp-item-set-visible shadow FALSE)
|
||||
|
||||
(gimp-image-select-rectangle img CHANNEL-OP-REPLACE (/ b-size 2) (/ b-size 2) (- width b-size) (- height b-size))
|
||||
(gimp-image-select-rectangle img CHANNEL-OP-SUBTRACT b-size b-size (- width (* b-size 2)) (- height (* b-size 2)))
|
||||
(gimp-edit-fill text-layer BACKGROUND-FILL)
|
||||
|
||||
(gimp-image-select-item img CHANNEL-OP-REPLACE text-layer)
|
||||
(gimp-context-set-background '(0 0 0))
|
||||
(gimp-selection-translate img offx1 offy1)
|
||||
(gimp-selection-feather img feather)
|
||||
(gimp-edit-fill layer2 BACKGROUND-FILL)
|
||||
(gimp-selection-translate img (* 2 offx2) (* 2 offy2))
|
||||
(gimp-edit-fill layer3 BACKGROUND-FILL)
|
||||
(gimp-selection-none img)
|
||||
(gimp-item-set-visible layer2 TRUE)
|
||||
(gimp-item-set-visible layer3 TRUE)
|
||||
(set! layer2 (car (gimp-image-merge-visible-layers img CLIP-TO-IMAGE)))
|
||||
(gimp-invert layer2)
|
||||
|
||||
(gimp-image-insert-layer img layer1 0 0)
|
||||
(copy-layer-sota img layer1 banding-img banding-layer)
|
||||
(gimp-image-delete banding-img)
|
||||
(gimp-layer-scale layer1 width height FALSE)
|
||||
(plug-in-gauss-iir RUN-NONINTERACTIVE img layer1 10 TRUE TRUE)
|
||||
(gimp-layer-set-opacity layer1 50)
|
||||
(gimp-item-set-visible layer1 TRUE)
|
||||
(gimp-item-set-visible layer2 TRUE)
|
||||
(set! layer1 (car (gimp-image-merge-visible-layers img CLIP-TO-IMAGE)))
|
||||
(gimp-curves-spline layer1 0 18 (spline1))
|
||||
|
||||
(set! layer-mask (car (gimp-layer-create-mask layer1 ADD-BLACK-MASK)))
|
||||
(gimp-layer-add-mask layer1 layer-mask)
|
||||
(gimp-image-select-item img CHANNEL-OP-REPLACE text-layer)
|
||||
(gimp-context-set-background '(255 255 255))
|
||||
(gimp-edit-fill layer-mask BACKGROUND-FILL)
|
||||
|
||||
(set! layer2 (car (gimp-layer-copy layer1 TRUE)))
|
||||
(gimp-image-insert-layer img layer2 0 0)
|
||||
(gimp-context-set-brush (brush brush-size))
|
||||
(gimp-context-set-foreground '(255 255 255))
|
||||
(gimp-edit-stroke layer-mask)
|
||||
|
||||
(gimp-context-set-background '(0 0 0))
|
||||
(gimp-selection-feather img (* feather 1.5))
|
||||
(gimp-selection-translate img (* 2.5 offx1) (* 2.5 offy1))
|
||||
(gimp-edit-fill shadow BACKGROUND-FILL)
|
||||
|
||||
(gimp-selection-all img)
|
||||
(gimp-context-set-pattern "Marble #1")
|
||||
(gimp-edit-bucket-fill text-layer PATTERN-BUCKET-FILL NORMAL-MODE 100 0 FALSE 0 0)
|
||||
(gimp-selection-none img)
|
||||
|
||||
(gimp-image-convert-rgb img)
|
||||
|
||||
(gimp-color-balance layer1 0 TRUE (shadows (rval hc)) (shadows (gval hc)) (shadows (bval hc)))
|
||||
(gimp-color-balance layer1 1 TRUE (midtones (rval hc)) (midtones (gval hc)) (midtones (bval hc)))
|
||||
(gimp-color-balance layer1 2 TRUE (highlights (rval hc)) (highlights (gval hc)) (highlights (bval hc)))
|
||||
|
||||
(gimp-color-balance layer2 0 TRUE (shadows (rval cc)) (shadows (gval cc)) (shadows (bval cc)))
|
||||
(gimp-color-balance layer2 1 TRUE (midtones (rval cc)) (midtones (gval cc)) (midtones (bval cc)))
|
||||
(gimp-color-balance layer2 2 TRUE (highlights (rval cc)) (highlights (gval cc)) (highlights (bval cc)))
|
||||
(gimp-hue-saturation layer2 0 0 chrome-lightness chrome-saturation)
|
||||
|
||||
(gimp-item-set-visible shadow TRUE)
|
||||
(gimp-item-set-visible text-layer TRUE)
|
||||
|
||||
(gimp-item-set-name text-layer "Background")
|
||||
(gimp-item-set-name layer2 "Chrome")
|
||||
(gimp-item-set-name layer1 "Highlight")
|
||||
|
||||
(gimp-layer-translate shadow (/ b-size -4) (/ b-size -4))
|
||||
(gimp-layer-translate layer2 (/ b-size -4) (/ b-size -4))
|
||||
(gimp-layer-translate layer1 (/ b-size -4) (/ b-size -4))
|
||||
|
||||
(gimp-image-undo-enable img)
|
||||
(gimp-display-new img)
|
||||
|
||||
(gimp-context-pop)
|
||||
)
|
||||
)
|
||||
|
||||
(script-fu-register "script-fu-sota-chrome-logo"
|
||||
_"SOTA Chrome..."
|
||||
_"Create a State Of The Art chromed logo"
|
||||
"Spencer Kimball"
|
||||
"Spencer Kimball"
|
||||
"1997"
|
||||
""
|
||||
SF-ADJUSTMENT _"Chrome saturation" '(-80 -100 100 1 10 0 0)
|
||||
SF-ADJUSTMENT _"Chrome lightness" '(-47 -100 100 1 10 0 0)
|
||||
SF-ADJUSTMENT _"Chrome factor" '(.75 0 1 0.1 0.01 2 0)
|
||||
SF-STRING _"Text" "GIMP"
|
||||
SF-ADJUSTMENT _"Font size (pixels)" '(150 2 1000 1 10 0 1)
|
||||
SF-FONT _"Font" "RoostHeavy"
|
||||
SF-FILENAME _"Environment map"
|
||||
(string-append gimp-data-directory
|
||||
"/scripts/images/beavis.jpg")
|
||||
SF-COLOR _"Highlight balance" '(211 95 0)
|
||||
SF-COLOR _"Chrome balance" "black"
|
||||
)
|
||||
|
||||
(script-fu-menu-register "script-fu-sota-chrome-logo"
|
||||
"<Image>/File/Create/Logos")
|
@ -1,101 +0,0 @@
|
||||
; Speed text
|
||||
; Copyright (c) 1998 Austin Donnelly <austin@greenend.org.uk>
|
||||
;
|
||||
;
|
||||
; Based on alien glow code from Adrian Likins
|
||||
;
|
||||
; 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 (script-fu-speed-text string font font-size density text-color bg-color)
|
||||
(let* (
|
||||
(text-ext (gimp-text-get-extents-fontname string font-size PIXELS font))
|
||||
(wid (+ (car text-ext) 20))
|
||||
(hi (+ (list-ref text-ext 1) 20))
|
||||
(img (car (gimp-image-new wid hi RGB)))
|
||||
(bg-layer (car (gimp-layer-new img wid hi RGB-IMAGE "Background" 100 NORMAL-MODE)))
|
||||
(text-layer (car (gimp-layer-new img wid hi RGBA-IMAGE "Text layer" 100 NORMAL-MODE)))
|
||||
(text-mask 0)
|
||||
(saved-select 0)
|
||||
(cell-size (/ font-size 8))
|
||||
(grey (/ (* density 255) 100))
|
||||
(saved-sel 0)
|
||||
(text-mask 0)
|
||||
)
|
||||
|
||||
(gimp-context-push)
|
||||
(gimp-context-set-defaults)
|
||||
|
||||
(gimp-image-undo-disable img)
|
||||
(gimp-image-insert-layer img bg-layer 0 1)
|
||||
(gimp-image-insert-layer img text-layer 0 -1)
|
||||
|
||||
(gimp-context-set-background bg-color)
|
||||
(gimp-edit-clear bg-layer)
|
||||
(gimp-edit-clear text-layer)
|
||||
|
||||
(gimp-floating-sel-anchor (car (gimp-text-fontname img text-layer 10 10 string 0 TRUE font-size PIXELS font)))
|
||||
|
||||
; save the selection for later
|
||||
(gimp-image-select-item img CHANNEL-OP-REPLACE text-layer)
|
||||
(set! saved-sel (car (gimp-selection-save img)))
|
||||
|
||||
; add layer mask
|
||||
(set! text-mask (car (gimp-layer-create-mask text-layer ADD-ALPHA-MASK)))
|
||||
(gimp-layer-add-mask text-layer text-mask)
|
||||
|
||||
; grow the layer
|
||||
(gimp-layer-set-edit-mask text-layer FALSE)
|
||||
(gimp-selection-grow img 10)
|
||||
(gimp-context-set-foreground text-color)
|
||||
(gimp-edit-fill text-layer FOREGROUND-FILL)
|
||||
|
||||
; feather the mask
|
||||
(gimp-layer-set-edit-mask text-layer TRUE)
|
||||
(gimp-image-select-item img CHANNEL-OP-REPLACE saved-sel)
|
||||
(gimp-selection-feather img 10)
|
||||
(gimp-context-set-background (list grey grey grey))
|
||||
(gimp-edit-fill text-mask BACKGROUND-FILL)
|
||||
(gimp-edit-fill text-mask BACKGROUND-FILL)
|
||||
(gimp-edit-fill text-mask BACKGROUND-FILL)
|
||||
(gimp-selection-none img)
|
||||
|
||||
(plug-in-newsprint RUN-NONINTERACTIVE img text-mask cell-size 0 0 0.0 1 45.0 0 45.0 0 45.0 0 5)
|
||||
|
||||
(gimp-layer-remove-mask text-layer MASK-APPLY)
|
||||
|
||||
(gimp-image-undo-enable img)
|
||||
(gimp-display-new img)
|
||||
|
||||
(gimp-context-pop)
|
||||
)
|
||||
)
|
||||
|
||||
(script-fu-register "script-fu-speed-text"
|
||||
_"Speed Text..."
|
||||
_"Create a logo with a speedy text effect"
|
||||
"Austin Donnelly"
|
||||
"Austin Donnelly"
|
||||
"1998"
|
||||
""
|
||||
SF-STRING _"Text" "Speed!"
|
||||
SF-FONT _"Font" "Charter"
|
||||
SF-ADJUSTMENT _"Font size (pixels)" '(100 2 1000 1 10 0 1)
|
||||
SF-ADJUSTMENT _"Density (%)" '(80 0 100 1 10 0 0)
|
||||
SF-COLOR _"Text color" "black"
|
||||
SF-COLOR _"Background color" "white"
|
||||
)
|
||||
|
||||
(script-fu-menu-register "script-fu-speed-text"
|
||||
"<Image>/File/Create/Logos")
|
@ -1,152 +0,0 @@
|
||||
; Nova Starscape
|
||||
; Create a text effect that simulates an eerie alien glow around text
|
||||
|
||||
(define (apply-starscape-logo-effect img logo-layer size glow-color)
|
||||
|
||||
(define (find-blend-coords w h)
|
||||
(let* (
|
||||
(denom (+ (/ w h) (/ h w)))
|
||||
(bx (/ (* -2 h) denom))
|
||||
(by (/ (* -2 w) denom))
|
||||
)
|
||||
(cons bx by)
|
||||
)
|
||||
)
|
||||
|
||||
(define (find-nova-x-coord drawable x1 x2 y)
|
||||
(let* (
|
||||
(x 0)
|
||||
(alpha 3)
|
||||
(range (- x2 x1))
|
||||
(min-clearance 5)
|
||||
(val '())
|
||||
(val-left '())
|
||||
(val-right '())
|
||||
(val-top '())
|
||||
(val-bottom '())
|
||||
(limit 100)
|
||||
(clearance 0)
|
||||
)
|
||||
|
||||
(while (and (= clearance 0) (> limit 0))
|
||||
(set! x (+ (rand range) x1))
|
||||
(set! val (cadr (gimp-drawable-get-pixel drawable x y)))
|
||||
(set! val-left (cadr (gimp-drawable-get-pixel drawable (- x min-clearance) y)))
|
||||
(set! val-right (cadr (gimp-drawable-get-pixel drawable (+ x min-clearance) y)))
|
||||
(set! val-top (cadr (gimp-drawable-get-pixel drawable x (- y min-clearance))))
|
||||
(set! val-bottom (cadr (gimp-drawable-get-pixel drawable x (+ y min-clearance))))
|
||||
(if (and (= (aref val alpha) 0) (= (aref val-left alpha) 0)
|
||||
(= (aref val-right alpha) 0) (= (aref val-top alpha) 0)
|
||||
(= (aref val-bottom alpha) 0)
|
||||
)
|
||||
(set! clearance 1)
|
||||
(set! limit (- limit 1))
|
||||
)
|
||||
)
|
||||
x
|
||||
)
|
||||
)
|
||||
|
||||
(let* (
|
||||
(border (/ size 4))
|
||||
(grow (/ size 30))
|
||||
(offx (* size 0.03))
|
||||
(offy (* size 0.02))
|
||||
(feather (/ size 4))
|
||||
(shadow-feather (/ size 25))
|
||||
(width (car (gimp-drawable-width logo-layer)))
|
||||
(height (car (gimp-drawable-height logo-layer)))
|
||||
(w (* (/ (- width (* border 2)) 2.0) 0.75))
|
||||
(h (* (/ (- height (* border 2)) 2.0) 0.75))
|
||||
(novay (* height 0.3))
|
||||
(novax (find-nova-x-coord logo-layer (* width 0.2) (* width 0.8) novay))
|
||||
(novaradius (/ (min height width) 7.0))
|
||||
(cx (/ width 2.0))
|
||||
(cy (/ height 2.0))
|
||||
(bx (+ cx (car (find-blend-coords w h))))
|
||||
(by (+ cy (cdr (find-blend-coords w h))))
|
||||
(bg-layer (car (gimp-layer-new img width height RGB-IMAGE "Background" 100 NORMAL-MODE)))
|
||||
(glow-layer (car (gimp-layer-new img width height RGBA-IMAGE "Glow" 100 NORMAL-MODE)))
|
||||
(shadow-layer (car (gimp-layer-new img width height RGBA-IMAGE "Drop Shadow" 100 NORMAL-MODE)))
|
||||
(bump-channel (car (gimp-channel-new img width height "Bump Map" 50 '(0 0 0))))
|
||||
)
|
||||
|
||||
(gimp-context-push)
|
||||
(gimp-context-set-defaults)
|
||||
|
||||
(gimp-selection-none img)
|
||||
(script-fu-util-image-resize-from-layer img logo-layer)
|
||||
(script-fu-util-image-add-layers img shadow-layer glow-layer bg-layer)
|
||||
(gimp-image-insert-channel img bump-channel 0 0)
|
||||
(gimp-layer-set-lock-alpha logo-layer TRUE)
|
||||
|
||||
(gimp-context-set-background '(0 0 0))
|
||||
(gimp-edit-fill bg-layer BACKGROUND-FILL)
|
||||
(gimp-edit-clear shadow-layer)
|
||||
(gimp-edit-clear glow-layer)
|
||||
|
||||
(gimp-image-select-item img CHANNEL-OP-REPLACE logo-layer)
|
||||
(gimp-selection-grow img grow)
|
||||
(gimp-selection-feather img feather)
|
||||
(gimp-context-set-background glow-color)
|
||||
(gimp-selection-feather img feather)
|
||||
(gimp-edit-fill glow-layer BACKGROUND-FILL)
|
||||
|
||||
(gimp-image-select-item img CHANNEL-OP-REPLACE logo-layer)
|
||||
(gimp-selection-feather img shadow-feather)
|
||||
(gimp-context-set-background '(0 0 0))
|
||||
(gimp-selection-translate img offx offy)
|
||||
(gimp-edit-fill shadow-layer BACKGROUND-FILL)
|
||||
|
||||
(gimp-selection-none img)
|
||||
(gimp-context-set-background '(31 31 31))
|
||||
(gimp-context-set-foreground '(255 255 255))
|
||||
|
||||
(gimp-edit-blend logo-layer FG-BG-RGB-MODE NORMAL-MODE
|
||||
GRADIENT-BILINEAR 100 0 REPEAT-NONE FALSE
|
||||
FALSE 0 0 TRUE
|
||||
cx cy bx by)
|
||||
|
||||
(plug-in-nova RUN-NONINTERACTIVE img glow-layer novax novay glow-color novaradius 100 0)
|
||||
|
||||
(gimp-selection-all img)
|
||||
(gimp-context-set-pattern "Stone")
|
||||
(gimp-edit-bucket-fill bump-channel PATTERN-BUCKET-FILL NORMAL-MODE 100 0 FALSE 0 0)
|
||||
(plug-in-bump-map RUN-NONINTERACTIVE img logo-layer bump-channel
|
||||
135.0 45.0 4 0 0 0 0 FALSE FALSE 0)
|
||||
(gimp-image-remove-channel img bump-channel)
|
||||
(gimp-selection-none img)
|
||||
|
||||
(gimp-context-pop)
|
||||
)
|
||||
)
|
||||
|
||||
(define (script-fu-starscape-logo text size fontname glow-color)
|
||||
(let* (
|
||||
(img (car (gimp-image-new 256 256 RGB)))
|
||||
(border (/ size 4))
|
||||
(text-layer (car (gimp-text-fontname img -1 0 0 text border
|
||||
TRUE size PIXELS fontname)))
|
||||
)
|
||||
(gimp-image-undo-disable img)
|
||||
(apply-starscape-logo-effect img text-layer size glow-color)
|
||||
(gimp-image-undo-enable img)
|
||||
(gimp-display-new img)
|
||||
)
|
||||
)
|
||||
|
||||
(script-fu-register "script-fu-starscape-logo"
|
||||
_"Sta_rscape..."
|
||||
_"Create a logo using a rock-like texture, a nova glow, and shadow"
|
||||
"Spencer Kimball"
|
||||
"Spencer Kimball"
|
||||
"1997"
|
||||
""
|
||||
SF-STRING _"Text" "Nova"
|
||||
SF-ADJUSTMENT _"Font size (pixels)" '(150 1 1000 1 10 0 1)
|
||||
SF-FONT _"Font" "Engraver"
|
||||
SF-COLOR _"Glow color" '(28 65 188)
|
||||
)
|
||||
|
||||
(script-fu-menu-register "script-fu-starscape-logo"
|
||||
"<Image>/File/Create/Logos")
|
@ -1,69 +0,0 @@
|
||||
;
|
||||
; Swirl-tile
|
||||
; produces a (hope-fully) seamlessly tiling swirling effect
|
||||
;
|
||||
; Adrian Likins <aklikins@eos.ncsu.edu>
|
||||
;
|
||||
; http://www4.ncsu.edu/eos/users/a/aklikins/pub/gimp/
|
||||
;
|
||||
|
||||
|
||||
(define (script-fu-swirl-tile depth azimuth elevation blurRadius height width whirl-amount noise-level bg-color)
|
||||
(let* (
|
||||
(img (car (gimp-image-new width height RGB)))
|
||||
(layer-one (car (gimp-layer-new img width height
|
||||
RGB-IMAGE "TEST" 100 NORMAL-MODE)))
|
||||
(cx (/ width 2))
|
||||
(cy (/ height 2))
|
||||
)
|
||||
|
||||
(gimp-context-push)
|
||||
|
||||
(gimp-image-undo-disable img)
|
||||
|
||||
(gimp-image-insert-layer img layer-one 0 0)
|
||||
(gimp-context-set-background bg-color)
|
||||
(gimp-edit-fill layer-one BACKGROUND-FILL)
|
||||
(plug-in-noisify RUN-NONINTERACTIVE img layer-one FALSE noise-level noise-level noise-level 1.0)
|
||||
|
||||
(plug-in-whirl-pinch RUN-NONINTERACTIVE img layer-one whirl-amount 0.0 1.0)
|
||||
(plug-in-whirl-pinch RUN-NONINTERACTIVE img layer-one whirl-amount 0.0 1.0)
|
||||
(plug-in-whirl-pinch RUN-NONINTERACTIVE img layer-one whirl-amount 0.0 1.0)
|
||||
|
||||
(gimp-drawable-offset layer-one TRUE 0 cx cy)
|
||||
|
||||
(plug-in-whirl-pinch RUN-NONINTERACTIVE img layer-one whirl-amount 0.0 1.0)
|
||||
(plug-in-whirl-pinch RUN-NONINTERACTIVE img layer-one whirl-amount 0.0 1.0)
|
||||
(plug-in-whirl-pinch RUN-NONINTERACTIVE img layer-one whirl-amount 0.0 1.0)
|
||||
|
||||
(plug-in-gauss-rle RUN-NONINTERACTIVE img layer-one blurRadius TRUE TRUE)
|
||||
|
||||
(plug-in-bump-map RUN-NONINTERACTIVE img layer-one layer-one azimuth elevation depth 0 0 0 0 FALSE FALSE 0)
|
||||
|
||||
(gimp-display-new img)
|
||||
(gimp-image-undo-enable img)
|
||||
|
||||
(gimp-context-pop)
|
||||
)
|
||||
)
|
||||
|
||||
(script-fu-register "script-fu-swirl-tile"
|
||||
_"Swirl-_Tile..."
|
||||
_"Create an image filled with a swirled tile effect"
|
||||
"Adrian Likins <aklikins@eos.ncsu.edu>"
|
||||
"Adrian Likins"
|
||||
"1997"
|
||||
""
|
||||
SF-ADJUSTMENT _"Depth" '(10 1 64 1 1 0 0)
|
||||
SF-ADJUSTMENT _"Azimuth" '(135 0 360 1 10 0 0)
|
||||
SF-ADJUSTMENT _"Elevation" '(45 0 90 1 10 0 0)
|
||||
SF-ADJUSTMENT _"Blur radius" '(3 0 128 1 10 0 0)
|
||||
SF-ADJUSTMENT _"Height" '(256 0 1024 1 10 0 1)
|
||||
SF-ADJUSTMENT _"Width" '(256 0 1024 1 10 0 1)
|
||||
SF-ADJUSTMENT _"Whirl amount" '(320 0 360 1 10 0 0)
|
||||
SF-ADJUSTMENT _"Roughness" '(0.5 0 1 0.1 0.01 2 1)
|
||||
SF-COLOR _"Background color" "white"
|
||||
)
|
||||
|
||||
(script-fu-menu-register "script-fu-swirl-tile"
|
||||
"<Image>/File/Create/Patterns")
|
@ -1,94 +0,0 @@
|
||||
; GIMP - The GNU Image Manipulation Program
|
||||
; Copyright (C) 1995 Spencer Kimball and Peter Mattis
|
||||
;
|
||||
; Pattern00 --- create a swirly tileable pattern
|
||||
; Copyright (C) 1997 Federico Mena Quintero
|
||||
; federico@nuclecu.unam.mx
|
||||
;
|
||||
; 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 (script-fu-swirly-pattern qsize angle times)
|
||||
(define (whirl-it img drawable angle times)
|
||||
(if (> times 0)
|
||||
(begin
|
||||
(plug-in-whirl-pinch RUN-NONINTERACTIVE img drawable angle 0.0 1.0)
|
||||
(whirl-it img drawable angle (- times 1)))))
|
||||
|
||||
(let* ((hsize (* qsize 2))
|
||||
(img-size (* qsize 4))
|
||||
(img (car (gimp-image-new img-size img-size RGB)))
|
||||
(drawable (car (gimp-layer-new img img-size img-size
|
||||
RGB-IMAGE "Swirly pattern"
|
||||
100 NORMAL-MODE))))
|
||||
|
||||
(gimp-context-push)
|
||||
(gimp-context-set-feather FALSE)
|
||||
|
||||
(gimp-image-undo-disable img)
|
||||
(gimp-image-insert-layer img drawable 0 0)
|
||||
|
||||
; Render checkerboard
|
||||
|
||||
(gimp-context-set-foreground '(0 0 0))
|
||||
(gimp-context-set-background '(255 255 255))
|
||||
|
||||
(plug-in-checkerboard RUN-NONINTERACTIVE img drawable 0 qsize)
|
||||
|
||||
; Whirl upper left
|
||||
|
||||
(gimp-image-select-rectangle img CHANNEL-OP-REPLACE 0 0 hsize hsize)
|
||||
(whirl-it img drawable angle times)
|
||||
(gimp-invert drawable)
|
||||
|
||||
; Whirl upper right
|
||||
|
||||
(gimp-image-select-rectangle img CHANNEL-OP-REPLACE hsize 0 hsize hsize)
|
||||
(whirl-it img drawable (- angle) times)
|
||||
|
||||
; Whirl lower left
|
||||
|
||||
(gimp-image-select-rectangle img CHANNEL-OP-REPLACE 0 hsize hsize hsize)
|
||||
(whirl-it img drawable (- angle) times)
|
||||
|
||||
; Whirl lower right
|
||||
|
||||
(gimp-image-select-rectangle img CHANNEL-OP-REPLACE hsize hsize hsize hsize)
|
||||
(whirl-it img drawable angle times)
|
||||
(gimp-invert drawable)
|
||||
|
||||
; Terminate
|
||||
|
||||
(gimp-selection-none img)
|
||||
(gimp-image-undo-enable img)
|
||||
(gimp-display-new img)
|
||||
|
||||
(gimp-context-pop)
|
||||
)
|
||||
)
|
||||
|
||||
(script-fu-register "script-fu-swirly-pattern"
|
||||
_"_Swirly..."
|
||||
_"Create an image filled with a swirly pattern"
|
||||
"Federico Mena Quintero"
|
||||
"Federico Mena Quintero"
|
||||
"June 1997"
|
||||
""
|
||||
SF-ADJUSTMENT _"Quarter size" '(20 0 2048 1 10 0 1)
|
||||
SF-ADJUSTMENT _"Whirl angle" '(90 0 360 1 1 0 0)
|
||||
SF-ADJUSTMENT _"Number of times to whirl" '(4 0 128 1 1 0 1)
|
||||
)
|
||||
|
||||
(script-fu-menu-register "script-fu-swirly-pattern"
|
||||
"<Image>/File/Create/Patterns")
|
@ -1,155 +0,0 @@
|
||||
;; Trace of Particles Effect
|
||||
;; Shuji Narazaki (narazaki@InetQ.or.jp)
|
||||
;; Time-stamp: <97/03/15 17:27:33 narazaki@InetQ.or.jp>
|
||||
;; Version 0.2
|
||||
|
||||
(define (apply-t-o-p-logo-effect img
|
||||
logo-layer
|
||||
b-size
|
||||
hit-rate
|
||||
edge-size
|
||||
edge-only
|
||||
base-color
|
||||
bg-color)
|
||||
(let* (
|
||||
(width (car (gimp-drawable-width logo-layer)))
|
||||
(height (car (gimp-drawable-height logo-layer)))
|
||||
(logo-layer-mask (car (gimp-layer-create-mask logo-layer ADD-BLACK-MASK)))
|
||||
(sparkle-layer (car (gimp-layer-new img width height RGBA-IMAGE "Sparkle" 100 NORMAL-MODE)))
|
||||
(shadow-layer (car (gimp-layer-new img width height RGBA-IMAGE "Shadow" 90 ADDITION-MODE)))
|
||||
(bg-layer (car (gimp-layer-new img width height RGB-IMAGE "Background" 100 NORMAL-MODE)))
|
||||
(selection 0)
|
||||
(white '(255 255 255))
|
||||
)
|
||||
|
||||
(gimp-context-push)
|
||||
(gimp-context-set-defaults)
|
||||
|
||||
(script-fu-util-image-resize-from-layer img logo-layer)
|
||||
(script-fu-util-image-add-layers img sparkle-layer shadow-layer bg-layer)
|
||||
(gimp-selection-none img)
|
||||
(gimp-edit-clear shadow-layer)
|
||||
(gimp-edit-clear sparkle-layer)
|
||||
(gimp-context-set-background base-color)
|
||||
(gimp-edit-fill sparkle-layer BACKGROUND-FILL)
|
||||
(gimp-image-select-item img CHANNEL-OP-REPLACE logo-layer)
|
||||
(set! selection (car (gimp-selection-save img)))
|
||||
(gimp-selection-grow img edge-size)
|
||||
(plug-in-noisify RUN-NONINTERACTIVE img sparkle-layer FALSE
|
||||
(* 0.1 hit-rate) (* 0.1 hit-rate) (* 0.1 hit-rate) 0.0)
|
||||
(gimp-selection-border img edge-size)
|
||||
(plug-in-noisify RUN-NONINTERACTIVE img sparkle-layer FALSE hit-rate hit-rate hit-rate 0.0)
|
||||
(gimp-selection-none img)
|
||||
(plug-in-sparkle RUN-NONINTERACTIVE img sparkle-layer 0.03 0.49 width 6 15 1.0 0.0 0.0 0.0 FALSE FALSE FALSE 0)
|
||||
(gimp-image-select-item img CHANNEL-OP-REPLACE selection)
|
||||
(gimp-selection-shrink img edge-size)
|
||||
(gimp-levels sparkle-layer 0 0 255 1.2 0 255)
|
||||
(gimp-image-select-item img CHANNEL-OP-REPLACE selection)
|
||||
(gimp-selection-border img edge-size)
|
||||
(gimp-levels sparkle-layer 0 0 255 0.5 0 255)
|
||||
(gimp-image-select-item img CHANNEL-OP-REPLACE selection)
|
||||
(gimp-selection-grow img (/ edge-size 2.0))
|
||||
(gimp-selection-invert img)
|
||||
(gimp-edit-clear sparkle-layer)
|
||||
(if (= edge-only TRUE)
|
||||
(begin
|
||||
(gimp-image-select-item img CHANNEL-OP-REPLACE selection)
|
||||
(gimp-selection-shrink img (/ edge-size 2.0))
|
||||
(gimp-edit-clear sparkle-layer)
|
||||
(gimp-image-select-item img CHANNEL-OP-REPLACE selection)
|
||||
(gimp-selection-grow img (/ edge-size 2.0))
|
||||
(gimp-selection-invert img)))
|
||||
(gimp-context-set-foreground '(0 0 0))
|
||||
(gimp-context-set-background '(255 255 255))
|
||||
(gimp-context-set-brush "Circle Fuzzy (11)")
|
||||
(gimp-selection-feather img b-size)
|
||||
(gimp-edit-fill shadow-layer BACKGROUND-FILL)
|
||||
|
||||
(gimp-selection-none img)
|
||||
(gimp-context-set-background bg-color)
|
||||
(gimp-edit-fill bg-layer BACKGROUND-FILL)
|
||||
|
||||
(gimp-item-set-visible logo-layer 0)
|
||||
(gimp-image-set-active-layer img sparkle-layer)
|
||||
|
||||
(gimp-context-pop)
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
(define (script-fu-t-o-p-logo-alpha img
|
||||
logo-layer
|
||||
b-size
|
||||
hit-rate
|
||||
edge-size
|
||||
edge-only
|
||||
base-color
|
||||
bg-color)
|
||||
(begin
|
||||
(gimp-image-undo-group-start img)
|
||||
(apply-t-o-p-logo-effect img logo-layer b-size hit-rate
|
||||
edge-size edge-only base-color bg-color)
|
||||
(gimp-image-undo-group-end img)
|
||||
(gimp-displays-flush)
|
||||
)
|
||||
)
|
||||
|
||||
(script-fu-register "script-fu-t-o-p-logo-alpha"
|
||||
_"_Particle Trace..."
|
||||
_"Add a Trace of Particles effect to the selected region (or alpha)"
|
||||
"Shuji Narazaki (narazaki@InetQ.or.jp)"
|
||||
"Shuji Narazaki"
|
||||
"1997"
|
||||
"RGBA"
|
||||
SF-IMAGE "Image" 0
|
||||
SF-DRAWABLE "Drawable" 0
|
||||
SF-ADJUSTMENT _"Border size (pixels)" '(20 1 200 1 10 0 1)
|
||||
SF-ADJUSTMENT _"Hit rate" '(0.2 0 1 .01 .01 2 0)
|
||||
SF-ADJUSTMENT _"Edge width" '(2 0 128 1 1 0 0)
|
||||
SF-TOGGLE _"Edge only" FALSE
|
||||
SF-COLOR _"Base color" '(0 40 0)
|
||||
SF-COLOR _"Background color" "white"
|
||||
)
|
||||
|
||||
(script-fu-menu-register "script-fu-t-o-p-logo-alpha"
|
||||
"<Image>/Filters/Alpha to Logo")
|
||||
|
||||
|
||||
(define (script-fu-t-o-p-logo text
|
||||
size
|
||||
fontname
|
||||
hit-rate
|
||||
edge-size
|
||||
edge-only
|
||||
base-color
|
||||
bg-color)
|
||||
(let* ((img (car (gimp-image-new 256 256 RGB)))
|
||||
(border (/ size 5))
|
||||
(text-layer (car (gimp-text-fontname img -1 0 0 text (* border 2) TRUE size PIXELS fontname))))
|
||||
(gimp-image-undo-disable img)
|
||||
(apply-t-o-p-logo-effect img text-layer border hit-rate
|
||||
edge-size edge-only base-color bg-color)
|
||||
(gimp-image-undo-enable img)
|
||||
(gimp-display-new img)
|
||||
)
|
||||
)
|
||||
|
||||
(script-fu-register "script-fu-t-o-p-logo"
|
||||
_"_Particle Trace..."
|
||||
_"Create a logo using a Trace Of Particles effect"
|
||||
"Shuji Narazaki (narazaki@InetQ.or.jp)"
|
||||
"Shuji Narazaki"
|
||||
"1997"
|
||||
""
|
||||
SF-STRING _"Text" "GIMP"
|
||||
SF-ADJUSTMENT _"Font size (pixels)" '(100 1 1000 1 10 0 1)
|
||||
SF-FONT _"Font" "Becker"
|
||||
SF-ADJUSTMENT _"Hit rate" '(0.2 0 1 .01 .01 2 0)
|
||||
SF-ADJUSTMENT _"Edge width" '(2 0 128 1 1 0 0)
|
||||
SF-TOGGLE _"Edge only" FALSE
|
||||
SF-COLOR _"Base color" '(0 40 0)
|
||||
SF-COLOR _"Background color" "white"
|
||||
)
|
||||
|
||||
(script-fu-menu-register "script-fu-t-o-p-logo"
|
||||
"<Image>/File/Create/Logos")
|
@ -1,223 +0,0 @@
|
||||
;; text-circle.scm -- a script for GIMP
|
||||
;; Author: Shuji Narazaki <narazaki@gimp.org>
|
||||
;; Time-stamp: <1998/11/25 13:26:51 narazaki@gimp.org>
|
||||
;; Version 2.5
|
||||
;; Thanks:
|
||||
;; jseymour@jimsun.LinxNet.com (Jim Seymour)
|
||||
;; Sven Neumann <neumanns@uni-duesseldorf.de>
|
||||
;;
|
||||
;; Modified June 24, 2005 by Kevin Cozens
|
||||
;; Incorporated changes made by Daniel P. Stasinski in his text-circle2.scm
|
||||
;; script. The letters are now placed properly for both positive and negative
|
||||
;; fill angles.
|
||||
|
||||
(if (not (symbol-bound? 'script-fu-text-circle-debug? (current-environment)))
|
||||
(define script-fu-text-circle-debug? #f)
|
||||
)
|
||||
|
||||
(define (script-fu-text-circle text radius start-angle fill-angle
|
||||
font-size antialias font-name)
|
||||
|
||||
(define (wrap-string str)
|
||||
(string-append "\"" str "\"")
|
||||
)
|
||||
(define (white-space-string? str)
|
||||
(or (equal? " " str) (equal? "\t" str))
|
||||
)
|
||||
|
||||
(let* (
|
||||
(drawable-size (* 2.0 (+ radius (* 2 font-size))))
|
||||
(script-fu-text-circle-debug? #f)
|
||||
(img (car (gimp-image-new drawable-size drawable-size RGB)))
|
||||
(BG-layer (car (gimp-layer-new img drawable-size drawable-size
|
||||
RGBA-IMAGE "background" 100 NORMAL-MODE)))
|
||||
(merged-layer #f)
|
||||
(char-num (string-length text))
|
||||
(radian-step 0)
|
||||
(rad-90 (/ *pi* 2))
|
||||
(center-x (/ drawable-size 2))
|
||||
(center-y center-x)
|
||||
(font-infos (gimp-text-get-extents-fontname "lAgy" font-size
|
||||
PIXELS font-name))
|
||||
(desc (nth 3 font-infos))
|
||||
(start-angle-rad (* (/ (modulo start-angle 360) 360) 2 *pi*))
|
||||
(angle-list #f)
|
||||
(letter "")
|
||||
(new-layer #f)
|
||||
(index 0)
|
||||
(ndx 0)
|
||||
(ndx-start 0)
|
||||
(ndx-step 1)
|
||||
(ccw 0)
|
||||
(fill-angle-rad 0)
|
||||
(rot-op 0)
|
||||
(radian-step 0)
|
||||
)
|
||||
|
||||
(gimp-context-push)
|
||||
(gimp-context-set-defaults)
|
||||
(gimp-context-set-antialias antialias)
|
||||
(gimp-image-undo-disable img)
|
||||
(gimp-image-insert-layer img BG-layer 0 0)
|
||||
(gimp-edit-fill BG-layer BACKGROUND-FILL)
|
||||
|
||||
;; change units
|
||||
(if (< fill-angle 0)
|
||||
(begin
|
||||
(set! ccw 1)
|
||||
(set! fill-angle (abs fill-angle))
|
||||
(set! start-angle-rad (* (/ (modulo (+ (- start-angle fill-angle) 360) 360) 360) 2 *pi*))
|
||||
(set! ndx-start (- char-num 1))
|
||||
(set! ndx-step -1)
|
||||
)
|
||||
)
|
||||
|
||||
(set! fill-angle-rad (* (/ fill-angle 360) 2 *pi*))
|
||||
(set! radian-step (/ fill-angle-rad char-num))
|
||||
|
||||
;; make width-list
|
||||
;; In a situation,
|
||||
;; (car (gimp-drawable-width (car (gimp-text ...)))
|
||||
;; != (car (gimp-text-get-extent ...))
|
||||
;; Thus, I changed to gimp-text from gimp-text-get-extent at 2.2 !!
|
||||
(let (
|
||||
(temp-list '())
|
||||
(temp-str #f)
|
||||
(temp-layer #f)
|
||||
(scale 0)
|
||||
(temp #f)
|
||||
)
|
||||
(set! ndx ndx-start)
|
||||
(set! index 0)
|
||||
(while (< index char-num)
|
||||
(set! temp-str (substring text ndx (+ ndx 1)))
|
||||
(if (white-space-string? temp-str)
|
||||
(set! temp-str "x")
|
||||
)
|
||||
(set! temp-layer (car (gimp-text-fontname img -1 0 0
|
||||
temp-str
|
||||
1 antialias
|
||||
font-size PIXELS
|
||||
font-name)))
|
||||
(set! temp-list (cons (car (gimp-drawable-width temp-layer)) temp-list))
|
||||
(gimp-image-remove-layer img temp-layer)
|
||||
(set! ndx (+ ndx ndx-step))
|
||||
(set! index (+ index 1))
|
||||
)
|
||||
(set! angle-list (nreverse temp-list))
|
||||
(set! temp 0)
|
||||
(set! angle-list
|
||||
(mapcar
|
||||
(lambda (angle)
|
||||
(let ((tmp temp))
|
||||
(set! temp (+ angle temp))
|
||||
(+ tmp (/ angle 2))
|
||||
)
|
||||
)
|
||||
angle-list
|
||||
)
|
||||
)
|
||||
(set! scale (/ fill-angle-rad temp))
|
||||
(set! angle-list (mapcar (lambda (angle) (* scale angle)) angle-list))
|
||||
)
|
||||
(set! ndx ndx-start)
|
||||
(set! index 0)
|
||||
(while (< index char-num)
|
||||
(set! letter (substring text ndx (+ ndx 1)))
|
||||
(if (not (white-space-string? letter))
|
||||
;; Running gimp-text with " " causes an error!
|
||||
(let* (
|
||||
(new-layer (car (gimp-text-fontname img -1 0 0
|
||||
letter
|
||||
1 antialias
|
||||
font-size PIXELS
|
||||
font-name)))
|
||||
(width (car (gimp-drawable-width new-layer)))
|
||||
(height (car (gimp-drawable-height new-layer)))
|
||||
(rotate-radius (- (/ height 2) desc))
|
||||
(angle (+ start-angle-rad (- (nth index angle-list) rad-90)))
|
||||
)
|
||||
|
||||
(gimp-layer-resize new-layer width height 0 0)
|
||||
(set! width (car (gimp-drawable-width new-layer)))
|
||||
(if (not script-fu-text-circle-debug?)
|
||||
(begin
|
||||
(if (= ccw 0)
|
||||
(set! rot-op (if (< 0 fill-angle-rad) + -))
|
||||
(set! rot-op (if (> 0 fill-angle-rad) + -))
|
||||
)
|
||||
(gimp-item-transform-rotate new-layer
|
||||
(rot-op angle rad-90)
|
||||
TRUE 0 0)
|
||||
(gimp-layer-translate new-layer
|
||||
(+ center-x
|
||||
(* radius (cos angle))
|
||||
(* rotate-radius
|
||||
(cos (if (< 0 fill-angle-rad)
|
||||
angle
|
||||
(+ angle *pi*)
|
||||
)
|
||||
)
|
||||
)
|
||||
(- (/ width 2))
|
||||
)
|
||||
(+ center-y
|
||||
(* radius (sin angle))
|
||||
(* rotate-radius
|
||||
(sin (if (< 0 fill-angle-rad)
|
||||
angle
|
||||
(+ angle *pi*)
|
||||
)
|
||||
)
|
||||
)
|
||||
(- (/ height 2))
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(set! ndx (+ ndx ndx-step))
|
||||
(set! index (+ index 1))
|
||||
)
|
||||
|
||||
(gimp-item-set-visible BG-layer 0)
|
||||
(if (not script-fu-text-circle-debug?)
|
||||
(begin
|
||||
(set! merged-layer
|
||||
(car (gimp-image-merge-visible-layers img CLIP-TO-IMAGE)))
|
||||
(gimp-item-set-name merged-layer
|
||||
(if (< (string-length text) 16)
|
||||
(wrap-string text)
|
||||
"Text Circle"
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(gimp-item-set-visible BG-layer 1)
|
||||
(gimp-image-undo-enable img)
|
||||
(gimp-image-clean-all img)
|
||||
(gimp-display-new img)
|
||||
(gimp-context-pop)
|
||||
(gimp-displays-flush)
|
||||
)
|
||||
)
|
||||
|
||||
(script-fu-register "script-fu-text-circle"
|
||||
_"Text C_ircle..."
|
||||
_"Create a logo by rendering the specified text along the perimeter of a circle"
|
||||
"Shuji Narazaki <narazaki@gimp.org>"
|
||||
"Shuji Narazaki"
|
||||
"1997-1998"
|
||||
""
|
||||
SF-STRING _"Text" "The GNU Image Manipulation Program Version 2.0 "
|
||||
SF-ADJUSTMENT _"Radius" '(80 1 8000 1 1 0 1)
|
||||
SF-ADJUSTMENT _"Start angle" '(0 -180 180 1 1 0 1)
|
||||
SF-ADJUSTMENT _"Fill angle" '(360 -360 360 1 1 0 1)
|
||||
SF-ADJUSTMENT _"Font size (pixels)" '(18 1 1000 1 1 0 1)
|
||||
SF-TOGGLE _"Antialias" TRUE
|
||||
SF-FONT _"Font" "Sans"
|
||||
)
|
||||
|
||||
(script-fu-menu-register "script-fu-text-circle"
|
||||
"<Image>/File/Create/Logos")
|
@ -1,180 +0,0 @@
|
||||
; 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 (scale size percent) (* size percent))
|
||||
|
||||
(define (apply-textured-logo-effect img
|
||||
logo-layer
|
||||
b-size
|
||||
text-pattern
|
||||
tile-type
|
||||
bg-color
|
||||
blend-fg
|
||||
blend-bg)
|
||||
(let* (
|
||||
(b-size-2 (scale b-size 0.5))
|
||||
(f-size (scale b-size 0.75))
|
||||
(ds-size (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)))
|
||||
)
|
||||
|
||||
(gimp-context-push)
|
||||
(gimp-context-set-defaults)
|
||||
|
||||
(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-all img)
|
||||
(gimp-context-set-pattern text-pattern)
|
||||
(gimp-layer-set-lock-alpha logo-layer TRUE)
|
||||
(gimp-edit-bucket-fill logo-layer PATTERN-BUCKET-FILL NORMAL-MODE 100 0 FALSE 0 0)
|
||||
(gimp-selection-none img)
|
||||
(gimp-edit-clear text-shadow-layer)
|
||||
(gimp-edit-clear drop-shadow-layer)
|
||||
(gimp-context-set-background bg-color)
|
||||
(gimp-drawable-fill shadow-layer BACKGROUND-FILL)
|
||||
(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-edit-blend blend-layer FG-BG-RGB-MODE NORMAL-MODE
|
||||
GRADIENT-LINEAR 100 0 REPEAT-NONE FALSE
|
||||
FALSE 0 0 TRUE
|
||||
0 0 width 0)
|
||||
|
||||
(plug-in-mosaic RUN-NONINTERACTIVE img blend-layer 12 1 1 0.7 TRUE 135 0.2 TRUE FALSE
|
||||
tile-type 1 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)
|
||||
|
||||
(gimp-context-pop)
|
||||
)
|
||||
)
|
||||
|
||||
(define (script-fu-textured-logo-alpha img
|
||||
logo-layer
|
||||
b-size
|
||||
text-pattern
|
||||
tile-type
|
||||
bg-color
|
||||
blend-fg
|
||||
blend-bg)
|
||||
(begin
|
||||
(gimp-image-undo-group-start img)
|
||||
(apply-textured-logo-effect img logo-layer b-size text-pattern tile-type
|
||||
bg-color blend-fg blend-bg)
|
||||
(gimp-image-undo-group-end img)
|
||||
(gimp-displays-flush))
|
||||
)
|
||||
|
||||
(script-fu-register "script-fu-textured-logo-alpha"
|
||||
_"_Textured..."
|
||||
_"Fill the selected region (or alpha) with a texture and add highlights, shadows, and a mosaic background"
|
||||
"Spencer Kimball"
|
||||
"Spencer Kimball"
|
||||
"1996"
|
||||
"RGBA"
|
||||
SF-IMAGE "Image" 0
|
||||
SF-DRAWABLE "Drawable" 0
|
||||
SF-ADJUSTMENT _"Border size (pixels)" '(20 1 100 1 10 0 1)
|
||||
SF-PATTERN _"Pattern" "Fibers"
|
||||
SF-OPTION _"Mosaic tile type" '(_"Squares"
|
||||
_"Hexagons"
|
||||
_"Octagons")
|
||||
SF-COLOR _"Background color" "white"
|
||||
SF-COLOR _"Starting blend" '(32 106 0)
|
||||
SF-COLOR _"Ending blend" '(0 0 106)
|
||||
)
|
||||
|
||||
(script-fu-menu-register "script-fu-textured-logo-alpha"
|
||||
"<Image>/Filters/Alpha to Logo")
|
||||
|
||||
(define (script-fu-textured-logo text
|
||||
size
|
||||
fontname
|
||||
text-pattern
|
||||
tile-type
|
||||
bg-color
|
||||
blend-fg
|
||||
blend-bg)
|
||||
(let* ((img (car (gimp-image-new 256 256 RGB)))
|
||||
(b-size (scale size 0.1))
|
||||
(text-layer (car (gimp-text-fontname img -1 0 0 text b-size
|
||||
TRUE size PIXELS fontname))))
|
||||
(gimp-image-undo-disable img)
|
||||
(apply-textured-logo-effect img text-layer b-size text-pattern tile-type
|
||||
bg-color blend-fg blend-bg)
|
||||
(gimp-image-undo-enable img)
|
||||
(gimp-display-new img)
|
||||
)
|
||||
)
|
||||
|
||||
(script-fu-register "script-fu-textured-logo"
|
||||
_"_Textured..."
|
||||
_"Create a textured logo with highlights, shadows, and a mosaic background"
|
||||
"Spencer Kimball"
|
||||
"Spencer Kimball"
|
||||
"1996"
|
||||
""
|
||||
SF-STRING _"Text" "GIMP"
|
||||
SF-ADJUSTMENT _"Font size (pixels)" '(200 1 1000 1 10 0 1)
|
||||
SF-FONT _"Font" "CuneiFont"
|
||||
SF-PATTERN _"Text pattern" "Fibers"
|
||||
SF-OPTION _"Mosaic tile type" '(_"Squares"
|
||||
_"Hexagons"
|
||||
_"Octagons")
|
||||
SF-COLOR _"Background color" "white"
|
||||
SF-COLOR _"Starting blend" '(32 106 0)
|
||||
SF-COLOR _"Ending blend" '(0 0 106)
|
||||
)
|
||||
|
||||
(script-fu-menu-register "script-fu-textured-logo"
|
||||
"<Image>/File/Create/Logos")
|
@ -1,178 +0,0 @@
|
||||
; GIMP - The GNU Image Manipulation Program
|
||||
; Copyright (C) 1995 Spencer Kimball and Peter Mattis
|
||||
;
|
||||
; Bump-mapped title script --- create a bump-mapped title image for web pages
|
||||
; Copyright (C) 1997 Federico Mena Quintero
|
||||
; federico@nuclecu.unam.mx
|
||||
; ************************************************************************
|
||||
; Changed on Feb 4, 1999 by Piet van Oostrum <piet@cs.uu.nl>
|
||||
; For use with GIMP 1.1.
|
||||
;
|
||||
; The corresponding parameters have been replaced by an SF-FONT parameter.
|
||||
; The call to gimp-context-set-background has been given a real layer
|
||||
; (although it is not used) otherwise gimp 1.1 crashed.
|
||||
; ************************************************************************
|
||||
;
|
||||
; 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 (script-fu-title-header text
|
||||
size
|
||||
fontname
|
||||
gradient-reverse)
|
||||
(let* (; Parameters
|
||||
|
||||
(padding 8)
|
||||
(fade-width 64)
|
||||
|
||||
; Image
|
||||
|
||||
(img (car (gimp-image-new 256 256 RGB)))
|
||||
|
||||
; Text layer
|
||||
|
||||
(text-layer (car (gimp-text-fontname
|
||||
img
|
||||
-1
|
||||
0
|
||||
0
|
||||
text
|
||||
padding
|
||||
TRUE
|
||||
size
|
||||
PIXELS
|
||||
fontname)))
|
||||
(text-width (car (gimp-drawable-width text-layer)))
|
||||
(text-height (car (gimp-drawable-height text-layer)))
|
||||
|
||||
; Sizes
|
||||
|
||||
(text-layers-offset (/ text-height 2))
|
||||
|
||||
(img-width (+ text-layers-offset text-width fade-width))
|
||||
(img-height text-height)
|
||||
|
||||
; Additional layers
|
||||
|
||||
(bg-layer (car (gimp-layer-new img img-width img-height RGBA-IMAGE
|
||||
"bg-layer" 100 NORMAL-MODE)))
|
||||
(bumpmap-layer (car (gimp-layer-new img
|
||||
text-width
|
||||
text-height
|
||||
RGBA-IMAGE
|
||||
"bumpmap-layer"
|
||||
100
|
||||
NORMAL-MODE)))
|
||||
(fore-layer (car (gimp-layer-new img text-width text-height RGBA-IMAGE
|
||||
"fore-layer" 100 NORMAL-MODE)))
|
||||
)
|
||||
|
||||
(gimp-context-push)
|
||||
(gimp-context-set-defaults)
|
||||
|
||||
; Create image
|
||||
|
||||
(gimp-image-undo-disable img)
|
||||
(gimp-image-resize img img-width img-height 0 0)
|
||||
|
||||
(gimp-image-insert-layer img bg-layer 0 -1)
|
||||
(gimp-image-insert-layer img bumpmap-layer 0 -1)
|
||||
(gimp-image-insert-layer img fore-layer 0 -1)
|
||||
; (gimp-image-insert-layer img text-layer 0 -1)
|
||||
(gimp-image-raise-item img text-layer)
|
||||
(gimp-image-raise-item img text-layer)
|
||||
(gimp-image-raise-item img text-layer)
|
||||
(gimp-layer-set-offsets bg-layer 0 0)
|
||||
(gimp-layer-set-offsets text-layer text-layers-offset 0)
|
||||
(gimp-layer-set-offsets bumpmap-layer text-layers-offset 0)
|
||||
(gimp-layer-set-offsets fore-layer text-layers-offset 0)
|
||||
|
||||
; Create bumpmap layer
|
||||
|
||||
(gimp-context-set-background '(0 0 0))
|
||||
(gimp-edit-fill bumpmap-layer BACKGROUND-FILL)
|
||||
(gimp-image-select-item img CHANNEL-OP-REPLACE text-layer)
|
||||
(gimp-context-set-background '(255 255 255))
|
||||
(gimp-edit-fill bumpmap-layer BACKGROUND-FILL)
|
||||
(gimp-selection-none img)
|
||||
(plug-in-gauss-rle RUN-NONINTERACTIVE img bumpmap-layer 4.0 TRUE TRUE)
|
||||
|
||||
; Fore layer, bumpmap
|
||||
|
||||
(gimp-context-set-background '(255 255 255))
|
||||
(gimp-edit-fill fore-layer BACKGROUND-FILL)
|
||||
(plug-in-bump-map RUN-NONINTERACTIVE img fore-layer bumpmap-layer 135.0 45.0 4 0 0 0 0 FALSE FALSE 0)
|
||||
|
||||
; Text layer
|
||||
|
||||
(gimp-item-set-visible text-layer TRUE)
|
||||
(gimp-layer-set-lock-alpha text-layer TRUE)
|
||||
|
||||
(gimp-edit-blend text-layer CUSTOM-MODE NORMAL-MODE
|
||||
GRADIENT-LINEAR 100 0 REPEAT-NONE gradient-reverse
|
||||
FALSE 0.2 3 TRUE
|
||||
padding padding
|
||||
(- text-width padding 1) (- text-height padding 1))
|
||||
|
||||
; Semicircle at the left
|
||||
|
||||
(gimp-context-set-background '(0 0 0))
|
||||
(gimp-edit-fill bg-layer BACKGROUND-FILL)
|
||||
|
||||
(gimp-image-select-ellipse img CHANNEL-OP-REPLACE 0 0 text-height text-height)
|
||||
(gimp-context-set-background (car (gimp-image-pick-color img text-layer
|
||||
text-layers-offset 0
|
||||
TRUE FALSE 0)))
|
||||
(gimp-edit-fill bg-layer BACKGROUND-FILL)
|
||||
|
||||
; Fade-out gradient at the right
|
||||
|
||||
(gimp-image-select-rectangle img CHANNEL-OP-REPLACE
|
||||
(- img-width fade-width) 0
|
||||
fade-width text-height)
|
||||
(gimp-context-set-foreground (car (gimp-context-get-background)))
|
||||
(gimp-context-set-background '(0 0 0))
|
||||
|
||||
(gimp-edit-blend bg-layer FG-BG-RGB-MODE NORMAL-MODE
|
||||
GRADIENT-LINEAR 100 0 REPEAT-NONE FALSE
|
||||
FALSE 0.2 3 TRUE
|
||||
(- img-width fade-width) 0 (- img-width 1) 0)
|
||||
|
||||
(gimp-selection-none img)
|
||||
|
||||
; Done
|
||||
|
||||
; (gimp-image-flatten img)
|
||||
(gimp-image-undo-enable img)
|
||||
(gimp-display-new img)
|
||||
|
||||
(gimp-context-pop)
|
||||
)
|
||||
)
|
||||
|
||||
(script-fu-register "script-fu-title-header"
|
||||
_"Web Title Header..."
|
||||
_"Create a decorative web title header"
|
||||
"Federico Mena Quintero"
|
||||
"Federico Mena Quintero"
|
||||
"June 1997"
|
||||
""
|
||||
SF-STRING _"Text" "Hello world!"
|
||||
SF-ADJUSTMENT _"Font size (pixels)" '(32 2 256 1 10 0 0)
|
||||
SF-FONT _"Font" "Sans"
|
||||
SF-TOGGLE _"Gradient reverse" FALSE
|
||||
)
|
||||
|
||||
(script-fu-menu-register "script-fu-title-header"
|
||||
"<Image>/File/Create/Logos")
|
@ -1,180 +0,0 @@
|
||||
; GIMP - The GNU Image Manipulation Program
|
||||
; Copyright (C) 1995 Spencer Kimball and Peter Mattis
|
||||
;
|
||||
; 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/>.
|
||||
;
|
||||
; Truchet - a script to create Truchet patterns
|
||||
; by Adrian Likins <aklikins@eos.ncsu.edu>
|
||||
; http://www4.ncsu.edu/~aklikins/
|
||||
; version about .8 give or take
|
||||
;
|
||||
; Lots of thanks to Quartic for his help.
|
||||
;
|
||||
;
|
||||
; The utility of this script is left as an exercise for the reader.
|
||||
;
|
||||
; NOTE: This script works best with even values for 'thickness'.
|
||||
|
||||
(define (center-ellipse img cx cy rx ry op aa feather frad)
|
||||
(gimp-context-push)
|
||||
(gimp-context-set-antialias aa)
|
||||
(gimp-context-set-feather feather)
|
||||
(gimp-context-set-feather-radius frad frad)
|
||||
(gimp-image-select-ellipse img op (- cx rx) (- cy ry) (+ rx rx ) (+ ry ry ))
|
||||
(gimp-context-pop)
|
||||
)
|
||||
|
||||
(define (use-tiles img drawable height width img2 drawable2 xoffset yoffset)
|
||||
(gimp-edit-copy drawable2)
|
||||
(let ((floating-sel (car (gimp-edit-paste drawable FALSE))))
|
||||
(gimp-layer-set-offsets floating-sel xoffset yoffset)
|
||||
(gimp-floating-sel-anchor floating-sel)
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
(define (create-tiles img drawable1 drawable2 size thickness backcolor forecolor)
|
||||
(let* (
|
||||
(half-thickness (/ thickness 2))
|
||||
(outer-radius (+ (/ size 2) half-thickness))
|
||||
(inner-radius (- (/ size 2) half-thickness))
|
||||
)
|
||||
|
||||
(gimp-context-push)
|
||||
|
||||
(gimp-selection-all img)
|
||||
(gimp-context-set-background backcolor)
|
||||
(gimp-edit-fill drawable1 BACKGROUND-FILL)
|
||||
|
||||
(let* (
|
||||
(tempSize (* size 3))
|
||||
(temp-img (car (gimp-image-new tempSize tempSize RGB)))
|
||||
(temp-draw (car (gimp-layer-new temp-img tempSize tempSize RGB-IMAGE "Jabar" 100 NORMAL-MODE)))
|
||||
)
|
||||
(gimp-image-undo-disable temp-img)
|
||||
(gimp-image-insert-layer temp-img temp-draw 0 0)
|
||||
(gimp-context-set-background backcolor)
|
||||
(gimp-edit-fill temp-draw BACKGROUND-FILL)
|
||||
|
||||
|
||||
(center-ellipse temp-img size size outer-radius outer-radius CHANNEL-OP-REPLACE TRUE FALSE 0)
|
||||
(center-ellipse temp-img size size inner-radius inner-radius CHANNEL-OP-SUBTRACT TRUE FALSE 0)
|
||||
|
||||
(center-ellipse temp-img (* size 2) (* size 2) outer-radius outer-radius CHANNEL-OP-ADD TRUE FALSE 0)
|
||||
(center-ellipse temp-img (* size 2) (* size 2) inner-radius inner-radius CHANNEL-OP-SUBTRACT TRUE FALSE 0)
|
||||
(gimp-context-set-background forecolor)
|
||||
(gimp-edit-fill temp-draw BACKGROUND-FILL)
|
||||
|
||||
(gimp-selection-none temp-img)
|
||||
|
||||
(gimp-image-resize temp-img size size (- size) (- size))
|
||||
; woo hoo it works....finally...
|
||||
|
||||
|
||||
(gimp-selection-all temp-img)
|
||||
(gimp-edit-copy temp-draw)
|
||||
(let ((floating-sel (car (gimp-edit-paste drawable2 FALSE))))
|
||||
(gimp-floating-sel-anchor floating-sel))
|
||||
|
||||
|
||||
(let ((floating-sel (car (gimp-edit-paste drawable1 FALSE))))
|
||||
(gimp-floating-sel-anchor floating-sel))
|
||||
|
||||
(gimp-context-set-transform-resize TRANSFORM-RESIZE-CLIP)
|
||||
(let ((drawble (car (gimp-item-transform-flip-simple drawable1
|
||||
ORIENTATION-VERTICAL TRUE 0)))))
|
||||
|
||||
|
||||
;(gimp-display-new temp-img)
|
||||
(gimp-image-delete temp-img)
|
||||
(gimp-context-pop)
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
(define (script-fu-truchet size thickness backcolor forecolor xtiles ytiles)
|
||||
(let* (
|
||||
(width (* size xtiles))
|
||||
(height (* size ytiles))
|
||||
(img (car (gimp-image-new width height RGB)))
|
||||
(tile (car (gimp-image-new size size RGB)))
|
||||
(layer-one (car (gimp-layer-new img width height
|
||||
RGB-IMAGE "Rambis" 100 NORMAL-MODE)))
|
||||
(tiledraw1 (car (gimp-layer-new tile size size
|
||||
RGB-IMAGE "Johnson" 100 NORMAL-MODE)))
|
||||
(tiledraw2 (car (gimp-layer-new tile size size
|
||||
RGB-IMAGE "Cooper" 100 NORMAL-MODE)))
|
||||
(Xindex 0)
|
||||
(Yindex 0)
|
||||
)
|
||||
|
||||
(gimp-context-push)
|
||||
(gimp-context-set-defaults)
|
||||
|
||||
(gimp-image-undo-disable img)
|
||||
(gimp-image-undo-disable tile)
|
||||
|
||||
(gimp-image-insert-layer img layer-one 0 0)
|
||||
(gimp-image-insert-layer tile tiledraw1 0 0)
|
||||
(gimp-image-insert-layer tile tiledraw2 0 0)
|
||||
|
||||
|
||||
;just to look a little better
|
||||
(gimp-selection-all img)
|
||||
(gimp-context-set-background backcolor)
|
||||
(gimp-edit-fill layer-one BACKGROUND-FILL)
|
||||
(gimp-selection-none img)
|
||||
|
||||
(create-tiles tile tiledraw1 tiledraw2 size thickness backcolor forecolor)
|
||||
|
||||
|
||||
(while (<= Xindex xtiles)
|
||||
(while (<= Yindex ytiles)
|
||||
(if (= (rand 2) 0)
|
||||
(use-tiles img layer-one height width tile tiledraw1 (* Xindex size) (* Yindex size))
|
||||
(use-tiles img layer-one height width tile tiledraw2 (* Xindex size) (* Yindex size))
|
||||
)
|
||||
(set! Yindex (+ Yindex 1))
|
||||
)
|
||||
(set! Yindex 0)
|
||||
(set! Xindex (+ Xindex 1))
|
||||
)
|
||||
|
||||
|
||||
(gimp-image-delete tile)
|
||||
(gimp-image-undo-enable img)
|
||||
(gimp-display-new img)
|
||||
|
||||
(gimp-context-pop)
|
||||
)
|
||||
)
|
||||
|
||||
(script-fu-register "script-fu-truchet"
|
||||
_"T_ruchet..."
|
||||
_"Create an image filled with a Truchet pattern"
|
||||
"Adrian Likins <aklikins@eos.ncsu.edu>"
|
||||
"Adrian Likins"
|
||||
"1997"
|
||||
""
|
||||
SF-ADJUSTMENT _"Block size" '(32 2 512 1 10 1 1)
|
||||
SF-ADJUSTMENT _"Thickness" '(2 1 512 1 10 1 1)
|
||||
SF-COLOR _"Background color" "white"
|
||||
SF-COLOR _"Foreground color" "black"
|
||||
SF-ADJUSTMENT _"Number of X tiles" '(5 1 512 1 10 1 1)
|
||||
SF-ADJUSTMENT _"Number of Y tiles" '(5 1 512 1 10 1 1)
|
||||
)
|
||||
|
||||
(script-fu-menu-register "script-fu-truchet"
|
||||
"<Image>/File/Create/Patterns")
|
Reference in New Issue
Block a user