wxLogError( _("No unused colour in image being masked.") );
return false;
}
-
+
SetMask(true);
SetMaskColour(mr, mg, mb);
-
+
unsigned char *imgdata = GetData();
unsigned char *alphadata = GetAlpha();
{
for (size_t x = 0; x < w; x++, imgdata += 3, alphadata++)
{
- if (*alphadata < threshold)
+ if ((unsigned)(*alphadata) < threshold)
{
imgdata[0] = mr;
imgdata[1] = mg;
free(M_IMGDATA->m_alpha);
M_IMGDATA->m_alpha = NULL;
+
+ return true;
}
#if wxUSE_PALETTE