Barney Chambers
Barney Chambers

Reputation: 2783

Xamarin Forms - Convert Image to Bitmap without using Native (iOS/Android) code

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

Answers (1)

Fahadsk
Fahadsk

Reputation: 1109

There are several libraries available for image loading and conversion.

  • You could use Splat, a simple light weight library for cross platform 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

Related Questions