Fix 90/270 degrees photo rotation.

Fixes #7197.
This commit is contained in:
John Preston 2020-02-20 10:55:50 +04:00
parent b5dcd84513
commit 6357529901
1 changed files with 4 additions and 4 deletions

View File

@ -2689,12 +2689,12 @@ void OverlayWidget::validatePhotoImage(Image *image, bool blurred) {
} else if (!_staticContent.isNull() && (blurred || !_blurred)) { } else if (!_staticContent.isNull() && (blurred || !_blurred)) {
return; return;
} }
const auto w = _width * cIntRetinaFactor(); const auto use = flipSizeByRotation({ _width, _height })
const auto h = _height * cIntRetinaFactor(); * cIntRetinaFactor();
_staticContent = image->pixNoCache( _staticContent = image->pixNoCache(
fileOrigin(), fileOrigin(),
w, use.width(),
h, use.height(),
Images::Option::Smooth Images::Option::Smooth
| (blurred ? Images::Option::Blurred : Images::Option(0))); | (blurred ? Images::Option::Blurred : Images::Option(0)));
_staticContent.setDevicePixelRatio(cRetinaFactor()); _staticContent.setDevicePixelRatio(cRetinaFactor());