(define (script_fu_jason_web_button xpos ypos text infilename outfilename) (print xpos) (print outfilename) (let* ( (img (car (gimp-xcf-load 0 infilename infilename))) (width (car (gimp-image-width img))) (height (car (gimp-image-height img))) ;(layers (cadr (gimp-image-get-layers img))) (drawable (car (gimp-layer-new img width height RGBA_IMAGE "Text" 100 NORMAL))) ) (gimp-image-undo-disable img) (gimp-image-add-layer img drawable -1) (gimp-selection-none img) (gimp-palette-set-foreground '(255 255 255)) (gimp-palette-set-background '(0 0 0)) (gimp-text img drawable 1 5 text 2 TRUE 14 0 "*" "helvetica narrow" "bold" "r" "condensed" "*" "*" "*") (gimp-selection-none img) ; Activate either the white or orange layers. ;(gimp-layer-set-visible (car layers) 1) ;(cond (eqv? dot_layer 2) (gimp-layer-set-visible (cadr layers) 1)) ;Delete fucked up pixels (gimp-selection-none img) (gimp-rect-select img 1 1 (- width 1) (- height 1) REPLACE 0 0.0) (gimp-selection-invert img) (gimp-edit-clear drawable) (gimp-selection-none img) ;(gimp-image-undo-enable img) ;(gimp-display-new img) (set! layer-to-save (car (gimp-image-merge-visible-layers img 0))) (gimp-convert-indexed img 3 0 256 0 1 "null") ;(gimp-file-save 1 img layer-to-save "jason2.jpg" "jason2.jpg" ) ;(file-jpeg-save 1 img layer-to-save outfilename outfilename 0.5 0.0 1 0 "" 0 1 0 2) (file-gif-save 1 img layer-to-save outfilename outfilename 0 0 0 0) ;(gimp-xcf-save 0 img drawable "jason_num2.xcf" "jason_num2.xcf") outfilename ) ) (script-fu-register "script_fu_jason_web_button" "/Xtns/Script-Fu/Misc/Jason Web Button..." "Adds text to a button" "Jason Gallicchio" "Jason Gallicchio" "June 1997" "" SF-ADJUSTMENT "Position X" '(1 0 100 1 10 0 1) SF-ADJUSTMENT "Position Y" '(1 0 100 1 10 0 1) SF-STRING "Text" "Bob is here" SF-STRING "In Filename" "button_template.xcf" SF-STRING "Out Filename" "jason_button.gif")