<html>
 <body>
  <div style="font-family: Verdana, Arial, Helvetica, Sans-Serif;">
   <table bgcolor="#f9f3c9" width="100%" cellpadding="8" style="border: 1px #c9c399 solid;">
    <tr>
     <td>
      This is an automatically generated e-mail. To reply, visit:
      <a href="http://git.reviewboard.kde.org/r/109087/">http://git.reviewboard.kde.org/r/109087/</a>
     </td>
    </tr>
   </table>
   <br />





<blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: 10px;">
 <p style="margin-top: 0;">On February 25th, 2013, 4:34 p.m. UTC, <b>Veaceslav Munteanu</b> wrote:</p>
 <blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: 10px;">
  <pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">Ok ... so here is the summary of http://www.metadataworkinggroup.com/pdf/mwg_guidance.pdf :

Image regions can suffer from 3 issues:
 - Re-size
 - Rotation
 - Crop

Image metadata doesn't suffer from re-size because it store values between 0 and 1. Digikam database suffer indeed because it store data in integer format. Resize should update database
Rotation should update database and image metadata.
Crop should update database and image metadata.

Now I need some info about where is the relevant code that re-size,rotate and crop images so I could patch it to meet metadata working group specifications.
</pre>
 </blockquote>




 <p>On February 28th, 2013, 9:16 p.m. UTC, <b>Veaceslav Munteanu</b> wrote:</p>
 <blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: 10px;">
  <pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">I'm stuck with database update...

Marcel,

so far I used FaceTagEditor class to get facetags list for metadatahub. When I try to delete all existing face tags(want to replace them with rotated ones), FaceTagsEditor::removeAllFaces() doesn't seem to work...

So, i get a lot of garbage tags into DB and also a lot of garbage rectangles on rotated image... Probably there is a cache, or something else that I don't get it.

Can you give me some hints? thank you!</pre>
 </blockquote>





 <p>On February 28th, 2013, 9:26 p.m. UTC, <b>Marcel Wiesweg</b> wrote:</p>
 <blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: 10px;">
  <pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">removeAllTags seems to have been unused until today, so you need to debug. Suggestion for debug statements:

void FaceTagsEditor::removeAllFaces(qlonglong imageid)
{
    QList<int>  tagsToRemove;
    QStringList attributes = DatabaseFace::attributesForFlags(DatabaseFace::AllTypes);

    kDebug() << "remove all faces from" << imageid;
    kDebug() << "removing the following properties:" << attributes;
    foreach(ImageTagPair pair, faceImageTagPairs(imageid, DatabaseFace::AllTypes))
    {
        kDebug() << "Having pair" << pair.imageId() << pair.tagId() << pair.properties();
        foreach(const QString& attribute, attributes)
        {
            pair.removeProperties(attribute);
        }
</pre>
 </blockquote>








</blockquote>

<pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">I was thinking why the seemingly obvious problem of rotation hasn't been solved yet. Answer: It seemed at the time and still seems of little practical impact for faces, which have a clearly defined orientation. There's not much use of marking an upside down face (with rare exceptions, if you are Georg Baselitz for example).
It's slightly more important for generic regions which are the focus of MWG. And of course, cropping and resizing is common and breaks digikam regions.</pre>
<br />










<p>- Marcel</p>


<br />
<p>On February 21st, 2013, 9:21 p.m. UTC, Veaceslav Munteanu wrote:</p>








<table bgcolor="#fefadf" width="100%" cellspacing="0" cellpadding="8" style="background-image: url('http://git.reviewboard.kde.org/static/rb/images/review_request_box_top_bg.ab6f3b1072c9.png'); background-position: left top; background-repeat: repeat-x; border: 1px black solid;">
 <tr>
  <td>

<div>Review request for Digikam, Gilles Caulier and Marcel Wiesweg.</div>
<div>By Veaceslav Munteanu.</div>


<p style="color: grey;"><i>Updated Feb. 21, 2013, 9:21 p.m.</i></p>






<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Description </h1>
 <table width="100%" bgcolor="#ffffff" cellspacing="0" cellpadding="10" style="border: 1px solid #b8b5a0">
 <tr>
  <td>
   <pre style="margin: 0; padding: 0; white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">This patch allows digikam to write face tags using Picassa/MetadataWorkingGroup format into image's xmp. This patch is still experimental, do not test with you usual photo collection. 
Even if It shouldn't do anything bad, I don't want to mess your collection.

This patch depends on libkexiv2 new methods that I added. It's based on this commit:

http://quickgit.kde.org/?p=libkexiv2.git&a=commit&h=f2c50255227852bcb83115f13bfc4d4394a780ed
</pre>
  </td>
 </tr>
</table>


<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Testing </h1>
<table width="100%" bgcolor="#ffffff" cellspacing="0" cellpadding="10" style="border: 1px solid #b8b5a0">
 <tr>
  <td>
   <pre style="margin: 0; padding: 0; white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">I tested so far with my limited collection and setting and deleting tags works well. Tested with exiv2 -pa to see if tags are set or removed.</pre>
  </td>
 </tr>
</table>



<div style="margin-top: 1.5em;">
 <b style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Bugs: </b>


 <a href="http://bugs.kde.org/show_bug.cgi?id=https://bugs.kde.org/show_bug.cgi?id=277429">https://bugs.kde.org/show_bug.cgi?id=277429</a>


</div>


<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Diffs</b> </h1>
<ul style="margin-left: 3em; padding-left: 0;">

 <li>digikam/fileaction/metadatahub.cpp <span style="color: grey">(ea74590)</span></li>

 <li>libs/database/core/tagregion.h <span style="color: grey">(436960f)</span></li>

 <li>libs/database/core/tagregion.cpp <span style="color: grey">(4fda6af)</span></li>

 <li>libs/dmetadata/dmetadata.h <span style="color: grey">(fb9a617)</span></li>

 <li>libs/dmetadata/dmetadata.cpp <span style="color: grey">(8eccb45)</span></li>

 <li>libs/dmetadata/metadatasettingscontainer.h <span style="color: grey">(02d35d2)</span></li>

 <li>libs/dmetadata/metadatasettingscontainer.cpp <span style="color: grey">(3e6cd93)</span></li>

 <li>utilities/setup/setupmetadata.cpp <span style="color: grey">(f73870c)</span></li>

</ul>

<p><a href="http://git.reviewboard.kde.org/r/109087/diff/" style="margin-left: 3em;">View Diff</a></p>







  </td>
 </tr>
</table>








  </div>
 </body>
</html>