mirror of
https://invent.kde.org/frameworks/kimageformats.git
synced 2026-09-16 05:36:59 -04:00
qRoundOrZero_T: fix possible assert in qRound
also: - qRoundOrZero_T: added documentation - EXR: I don't set the ISO Speed if it's zero. BUG: 524678
This commit is contained in:
committed by
Albert Astals Cid
parent
47ea774621
commit
a6027264d4
@@ -368,7 +368,8 @@ static void readMetadata(const Imf::Header &header, QImage &image)
|
||||
|
||||
// shot metadata
|
||||
if (auto isoSpeed = header.findTypedAttribute<Imf::FloatAttribute>("isoSpeed")) {
|
||||
image.setText(QStringLiteral(META_KEY_ISOSPEEDRATINGS), QLocale::c().toString(qRound(isoSpeed->value())));
|
||||
if (auto v = qRoundOrZero(isoSpeed->value()))
|
||||
image.setText(QStringLiteral(META_KEY_ISOSPEEDRATINGS), QLocale::c().toString(v));
|
||||
}
|
||||
if (auto expTime = header.findTypedAttribute<Imf::FloatAttribute>("expTime")) {
|
||||
image.setText(QStringLiteral(META_KEY_EXPOSURETIME), QLocale::c().toString(expTime->value()));
|
||||
|
||||
Reference in New Issue
Block a user