In the past, I have used ppmlabel to add text to images.

>From my limited understanding, you have to convert the image to .pnm format before adding the text and then convert it back to .jpg when you're done.

Here's a script snippet of how I added the date to images before I used started using motion:

#!/bin/bash

## retrieve the JPEG image from the camera
wget --http-user=user --http-passwd=pass -t 1 --timeout=8 -O next.jpg http://192.168.0.1/IMAGE.JPG
## check whether the retrieval was successful or not
RETVAL=$?
if [ "$RETVAL" = "0" ]
then
   ## convert image to .pnm format
   jpegtopnm next.jpg > next.pnm
   ## add date string to image and convert it back to .jpg
   ppmlabel -x 245 -y 472 -angle 0 -background black -color white  -size 8 -text "| `date +"%d-%b-%Y %H:%M:%S"` |" next.pnm | pnmtojpeg > webcam.jpg
   ## create a thumbnail image of the same image
   pnmscale -reduce 3 next.pnm | pnmtojpeg > webcam-thumb.jpg
fi



The utilities jpegtopnm, ppmlabel, pnmtojpeg, and pnmscale are all provide by "netpbm" package of utilities that are available on sourceforge and most OS distributions.

What are you using to retrieve the weather information text?

Good Luck!

Jeff G.


Bogdan Lucaciu wrote:
On Tue, Dec 30, 2008 at 1:29 AM, Zachary McGibbon
<zachary.mcgibbon@gmail.com> wrote:
  
Does anyone know any way to change the text_left or text_right to show
dynamic text from a text file?

I'd like to be able to display local weather data on my cams so it's always
in the image archives.
    

You can easily update the text from motion's administration http server.
http://localhost:8080/0/config/set?text_left
http://localhost:8080/0/config/set?text_right

etc

So just have a cronjob that fetches the weather RSS (or whatever) and
updates the camera labels using some http client like Curl or LWP.