X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/f6bcfd974ef26faf6f91a62cac09827e09463fd1..1af9e5c56dedf2ecd79d4f9186f6a8edb5c72448:/wxPython/src/image.i diff --git a/wxPython/src/image.i b/wxPython/src/image.i index fd8ba4d8b2..e6d5614a7c 100644 --- a/wxPython/src/image.i +++ b/wxPython/src/image.i @@ -106,7 +106,8 @@ public: unsigned char GetGreen( int x, int y ); unsigned char GetBlue( int x, int y ); - bool LoadFile( const wxString& name, long type = wxBITMAP_TYPE_PNG ); + static bool CanRead( const wxString& name ); + bool LoadFile( const wxString& name, long type = wxBITMAP_TYPE_ANY ); %name(LoadMimeFile)bool LoadFile( const wxString& name, const wxString& mimetype ); bool SaveFile( const wxString& name, int type ); @@ -139,7 +140,7 @@ public: } size_t len = self->GetWidth() * self->GetHeight() * 3; - dataPtr = new unsigned char[len]; + dataPtr = (unsigned char*) malloc(len); memcpy(dataPtr, PyString_AsString(data), len); self->SetData(dataPtr); } @@ -163,6 +164,9 @@ public: unsigned long CountColours( unsigned long stopafter = (unsigned long) -1 ); // TODO: unsigned long ComputeHistogram( wxHashTable &h ); + static void AddHandler( wxImageHandler *handler ); + static void InsertHandler( wxImageHandler *handler ); + static bool RemoveHandler( const wxString& name ); }; // Alternate constructors @@ -188,13 +192,6 @@ public: } %} -// Static Methods -void wxImage_AddHandler(wxImageHandler *handler); -%{ - void wxImage_AddHandler(wxImageHandler *handler) { - wxImage::AddHandler(handler); - } -%} void wxInitAllImageHandlers();