Page 1 of 1

How to draw text from file on an existing image

Posted: 2016-01-01T16:29:54-07:00
by jensen31
Hey there,

searching for hours... Maybe you can help me. I am on Debian.

I want to draw text from file.txt on my existing picture pic.jpg.
I do know only how to draw text, which is in the command itself, but not from text file or with variables.

Why? The picture is a webcam picture. and the text, that should be on the image is in a text file.

Who gives me the working hint first gets a coffee (5 €) via PayPal.:)

Thank you guys and happy new year.
Jens

Re: How to draw text from file on an existing image

Posted: 2016-01-01T16:43:20-07:00
by jensen31
got it on my own..

KATZE=aufEinemBeim
convert /skripte/dateien/bg.jpg -pointsize 34 -fill white -annotate +266+235 "$KATZE" /skripte/dateien/bg.jpg

Re: How to draw text from file on an existing image

Posted: 2016-01-02T07:37:53-07:00
by GeeMack
jensen31 wrote:I want to draw text from file.txt on my existing picture pic.jpg.
I do know only how to draw text, which is in the command itself, but not from text file or with variables.

Why? The picture is a webcam picture. and the text, that should be on the image is in a text file.

Who gives me the working hint first gets a coffee (5 €) via PayPal.:)
Save the text you want to draw in a file. Let's say the file is named "mywords.txt". Then to use that in your annotate command, put a "@" at the beginning of the text file name. IM will read the "mywords.txt" file and use its contents as the text. It will look something like this...

Code: Select all

convert /skripte/dateien/bg.jpg -pointsize 34 -fill white -annotate +266+235 @mywords.txt /skripte/dateien/bg_with_text.jpg
You can PayPal me at: gmcneil@yahoo.com
:)