mirror of
https://github.com/qgis/QGIS.git
synced 2025-02-27 00:33:48 -05:00
Bugfix by Radim: prevent extra multiplication if alpha is 1
This commit is contained in:
parent
10ad3fb072
commit
8304d6a3b7
@ -295,7 +295,7 @@ void QgsMultiBandColorRenderer::draw( QPainter* p, QgsRasterViewPort* viewPort,
|
||||
currentOpacity *= ( readValue( alphaData, transparencyType, currentRasterPos ) / 255.0 );
|
||||
}
|
||||
|
||||
if ( doubleNear( currentOpacity, 255 ) )
|
||||
if ( doubleNear( currentOpacity, 1.0 ) )
|
||||
{
|
||||
imageScanLine[j] = qRgba( redVal, greenVal, blueVal, 255 );
|
||||
}
|
||||
|
@ -149,7 +149,7 @@ void QgsSingleBandGrayRenderer::draw( QPainter* p, QgsRasterViewPort* viewPort,
|
||||
grayVal = 255 - grayVal;
|
||||
}
|
||||
|
||||
if ( doubleNear( currentAlpha, 255 ) )
|
||||
if ( doubleNear( currentAlpha, 1.0 ) )
|
||||
{
|
||||
imageScanLine[j] = qRgba( grayVal, grayVal, grayVal, 255 );
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user