X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/e6ebb51430cd8e4a9a11c6c5a5ca7c3ff9d7a72a..cd3c2375e6fddd3d478a6776900c21aaeb2d0f08:/src/os2/dataobj.cpp diff --git a/src/os2/dataobj.cpp b/src/os2/dataobj.cpp index 98031a0a75..b6738a028d 100644 --- a/src/os2/dataobj.cpp +++ b/src/os2/dataobj.cpp @@ -313,6 +313,7 @@ bool wxBitmapDataObject::SetData( memcpy(m_pngData, pBuf, m_pngSize); +#if wxUSE_STREAMS wxMemoryInputStream vMstream((char*)m_pngData, m_pngSize); wxImage vImage; wxPNGHandler vHandler; @@ -322,7 +323,9 @@ bool wxBitmapDataObject::SetData( return FALSE; } - m_bitmap = vImage.ConvertToBitmap(); + m_bitmap = wxBitmap(vImage); +#endif //wxUSE_STREAMS + return m_bitmap.Ok(); } @@ -331,7 +334,8 @@ void wxBitmapDataObject::DoConvertToPng() if (!m_bitmap.Ok()) return; - wxImage vImage(m_bitmap); +#if wxUSE_STREAMS + wxImage vImage = m_bitmap.ConvertToImage(); wxPNGHandler vHandler; wxCountingOutputStream vCount; @@ -343,5 +347,6 @@ void wxBitmapDataObject::DoConvertToPng() wxMemoryOutputStream vMstream((char*) m_pngData, m_pngSize); vHandler.SaveFile(&vImage, vMstream ); +#endif }