When I tried to transform byte[] into BitmapImage, at the step bitmap.EndInit() it threw the IOException: unable to read from the source.
Following is the code:
BitmapImage bitmap = new BitmapImage(); bitmap.BeginInit(); bitmap.StreamSource = new MemoryStream(bytes); bitmap.EndInit();What happened, how can I solve it.