summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMinh Nguyễn <mxn@1ec5.org>2017-10-03 12:54:47 -0700
committerMinh Nguyễn <mxn@1ec5.org>2017-10-03 12:54:47 -0700
commit65936d7d7e23db33cb3824cd8ef71ef53496daa6 (patch)
treec8f3938a8ac6348c2199c8158539d7b1e8fcb136
parent736e9d60848b1f5f11ffa1ddfbd8c052f79e2cdc (diff)
downloadqtlocation-mapboxgl-upstream/fred-fix-snapshot-scale.tar.gz
[macos] Scale down snapshot imagesupstream/fred-fix-snapshot-scale
-rw-r--r--platform/darwin/src/MGLMapSnapshotter.mm2
1 files changed, 2 insertions, 0 deletions
diff --git a/platform/darwin/src/MGLMapSnapshotter.mm b/platform/darwin/src/MGLMapSnapshotter.mm
index af4d84d773..c86f6f0fa7 100644
--- a/platform/darwin/src/MGLMapSnapshotter.mm
+++ b/platform/darwin/src/MGLMapSnapshotter.mm
@@ -128,6 +128,8 @@
MGLImage *mglImage = [[MGLImage alloc] initWithMGLPremultipliedImage:std::move(image) scale:self.options.scale];
#else
MGLImage *mglImage = [[MGLImage alloc] initWithMGLPremultipliedImage:std::move(image)];
+ mglImage.size = NSMakeSize(mglImage.size.width / self.options.scale,
+ mglImage.size.height / self.options.scale);
#endif
// Process image watermark in a work queue