Improve thumbnail generation

This commit is contained in:
reionwong 2021-07-27 12:09:55 +08:00
parent 8d0eaf1697
commit 3fd826ec4a

View file

@ -116,6 +116,12 @@ void ThumbnailerJob::run()
QCryptographicHash md5(QCryptographicHash::Md5); QCryptographicHash md5(QCryptographicHash::Md5);
md5.addData(origName); md5.addData(origName);
// Image size
md5.addData(QString::number(m_size.width()).toStdString().c_str());
md5.addData(QString::number(m_size.height()).toStdString().c_str());
// Time
md5.addData(QString::number(info.lastModified().toTime_t()).toStdString().c_str());
m_thumbnailsName = QString::fromLatin1(md5.result().toHex()) + QLatin1String(".png"); m_thumbnailsName = QString::fromLatin1(md5.result().toHex()) + QLatin1String(".png");
// 是否需要生成缓存 // 是否需要生成缓存