Hello Tim, thank you for your response. This is the ActiveGige SDK by A&B. The method description only says it returns the 2D array of image buffer values with a return value type Variant (SAFEARRAY).
Thanks, Filippo > Date: Fri, 17 Feb 2017 13:55:39 -0800 > From: Tim Roberts <t...@probo.com> > To: "python-win32@python.org" <python-win32@python.org> > Subject: Re: [python-win32] 2D array from win32com > Message-ID: <61f63573-555b-6d3f-d7b6-b6a8c4f7d...@probo.com> > Content-Type: text/plain; charset="utf-8" > > Filippo Scotti wrote: > > > > I am expecting a 720x480 array (safearray, 1 byte/pixel) from the > > method below from a camera SDK but win32com is returning a byte buffer > > of size 720. Extracting the data from the buffer I can get pixel > > values of only 1 row of pixels and not the entire 2D array. How can I > > get the 2D array? > > Which camera SDK is this? Do you know exactly what this API is > returning? Is it a SAFEARRAY of SAFEARRAYs, or have they cheated by > returning something else? Two dimensional arrays are not trivial in > COM. I write USB camera drivers, and the APIs I've done return the > frames as one large vector. > > -- > Tim Roberts, t...@probo.com > Providenza & Boekelheide, Inc. >
_______________________________________________ python-win32 mailing list python-win32@python.org https://mail.python.org/mailman/listinfo/python-win32