Auto-text for jpeg
December 8, 2009 9:43 AM   Subscribe

Is there a straightforward way of adding text to a jpeg semi-automatically?

I have a series of jpegs that are produced from a simulation that represent a system at various time intervals. I want to make a simple video by putting these together but I'm not sure how to add the time caption to each jpeg. There is no way of generating it within the program I am using. It is a series of 40 images, so I can do it manually but I'm interested to learn about any alternatives.

(I have access to photoshop, windows xp, mac osx and ubuntu)
posted by a womble is an active kind of sloth to Computers & Internet (6 answers total) 4 users marked this as a favorite
 
ImageMagick. Specifically.
posted by Cat Pie Hurts at 9:46 AM on December 8, 2009


This:

convert -pointsize 12 -fill yellow -draw 'text 270,460 "ASDF" ' input.jpg output.jpg

will draw "ASDF" in yellow at 12pt font at x = 270, y = 460 on the image.
posted by null terminated at 9:47 AM on December 8, 2009


Oops! I meant to link to IM's main page as well. ImageMagick is the best tool ever!
posted by Cat Pie Hurts at 9:48 AM on December 8, 2009


Response by poster: Thanks! I've downloaded and installed it. Is it possible to control using python? What is the best way/languge of organizing a loop to iterate through my jpegs?

null terminated, is that ImageMagick code?
posted by a womble is an active kind of sloth at 9:55 AM on December 8, 2009


The "convert" command is the main IM commandline tool. There's also an API for almost every known language.
posted by Cat Pie Hurts at 9:58 AM on December 8, 2009


What is the best way/languge of organizing a loop to iterate through my jpegs?

This is probably something easiest solved with a simple bash script.

From the directory containing the jpgs:

for i in *.jpg;do convert <options> "$i" `basename "$i" .jpg`.new.jpg;done

posted by chrisamiller at 10:19 AM on December 8, 2009


« Older How can I work as a writing and editing contractor...   |   Help with live online demo? Newer »
This thread is closed to new comments.