I am trying to convert byte array, which contains image description to bitmapimage
but I got an error: "Additional information: No imaging component suitable to complete this operation was found."
My code is:
public BitmapImage ImageData
{
get
{
BitmapImage btm;
using (MemoryStream ms = new MemoryStream(mSpaceObject.ImageData))
{
btm = new BitmapImage();
btm.BeginInit();
btm.StreamSource = ms;
btm.CacheOption = BitmapCacheOption.OnLoad;
btm.EndInit();
btm.Freeze();
}
return btm;
}
}