; An example script that writes a fixed string in the current
; image.
(define (script-fu-stamp-h20water img drawable)
(define text-float)
(let* (
(y_start (- (car(gimp-drawable-height drawable)) 11) )
(x_start (- (car(gimp-drawable-width drawable)) 120) )
(img_h (car(gimp-drawable-height drawable)) )
(img_w (car(gimp-drawable-width drawable)) )
(watermark (car (gimp-layer-new img
img_w img_h 0
"Watermarked" 100 0)))
)
;work with "watermarked" layer
(gimp-layer-add-alpha watermark)
(gimp-drawable-fill watermark 3)
(gimp-image-add-layer img watermark -1)
;set to b & w
(gimp-context-set-default-colors)
; Create the text. See the Procedure Browser for parameters of gimp-text.
(set! text-float (car (gimp-text-fontname img watermark
x_start y_start "photographed by h20water" 0 1 8 0
"Sans")))
; Anchor the selection
(gimp-floating-sel-anchor text-float)
)
; Flush output
(gimp-displays-flush)
)
(script-fu-register "script-fu-stamp-h20water"
"stamp h20water"
"stamp photographed by h20water in the current image"
"H20water
"H20water"
"2008-03-07"
"RGB*, GRAY*"
SF-IMAGE "Input Image" 0
SF-DRAWABLE "Input Drawable" 0)
(script-fu-menu-register "script-fu-stamp-h20water"
"
No comments:
Post a Comment