X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/52b64b0a78c7f6c7994d25f6e212c715ab4404ba..fa1c12bdd76acc21ddb45b90bb53b2f58aed946d:/src/common/imagbmp.cpp diff --git a/src/common/imagbmp.cpp b/src/common/imagbmp.cpp index afe564607d..bb388134af 100644 --- a/src/common/imagbmp.cpp +++ b/src/common/imagbmp.cpp @@ -748,8 +748,6 @@ bool wxBMPHandler::DoLoadDib (wxImage * image, int width, int height, int bpp, i bool wxBMPHandler::LoadDib( wxImage *image, wxInputStream& stream, bool verbose, bool IsBmp ) { - - wxUint8 aByte; wxUint16 aWord; wxInt32 dbuf[4]; wxInt8 bbuf[4]; @@ -844,7 +842,7 @@ bool wxBMPHandler::LoadDib( wxImage *image, wxInputStream& stream, bool verbose, { //read Icon mask which is monochrome //there is no palette, so we will create one - wxImage mask ; + wxImage mask; if (!DoLoadDib (&mask, width, height, 1, 2, BI_RGB, offset, stream, verbose, IsBmp, FALSE ) ) { @@ -852,7 +850,7 @@ bool wxBMPHandler::LoadDib( wxImage *image, wxInputStream& stream, bool verbose, wxLogError( _("ICO: Error in reading mask DIB.") ); return FALSE; } - image -> ApplyMask ( &mask ); + image->SetMaskFromImage(mask, 255, 255, 255); } return TRUE;