Fixing double to uchar conversion warning.
authorMarvin Smith <marvin_smith1@me.com>
Fri, 11 Jul 2014 14:33:42 +0000 (07:33 -0700)
committerMarvin Smith <marvin_smith1@me.com>
Fri, 11 Jul 2014 14:33:42 +0000 (07:33 -0700)
samples/cpp/tutorial_code/HighGUI/GDAL_IO/gdal-image.cpp

index deb3770..48ef254 100644 (file)
@@ -64,7 +64,7 @@ cv::Vec<DATATYPE,N> lerp( cv::Vec<DATATYPE,N> const& minColor,
 
     cv::Vec<DATATYPE,N> output;
     for( int i=0; i<N; i++ ){
-        output[i] = ((1-t)*minColor[i]) + (t * maxColor[i]);
+        output[i] = (uchar)(((1-t)*minColor[i]) + (t * maxColor[i]));
     }
     return output;
 }