home *** CD-ROM | disk | FTP | other *** search
/ Chip 1999 July / CHIP-1999-07.iso / software / gimp / GIMP-SET.EXE / file0369_39b812_39bdb4.bin < prev    next >
Encoding:
Text File  |  1999-02-28  |  3.9 KB  |  93 lines

  1. ; The GIMP -- an image manipulation program
  2. ; Copyright (C) 1995 Spencer Kimball and Peter Mattis
  3. ; This program is free software; you can redistribute it and/or modify
  4. ; it under the terms of the GNU General Public License as published by
  5. ; the Free Software Foundation; either version 2 of the License, or
  6. ; (at your option) any later version.
  7. ; This program is distributed in the hope that it will be useful,
  8. ; but WITHOUT ANY WARRANTY; without even the implied warranty of
  9. ; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  10. ; GNU General Public License for more details.
  11. ; You should have received a copy of the GNU General Public License
  12. ; along with this program; if not, write to the Free Software
  13. ; Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  14. ;
  15. ;  Comic Book Logo v0.1  04/08/98
  16. ;  by Brian McFee
  17. ;  Creates snazzy-looking text, inspired by watching a Maxx marathon :)
  18.  
  19. (define (script-fu-comic-logo text size font gradient ol-width)
  20.   (let* ((img (car (gimp-image-new 256 256 RGB)))
  21.          (border (/ size 4))
  22.      (text-layer (car (gimp-text-fontname img -1 0 0 text border TRUE size PIXELS font)))
  23.      (width (car (gimp-drawable-width text-layer)))
  24.      (height (car (gimp-drawable-height text-layer)))
  25.      (bg-layer (car (gimp-layer-new img width height RGBA_IMAGE "Background" 100 NORMAL)))
  26.      (white-layer (car (gimp-layer-copy text-layer 1)))
  27.      (black-layer (car (gimp-layer-copy text-layer 1)))
  28.      (old-fg (car (gimp-palette-get-foreground)))
  29.      (old-bg (car (gimp-palette-get-background))))
  30.     (gimp-image-disable-undo img)
  31.     (gimp-image-resize img width height 0 0)
  32.     (gimp-image-add-layer img bg-layer 1)
  33.     (gimp-image-add-layer img white-layer 1)
  34.     (gimp-layer-set-name white-layer "White")
  35.     (gimp-image-add-layer img black-layer 1)
  36.     (gimp-layer-set-name black-layer "Black")
  37.   
  38.     (gimp-selection-all img)
  39.     (gimp-edit-fill bg-layer)
  40.     (gimp-selection-none img)
  41.  
  42.     (gimp-layer-set-preserve-trans white-layer TRUE)
  43.     (gimp-palette-set-background '(255 255 255))
  44.     (gimp-selection-all img)
  45.     (gimp-edit-fill white-layer)
  46.     (gimp-layer-set-preserve-trans white-layer FALSE)
  47.     (plug-in-spread 1 img white-layer (* 3 ol-width) (* 3 ol-width))
  48.     (plug-in-gauss-rle 1 img white-layer (* 2 ol-width) 1 1)
  49.     (plug-in-threshold-alpha 1 img white-layer 0)
  50.     (gimp-selection-none img)
  51.  
  52.     (gimp-palette-set-background '(0 0 0))
  53.     (gimp-layer-set-preserve-trans black-layer TRUE)
  54.     (gimp-selection-all img)
  55.     (gimp-edit-fill black-layer)
  56.     (gimp-selection-none img)
  57.     (gimp-layer-set-preserve-trans black-layer FALSE)
  58.     (plug-in-gauss-rle 1 img black-layer ol-width 1 1)
  59.     (plug-in-threshold-alpha 1 img black-layer 0)
  60.  
  61.     (gimp-gradients-set-active gradient)
  62.     (gimp-layer-set-preserve-trans text-layer TRUE)
  63.     (gimp-selection-all img)
  64.     (gimp-blend text-layer CUSTOM NORMAL LINEAR 100 0 REPEAT-NONE FALSE 0 0 0 (* 2 border) 0 (- height border))
  65.     (plug-in-noisify 1 img text-layer 0 0.20 0.20 0.20 0.20)
  66.     (gimp-selection-none img)
  67.     (gimp-layer-set-preserve-trans text-layer FALSE)
  68.     (gimp-brightness-contrast text-layer 0 30)
  69.     (plug-in-threshold-alpha 1 img text-layer 60)
  70.     (gimp-layer-set-name text-layer text)
  71.     (gimp-image-set-active-layer img text-layer)
  72.     (gimp-palette-set-background old-bg)
  73.     (gimp-palette-set-foreground old-fg)
  74.     (gimp-image-enable-undo img)
  75.     (gimp-display-new img)))
  76.  
  77.  
  78. (script-fu-register "script-fu-comic-logo"
  79.             "<Toolbox>/Xtns/Script-Fu/Logos/Comic Book"
  80.             "Comic-book Style Logos"
  81.             "Brian McFee <keebler@wco.com>"
  82.             "Brian McFee"
  83.             "April 1998"
  84.             ""
  85.             SF-STRING "Text String" "Moo"
  86.             SF-ADJUSTMENT "Font Size (pixels)" '(85 2 1000 1 10 0 1)
  87.             SF-FONT "Font" "-*-tribeca-*-i-*-*-24-*-*-*-p-*-*-*"
  88.             SF-GRADIENT "Gradient" "Incandescent"
  89.             SF-VALUE "Outline width" "5")
  90.