MicroExif: API improvements and minor bugfixes

This commit is contained in:
Mirco Miranda
2025-03-02 10:18:13 +01:00
parent d3386bbf50
commit 7742537f8c
13 changed files with 103 additions and 31 deletions

View File

@@ -955,13 +955,8 @@ bool HEIFHandler::ensureDecoder()
} else if (isExif) {
auto exif = MicroExif::fromByteArray(ba.mid(4));
if (!exif.isEmpty()) {
// set image resolution
if (exif.horizontalResolution() > 0)
m_current_image.setDotsPerMeterX(qRound(exif.horizontalResolution() / 25.4 * 1000));
if (exif.verticalResolution() > 0)
m_current_image.setDotsPerMeterY(qRound(exif.verticalResolution() / 25.4 * 1000));
// set image metadata
exif.toImageMetadata(m_current_image);
exif.updateImageResolution(m_current_image);
exif.updateImageMetadata(m_current_image);
}
}
}