EXIF
Posted: Wed Nov 15, 2023 1:52 pm
Im trying to help a friend sorting her photos, which are widely spread over
hard disks, external devices, phones, etc. The idea is to use an SBASIC
program on QPC2 to drill down every device's directory structure looking
for image-type files, extracting the date and copying those images on to a
single external device, ordered into folders by year and month.
The dates are key: If the file name contains a viable date then that is
used else, if I can extract the Exif date, then that is used, if neither
can be found, then the file date is used.
Digital photo file naming conventions have changed considerably over the
past 20 or so years so it is quite a challenge, however, for the file sets
Ive been working with I seem to have found satisfactory solutions - except
when it comes to Exif. A lot of the time my Exif date extaction routine
works fine, but too frequently it is defeated by some photos that appear to
follow different specifications.
The fact that the initial standards document is written in Japanenglish,
that various companies have their own subsets of, or parallel, "standards"
- not always published either; that the information of interest to me is
deeply buried in tangled photographic technicalities, and that the
standards have evolved over time, means that I cannot reliably extract this
information (which I know is there because Windows always seems able to
find it!)
Does anyone here have experience of Exif? And could you give me pointers as
to writing a universal Exif date extraction routine?
If I am successful, Id be happy to share my program. The extraction side of
things is largely finished. At present my program only produces log files,
which could be turned into SBASIC or DOS scripts to do the copying, to mark
duplicates (I havent decided how to handle those yet) or to delete the
originals after copying - if desired. I reckon there will be quite some
manual sorting to do once the scraping together is done (scanned files,
photos of photos, duplicate with different meta data, etc), but at least
(copies of) all the photos will be orderly in one place. The next phase would
be maintenance, but that might be a separate program for another time.
hard disks, external devices, phones, etc. The idea is to use an SBASIC
program on QPC2 to drill down every device's directory structure looking
for image-type files, extracting the date and copying those images on to a
single external device, ordered into folders by year and month.
The dates are key: If the file name contains a viable date then that is
used else, if I can extract the Exif date, then that is used, if neither
can be found, then the file date is used.
Digital photo file naming conventions have changed considerably over the
past 20 or so years so it is quite a challenge, however, for the file sets
Ive been working with I seem to have found satisfactory solutions - except
when it comes to Exif. A lot of the time my Exif date extaction routine
works fine, but too frequently it is defeated by some photos that appear to
follow different specifications.
The fact that the initial standards document is written in Japanenglish,
that various companies have their own subsets of, or parallel, "standards"
- not always published either; that the information of interest to me is
deeply buried in tangled photographic technicalities, and that the
standards have evolved over time, means that I cannot reliably extract this
information (which I know is there because Windows always seems able to
find it!)
Does anyone here have experience of Exif? And could you give me pointers as
to writing a universal Exif date extraction routine?
If I am successful, Id be happy to share my program. The extraction side of
things is largely finished. At present my program only produces log files,
which could be turned into SBASIC or DOS scripts to do the copying, to mark
duplicates (I havent decided how to handle those yet) or to delete the
originals after copying - if desired. I reckon there will be quite some
manual sorting to do once the scraping together is done (scanned files,
photos of photos, duplicate with different meta data, etc), but at least
(copies of) all the photos will be orderly in one place. The next phase would
be maintenance, but that might be a separate program for another time.