diff options
| author | Crystalwarrior <varsash@gmail.com> | 2020-03-08 17:40:52 +0300 |
|---|---|---|
| committer | Crystalwarrior <varsash@gmail.com> | 2020-03-08 17:40:52 +0300 |
| commit | 9b8f60061aebae849f5325189d5baf36db0c8c99 (patch) | |
| tree | dcb6a93d61f246ca7f8eb3c1f06113b8f8cbc640 /src | |
| parent | e4b90d36a90e4601df23b5634aa5ad123d8f6424 (diff) | |
The Crispy:tm: 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
Diffstat (limited to 'src')
| -rw-r--r-- | src/aocharmovie.cpp | 4 | ||||
| -rw-r--r-- | src/aoscene.cpp | 4 |
2 files changed, 5 insertions, 3 deletions
diff --git a/src/aocharmovie.cpp b/src/aocharmovie.cpp index 0ce5c868..6cdcab2c 100644 --- a/src/aocharmovie.cpp +++ b/src/aocharmovie.cpp @@ -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()); diff --git a/src/aoscene.cpp b/src/aoscene.cpp index 6ada5ee5..32e5c350 100644 --- a/src/aoscene.cpp +++ b/src/aoscene.cpp @@ -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(); |
