Mobile app version of vmapp.org
Login or Join
BetL875

: Automating Export of an image where the only thing that changes is the text layer? Good morning all... I am wondering if there is a way to automate export of an image that will have a variation

@BetL875

Posted in: #Automation #Gimp

Good morning all...

I am wondering if there is a way to automate export of an image that will have a variation for each state, where the only thing that changes on the image is the text layer that includes the name of the state, using a simple text file that lists all of the possible word variations.

I know the sample in the example is small, I'm just trying to find a solution that I can use on lists where the variations are measured in the thousands.

Thanks!

10.02% popularity Vote Up Vote Down


Login to follow query

More posts by @BetL875

2 Comments

Sorted by latest first Latest Oldest Best

 

@Sent7350415

If you want to adjust font size:

ImageMagick:

You can use IM's convert to produce the label, measure it (see IM's identify utility) and if it's too big interpolate a better font size and retry. Once you have the label you use IM's compose to put the label over the picture.

GIMP:

In a Gimp script you can do the same, using the width of the generated text layer. An alternative is to produce the path/vectors from the text, and scale it to the required size and then select/fill it. But text at size 15 is not 3/4 of the font at size 20, there are subtleties, so iterating the font size will likely give better results.

10% popularity Vote Up Vote Down


 

@Sent7350415

Gimp is overkill for this. There are plenty of ways to do this in the command line using a script based on ImageMagick.

If you have a file with the list of labels producing the script is a mere matter of passing a few global editor commands to change each line into a command that adds the label to the source image.

10% popularity Vote Up Vote Down


Back to top | Use Dark Theme