Short script to add a timestamp on pictures
Here is a short script (1.6kb) to add a timestamp on all PNG pictures in a directory. It requires Python and the Python Image Library (PIL). In order to use it, modify some parameters in the beginning to suit your needs (images directory, font file and size, etc.) and launch
./timestampFiles.py. Here is a before/after example (size of pictures is reduced to fit in this blog):
Note 2: I chose to convert PNG images to JPG ones for 2 reasons. First, my capture script gives me PNG images (see previous posts). Second, I want to be able to copy all JPG pictures in a MJPEG movie. It shouldn’t be difficult to change the different file formats to suit your needs (ask me if you can’t do that).
Note 3: I guess this would also have been possible using a bash script and imagemagick, Perl or any other programming language ;-)