class wxImageHandler {
public:
- wxImageHandler();
+ // wxImageHandler(); Abstract Base Class
wxString GetName();
wxString GetExtension();
long GetType();
wxGIFHandler();
};
+class wxPNMHandler : public wxImageHandler {
+public:
+ wxPNMHandler();
+};
+class wxPCXHandler : public wxImageHandler {
+public:
+ wxPCXHandler();
+};
//---------------------------------------------------------------------------
int GetWidth();
int GetHeight();
+ wxImage GetSubImage(const wxRect& rect);
+
//unsigned char *GetData();
//void SetData( unsigned char *data );
PyErr_SetString(PyExc_TypeError, "Expected string object");
return /* NULL */ ;
}
- dataPtr = (unsigned char*)PyString_AsString(data);
+
+ size_t len = self->GetWidth() * self->GetHeight() * 3;
+ dataPtr = new unsigned char[len];
+ memcpy(dataPtr, PyString_AsString(data), len);
self->SetData(dataPtr);
}
}
}
%}
+void wxInitAllImageHandlers();
+
//---------------------------------------------------------------------------
//---------------------------------------------------------------------------
-
-
-
-