git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@41432
c3d73ce0-8a6f-49c7-b76d-
6d57e0e08775
}
dst = dst_data + y * M_IMGDATA->m_width*3;
}
dst = dst_data + y * M_IMGDATA->m_width*3;
- dst[0] = sum_r / blurArea;
- dst[1] = sum_g / blurArea;
- dst[2] = sum_b / blurArea;
+ dst[0] = (unsigned char)(sum_r / blurArea);
+ dst[1] = (unsigned char)(sum_g / blurArea);
+ dst[2] = (unsigned char)(sum_b / blurArea);
- dst_alpha[y * M_IMGDATA->m_width] = sum_a / blurArea;
+ dst_alpha[y * M_IMGDATA->m_width] = (unsigned char)(sum_a / blurArea);
// Now average the values of the rest of the pixels by just moving the
// blur radius box along the row
// Now average the values of the rest of the pixels by just moving the
// blur radius box along the row
// Save off the averaged data
dst = dst_data + x*3 + y*M_IMGDATA->m_width;
// Save off the averaged data
dst = dst_data + x*3 + y*M_IMGDATA->m_width;
- dst[0] = sum_r / blurArea;
- dst[1] = sum_g / blurArea;
- dst[2] = sum_b / blurArea;
+ dst[0] = (unsigned char)(sum_r / blurArea);
+ dst[1] = (unsigned char)(sum_g / blurArea);
+ dst[2] = (unsigned char)(sum_b / blurArea);
- dst_alpha[x + y * M_IMGDATA->m_width] = sum_a / blurArea;
+ dst_alpha[x + y * M_IMGDATA->m_width] = (unsigned char)(sum_a / blurArea);
- dst[0] = sum_r / blurArea;
- dst[1] = sum_g / blurArea;
- dst[2] = sum_b / blurArea;
+ dst[0] = (unsigned char)(sum_r / blurArea);
+ dst[1] = (unsigned char)(sum_g / blurArea);
+ dst[2] = (unsigned char)(sum_b / blurArea);
- dst_alpha[x] = sum_a / blurArea;
+ dst_alpha[x] = (unsigned char)(sum_a / blurArea);
// Now average the values of the rest of the pixels by just moving the
// box along the column from top to bottom
// Now average the values of the rest of the pixels by just moving the
// box along the column from top to bottom
// Save off the averaged data
dst = dst_data + (x + y * M_IMGDATA->m_width) * 3;
// Save off the averaged data
dst = dst_data + (x + y * M_IMGDATA->m_width) * 3;
- dst[0] = sum_r / blurArea;
- dst[1] = sum_g / blurArea;
- dst[2] = sum_b / blurArea;
+ dst[0] = (unsigned char)(sum_r / blurArea);
+ dst[1] = (unsigned char)(sum_g / blurArea);
+ dst[2] = (unsigned char)(sum_b / blurArea);
- dst_alpha[x + y * M_IMGDATA->m_width] = sum_a / blurArea;
+ dst_alpha[x + y * M_IMGDATA->m_width] = (unsigned char)(sum_a / blurArea);