Skip to content
Permalink
Browse files
Partial fix for ticket #303 (tiff withs nulls in them plot all
black). More to come.


git-svn-id: http://svn.osgeo.org/qgis/trunk@5998 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
g_j_m committed Oct 22, 2006
1 parent 9c91bce commit e260cc13c3d22a0c1bc1a64794d97bec8be56c9a
Showing with 6 additions and 1 deletion.
  1. +6 −1 src/raster/qgsrasterlayer.cpp
@@ -1539,7 +1539,12 @@ void QgsRasterLayer::drawSingleBandGray(QPainter * theQPainter, QgsRasterViewPor
double myGrayValDouble = readValue ( myGdalScanData, myDataType,
myColumnInt * theRasterViewPort->drawableAreaXDimInt + myRowInt );

if ( myGrayValDouble == noDataValueDouble )
// If noDataValueDouble is 'nan', the comparison
// against myGrayValDouble will always fail ( nan==nan always
// returns false, by design), hence the slightly odd comparison
// of myGrayValDouble against itself.
if ( myGrayValDouble == noDataValueDouble ||
myGrayValDouble != myGrayValDouble)
{

myQImage.setPixel(myRowInt, myColumnInt, qRgba(255,255,255,0 ));

0 comments on commit e260cc1

Please sign in to comment.