Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Automatically write filename on a set of images
#1
Dear All,

I am new in this forum. I write a topic because I would ask if it is available a Script-Fu (of Python-Fu) which generates a specific set of operation made automatically.

I have a lot of images, with specific filename.jpg (or filename.png, or any extension).
I would like to:

- Open them one by one;
- Write on a specific position (which is always the same for every image) the filename without the extension ("filename"), with a specific size/color, font, etc;
- Save it and close;

Is there any Script-Fu able to doing this?
Is there an official repository of ready to use
Script-fu (or Python-Fu) scripts?

Thank you in advance for every reply!
Reply
#2
Bests use something like ImageMagick for this.
Reply
#3
I was looking at this yesterday, but got side-tracked Wink I thought there might be a old script or two but the only ones I found, not working in Gimp 2.10 and not likely to do what is required anyway.

As with Ofnuts post the most obvious is ImageMagick (IM) and it has a built in variable for this %t (shown in that post Ofnuts referenced) but I have used it in the past as:

For a single image
Code:
magick filein.ext -font Arial -pointsize 72 -fill white -annotate +100+100  %t  fileout.ext

For a folder full of images
Code:
mogrify -font Arial -pointsize 72 -fill white -annotate +100+100  %t  *.*
note: mogrify works in place so use copies of the images otherwise lose the original.

and that gives. https://i.imgur.com/z6snAbB.jpg


For something with a GUI there is XnViewMP. It is possible for individual images but really meant for batch operations. Once set up it does remember the settings. https://i.imgur.com/t1AXKh5.jpg


Quote:Is there an official repository of ready to use
Script-fu (or Python-Fu) scripts?

Nothing official, A search often brings up something. At the moment best collections of scripts;
https://www.gimpscripts.net/ https://www.gimphelp.org/script210.html
Reply


Forum Jump: