Jump to content

Digikam/GSoC2012/PhotivoIntegration: Difference between revisions

From KDE Community Wiki
Peex (talk | contribs)
Peex (talk | contribs)
Add metadata format
Line 12: Line 12:


Therefore my motivation is to make digiKam and Photivo nicely integrate into each other in order to combine the best out of both applications.
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==
===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:=====
<tt>
'''<span style="color:blue">Xmp.xmpMM.DocumentID &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;= xmp.did:a452f960-33ff-4ada-9374-7f366dd9ce9d</span>'''<br/>
'''<span style="color:green">Xmp.xmpMM.InstanceID &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;= xmp.iid:a452f960-33ff-4ada-9374-7f366dd9ce9d</span>'''<br/>
Xmp.xmpMM.OriginalDocumentID = xmp.iid:a452f960-33ff-4ada-9374-7f366dd9ce9d
</tt>
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:=====
<tt>
Xmp.xmpMM.DocumentID &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;= xmp.did:abba15f2-47e9-4acb-b301-39af2ae0c9c8<br/>
Xmp.xmpMM.InstanceID &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;= xmp.iid:abba15f2-47e9-4acb-b301-39af2ae0c9c8<br/>
'''<span style="color:blue">Xmp.xmpMM.OriginalDocumentID = xmp.did:a452f960-33ff-4ada-9374-7f366dd9ce9d</span>'''<br/>
Xmp.xmpMM.History[1]/stEvt:action &nbsp;&nbsp;&nbsp;&nbsp;= created<br/>
Xmp.xmpMM.History[1]/stEvt:instanceID = xmp.iid:abba15f2-47e9-4acb-b301-39af2ae0c9c8<br/>
Xmp.xmpMM.History[1]/stEvt:when &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;= 2012-01-01T01:01:01+01:00<br/>
'''<span style="color:blue">Xmp.xmpMM.DerivedFrom[1]/stRef:documentID = xmp.did:a452f960-33ff-4ada-9374-7f366dd9ce9d</span>'''<br/>
'''<span style="color:green">Xmp.xmpMM.DerivedFrom[1]/stRef:instanceID = xmp.iid:a452f960-33ff-4ada-9374-7f366dd9ce9d</span>'''
</tt>
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:
<tt>
&nbsp;&nbsp;&nbsp;[...]<br/>
Xmp.pt.FilterCfg[2] ''(type="Struct")''<br/>
Xmp.pt.FilterCfg[2]/pt:SigContrastRgb ''(type="Seq")''<br/>
Xmp.pt.FilterCfg[2]/pt:SigContrastRgb[1]''type="Struct"''<br/>
Xmp.pt.FilterCfg[2]/pt:SigContrastRgb[1]/pt:CfgItem &nbsp;= isBlocked<br/>
Xmp.pt.FilterCfg[2]/pt:SigContrastRgb[1]/pt:CfgValue =  0<br/>
Xmp.pt.FilterCfg[2]/pt:SigContrastRgb[2] ''(type="Struct")''<br/>
Xmp.pt.FilterCfg[2]/pt:SigContrastRgb[2]/pt:CfgItem &nbsp;= Strength<br/>
Xmp.pt.FilterCfg[2]/pt:SigContrastRgb[2]/pt:CfgValue = 4<br/>
Xmp.pt.FilterCfg[2]/pt:SigContrastRgb[3] ''(type="Struct")''<br/>
Xmp.pt.FilterCfg[2]/pt:SigContrastRgb[3]/pt:CfgItem &nbsp;= Threshold<br/>
Xmp.pt.FilterCfg[2]/pt:SigContrastRgb[3]/pt:CfgValue = 0.4<br/>
Xmp.pt.Header ''(type="Seq")''<br/>
Xmp.pt.Header[1] ''(type="Struct")''<br/>
Xmp.pt.Header[1]/pt:XmpSerializerVersion = 0.9<br/>
Xmp.pt.Header[2] ''(type="Struct")''<br/>
Xmp.pt.Header[2]/pt:XmpSerializerVariant = Output
</tt>


==Lists==
==Lists==
===TODO===
===TODO===
* Preserve IDs and history of the input file (although it is unlikely for a raw file)
* Read settings from an processed output file
* Push source code to a special branch as soon as reading and writing seems reliable enough...
* Save settings to input xmp. 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
===DONE===


* Investigate: Which XMP properties should be used to map RAW and output file to each other? Possible ones are:
* Investigate: Which XMP properties should be used to map RAW and output file to each other? Possible ones are:
Line 42: Line 119:
*** [http://wwwimages.adobe.com/www.adobe.com/content/dam/Adobe/en/devnet/xmp/pdfs/cs6/XMPSpecificationPart1.pdf XMP Specification Part 1]
*** [http://wwwimages.adobe.com/www.adobe.com/content/dam/Adobe/en/devnet/xmp/pdfs/cs6/XMPSpecificationPart1.pdf XMP Specification Part 1]
*** [http://wwwimages.adobe.com/www.adobe.com/content/dam/Adobe/en/devnet/xmp/pdfs/DynamicMediaXMPPartnerGuide.pdf Partners Guide to XMP for Dynamic Media]
*** [http://wwwimages.adobe.com/www.adobe.com/content/dam/Adobe/en/devnet/xmp/pdfs/DynamicMediaXMPPartnerGuide.pdf Partners Guide to XMP for Dynamic Media]
** '''=> xmpMM will be used as a base''', see [[#Linkage of files]]
* 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


===DONE===
* 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==
==Reference and related links==

Revision as of 22:29, 4 June 2012

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

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 an processed output file
  • Push source code to a special branch as soon as reading and writing seems reliable enough...
  • Save settings to input xmp. 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


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