This article explains you on how to convert image to byte array, stream to byte array, bytearray to stream and load them as image.
Import the SfImageEditor namespace as shown below,
Create a Xamarin application and initialize SfImageEditor control in it. Provide the Source for the image as in the below code snippet.
Use the inbuilt ImageSaving event of the SfImageEditor to get the stream of the image being saved. The stream can be obtained from the ImageSavingEventArgs
Add the corresponding ImageSaving event implementations in the adjacent .xaml.cs file.
The above code snippet obtains the current stream of the image being saved.
To convert the image stream as bytearray, use the stream obtained from the ImageSavingEventArgs from the ImageSaving event as in the below code snippet:
For a better understanding of the conversion of images to streams, streams to bytearray, image to bytearray, bytearray to stream and finally show them as an Image, please refer the below sample link:
|Article ID:||Published Date:||Last Revised Date:||Platform:||Control:|