From 993f08452dce7af55c5ff4a578d0402956188392 Mon Sep 17 00:00:00 2001 From: Robin Dunn Date: Mon, 18 Jun 2007 19:39:13 +0000 Subject: [PATCH] Coerce to floating point to fix ResampleBicubic. See bug #1736953. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@46531 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/common/image.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/common/image.cpp b/src/common/image.cpp index 7abe5f9860..6df19503b2 100644 --- a/src/common/image.cpp +++ b/src/common/image.cpp @@ -675,13 +675,13 @@ wxImage wxImage::ResampleBicubic(int width, int height) const for ( int dsty = 0; dsty < height; dsty++ ) { // We need to calculate the source pixel to interpolate from - Y-axis - double srcpixy = dsty * M_IMGDATA->m_height / height; + double srcpixy = double(dsty * M_IMGDATA->m_height) / height; double dy = srcpixy - (int)srcpixy; for ( int dstx = 0; dstx < width; dstx++ ) { // X-axis of pixel to interpolate from - double srcpixx = dstx * M_IMGDATA->m_width / width; + double srcpixx = double(dstx * M_IMGDATA->m_width) / width; double dx = srcpixx - (int)srcpixx; // Sums for each color channel -- 2.47.2