]> git.saurik.com Git - wxWidgets.git/blobdiff - src/common/image.cpp
updated license info: Remstar gace permission to change it to wxWindows License with...
[wxWidgets.git] / src / common / image.cpp
index 238b5195f88b5a0d366941b5bc69a14b20138421..a01eece6e5ee534d6458d0775030b61b7a7eb39c 100644 (file)
@@ -947,10 +947,10 @@ bool wxImage::ConvertAlphaToMask(unsigned threshold)
         wxLogError( _("No unused colour in image being masked.") );
         return false;
     }
-    
+
     SetMask(true);
     SetMaskColour(mr, mg, mb);
-    
+
     unsigned char *imgdata = GetData();
     unsigned char *alphadata = GetAlpha();
 
@@ -961,7 +961,7 @@ bool wxImage::ConvertAlphaToMask(unsigned threshold)
     {
         for (size_t x = 0; x < w; x++, imgdata += 3, alphadata++)
         {
-            if (*alphadata < threshold)
+            if ((unsigned)(*alphadata) < threshold)
             {
                 imgdata[0] = mr;
                 imgdata[1] = mg;
@@ -972,6 +972,8 @@ bool wxImage::ConvertAlphaToMask(unsigned threshold)
 
     free(M_IMGDATA->m_alpha);
     M_IMGDATA->m_alpha = NULL;
+
+    return true;
 }
 
 #if wxUSE_PALETTE