Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Passing Unmanaged Pointer as Pixels buffer in ImageSharp #88

Closed
ghost opened this issue Jan 21, 2017 · 5 comments
Closed

Passing Unmanaged Pointer as Pixels buffer in ImageSharp #88

ghost opened this issue Jan 21, 2017 · 5 comments

Comments

@ghost
Copy link

ghost commented Jan 21, 2017

Part of Wayland development is that I create a Shared Memory Buffer that is being used between processes and I wanted to eliminate the amount of buffer copying between ImageSharp and Shared Memory Buffer. If implemented, we may actually be able to see a relatively fast User Interface on Linux for C# that is easy to use for everyone.

Can ImageSharp implement a safe api that accepts IntPtr for Argb or other image format pixel buffer? (Width/height/strides can be provided if needed.)

Please and thank you

@BernhardGlueck
Copy link

In addition especially for server side processing, as right now images allocate array on the .NET Heap ( which inevitable end up on the LOH etc.. ) it would be great to use this to store the image data in off heap memory using unsafe operations... maybe introduce a base interface like IPixelStorage with a provider IPixelStorageProvider that allows different strategies to be put int

@antonfirsov
Copy link
Member

antonfirsov commented Jan 22, 2017

We are currently waiting for reliable VS2017 tooling (for C#7 ref returns) and for new official corefx packages for Span<T> and other low level memory management stuff.

I think we could introduce design changes based on these features. 👍 for something like IPixelStorageProvider.

@ghost
Copy link
Author

ghost commented Jan 22, 2017

I see, so it potentially possible that Mono would not be supported in this case. (I don't know if it's still maintained to backport Corefx.)

@JimBobSquarePants
Copy link
Member

No that should be fine. Mono supports NetStandard

https://blog.xamarin.com/net-standard-library-support-for-xamarin/

@antonfirsov
Copy link
Member

For implementations plans see: #565.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants