+
+void wxBitmapDataObject::SetPngData( const char *pngData, size_t pngSize )
+{
+ if (m_pngData) delete[] m_pngData;
+ m_pngData = (char*) NULL;
+ m_pngSize = pngSize;
+ m_pngData = new char[m_pngSize];
+ memcpy( m_pngData, pngData, m_pngSize );
+
+ wxMemoryInputStream mstream( pngData, pngSize );
+ wxImage image;
+ wxPNGHandler handler;
+ handler.LoadFile( &image, mstream );
+ m_bitmap = image.ConvertToBitmap();
+}
+
+void wxBitmapDataObject::DoConvertToPng()
+{
+ if (m_pngData) delete[] m_pngData;