Work on image before import

The application I am working on is taking a series of images (time lapse) and combining them into an .avi file. That part works well. Now I would like to superimpose on each image the date and time. I know how to do the superimpose, but cannot figure out how to make this happen inside of the code that brings in the images.

here is the code. pictures will be a list of images, pathname is the path to the subdirectory, pixss is the list of filenames that are to be imported.

pictures = Import[pathname <> #] & /@ pixss

The following are a function and the command to make the superimpose work.

img = Import["IMG_7038.jpg"];
year = 2013;
month = 3;
day = 4;
hour = 5;
min = 6;
overlay[img1_, yr_, mon_, day_, hr_, min_] :=
 Overlay[{img1,
   Framed[Graphics[{Text[
       Style[DateString[{yr, mon, day, hr, min}, {"Month", "/", "Day",
           "/", "YearShort", "--", "Hour", ":", "Minute"}], White,
        24], {1, 1}]}, ImageSize -> {200, 24}], Background -> Black]},
   Alignment -> Top]
img = Overlay[{img, overlay[img, year, month, day, hour, min]},
  Alignment -> Top]

So, how can i put the function inside of the import code?

thanks for ideas and assistance.

Steve

Perhaps what I need to do is preprocess the list of files and add an overlay. Can I import filedate and filetime data when i import the file and if so how would i store it?

thanks

The documentation for the JPEG format show what can be imported:

[JPEG—Wolfram Documentation

T](JPEG—Wolfram Documentation)he date for the file is something I would probably get by using the Run command and a small batch/bash script.

I’m not sure what you mean by asking how to store it. What kind of scenerio for storing dates are you considering?

You also may find this useful ImageFileApply or a related function.