On Tuesday 16 May 2006 04:35, Tim Jedlicka wrote:
> On 5/15/06, Mirageii <[EMAIL PROTECTED]> wrote:
> > I just have a simple question on how to add a watermark to an image?
>
> I'm sure there are tutorials someplace on this, but here is my quick
> overview.
>
> Several ways of doing this. If you just want a copyright on one image then
> in Gimp
> open the text tool (a big T). The tricky part is the (C) symbol. Presumably
> there are keystrokes to get a (C) to appear but it has never worked for me
> so I use gucharmap and select a (C) from there. You may want to knock down
> the opacity of the text layer (from the layer dialogue).
>
> If you have several images to copyright I use imagemagick's composite. Once
> I've created a file that just has my copyright statement in it (copyd.png)
> I do:
> composite -gravity SouthEast -geometry +100+100
> /home/bonzo/photos/copyd.png orig.jpg new.jpg
>
> I'm no lawyer, but I read that to be "legal" a copyright must have the
> symbol, (C) is not good enough, the date, and an identifing "name".

Use the watermark script.
It does exactly what you want.
I cant for my life remember who wrote it. But who ever is was shall have all 
the credit.
Its a marvelous little piece :)

The copyright symbol "©" on MY keyboard is <alt-gr> + C 
There are other ways to get it into a text. (eg. copy from another text or use 
special character inserts in whatever program you are using.)


This is the script:

---Start Script ---

;   Write a watermark in a corner of the image

;  Next line wrapped!!!
(define (script-fu-watermark image drawable text font pixsize location \
        \ opacity)

  (let*

;   Save the foreground color

    ((old-fg (car (gimp-palette-get-foreground))))

;   Set the foreground color to white

     (gimp-palette-set-foreground '(255 255 255))

  (let*

;   Set the X and Y locations offset by 10 pixels from the chosen corner

     ((imagewid (car (gimp-image-width image)))
      (imagehgt (car (gimp-image-height image)))

      (ytext
         (cond ((<= location 1) (- (- imagehgt pixsize) 10))
               ((>= location 2) 0)))

      (textwid (car (gimp-text-get-extents-fontname text pixsize 0 font)))

      (xtext
         (cond ((= (fmod location 2) 0) 10)
               ((= (fmod location 2) 1) (- (- imagewid textwid) 10))))

;   Create a layer with the watermark text

      (tlayer (car (gimp-text-fontname image -1 xtext ytext text -1 TRUE
          pixsize 0 font))))

;   Bump map the watermark layer

      (plug-in-bump-map 1 image tlayer tlayer 135 45 3 0 0 0 0 1 0 0)

;   Set the opacity of the watermark layer

      (gimp-layer-set-opacity tlayer opacity)

;   Combine the original image layer and the watermark layer

      (gimp-image-flatten image)
    )

;   Restore the old foreground color

    (gimp-palette-set-foreground old-fg)
  )

;   Update the display

  (gimp-displays-flush)
)

(script-fu-register "script-fu-watermark"
                    "<Image>/Script-Fu/MyScript/Watermark"
                    "Watermark"
                    "Doug Reynolds"
                    "Doug Reynolds"
                    "2001/04/12"
                    "RGB*, GRAY*"
                    SF-IMAGE "Input Image" 0
                    SF-DRAWABLE "Input Drawable" 0
                    SF-STRING "Text String" "This is where your text goes"
SF-FONT "Font" "-itc-bookman-demi-r-normal-*-*-*-*-*-p-*-iso8859-1"
SF-ADJUSTMENT "Size (pixels)" '(30 0 1000 5 10 0 1)
SF-OPTION "Location" '("Lower left" "Lower right" "Upper left" "Upper right")
                    SF-ADJUSTMENT "Opacity" '(20 0 100 5 10 0 1)
                    )



--- end script ---


Hope it helps.

-- 
         /Rikard

-----------------------------------------------------------------------------
email   : [EMAIL PROTECTED]
web     : http://www.rikjoh.com
mob:    : +46 (0)763 19 76 25
------------------------ Public PGP fingerprint ----------------------------
< 15 28 DF 78 67 98 B2 16 1F D3 FD C5 59 D4 B6 78  46 1C EE 56 >

Attachment: pgpO9gaI5TxU5.pgp
Description: PGP signature

_______________________________________________
Gimp-user mailing list
Gimp-user@lists.XCF.Berkeley.EDU
https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-user

Reply via email to