I have a file of several thousand text strings with an associated ID number. I want to take each distinct text string and make it a JPG image of the text, and have the file named with the associated ID number.
All of the strings are a maximum of 75 characters, so I don't need to worry about dynamic sizing of the image to compensate for longer strings. I'd just like to set a single image size.
I use Irfanview for most of my batch imaging needs, and given its flexibility I assume that there's a way to do this. Does anyone know how this can be done?
I don't believe that is possible with Irfanview - though I have not used that program much. There is a list here of the commandline options to Irfanview, and there is no mention I can see of
label,textorannotate.I can only suggest ImageMagick, which is free and available for Linux, OSX and Windows.
If your input file is called
IdAndText.txtand looks like this:then you could run something like this
and you'll get this
id123456.png
id987654.png
id111222.png
There is a mad Windows-y way of reading the text file, that I may experiment with and report back, but the ImageMagick part is more-or-less the same in Windows.
In Windows it is something like: