Skip to content

Commit 9a300d8

Browse files
committed
invert color fix
1 parent 3284fcc commit 9a300d8

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

src/core/raster/qgssinglebandpseudocolorrenderer.cpp

+8
Original file line numberDiff line numberDiff line change
@@ -165,6 +165,14 @@ QgsRasterBlock* QgsSingleBandPseudoColorRenderer::block( int bandNo, QgsRectangl
165165
continue;
166166
}
167167

168+
if ( mInvertColor )
169+
{
170+
// 1.8 was flipping blue and red
171+
red = 255 - red;
172+
green = 255 - green;
173+
blue = 255 - blue;
174+
}
175+
168176
if ( !hasTransparency )
169177
{
170178
outputBlock->setColor( i, qRgba( red, green, blue, 255 ) );

0 commit comments

Comments
 (0)