Image name - General Help and Assistance on using CHDK stable releases - CHDK Forum

Image name

  • 2 Replies
  • 1966 Views
Image name
« on: 07 / August / 2020, 01:28:14 »
Advertisements
I’ve been thinking about adding info into the image file name, for example focus distance.


This would be more readily accessible than trying to dive into each file’s EXIF.


So my question is, what is the ‘easiest’ way to add text to the .cr2 file that Canon records.


Can you do it before the Canon write, or do you have to do it after.


Any thoughts or experiences welcome.

*

Offline reyalp

  • ******
  • 14118
Re: Image name
« Reply #1 on: 07 / August / 2020, 02:09:32 »
So my question is, what is the ‘easiest’ way to add text to the .cr2 file that Canon records.
 
Can you do it before the Canon write, or do you have to do it after.
You would need to rename the file after it was saved. Note that the cameras have filename / path length limitations, which vary significantly across the various Canon OS versions. Generally, it's safest to to stick to 8.3, but if you only care about a specific model, you can use whatever works on that specific model.

Files in the DCIM directory structure are treated specially by the OS and expected to follow the DCF standard https://en.wikipedia.org/wiki/Design_rule_for_Camera_File_system
Files that don't follow this standard will likely not be visible in playback or over (non-CHDK) USB or wifi file transfer.

Also note that rename only works within a directory. To *move* a file, you'd need to copy and delete, or hack the FAT structures.

My preference for recording additional data is to put it in separate log file in CSV or similar format, with one row per shot, recording the image number and time along with whatever other information is to be recorded. It's easy to feed a file like this to python or shell script to rename the files later if you want.
Don't forget what the H stands for.

Re: Image name
« Reply #2 on: 07 / August / 2020, 02:17:30 »
@reyalp

All good points and understood.

Many thanks.

Garry

 

Related Topics


SimplePortal 2.3.6 © 2008-2014, SimplePortal