X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/e567515efdc65f853687f6bfc685cd3aeca14f77..447fd332c8c554c05fa0bb889a5374a550b33391:/src/common/image.cpp diff --git a/src/common/image.cpp b/src/common/image.cpp index a01eece6e5..469260fb47 100644 --- a/src/common/image.cpp +++ b/src/common/image.cpp @@ -936,7 +936,7 @@ bool wxImage::SetMaskFromImage(const wxImage& mask, return true; } -bool wxImage::ConvertAlphaToMask(unsigned threshold) +bool wxImage::ConvertAlphaToMask(unsigned char threshold) { if (!HasAlpha()) return true; @@ -954,14 +954,14 @@ bool wxImage::ConvertAlphaToMask(unsigned threshold) unsigned char *imgdata = GetData(); unsigned char *alphadata = GetAlpha(); - size_t w = GetWidth(); - size_t h = GetHeight(); + int w = GetWidth(); + int h = GetHeight(); - for (size_t y = 0; y < h; y++) + for (int y = 0; y < h; y++) { - for (size_t x = 0; x < w; x++, imgdata += 3, alphadata++) + for (int x = 0; x < w; x++, imgdata += 3, alphadata++) { - if ((unsigned)(*alphadata) < threshold) + if (*alphadata < threshold) { imgdata[0] = mr; imgdata[1] = mg;