BitmapImage bm = new BitmapImage(new Uri("/Assets/ToolKit.Content/RedIcon/arab-woman.jpg", UriKind.RelativeOrAbsolute));
using (MemoryStream ms = new MemoryStream())
{
WriteableBitmap btmMap = new WriteableBitmap(bm);
System.Windows.Media.Imaging.Extensions.SaveJpeg(btmMap, ms, bm.PixelWidth, bm.PixelHeight, 0, 100);
bm = null;
byte[] a = ms.ToArray();
}
I am using this code but it showing error I cannot convert to WriteableBitmap
.