Replies: 1 comment
-
|
I've just opened #3066 which will address this by adding overloads for |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hello, all. I am hoping to use ImageSharp to replace the .NET Bitmap in my NDI application. Currently, the NDI videoframe is updated by passing the nint buffer to the .NET Bitmap's constructor and then modifying the Bitmap/Graphic instance as required.
_bitmap = new Bitmap(_videoFrame.Width, _videoFrame.Height, _videoFrame.Stride, System.Drawing.Imaging.PixelFormat.Format32bppPArgb, _videoFrame.BufferPtr);I am able to save the Image instance to a memorystream/byte array and then import the data into a .NET Bitmap and draw it on the videoframe's graphic, but that solution won't scale well when I start sending a 30fps video stream.
I attempted to eliminate the .NET Bitmap step by writing the Image's data to the nint buffer directly, but the videoframe doesn't change and no exceptions are thrown.
Marshal.Copy(imageData, 0, frame.BufferPtr, imageData.Length);I don't have much experience with unmanaged resources, so any advice would be greatly appreciated. Thanks.
Beta Was this translation helpful? Give feedback.
All reactions