Replies: 2 comments 5 replies
-
No it doesn’t. We have no dependencies. |
Beta Was this translation helpful? Give feedback.
-
Pitch (aka. stride) is a concept ImageSharp memory model doesn't support currently. Discontiguous memory means something else for us: different parts of the image may live on completely different memory locations, allocated separately. Implementing stride would require a non-trivial amount of work involving a lot of refactoring. Unless there is high interest, it's unlikely the core team will get to it. Personally, I would be fine with a community contribution. I recommend to edit the title ( |
Beta Was this translation helpful? Give feedback.
-
I have pipeline in my performance crucial app module which avoids not only unnecessary allocations but also unnecessary memory copying. But i also have to save images on disk when it is requested, so i have to encode them before it, but Encoder only accepts Image as input, so i need to convert my raw TPixel data to image, i can use Image.WrapMemory, but it handles only continuous memory, but i'm using crop which also avoids copying by utilizing CommunityToolkit.HighPerformance Span2D which have Slice method and produces discontinuous memory area, and i can't use it's data without copy to some new instance of Image and therefore i can't encode it and save to disc. So i need some kind of Image.WrapMemory overload which accepts something like pitch as it is in Span2D (void*) constructor
Beta Was this translation helpful? Give feedback.
All reactions