We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f882040 commit 707550aCopy full SHA for 707550a
src/core/raster/qgsrasterlayer.cpp
@@ -1538,6 +1538,8 @@ bool QgsRasterLayer::draw( QgsRenderContext& rendererContext )
1538
1539
if(mTransparencyLevel != 255) //improve performance if layer transparency not altered
1540
{
1541
+ QImage* transparentImageCopy = new QImage(*image); //copy image if there is user transparency
1542
+ image = transparentImageCopy;
1543
int myWidth = image->width();
1544
int myHeight = image->height();
1545
QRgb myRgb;
@@ -1569,6 +1571,11 @@ bool QgsRasterLayer::draw( QgsRenderContext& rendererContext )
1569
1571
),
1570
1572
*image );
1573
1574
+ if(mTransparencyLevel != 255)
1575
+ {
1576
+ delete image;
1577
+ }
1578
+
1579
}
1580
else
1581
0 commit comments