Outdoor Photography and Videography

Tobi Wulff Photography

Home / Tags / digikam / Essays

Challenges Adjusting Time in JPGs and RAWs

I recently found myself in a situation where I had to adjust the date and time on all my photos from overseas, JPEGs and RAWs. Lesson learned: it is much easier to remember (if you do) to change the setting on the camera when you are switching time zones.

JPEGs

It is fairly easy to change EXIF and IPTC metadata in JPEGs because pretty much all the tools support it. Apart from just writing data directly, most of the tools (and luckily there are many options) I looked at also allow for automatic and intelligent data/time adjustments, so you only have to specify the offset in minutes or hours or whatever unit you require, and it will set the date and time accordingly. In the end this means the choice of the specific program comes down to personal preference. In Linux, there are several options, both for the CLI and as a GUI.

In digikam, the time adjustment can be found in the batch processing editor. To get there, select the photos you want to adjust, then hit B. You can select the individual destinations for the adjust times and I usually go with all the EXIF tags and the digikam timestamp (IPTC wasn't set when the files came out of camera). After the adjustments have been made to the files, it is important to re-read the photos back into digikam. To do this, select the photos again, then go to the menu Item and click "Reread Metadata".

On the CLI, the job is much easier in my opinion (as is often the case). To get a console for the album you want to edit, right-click on the album in the album view (sorry, this technique can't work when you want to edit photos based on tags or other filters; in that case you have to use the GUI method described above) and select "Open in Terminal". Now we can use (if installed) several programs to fix the date/time:

- exiftool: Does not have a date/time adjust option so for JPEGs I would not use it
- exiv2: Can read and write all the tags in JPEGs (and other formats, but not all RAW formats, see below) and has a handy date/time adjust function: "exiv2 ad -a -10 *.JPG" will subtract 10 hours from the EXIF timestamps. It can also be used to rename the files according to the timestamp ("exiv2 mv") but I like to use digikam for that (it can make filenames unique automatically if necessary).
- jhead: Functionality around timestamps and renaming is similar to exiv2 so it comes down to personal taste and specific use cases: "jhead -ta-10:00 *.JPG" will subtract 10 hours.

RAWs

This is were things get a bit trickier and depending on your camera's RAW format some of the programs will not work, e.g. exiv2 supports ORF but not RW2, and the GUI alternatives (digikam or UFRaw) didn't contain any options to write arbitrary metadata. exiv2 can work on some formats as described above (which is nice because it is the shortest and simplest command) but failed to write RW2 (Panasonic). What did work was exiftool. One slight quirk is that while exiftool displays pretty field names when you print all the metadata within a file (no arugments, just "exiftool file.RW2"), it requires the arguments for time adjustment to be the technical, compressed names of all the individual fields that you want to write, so: exiftool -"ModifyDate"-=10 -"DateTimeOriginal"-=10 -"CreateDate"-=10 *.RW2

I hope someone else who is on the search for the right tool to adjust their photos' metadata will find this information useful. I'll keep it as a reference for the future because I'm sure I will forget to set my camera to the right time zone again.

Please use the comment section below or head over to Google+ or Twitter @tobiaswulff to discuss this article or any of my photography and videography work. My Flickr, 500px and Vimeo pages also provide some space to leave comments and keep up to date with my portfolio. Lastly, if you want to get updates on future blog posts, please subscribe to my RSS feed. I plan to publish a new article every Wednesday.

Photo Management Workflow in Linux

Ever since I started taking RAW photographs and developing them on my computer, I put a lot of thought ("obsessing over") into how I want to organize my workflow and in particular how to structure my files.

Many photographers might start by simply dumping all their pictures into a folder for each trip or shoot, hopefully ordered by date. If your folder names do not start with YYYY-MM-DD you're going to have a hard time quickly finding and grabbing your photos with a file manager - on the other hand, photo management software can simply use the date and time in the EXIF data to sort and find digital assets. However, what can happen if you take that approach is that you lock yourself into one specific workflow with one specific application.

Apart from that, one folder sounds fine, after all, different files for different purposes have different file extensions: RAW as the original ("digital negative") that never gets modified, XMP sidecar files that store additional metadata and RAW processing steps, XCF/PSD work-in-progress editing files, and finally JPEGs. Nevertheless, I keep my JPEGs and my RAWs in different folders so that I can quickly copy all the JPEGs to an external device to show them to other people. Having to go through the export functionality of a photo management tool would complicate this process unnecessarily.

A great video to watch is Chase Jarvis' TECH blog post and video on his company's workflow, and if you've got some extra time to kill: Chase Jarvis LIVE Q&A on workflow which goes into much more useful detail (but also rambles on about less important stuff from time to time). There is a lot of solid advice from highly successful professionals in there but it can easily be applied to your personal needs by scaling it down a notch. After all, most of what they do still applies to one-man-bands and enthusiasts:

  • Use redundant hardware to prevent data loss due to technical failures
  • Backup regularly and off-site to prevent data loss due to theft or human error
  • Have a standardized workflow so that all your folders are organized consistently
  • Tag and rate to find photos once you've accumulated thousands

Requirements

Availability

I want to be able to quickly get to my photos and show them to someone or copy them to a USB flash drive without having to go through my photo management software. By having separate folders for each photo shoot sorted by date and within those separate folders for each file type ("digital negative", 'developed photos", "project files"), I can always use the CLI or a file manager to get exactly the files I want without reading their EXIF etc data.

Interoperability

Interoperability might not be very important if you know that you will always use one specific program and that you can rely on this program being available, up-to-date and meeting your needs for many years to come (we are talking potentially decades here). Personally, I wouldn't put that much trust into it, and while proprietary photography applications have a slightly better track record than something like MS Office, keep in mind that things might still change very suddenly and your favorite program might not meet your requirements anymore or work in a very different, non-backwards compatible way (like when FCPX came out).

My photo management program of choice, digikam, relies on my own file system structure of my albums, and displays them basically exactly like they are stored on disk. However, it can also browse all photos by date, tag, rating, etc. This way, I can quickly search and filter for specific criteria, or just browse my albums as they are stored in folders. For much, much more information on digikam I highly recommend the eBook digikam recipes which is easily worth the little money it costs if you're looking into using Linux for your photography workflow.

Backups

I don't want to rely solely on my photo management program to do the backups. This is another reason why I started this blog post and my workflow considerations with a sane and well organized file system structure: any backup program will be able to grab those files (all of them or a subset) and copy them somewhere else doing full, incremental and differential backups. Restoring them is also easier if the photo or photo shoot in question can be found quickly.

I will talk more about my backup strategy and how I've implemented it (including tools around rsync and btrfs) in a future blog post.

Personal Workflow

My personal directory structure which reflects most of the workflow:

  • It starts with a folder for the YEAR (e.g. 2014),
  • within each year I have a sub folder DATE_PROJECT/TRIP (e.g. 2015-09-30_Trip_Location),
  • if there are a lot of photos: DAY (full date) or other categorization (e.g. by camera, sub-project, etc)
  • Further sub folders based on workflow (see below)
  • File names are usually DATE_TIMESTAMP (with suffix _1, _2 etc if multiple photos have the same timestamp). I've also seen many people keep the camera's original file name but add date and time at the front. Personally, I don't see any point in keeping the camera's numbering scheme - it doesn't convey any useful information apart from avoiding duplicates if date/time are the same.
These are the sub folders that I use to organize the files within each shoot:
  • jpg: final JPEGs, often straight from camera and the ones developed by myself; I want all the final pictures in one folder so I can browse them easily
  • orf: my current camera's (Olympus) RAW files
  • liveworks: contains RAW files and their XMP sidecars

This covers 95% of my usual projects which are trips or events with lots of out-of-camera JPEGs and a few jewels I want to work on from RAW. These are the ones you see show up in my portfolio. I usually don't have HDR, panorama or other composite shots but if I need a place for them I would put them in a new folder in liveworks. JPEGs that get a final touch-up in GIMP also go into a new "edit" folder.

There is also a discussion to be had about whether to keep developed files or not. While it should always be possible and easy to get to any photo - if developed: from RAW plus sidecar, if edited: from GIMP's XCF- it also makes it quite difficult to quickly access the final image, or the one I uploaded to my website because I also want to publish it somewhere else, or the one I adjusted for printing. Therefore, I keep all the final images around in the "jpg" folder and name them using a flexible system of suffixes. Basically, there is no strict system as long as it is clear what the image and its intention are. It is nice to have the final image appear first in alphanumerical sorting order. Here are some examples:

  • DATE_TIMESTAMP_final_no_wm.jpg: final image (this is usually the final photo, the way I like it most, no watermark therefore not directly for publishing,
  • DATE_TIMESTAMP_final_wm.jpg: same as above but with a watermark/signature and therefore suitable for publishing,
  • DATE_TIMESTAMP_bw.jpg: a black and white version of the photo if I feel like both versions, color and monochrome, work well,
  • DATE_TIMESTAMP_Ax.jpg: image in A format for printing on A4, A3, etc,
  • DATE_TIMESTAMP_dark.jpg or _bright.jpg: different exposures from the final image if they are worth keeping, for instance if it gives the image a different atmosphere,
  • no suffix at all usually means the jpg comes straight out of the camera.

Digikam and most other photo management software can group images. When I keep all developed and processed JPEGs in one folder, I can group them under the "_final_no_wm" version so that all the different varieties won't clutter the album but I can still quickly access all versions by expanding the group.

Conclusion

It's been 1.5 years since I started doing photography with RAW files and this workflow has worked really well for me. I have hardly modified it apart from renaming a few folders. I could see myself dividing my files even more in the future, say, between outdoor trips and events, but for now the quantity of photos is perfectly manageable as described in this blog post. I might look again into digikam's import functionality and what it can do for me but it didn't convince me the first time I tried so I stuck with using the CLI to create sub directories and copying the files from the camera's SD card to their respective folders.

Please head over to Google+ or Twitter @tobiaswulff to discuss this article or any of my photography and videography work. My Flickr and Vimeo pages also provide some space to leave comments and keep up to date with my portfolio. Lastly, if you want to get updates on future blog posts, please subscribe to my RSS feed. I plan to publish a new article every Wednesday.