]> git.saurik.com Git - wxWidgets.git/blobdiff - src/common/image.cpp
Make wxPORTRAIT and wxLANDSCAPE elements of wxPrintOrientation enum.
[wxWidgets.git] / src / common / image.cpp
index a3c94837675046e78b17694e0121b7dfc65a3628..cc63e385c150cccf190b85b31b27e477dd74a7d1 100644 (file)
@@ -668,13 +668,13 @@ wxImage wxImage::ResampleBilinear(int width, int height) const
 
             //result lines
 
-            dst_data[0] = r1 * dy1 + r2 * dy;
-            dst_data[1] = g1 * dy1 + g2 * dy;
-            dst_data[2] = b1 * dy1 + b2 * dy;
+            dst_data[0] = static_cast<unsigned char>(r1 * dy1 + r2 * dy);
+            dst_data[1] = static_cast<unsigned char>(g1 * dy1 + g2 * dy);
+            dst_data[2] = static_cast<unsigned char>(b1 * dy1 + b2 * dy);
             dst_data += 3;
 
             if ( src_alpha )
-                *dst_alpha++ = a1 * dy1 + a2 * dy;
+                *dst_alpha++ = static_cast<unsigned char>(a1 * dy1 + a2 * dy);
         }
     }