how to copy multi-dim Array into IntPtr (or byte[])?

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Kirk Marple

    #1

    how to copy multi-dim Array into IntPtr (or byte[])?

    an external API that we're using is giving me back video data in a
    multi-dimensional Array (not byte[], just System.Array). so, for an HD
    quality video, the data is organized as [3][1280][720] of bytes. i know
    this rather weird, but it's what i have to work with...

    i've been reading thru Array.Copy and other related methods, but nothing
    seems appropriate or efficient.

    i'd rather not have to copy into a big byte[] array and them Marshal.Copy
    that into an allocated IntPtr, but if that's what it takes, i'll have to do
    it.

    my biggest problem is i don't even know how to flatten the multi-dim array
    into a byte[] array. optimally, i'd like to do it into one step into the
    allocated IntPtr from the multi-dim array.

    thanks for any help,
    Kirk


Working...