We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

How to Load an Image from Gallery in ImageEditor Xamarin.Android

Platform: Xamarin.Android |
Control: SfImageEditor |
Published Date: June 21, 2017 |
Last Revised Date: July 6, 2018

How to Load an Image from Gallery in ImageEditor Xamarin.Android?

This article explains you to load an Image from Gallery to the Image Editor.

 

  1. Create a Xamarin application and initialize SfImageEditor control in it by using the below code.

 

Import the SfImageEditor as shown below,

 

 

 

using Syncfusion.SfImageEditor.Android;

 

 

C#

 

static Intent mainIntent;

private static int SELECT_FROM_GALLERY = 0;

internal static string Path { get; set; }

SfImageEditor editor;

 

protected override void OnCreate(Bundle bundle)

{

    base.OnCreate(bundle);

    editor = new SfImageEditor(this);

    SetContentView(editor);

 

}

 

  1. Load an Image from Gallery to the image editor by call the InitializeMediaPicker method as shown in below.

 

 

C#

 

 

 

 

 

 

 

 

  1. Set the Captured image from Camera to the ImageEditor as Bitmap Only. So you need to set the Bitmap as shown in below

 

ADD COMMENT
You must log in to leave a comment

Please sign in to access our KB

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon