Jump to content

Digikam/GSoC2012/PhotivoIntegration: Difference between revisions

From KDE Community Wiki
Peex (talk | contribs)
Add some TODO
Peex (talk | contribs)
Add source code repo
 
(5 intermediate revisions by the same user not shown)
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==
===Source code===
* [https://projects.kde.org/projects/extragear/graphics/kipi-plugins/repository/show/photivointegration?rev=development%2F3.0.0 KIPI Photivo Integration Plugin]
* [http://code.google.com/p/photivo/source/browse/?name=metadata Photivo on Google Code], Branch '''metadata'''
===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 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:
* Investigate: Which XMP properties should be used to map RAW and output file to each other? Possible ones are:
Line 36: Line 121:
** Does digiKam have special support for one schema?
** Does digiKam have special support for one schema?
*** Has internal IDs but doesn't seem to make the available somewhere
*** Has internal IDs but doesn't seem to make the available somewhere
*** Versioning uses a XML format embedded into XMP
*** Versioning uses a XML format embedded into XMP ([http://www.exiv2.org/tags-xmp-digiKam.html Xmp.digiKam.ImageHistory])
*** PicasaWeb and Yandex IDs are mapped into [http://www.exiv2.org/tags-xmp-kipi.html KIPI]
** Related:
*** [http://elvis.tenderapp.com/kb/technical/automatic-xmp-relation-creation Elvis: XMP relation creation]
*** [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]
** '''=> 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
 
* Set IDs for output files and reference to the IDs of the input file


===DONE===
* Save IDs for the input file as XMOP sidecar file; naming schema: ''Filename.OriginalExtension.xmp''


==Reference and related links==
==Reference and related links==
Line 47: Line 144:


* [http://photivo.org Photivo]
* [http://photivo.org Photivo]
* [http://www.adobe.com/devnet/xmp.html Adobe XMP Developer Center] (Specifications, SDK, ...)

Latest revision as of 01:01, 29 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

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