F
frankh
With Marshal you can copy data from a one-dimensional array to
BitmapData.Scan0.
What do I do if my array is two-dimensional?
Or, alternatively, can I create somehow two variables
byte[] arr1; // size 480*640
byte[,] arr2; // size [480,640]
which are references to the same memory block and allow me to access it
at will with one or two indices, e.g. arr1[640] or arr2[1,0]?
I tried to assign arr2[0,0] to Scan0 to avoid copying at all, but it
didn't work.
BitmapData.Scan0.
What do I do if my array is two-dimensional?
Or, alternatively, can I create somehow two variables
byte[] arr1; // size 480*640
byte[,] arr2; // size [480,640]
which are references to the same memory block and allow me to access it
at will with one or two indices, e.g. arr1[640] or arr2[1,0]?
I tried to assign arr2[0,0] to Scan0 to avoid copying at all, but it
didn't work.