Skip to content

Commit 45fe0ec

Browse files
mhugentMarco Hugentobler
authored and
Marco Hugentobler
committedOct 2, 2012
Fix bug in quantisation code. 8Bit has now a very good visual quality
1 parent 9cd2bb2 commit 45fe0ec

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed
 

‎src/mapserver/qgshttprequesthandler.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -751,7 +751,7 @@ QRgb QgsHttpRequestHandler::boxColor( const QgsColorBox& box, int boxPixels )
751751
{
752752
currentColor = colorBoxIt->first;
753753
currentPixel = colorBoxIt->second;
754-
weight = currentPixel / boxPixels;
754+
weight = ( double )currentPixel / boxPixels;
755755
avRed += ( qRed( currentColor ) * weight );
756756
avGreen += ( qGreen( currentColor ) * weight );
757757
avBlue += ( qBlue( currentColor ) * weight );

0 commit comments

Comments
 (0)
Please sign in to comment.