memcpy(m_pngData, pBuf, m_pngSize);
+#if wxUSE_STREAMS
wxMemoryInputStream vMstream((char*)m_pngData, m_pngSize);
wxImage vImage;
wxPNGHandler vHandler;
return FALSE;
}
- m_bitmap = vImage.ConvertToBitmap();
+ m_bitmap = wxBitmap(vImage);
+#endif //wxUSE_STREAMS
+
return m_bitmap.Ok();
}
if (!m_bitmap.Ok())
return;
- wxImage vImage(m_bitmap);
+#if wxUSE_STREAMS
+ wxImage vImage = m_bitmap.ConvertToImage();
wxPNGHandler vHandler;
wxCountingOutputStream vCount;
wxMemoryOutputStream vMstream((char*) m_pngData, m_pngSize);
vHandler.SaveFile(&vImage, vMstream );
+#endif
}