RSS/Atom feed Twitter
Site is read-only, email is disabled

Script-fu, watermark

This discussion is connected to the gimp-user-list.gnome.org mailing list which is provided by the GIMP developers and not related to gimpusers.com.

This is a read-only list on gimpusers.com so this discussion thread is read-only, too.

4 of 6 messages available
Toggle history

Please log in to manage your subscriptions.

Script-fu, watermark Roland Berger 17 Dec 01:39
op.s1ixl5jtcdzd13@pashitos-... 07 Oct 20:17
  Script-fu, watermark Pavel Sorokin 09 Dec 18:56
   Script-fu, watermark michael chang 11 Dec 02:20
1134240612.6147.3.camel@hst... 07 Oct 20:17
  Script-fu, watermark Pavel Sorokin 10 Dec 22:29
Pavel Sorokin
2005-12-09 18:56:17 UTC (over 18 years ago)

Script-fu, watermark

I`m totally new to Gimp and Script-fu but I have to do this one thing using Script-fu.

I need a script (and a batch?) which will read .jpg file names from a file list and mark all of these files with greyscale watermark (aka logo), which will be place at exact location of those pictures (for example, lower right corner). Watermark must be read from a .gif file.

As I understand, this is not a very short script and a few pointers can`t help me (as I already said - I`m new to all this), but maybe you will direct me to some useful (in my case) resources. I`ve been reading tutorials, going through lots of examples, but can`t get enough information to do what I need to do.

Thank you!

Pavel Sorokin
2005-12-10 22:29:28 UTC (over 18 years ago)

Script-fu, watermark

On Sat, 10 Dec 2005 20:50:12 +0200, peter kostov wrote:

On Fri, 2005-12-09 at 19:56 +0200, Pavel Sorokin wrote:

I`m totally new to Gimp and Script-fu but I have to do this one thing using Script-fu.

I need a script (and a batch?) which will read .jpg file names from a file
list and mark all of these files with greyscale watermark (aka logo), which will be place at exact location of those pictures (for example, lower right corner). Watermark must be read from a .gif file.

As I understand, this is not a very short script and a few pointers can`t
help me (as I already said - I`m new to all this), but maybe you will direct me to some useful (in my case) resources. I`ve been reading tutorials, going through lots of examples, but can`t get enough information to do what I need to do.

Thank you!

Hi, I think you better do that with ImageMagick! Here is a link with explanation how to do exactly what you want: http://www.cit.gu.edu.au/~anthony/graphics/imagick6/annotating/#watermarking

It works great, I have tried it ;)

Peter

Thanks for advice, but the thing is, I know about this program and some other, suitable for this purpose, too... but this is my assignment for a class at university. I simply MUST use script-fu, so I had to choose what exactly I am going to do using script-fu (from a list of assignments) and I decided to do this one - with watermark. Other tasks were not easier.

Thanks anyway!

michael chang
2005-12-11 02:20:21 UTC (over 18 years ago)

Script-fu, watermark

On 12/9/05, Pavel Sorokin wrote:

I`m totally new to Gimp and Script-fu but I have to do this one thing using Script-fu.

I need a script (and a batch?) which will read .jpg file names from a file list and mark all of these files with greyscale watermark (aka logo), which will be place at exact location of those pictures (for example, lower right corner). Watermark must be read from a .gif file.

As I understand, this is not a very short script and a few pointers can`t help me (as I already said - I`m new to all this), but maybe you will direct me to some useful (in my case) resources. I`ve been reading tutorials, going through lots of examples, but can`t get enough information to do what I need to do.

Basically, what you need to do is to use a loop to run through the images, open them, apply the watermark, save, and close them.

Applying the watermark probably would be easiest by copying the watermark from one image into a new semitransparent layer onto the destination image, positioned as necessary.

If all the images have similar names, (even if that similarity is just that the end in .jpg) then a good way to automate getting the list of files would be to use GLOB.

A useful resource might be the Procedure Browser in GIMP (Xtns menu on main window in 2.2.x) - which lists commands and shows their arguments. (It lets you search through the functions.) The only other things you'd probably need are the knowledge that although the Prodcedure Browser lists function names with underscores, Script-Fu seperates words with dashes (e.g. (gimp_file_load ...) becomes (gimp-file-load ...)) and that all parameters are returned inside lists regardless of number (so you have to use car and cdr and the like to get at the contents).

I wish you good luck, as the insane bracket-counting I witnessed with Script-Fu was maddening when trying to debug anything. [GIMP's Script-Fu doesn't report errors very well, so you have to mostly figure out the problem by reading the code and spotting mistakes with no assistance.] Have fun!

--
~Mike
- Just the crazy copy cat.

Roland Berger
2005-12-17 01:39:18 UTC (over 18 years ago)

Script-fu, watermark

Pavel wrote:

I need a script (and a batch?) which will read .jpg file names from a file list and mark all of these files with greyscale watermark (aka logo), which will be place at exact location of those pictures (for example, lower right corner). Watermark must be read from a .gif file.

AutoThumb does this: http://www.behind-blue-eyes.de/tools/

Greetings, /Roland/