Programmers have been using version control systems for decades to record/log/merge/revert changes in their source code. Photographers don't have a similar tool, although they also have to wrangle with many different versions of one photo:
- a photo is typically shot in a Camera RAW format, a kind of digital negative, that needs automatic or manual processing to produce a visible image on the screen
- the edited Camera RAW photo has to be saved in another format (e.g. Photoshop PSD or JPEG), because RAW is basically a read-only format. Often multiple versions of one image are saved to test different effects and filters.
- then the edited photos are published on photosharing sites or online photo galleries. To increase the upload speed, optimized JPEG versions of the source files are created. The gallery software might create additional versions of the image (e.g. thumbnails and smaller previews).
This multifile-workflow brings a few problems:
- photographers often need to find the source files for derived images (Which RAW file was the base for
portrait01.jpg
?) - the editing history of a photo gets lost, because the target file format doesn't support storing it (e.g. JPEG). For subsequent changes this editing history might be really important.
- clients of photographers sometimes request changes for a photo. This often happens by email with pasted-in preview pictures, making it hard for the photographer to find the correct source photo, applying the changes and customer again. an issue-tracker like system could come in handy here
hg imgtrack
is a mercurial-based solution to track relations between photos, their editing history and storage locations. It works similar to the Large Files extension and thus doesn't track the photos itself, but only their metadata and relations.
As a photographer, I want hg imgtrack
to track derived/edited versions (e.g. downsized jpegs) of my source photos (e.g. RAW files) so that i can trace back an edited version to its source file. The tracking mechanism should support an arbitrary number of derived images with an arbitrary nesting depth (i.e. derived child-images, grand-child-images,...) that are not necessarily stored my system.
hg imgtrack
should tell me thathttp://example.com/gallery/03.jpg
is the uploaded version ofpatagonian_sunset03.jpg
which itself is an edited version of the raw fileP019278.NEF
As a photographer, I want hg imgtrack
to record the edits that lead to producing the image (if it was derived from another image). Ideally, hg imgtrack
should be able to reconstruct the image given its predecessor image and provided that the required Image Processing Tools are installed on the system (e.g. Photoshop, ImageMagick etc).
hg imgtrack
should tell me thatpatagonian_sunset03.jpg
is an 50%-downsized, sharpened version ofP019278.NEF
processed by ImageMagick 6.7
This example assumes that ImageMagick is installed on the system, because it is wrapped in some hg imgtrack
calls. Note: this is a first guess, workflow still needs to be refined.
First we initialize imgtrack in the photo directory and cd to it.
$ hg imgtrack init (photo-directory)
$ cd (photo-directory)
Now we convert the raw file P737438.NEF to a downsized jpeg version. This happens by wrapping the ImageMagick convert utility. By doing so, we can track the edit.
$ hg imgtrack convert P737438.NEF -resize '40%' target.jpg
The changes are recorded to the repository
$ hg imgtrack addremove
$ hg imgtrack commit -m "RAW downsize"
$ hg imgtrack diff
P737438.NEF -> ImageMagick 7.20 40% resize (additional opts..) -> target.jpg
TBD, but probably similar to Large files Extension (see related work)
- How can we implement a lightweight "visual" diff between the image versions (cf. github.com image diffs)