Microsoft.Maui.Graphics
Microsoft.Maui.Graphics copied to clipboard
[Enhancement] Cross-platform image load/save APIs
While it's possible to use GraphicsService.LoadImageFromStream
to load images from a variety of sources (local files, embedded files etc.), it seems to involve writing platform code if the image isn't an embedded resource. Ditto for IImage.Save
.
For MAUI usage, a fully cross-platform image load/save API would be beneficial so that you could load/save an image from/to a known location, without having to resort to platform code.
While it's possible to use GraphicsService.LoadImageFromStream to load images from a variety of sources (local files, embedded files etc.), it seems to involve writing platform code
So you have a valid stream but it doesn't work. So this is a bug report about GraphicsService.LoadImageFromStream?
@davidbritch I'm not sure what the issue/ask is. Loading images from a Stream seems (to me) to be the most cross platform approach to take. Are you looking for extension methods that hides file management as well?
Yes. I'm just looking at it purely from a perspective of usage in MAUI.
Post in https://github.com/dotnet/maui instead? The similarity in naming of the repos is unfortunate!