stride

Why does BitmapSource.Create throw an ArgumentException?

I'm trying to get an bitmap created from raw data to show in WPF, by using an Image and a BitmapSource: Int32[] data = new Int32[RenderHeight * RenderWidth]; for (Int32 i = 0; i < RenderHeight; i++) { for (Int32 j = 0; j < RenderWidth; j++) { Int32 index = j + (i * RenderHeight); if (i + j % 2 == 0) ...

It is possible to get an IntPtr from an int[] array?

Greetings. In C#: If I have an int[] array declared like this int[] array = new array[size]; there is an way to get the IntPtr from this array? The thing is that I'm using the EmguCV framework, and there is an constructor to create an image which takes an IntPtr to the pixel data, in order to build an image from an array (int[]). I...