Added wxImage.GetDataBuffer which returns an in-place edit buffer of

the image data.  (Patch #546009)


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@15241 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Robin Dunn
2002-04-22 21:18:52 +00:00
parent 3e679f0190
commit d55d6b3f45
4 changed files with 46 additions and 0 deletions

View File

@@ -167,6 +167,12 @@ public:
//void SetData( unsigned char *data );
%addmethods {
PyObject* GetDataBuffer() {
unsigned char* data = self->GetData();
int len = self->GetWidth() * self->GetHeight() * 3;
return PyBuffer_FromReadWriteMemory(data, len);
}
PyObject* GetData() {
unsigned char* data = self->GetData();
int len = self->GetWidth() * self->GetHeight() * 3;