- wxCHECK_MSG((bmp.GetMask() != NULL) || transColour.Ok(),
- FALSE,
- wxT("Either the bitmap should have a mask or a colour should be given."));
-
- wxImage image = bmp.ConvertToImage();
-
- if (image.HasMask())
- {
- loR = image.GetMaskRed();
- loG = image.GetMaskGreen();
- loB = image.GetMaskBlue();
- }
- else
- {
- loR = transColour.Red();
- loG = transColour.Green();
- loB = transColour.Blue();
- }
-
- hiR = wxMin(0xFF, loR + tolerance);
- hiG = wxMin(0xFF, loG + tolerance);
- hiB = wxMin(0xFF, loB + tolerance);
+ hiR = (unsigned char)wxMin(0xFF, loR + tolerance);
+ hiG = (unsigned char)wxMin(0xFF, loG + tolerance);
+ hiB = (unsigned char)wxMin(0xFF, loB + tolerance);