[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: [gwenview] /: Improve sharpness for downscaled jpeg images
From: Benjamin_Löwe <benni () mytum ! de>
Date: 2013-05-31 18:04:04
Message-ID: 20130531180404.C9357A6067 () git ! kde ! org
[Download RAW message or body]
Git commit d97102e332b86db61b0cd358935abf390fbdab1d by Benjamin Löwe.
Committed on 30/05/2013 at 17:27.
Pushed by bennihill into branch 'master'.
Improve sharpness for downscaled jpeg images
REVIEW: 110743
BUG: 286284
FIXED-IN: 4.11.0
M +1 -1 lib/document/document.cpp
M +1 -1 tests/auto/documenttest.cpp
http://commits.kde.org/gwenview/d97102e332b86db61b0cd358935abf390fbdab1d
diff --git a/lib/document/document.cpp b/lib/document/document.cpp
index f3677fd..dd4a680 100644
--- a/lib/document/document.cpp
+++ b/lib/document/document.cpp
@@ -131,7 +131,7 @@ const QImage& Document::image() const
inline int invertedZoomForZoom(qreal zoom)
{
int invertedZoom;
- for (invertedZoom = 1; zoom < 1. / (invertedZoom * 2); invertedZoom *= 2) {}
+ for (invertedZoom = 1; zoom < 1. / (invertedZoom * 4); invertedZoom *= 2) {}
return invertedZoom;
}
diff --git a/tests/auto/documenttest.cpp b/tests/auto/documenttest.cpp
index 3da2471..b608e34 100644
--- a/tests/auto/documenttest.cpp
+++ b/tests/auto/documenttest.cpp
@@ -215,7 +215,7 @@ void DocumentTest::testLoadDownSampled()
QImage downSampledImage = doc->downSampledImageForZoom(0.2);
QVERIFY2(!downSampledImage.isNull(), "Down sampled image should not be null");
- QSize expectedSize = doc->size() / 4;
+ QSize expectedSize = doc->size() / 2;
if (expectedSize.isEmpty()) {
expectedSize = image.size();
}
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic