-
-void wxBitmapDataObject::DoConvertToPng()
-{
- if (!m_bitmap.Ok())
- return;
-
- wxImage vImage(m_bitmap);
- wxPNGHandler vHandler;
- wxCountingOutputStream vCount;
-
- vHandler.SaveFile(&vImage, vCount);
-
- m_pngSize = vCount.GetSize() + 100; // sometimes the size seems to vary ???
- m_pngData = malloc(m_pngSize);
-
- wxMemoryOutputStream vMstream((char*) m_pngData, m_pngSize);
-
- vHandler.SaveFile(&vImage, vMstream );
-}
-