m_display = bitmap.GetDisplay();
- wxImage image( bitmap );
+ wxImage image = bitmap.ConvertToImage();
if (!image.Ok()) return FALSE;
m_display = bitmap.GetDisplay();
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);
Display *xdisplay = (Display*) M_BMPDATA->m_display;
wxASSERT_MSG( xdisplay, wxT("No display") );
-
- int bpp = wxTheApp->m_visualDepth;
#if wxUSE_NANOX
+ //int bpp = DefaultDepth(xdisplay, xscreen);
wxGetImageFromDrawable((Pixmap) GetPixmap(), 0, 0, GetWidth(), GetHeight(), image);
return image;
#else
// !wxUSE_NANOX
+ int bpp = wxTheApp->m_visualDepth;
XImage *x_image = NULL;
if (GetPixmap())
{
// Try to save the bitmap via wxImage handlers:
{
- wxImage image( *this );
+ wxImage image(this->ConvertToImage()) ;
if (image.Ok()) return image.SaveFile( name, 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;
}