Add box resize algorithm

This commit is contained in:
2024-01-14 14:28:28 +01:00
parent 0e0d29320e
commit 6539c78c57
3 changed files with 94 additions and 10 deletions
+5 -2
View File
@@ -478,14 +478,17 @@ void LoadRunable::run()
if(m_thumbnail)
{
if(rawImage)
if(rawImage && rawImage->valid())
{
rawImage->resize(THUMB_SIZE, THUMB_SIZE);
rawImage->convertToThumbnail();
QMetaObject::invokeMethod(m_receiver, "thumbnailLoadFinish", Qt::QueuedConnection, Q_ARG(std::shared_ptr<RawImage>, rawImage));
}
QMetaObject::invokeMethod(m_receiver, "thumbnailLoadFinish", Qt::QueuedConnection, Q_ARG(std::shared_ptr<RawImage>, rawImage));
}
else
{
QMetaObject::invokeMethod(m_receiver, "imageLoaded", Qt::QueuedConnection, Q_ARG(std::shared_ptr<RawImage>, rawImage), Q_ARG(ImageInfoData, info));
}
}
catch(std::exception e)
{