Skip to content

Commit

Permalink
Set OutputImageFormat to Format_ARGB32
Browse files Browse the repository at this point in the history
  • Loading branch information
boardend committed Jan 17, 2024
1 parent 7d45b72 commit 56984b7
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/api/QgisApi.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ void QgisApi_renderXYZTile(

QgsMapSettings mapSettings;

mapSettings.setOutputImageFormat(QImage::Format_ARGB32);
mapSettings.setBackgroundColor(Qt::transparent);
mapSettings.setOutputSize(QSize(tileSize, tileSize));
mapSettings.setOutputDpi(96.0 * pixelRatio);
Expand Down Expand Up @@ -102,6 +103,7 @@ void QgisApi_renderImage(

QgsMapSettings mapSettings;

mapSettings.setOutputImageFormat(QImage::Format_ARGB32);
mapSettings.setBackgroundColor(Qt::transparent);
mapSettings.setOutputSize(QSize(width, height));
mapSettings.setOutputDpi(96.0 * pixelRatio);
Expand Down

0 comments on commit 56984b7

Please sign in to comment.