Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Add text with script fu
#2
It might be possible with script-fu or python-fu, an expert might look in soon.

However, my first thought was not Gimp but ImageMagick. That should be in your linux repository.

If I create a text file for each date, 01.poster 02.poster ....30.poster then for a single file

Code:
magick poster.jpg -font Futura-Bold.ttf  -pointsize 24 -fill red -annotate +420+1030  @01.poster  01-poster.jpg

writes the content of 01.poster text at the given offset.

For 30 new images then something like a bash file
Code:
#!/bin/bash

find . -name "*.poster" | while read fname ; do
     echo "Doing:  $fname"
     magick poster.jpg -font Futura-Bold.ttf  -pointsize 24 -fill red -annotate +420+1030  @$fname  $fname.jpg
done

creates a new image for each text file and names them 01.poster.jpg 02.poster.jpg ....

As a note I am using kubuntu 18.04 which comes with ImageMagick (IM) 6.9.7 That would use the convert in place of the magick command. For some reason convert throws up errors.
My compiled IM 7.0.8 and magick works fine. If you go down this route and have problems ask on the IM forum https://www.imagemagick.org/discourse-server/ In the Users section.

(edit: The not working convert problem is due to the IM6 security policy held in a policy.xml file. Disabled that and IM6 convert works fine )
Reply


Messages In This Thread
Add text with script fu - by carlbcx - 09-01-2019, 03:09 PM
RE: Add text with script fu - by rich2005 - 09-01-2019, 05:28 PM
RE: Add text with script fu - by Ofnuts - 09-01-2019, 05:29 PM
RE: Add text with script fu - by carlbcx - 09-01-2019, 07:07 PM
RE: Add text with script fu - by carlbcx - 09-04-2022, 10:29 AM
RE: Add text with script fu - by carlbcx - 09-04-2022, 12:35 PM

Forum Jump: