Page 1 of 1

Captioning existing images

Posted: 2013-05-02T23:22:17-07:00
by string_theorist
This is obviously a simple, amateur question, but I have failed in solving.

I have existing images that needs text to be inserted as captions. I am writing in Batch.

for /F "tokens=1-4 DELIMS=#" %%n in ('type %textSourcePath%') do if "%%n"==" " (

%imageMagickPath%\convert.exe "%imageSourcePath%\%%o.jpg" -interline-spacing -7 -background blue -fill white -strokewidth 2 -stroke black -pointsize 40 +repage -bordercolor blue -border 15 -size 580X420 -gravity South -font C:\Users\user\Downloads\fontor_perspective-sans\persanbk.ttf caption:"%%o\n%%p" "%imageDestPathUNC%\DSC00%%q.jpg"

It fails when trying to run this.

I think i have some fundamental flaws in my understanding of this programs operation.

Thanks for the support.

Re: Captioning existing images

Posted: 2013-05-02T23:57:27-07:00
by snibgo
"caption:" creates a new image. So your command reads an image (%o.jpg), then creates another image (the caption, but you would need to spefify the size), then writes to a single .PNG.

You either need to combine the two images (see "composite"), or write the text directly on the image you have read (see "annotate" or "draw").

http://www.imagemagick.org/script/comma ... ptions.php