Update existing image from byte array with raw image data #1682
-
Is it possible to update/mutate Image instance with a pixel data from a byte array? My use case is that I fetch raw byte array with pixels from OpenGL and need to draw them as an Image, that will be almost immediately discarded. As I know, you use a lot of memory allocation optimization and etc, but in my specific example here maybe it is possible just to update an existing image instead? Thanks! |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
Yep. That's something a few people have asked for over the years. var memory = new Memory<Rgba32>(array);
using Image<Rgba32> image = Image.WrapMemory(memory, width, height); |
Beta Was this translation helpful? Give feedback.
Yep. That's something a few people have asked for over the years.
Image.WrapMemory