Saxonite 1.2.11.3. Sandtrap.
This commit is contained in:
@@ -0,0 +1,25 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Text;
|
||||
using Xamarin.Forms;
|
||||
|
||||
namespace Sarand.Net.Mobile.Xamarin.Utils
|
||||
{
|
||||
//=======================================================================
|
||||
public static class SacsImageUtils
|
||||
{
|
||||
//-------------------------------------------------------------------
|
||||
/// <summary>
|
||||
/// Method that uses the ImageConverter object in .Net Framework to convert a byte array,
|
||||
/// presumably containing a JPEG or PNG file image, into an ImageSource.
|
||||
/// </summary>
|
||||
public static ImageSource GetImageFromByteArray (byte[] imageAsBytes)
|
||||
{
|
||||
return ImageSource.FromStream(() => new MemoryStream(imageAsBytes));
|
||||
}
|
||||
|
||||
//-------------------------------------------------------------------
|
||||
}
|
||||
//=======================================================================
|
||||
}
|
||||
Reference in New Issue
Block a user