You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on May 1, 2024. It is now read-only.
I'm covert the image as stream and set to the Xamarin.Forms.Image.Source, In button click, am trying to access the same image, but in code behind am getting the image as StreamImagesSource from that I can't able to access to get the stream.
///Added the image to the ImageSource property in Model
Persons.Add(new Person() { Name = "John Smith", Photo = source });
Please helps me to overcome this issue.
Thanks.
The text was updated successfully, but these errors were encountered:
BalasubramaniSundaram
changed the title
[Bug]How to get the path of the image from stream in Xamarin.Forms
[Bug]How to convert StreamImageSource.Stream to image in Xamarin.Forms
Aug 1, 2019
Hi @StephaneDelcroix ,
Thanks, We have already done this solution but it doesn't work in our case. In our case, we get the image source as a bit array from the database, so the image didn't physically present in the application. In that scenario, we couldn't able to use "Xamarin.Forms.Controls" it will through exception.
We have tried a different step to achieve a solution but everything ends up big stumbling with couldn't able to convert "ImageStream" to "ImageSource" at the back end, as we set the image source as a stream.
We expecting for a good solution to overcome this issue, thanks to advance.
I'm covert the image as stream and set to the Xamarin.Forms.Image.Source, In button click, am trying to access the same image, but in code behind am getting the image as StreamImagesSource from that I can't able to access to get the stream.
Assembly _assembly = this.GetType().Assembly;
Stream stream = _assembly.GetManifestResourceStream("DataGrithWithImagePdfExport.Resources.Jk.png");
ImageSource source = ImageSource.FromStream(() => stream);
///Added the image to the ImageSource property in Model
Persons.Add(new Person() { Name = "John Smith", Photo = source });
Please helps me to overcome this issue.
Thanks.
The text was updated successfully, but these errors were encountered: