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:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user