I've made an atlas in QGIS where different pages have the same map extent, same dpi, but different page sizes / resolutions. When I export as image (png), however, QGIS overrides the different page sizes with one fixed image size, changing the resolution instead.
Simplified example:
- Atlas page 1 is 4096x2048 pixels @ 96 dpi, scale 1:2257
- Atlas page 2 is same extent, 2048x1024 @ 96 dpi, scale 1:4514
If I preview the atlas on screen, it's fine. And I can export page by page using Layout / Export as Image, as expected. But if I try Atlas / Export Atlas as Images, the Image Export options dialog that appears populates with the currently-being-previewed page's dpi and page width and page height, and then all pages are forced to that width and height in pixels. So if I was looking at atlas page 1 on screen, I get 2 exported images at 4096x2048 at different dpi. How do I instead get the dpi to be fixed and the image width and height to change?
The page width and height do change as expected if I export to PDF instead (where the image export options dialog doesn't muck with image size).
I'm doing this to generate pngs at different scale levels that I then convert to one .mbtiles with gdal_translate
(plus sqlite3
to combine into a single file). This is to preserve resolution-dependent rendering that creating a single png and then using just gdaladdo
would not allow, and to avoid the instability and cross-tile-oundary labeling issues of the QTiles3 plugin.
[QGis Windows 3.6.2]