Add support for importing hierarchical tags from Lightroom.

For #9321.
Fix #9396: Correct watermark alignement computation

When using a higher than wide images, the ratio computation were
inverted.

Signed-off-by: bleader <bleader@ratonland.org>