I have a class like this:
class person
{
public string Name{get;set;}
public byte[] PersonImage{get;set;}
}
When I Load my Person From DataBase I want to show PersonImage in a Image control, so I want to create BitmapImage from my byte[]:
var bitmapImage = new BitmapImage();
bitmapImage.BeginInit();
var filestream = new MemoryStream(PersonImage);
bitmapImage.StreamSource = filestream;
bitmapImage.EndInit();// I have Exception in this line
My Exception is:
No imaging component suitable to complete this operation was found.
--edite my Inner Exception is :
Inner Exception:Exception from HRESULT:0*88982F50