]> git.saurik.com Git - wxWidgets.git/blobdiff - wxPython/src/image.i
In GetPath(), don't append separator if there's already one at the end
[wxWidgets.git] / wxPython / src / image.i
index 837336efe8260a83ec98cef172a2b370a4b989e1..ab9ccc65e9af94edde6f6c514b859fad7366d8fb 100644 (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;