Repository navigation
Image<TPixel>.TryGetSinglePixelSpan(out Span<TPixel>) doesn't hint towards when it will work. When will it work? #1307
|
Questions:
|
Replies: 2 comments 8 replies
Currently the limit is
foreach (Memory<Rgba32> memory in image.GetPixelMemoryGroup())
{
// Take pixel data from memory.Span
}PS: |
|
@alistaircarscadden @ThomasMiz @Veriara and others interested in contiguous image buffers: Despite my promise of not going below 16 Rgba32 Megapixels, we are about to radically reduce the default contiguous buffer size in our next release. This seems to be necessary in order to optimize memory management for common use cases. We are about to provide an easy workaround to setup higher contiguous minimum for interop scenarios: |
Currently the limit is
int.MaxValue / 4 byteswhich is around 134Rgba32megapixels. We may decide to lower this value, but it we won't go below 16 Megapixels, to not break people working with images that need to fit on screen.PS:
These questions made me to consider exposing methods like
image.CopyPixelDataTo(Span<TPixel>)and maybe evenimage.CopyPixelDataTo(Stream). Is t…