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
Here's a script snippet of how I added the date to images before I used
started using motion:
## retrieve the JPEG image from the camera
wget --http-user=user --http-passwd=pass -t 1 --timeout=8 -O next.jpg
## check whether the retrieval was successful or not
if [ "$RETVAL" = "0" ]
## 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
## create a thumbnail image of the same image
pnmscale -reduce 3 next.pnm | pnmtojpeg > webcam-thumb.jpg
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?
Bogdan Lucaciu wrote:
On Tue, Dec 30, 2008 at 1:29 AM, Zachary McGibbon
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.
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.