Damselfly icon indicating copy to clipboard operation
Damselfly copied to clipboard

XMP Face regions out of place for portrait pictures

Open dominformant opened this issue 2 years ago • 8 comments

I have a large gallery of pictures with face tags generated in Digikam. When I import those to Damselfly, the face regions for pictures in portrait orientation are out of place, while they are correctly placed for landscape photos. To me it seems as if the there is a rotation applied to the image, that is ignored when drawing the face region. If wished, I can provide an example image to show the effect, but I hope my explanation is understandable without.

dominformant avatar Mar 28 '22 14:03 dominformant

Thanks for flagging - I did wonder if I'd missed some of the rotation cases for this functionality, but didn't have enough test data to be certain. If you could attach images that are wrong to this issue that would be great; if the pictures you have are personal/private, please send them to me at [email protected] and I'll look into testing/fixing! :)

Webreaper avatar Mar 28 '22 14:03 Webreaper

Sorry for the dely, just needed to find a non-personal picture with that problem. Hope the metadata is not changed from attaching here. In this picture, the orientation is set to "right - top". If the orientation is set to "top - left", which (to me) leads to the same image, the regions are draw in the correct place. MVIMG_20220328_192820 (1) .

dominformant avatar Mar 29 '22 09:03 dominformant

Thanks for fixing this issue, now the face regions are in place. However, now some preview images of portrait photos are generated with the wrong aspect. If the orientation is right-top, everything is fine, if the orientation is top-left, the preview image is stretched to landscape. In the detailled view, the image is shown correctly again.

dominformant avatar Jul 26 '22 20:07 dominformant

Oh, interesting! Have you forced the metadata to be updated on the affected images? (right click, Refresh, Rescan metadata). If so, can you send me a sample image?

Also, well done for picking this up but be aware that the current Dev branch is using a beta version of .Net, so please be aware that weird stuff might happen. 😁

Webreaper avatar Jul 26 '22 20:07 Webreaper

I was so interested in the corrected face tags, I had to try out the Dev branch :laughing: Regarding the thumbnail scaling, I'm still searching for the reason and maybe it's a problem with my camera writing wrong size tags to the image, however I can't remember to have seen the problem in the latest branch.

dominformant avatar Jul 26 '22 21:07 dominformant

I did fix some metadata extraction recently, which for some pictures was messing up the orientation/aspect ratio - which then makes everything else go wrong. So perhaps rescanning the metadata with the new version solved it...

Webreaper avatar Jul 26 '22 21:07 Webreaper

I think, the problem really was my phone tagging portrait photos with flipped dimensions, so the tagged width is actually the height of the image. Maybe the error didn't show until your changes in the metadata extraction, however it seems that everything works right in Damselfly.

dominformant avatar Jul 27 '22 14:07 dominformant

Good to hear!

Webreaper avatar Jul 27 '22 15:07 Webreaper