[Digikam-devel] [Bug 271030] Windows Live Photo Gallery people tagging Compatibility [patch]

Marcel Wiesweg marcel.wiesweg at gmx.de
Tue Jul 12 19:13:39 BST 2011


https://bugs.kde.org/show_bug.cgi?id=271030





--- Comment #22 from Marcel Wiesweg <marcel wiesweg gmx de>  2011-07-12 18:13:38 ---

> I spent most of today reading the code trying to understand how it all fits
> together.  I am confused about what situations MetadataHub::load is called. 
> When I click "Reread metadata" it seems to call ImageScanner::rescan.  In what
> situation is MetadataHub::load called?

MetadataHub was written to support loading multiple images in the right
sidebar, which is mostly complicated for tags. You load one or multiple images,
have a merged result, and write it back. In more places it is used for simple
load one - write one.

> I used QRectF for passing the image info and I have merged FaceIface and
> FaceIfacePriv (moving the methods from FaceIfacePriv into private methods in
> FaceIFace).  I think that is what you wanted.  What methods should be broken
> off?  Only the ones that use MetadataManager?

The problem is that using MetadataManager cannot be moved to the
libdigikamdatabase library, where we need to put FaceIface when used from
ImageScanner. 
MetadataManager is asynchronous, has UI progress feedback, and writes to
database and metadata, which we do not want at all when reading from metadata.

I believe would be sufficient to move the calls to a virtual method, the
default implementation calling directly ImageInfo.setTag etc, and a subclass at
higher level using MetadataManager (asynchronous, with UI progress etc.)

Further on, we should see to replace most of the code you have in
ImageScanner::scanFaces() with calls to FaceIface. Something like
int tagid = iface.getOrCreateTagForPerson(i.key())
iface.add(m_scanInfo.id, tagId, TagRegion(rect), false);

-- 
Configure bugmail: https://bugs.kde.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the Digikam-devel mailing list