Digikam/GSoC2012/PhotivoIntegration

Jump to: navigation, search

Photivo Integration

digikam and Photivo are perfect complements: digiKam is the best photo management software I have ever known. The raw file developing tool Photivo offers a remarkable feature set, high quality of processing and an optimized workflow.

My motivation is to make digiKam and Photivo nicely integrate into each other in order to combine the best out of both applications.

Details

digiKam is the best photo management software I have ever known. In addition to its comprehensive management abilities it also provides image editing and processing features. Nevertheless there are are some tasks that can be done better by tools that are optimized for a special purpose. One of these tasks is the processing of raw image files. digiKam is able to develop raw files, but more experienced users tend to use specialized software that offer more options and detailed control but also demand some more knowledge (or at least the will to experiment around a bit).

Since a while there are some great open source raw developers. My favored tool is Photivo. It offers a remarkable feature set, high quality of processing and an optimized workflow, that suits its purpose. Although some of the filters aim at advanced users Photivo can also be used without knowledge what LAB and “all that stuff” even means and how it internally works.

Therefore my motivation is to make digiKam and Photivo nicely integrate into each other in order to combine the best out of both applications.

Technical Details

Source code

Metadata format

Linkage of files

The linkage between RAW and output file is based on XMP Media Management Schema (xmpMM). Not all properties will (and should) be used as they are in the ownership of a media amnagement system.

Example of the properties and how they are used (for readability as simple list instead of raw XMP):

RAW file:

Xmp.xmpMM.DocumentID         = xmp.did:a452f960-33ff-4ada-9374-7f366dd9ce9d
Xmp.xmpMM.InstanceID         = xmp.iid:a452f960-33ff-4ada-9374-7f366dd9ce9d
Xmp.xmpMM.OriginalDocumentID = xmp.iid:a452f960-33ff-4ada-9374-7f366dd9ce9d

At the moment the metedata for the input file is written as XMP sidecar even if Eviv2 could embedd it to some file formats.

Output file:

Xmp.xmpMM.DocumentID         = xmp.did:abba15f2-47e9-4acb-b301-39af2ae0c9c8
Xmp.xmpMM.InstanceID         = xmp.iid:abba15f2-47e9-4acb-b301-39af2ae0c9c8
Xmp.xmpMM.OriginalDocumentID = xmp.did:a452f960-33ff-4ada-9374-7f366dd9ce9d
Xmp.xmpMM.History[1]/stEvt:action     = created
Xmp.xmpMM.History[1]/stEvt:instanceID = xmp.iid:abba15f2-47e9-4acb-b301-39af2ae0c9c8
Xmp.xmpMM.History[1]/stEvt:when       = 2012-01-01T01:01:01+01:00
Xmp.xmpMM.DerivedFrom[1]/stRef:documentID = xmp.did:a452f960-33ff-4ada-9374-7f366dd9ce9d
Xmp.xmpMM.DerivedFrom[1]/stRef:instanceID = xmp.iid:a452f960-33ff-4ada-9374-7f366dd9ce9d

Xmp gets embedded into the output file.

xmpMM and digiKam
  • Digikam can display xmpMM properties
  • Currently digiKam neither interprets xmpMM nor does it save the properties to the internal database. So the Photivo Integration Plugin can not rely on digiKam to link in- and output files.

Photivo Settings

The settings are saved as a schema withthe namespace URI http://www.photivo.org/ns/pts/1.0/ and pt as preferred prefix. The schema is proprietary to Photivo and depends on the settings each filter offers.

Although naming and details in structure are likely to change the schema in principal is something like this simple example:

   [...]
Xmp.pt.FilterCfg[2] (type="Struct")
Xmp.pt.FilterCfg[2]/pt:SigContrastRgb (type="Seq")
Xmp.pt.FilterCfg[2]/pt:SigContrastRgb[1]type="Struct"
Xmp.pt.FilterCfg[2]/pt:SigContrastRgb[1]/pt:CfgItem  = isBlocked
Xmp.pt.FilterCfg[2]/pt:SigContrastRgb[1]/pt:CfgValue = 0
Xmp.pt.FilterCfg[2]/pt:SigContrastRgb[2] (type="Struct")
Xmp.pt.FilterCfg[2]/pt:SigContrastRgb[2]/pt:CfgItem  = Strength
Xmp.pt.FilterCfg[2]/pt:SigContrastRgb[2]/pt:CfgValue = 4
Xmp.pt.FilterCfg[2]/pt:SigContrastRgb[3] (type="Struct")
Xmp.pt.FilterCfg[2]/pt:SigContrastRgb[3]/pt:CfgItem  = Threshold
Xmp.pt.FilterCfg[2]/pt:SigContrastRgb[3]/pt:CfgValue = 0.4
Xmp.pt.Header (type="Seq")
Xmp.pt.Header[1] (type="Struct")
Xmp.pt.Header[1]/pt:XmpSerializerVersion = 0.9
Xmp.pt.Header[2] (type="Struct")
Xmp.pt.Header[2]/pt:XmpSerializerVariant = Output

Lists

TODO

  • Preserve IDs and history of the input file (although it is unlikely for a raw file)
  • Read settings from a processed output file
  • Push source code to a special branch as soon as reading and writing seems reliable enough...
  • Save settings to input xmp, too. As a raw file could be the source of multiple output files it's necessary to handle multiple sets of settings.
  • Read and save special case settings
  • Save ID <==> File mapping for Photivo Integration Plugin?

DONE

  • Investigate: Which XMP properties should be used to map RAW and output file to each other? Possible ones are:
  • Embedd photivo settings as XMP (some specials cases are ignored at the moment) to output file
  • Create UUIDs for usage as DocumentID, InstanceID and OriginalDocumentID
  • Set IDs for output files and reference to the IDs of the input file
  • Save IDs for the input file as XMOP sidecar file; naming schema: Filename.OriginalExtension.xmp

Reference and related links


This page was last edited on 29 June 2012, at 01:01. Content is available under Creative Commons License SA 4.0 unless otherwise noted.