mirror of
https://invent.kde.org/graphics/okular
synced 2024-08-27 03:30:20 +00:00
Improve picture scaling issues in epub generator
CCBUG: 391625 Test Plan: I tested the file mentioned in the bug report. Pictures look less blurry Reviewers: #okular Subscribers: ngraham, aacid, okular-devel Tags: #okular Differential Revision: https://phabricator.kde.org/D13766
This commit is contained in:
parent
aed8e5ac28
commit
57be655c15
|
@ -86,9 +86,9 @@ QVariant EpubDocument::loadResource(int type, const QUrl &name)
|
|||
const int maxHeight = maxContentHeight();
|
||||
const int maxWidth = maxContentWidth();
|
||||
if(img.height() > maxHeight)
|
||||
img = img.scaledToHeight(maxHeight);
|
||||
img = img.scaledToHeight(maxHeight, Qt::SmoothTransformation);
|
||||
if(img.width() > maxWidth)
|
||||
img = img.scaledToWidth(maxWidth);
|
||||
img = img.scaledToWidth(maxWidth, Qt::SmoothTransformation);
|
||||
resource.setValue(img);
|
||||
break;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue