Help me import edited 'versions' of images from Picasa

g0rak 1 g0rak01 at gmail.com
Fri Feb 10 09:23:23 GMT 2017


That's why I'd like to ensure the XML I create follows any standard that
Digikam follows, if possible.  Looking at the .picasa.ini files today
confirmed my expectations that it'll be too difficult to convert the the
non-destructive editing parameters to those that Digikam use.  We have
parameters like:

crop=rect64(fc40570fffff5ae)
filters=finetune2=1,0.526316,0.000000,0.000000,00000000,0.000000;
filters=unsharp2=1,3.000000;

I'll either leave the parameters out completely, and at best, try coping
the Picasa params as is, just as a reference.  Some clever nut can have a
go at converting them later on using the DB or something!

I'll let you know how I go.  I have to resurrect Eclipse and Java now.  I
had a quick look at writing a Kipi plug-in, but I couldn't work out the
language and find doco on how to work with it.  I probably need to look
harder.

Cheers,

Simon

On 10 February 2017 at 17:57, Gilles Caulier <caulier.gilles at gmail.com>
wrote:

> well parameters will populate the database with these information.
>
> For the moment, it's just informative, but in the future, the goal is to
> be able to apply same filter on another image by copy and paste from GUI.
>
> So, yes, it can be acceptable, but take a care. Work on test database, in
> case of you break something.
>
> Your feedback can be interesting if it work to improve import rules in
> digiKam.
>
> Gilles Caulier
>
> 2017-02-10 1:25 GMT+01:00 g0rak 1 <g0rak01 at gmail.com>:
>
>> Hey Gilles,
>>
>> Thank you for replying.  I checked out the namespace link but it didn't
>> give any info on what are the acceptable names for the filters.  For the
>> source code however I could at least what the other filter categories are,
>> such as 'doucmentedHistory.
>>
>> Based on this, can I just make up my own filter name, and provide no
>> parameters?
>>
>> E.g. below I have made a filter named 'picasa:Picasa', display name
>> 'Edited by Picasa', filter version '1', with a category 'documentedHistory'.
>>
>> <?xml version="1.0"?>.
>> <history version="1">.
>>   <file uuid="4d13dbbff40ae5501c42e6314b8b8f52" type="original">.
>>     <fileParams fileName="20170103_094034.jpg"
>> filePath="/Users/simon/Photos/2016/Holiday/"
>> fileHash="8838978dccc24c1763b6996fe94bb019" fileSize="4401586"
>> creationDate="2017-01-03T09:40:34"/>.
>>   </file>.
>>   <filter filterName="picasa:Picasa" filterDisplayName="Edited by Picasa"
>> filterVersion="1" filterCategory="documentedHistory">.
>>     <params>.
>>     </params>.
>>   </filter>.
>> </history>.
>>
>> If you think it is acceptable to make up filter names, then I will be
>> happy to give this a try.
>>
>> Kind regards,
>>
>> Simon
>>
>> On 7 February 2017 at 05:09, Gilles Caulier <caulier.gilles at gmail.com>
>> wrote:
>>
>>> Hi,
>>>
>>> The versionning is stored in XMP digiKam namespace :
>>>
>>> http://www.exiv2.org/tags-xmp-digiKam.html
>>>
>>> Look ImageHistory tag.
>>>
>>> In source code, the method which export history to XML data is this one :
>>>
>>> https://cgit.kde.org/digikam.git/tree/libs/dimg/imagehistory
>>> /dimagehistory.cpp#n491
>>>
>>> An example of exported history is given below (with resize tool used) :
>>>
>>> $ exiv2 -px DSC03712_1.JPG
>>> Xmp.tiff.Software                            XmpText    13  digiKam-4.2.0
>>> Xmp.tiff.ImageWidth                          XmpText     3  800
>>> Xmp.tiff.ImageLength                         XmpText     3  533
>>> Xmp.xmp.CreatorTool                          XmpText    13  digiKam-4.2.0
>>> Xmp.exif.PixelXDimension                     XmpText     3  800
>>> Xmp.exif.PixelYDimension                     XmpText     3  533
>>> Xmp.digiKam.ImageHistory                     XmpText   1647  <?xml
>>> version="1.0"?>
>>> <history version="1">
>>>     <file uuid="e854d7e092d41bc00c1e537af3e7296dafe85809797bbf3f3ff93a48b8d07a5d"
>>> type="original">
>>>         <fileParams filePath="/" fileHash="afe85809797bbf3f3ff93a48b8d07a5d"
>>> fileSize="12812288" creationDate="2014-07-13T14:52:45"/>
>>>     </file>
>>>     <filter filterName="digikam:LocalContrastFilter"
>>> filterDisplayName="Local Contrast Filter" filterVersion="2"
>>> filterCategory="reproducible">
>>>         <params>
>>>             <param name="functionId" value="0"/>
>>>             <param name="highSaturation" value="100"/>
>>>             <param name="lowSaturation" value="100"/>
>>>             <param name="randomSeed" value="2940933007"/>
>>>             <param name="stage[0]:blur" value="11"/>
>>>             <param name="stage[0]:enabled" value="true"/>
>>>             <param name="stage[0]:power" value="30"/>
>>>             <param name="stage[1]:enabled" value="false"/>
>>>             <param name="stage[2]:enabled" value="false"/>
>>>             <param name="stage[3]:enabled" value="false"/>
>>>             <param name="stretchContrast" value="true"/>
>>>         </params>
>>>     </filter>
>>>     <file uuid="9265806dd2ed9a362fdd2d9d83da1d3cafe85809797bbf3f3ff93a
>>> 48b8d07a5d">
>>>         <fileParams fileName="DSC03712.JPG"
>>> filePath="/Users/gilles/Pictures/Photos/SALAGOU/2014-07-13/"
>>> fileHash="fdb610f5d23b875e575d7fb3d32df0b1" fileSize="4562194"/>
>>>     </file>
>>>     <filter filterName="transform:resize" filterDisplayName="Resize"
>>> filterVersion="1" filterCategory="reproducible" branch="true">
>>>         <params>
>>>             <param name="height" value="533"/>
>>>             <param name="width" value="800"/>
>>>         </params>
>>>     </filter>
>>> </history>
>>>
>>> Xmp.digiKam.ImageUniqueID                    XmpText    64
>>>  a50d3eaae1bc5da03c0c7d159bb30649fdb610f5d23b875e575d7fb3d32df0b1
>>>
>>> Gilles Caulier
>>>
>>>
>>> 2017-02-06 10:29 GMT+01:00 g0rak 1 <g0rak01 at gmail.com>:
>>>
>>>> Hey all,
>>>>
>>>> I'm new to Digikam and looking to move from Picasa.  I've been
>>>> impressed by Digikam's non-destructive versioning and want to use it to
>>>> retain my Picasa edits by:
>>>>
>>>> - exporting all edited photos from Picasa
>>>> - adding '_v1' to their filenames
>>>> - adding Digikam's versioning XML to 'ImageHistory' field in the XMP
>>>> tag of each edited image
>>>>
>>>> Digikam should then link the edited version with the original, and then
>>>> hide the original in the thumbnail browser as the original 'version'.
>>>>
>>>> Does anyone know where I can find the specification for Digikam's
>>>> versioning XML, so I can work out how to write my own XML into the images?
>>>> I can see the basic structure after performing a resize etc., but ideally I
>>>> want to keep things simple and record each edited version as 'Edited by
>>>> Picasa' without having to work out what the edit actually was.
>>>>
>>>> I'm not sure if it's possible to define a generic 'version' in the XML
>>>> without specifying a 'filter' and 'parameters' (e.g. a resize with
>>>> coordinates, etc.), but would like to find out.
>>>>
>>>> If I can get this to work I will happily share my script with the
>>>> community as there might be others looking to move from Picasa who would
>>>> like to maintain their edits alongside their originals.
>>>>
>>>> Thanks for your help,
>>>>
>>>> Simon
>>>>
>>>>
>>>>
>>>
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/digikam-users/attachments/20170210/75071801/attachment.html>


More information about the Digikam-users mailing list