Page 1 of 1

How to input text overlay from text file

Posted: 2015-05-14T05:49:13-07:00
by slacsteve
Newbie here. I've been searching but can't find an answer. I have a constantly updating voltage in a one line text file which I would like to put on an image. How do I do it?

Re: How to input text overlay from text file

Posted: 2015-05-14T07:39:08-07:00
by Bonzo
One important feature of IM is that it can read the text data to use from a file. This is done by prefixing the filename with an 'at' character '@', and using this as the string argument.
For example, here we create a label from my workstations 'message of the day' file...

convert -background lightblue -fill blue \
label:@/etc/motd label_file.gif
I would guess you can do the same thing with -annotate or -draw

Re: How to input text overlay from text file

Posted: 2015-05-14T08:28:06-07:00
by slacsteve
Great thanks. Here is what I finally will use for positioning various text on the image:

convert pccfield.jpg -pointsize 18 -annotate +50+50 @battvolts.txt label_file.gif

@ was the key I needed.

I appreciate your quick response. Soon I will be dangerous!