Reputation: 2783
Is there are way that you can convert Xamarin Forms images to bitmap format (for storing in an SQLite database) without having to write the code twice for iOS and Android individually?
Upvotes: 0
Views: 2619
Reputation: 1109
There are several libraries available for image loading and conversion.
You could use DevKit.Xamarin.ImageKit it's a light weight library it has implementation for each platforms
like for Android it will return Bitmap
, for iOS it will return UIImage
from byte[]
and for UWP
it returns a WriteableBitmap
from byte[]
Or, more sophisticated library like Fast & Furious Image Loading It supports built in caching and transformation.
Upvotes: 1