diff options
| author | morefigs <morefigs@gmail.com> | 2018-10-17 12:40:21 +1100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2018-10-17 12:40:21 +1100 |
| commit | 2ff0a719a39a36aa9afcb260da47f0289e98be8c (patch) | |
| tree | 1f3a666fe0b6aef03f0837f364224b42c2f3a9b3 | |
| parent | be2fbf063bd88aadea3a7fe95555026c56717f3a (diff) | |
| parent | f632e3b9ad1163491ae28e1ff74086e8eec0864a (diff) | |
| download | pymba-2ff0a719a39a36aa9afcb260da47f0289e98be8c.tar.gz pymba-2ff0a719a39a36aa9afcb260da47f0289e98be8c.zip | |
Merge pull request #75 from PierreRaybaut/patch-1
vimba_frame.getBufferByteData: fixed image size
| -rw-r--r-- | pymba/vimba_frame.py | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/pymba/vimba_frame.py b/pymba/vimba_frame.py index b2b5d35..072aaf8 100644 --- a/pymba/vimba_frame.py +++ b/pymba/vimba_frame.py @@ -159,9 +159,8 @@ class VimbaFrame(object): POINTER(c_ubyte * self.payloadSize)) # make array of c_ubytes from buffer - array = (c_ubyte * int(self.height*self.pixel_bytes) * - int(self.width*self.pixel_bytes)).from_address(addressof( - data.contents)) + imagebytes = int(self.height*self.width*self.pixel_bytes) + array = (c_ubyte*imagebytes).from_address(addressof(data.contents)) return array |
