The Crispy™️ update

Make it so BG's and Characters will not be blurred when rescaled

TODO: Make Qmovies ditch anti-aliasing during scaling as well
Only apply crispy scaling if the size is 2x of the previous size or something
This commit is contained in:
Crystalwarrior 2020-03-08 17:40:52 +03:00
parent e4b90d36a9
commit 9b8f60061a
2 changed files with 5 additions and 3 deletions

View File

@ -240,7 +240,9 @@ QPixmap AOCharMovie::get_pixmap(QImage image)
else
f_pixmap = QPixmap::fromImage(image);
// auto aspect_ratio = Qt::KeepAspectRatio;
auto transform_mode = Qt::SmoothTransformation;
auto transform_mode = Qt::FastTransformation;
// if ()
// transform_mode = Qt::SmoothTransformation;
f_pixmap = f_pixmap.scaledToHeight(f_h, transform_mode);
this->resize(f_pixmap.size());

View File

@ -36,7 +36,7 @@ void AOScene::set_image(QString p_image)
m_movie->setFileName(background_path);
m_movie->setScaledSize(QSize(w, h));
if (m_movie->isValid())
if (m_movie->isValid() && m_movie->frameCount() > 1)
{
this->setMovie(m_movie);
m_movie->start();
@ -85,7 +85,7 @@ void AOScene::set_legacy_desk(QString p_image)
m_movie->setScaledSize(QSize(vp_width, final_h));
if (m_movie->isValid())
if (m_movie->isValid() && m_movie->frameCount() > 1)
{
this->setMovie(m_movie);
m_movie->start();