- wxMemoryOutputStream mstream( (char*) m_pngData, m_pngSize );
- handler.SaveFile( &image, mstream );
-}
-
-// ----------------------------------------------------------------------------
-// wxPrivateDataObject
-// ----------------------------------------------------------------------------
-
-IMPLEMENT_CLASS( wxPrivateDataObject, wxDataObject )
-
-void wxPrivateDataObject::Free()
-{
- if ( m_data )
- free(m_data);
-}
-
-wxPrivateDataObject::wxPrivateDataObject()
-{
- wxString id = wxT("application/");
- id += wxTheApp->GetAppName();
-
- m_format.SetId( id );
-
- m_size = 0;
- m_data = (void *)NULL;
-}
-
-void wxPrivateDataObject::SetData( const void *data, size_t size )
-{
- Free();
-
- m_size = size;
- m_data = malloc(size);
-
- memcpy( m_data, data, size );
-}
-
-void wxPrivateDataObject::WriteData( void *dest ) const
-{
- WriteData( m_data, dest );
-}
-
-size_t wxPrivateDataObject::GetSize() const
-{
- return m_size;
-}
-
-void wxPrivateDataObject::WriteData( const void *data, void *dest ) const
-{
- memcpy( dest, data, GetSize() );
+ wxMemoryOutputStream mstream((char*) m_pngData, m_pngSize);
+ image.SaveFile(mstream, wxBITMAP_TYPE_PNG);