X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/8601b2e15bf924d4be6b7843064028e514a71ec8..f40f9976fd085fd6d2099de861159bb1062a8f46:/src/x11/bitmap.cpp?ds=inline diff --git a/src/x11/bitmap.cpp b/src/x11/bitmap.cpp index 9659dc351c..8663744e46 100644 --- a/src/x11/bitmap.cpp +++ b/src/x11/bitmap.cpp @@ -91,7 +91,7 @@ bool wxMask::Create( const wxBitmap& bitmap, m_display = bitmap.GetDisplay(); - wxImage image( bitmap ); + wxImage image = bitmap.ConvertToImage(); if (!image.Ok()) return FALSE; m_display = bitmap.GetDisplay(); @@ -370,7 +370,7 @@ bool wxBitmap::CreateFromXpm( const char **bits ) XGetGeometry( xdisplay, pixmap, &xroot, &xRet, &yRet, &widthRet, &heightRet, &borderWidthRet, &depthRet); - wxASSERT_MSG( bpp == (int)depthRet, wxT("colour depth mismatch") ) + wxASSERT_MSG( bpp == (int)depthRet, wxT("colour depth mismatch") ); #endif XpmFreeAttributes(&xpmAttr); @@ -1022,7 +1022,7 @@ bool wxBitmap::SaveFile( const wxString &name, int type, wxPalette *WXUNUSED(pal // Try to save the bitmap via wxImage handlers: { - wxImage image( *this ); + wxImage image(this->ConvertToImage()) ; if (image.Ok()) return image.SaveFile( name, type ); } @@ -1111,7 +1111,7 @@ bool wxBitmap::LoadFile( const wxString &name, int type ) { wxImage image; if (!image.LoadFile( name, type )) return FALSE; - if (image.Ok()) *this = image.ConvertToBitmap(); + if (image.Ok()) *this = wxBitmap(image); else return FALSE; }