Hi,
thanks, sorry I forgot to mention that I want to do it directly inside the CHDK source code.
Since I am C++ programmer I think this would be much easier for me.
Is there any way to get a pointer to the all image files and insert the EXIF data?
You can read and write files using stdio functions like fopen etc. You can list directories using opendir/readdir (look at the file browser code for examples)
You will need to parse the EXIF yourself. The tagme lua script may provide a useful example. There's probably some fairly compact, portable EXIF libraries in C out there too. If you find one that ports easily to CHDK, it might be worth including as a module.
Note that there is very limited memory available to CHDK, typically less than 1 MB and sometimes a lot less, so you can't just read an entire image file into RAM.
There is not currently a known way to add entries to the EXIF of an image before it is saved. In theory you could modify data is it is being written in the filewrite hook, but I suspect maintaining the correct structure would be problematic (I haven't looked at it in detail though). It's possible you could find a way to hook into the cameras EXIF process with some reverse engineering.
Personally, I would suggest keeping your GPS data separately and just align later on a PC with image number or timestamp.