On 12/9/05, Pavel Sorokin <[EMAIL PROTECTED]> 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.
_______________________________________________ Gimp-user mailing list [email protected] https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-user
