我已經tryed這一點,但有例外 - 操作無法的Valide由於對象時,我試圖怎樣的byte []轉換成BitmapFrame C#
return backconvertor(buff);
private BitmapFrame backconvertor(byte[] incomingBuffer)
{
BitmapImage bmpImage = new BitmapImage();
MemoryStream mystream = new MemoryStream(incomingBuffer);
bmpImage.StreamSource = mystream;
BitmapFrame bf = BitmapFrame.Create(bmpImage);
return bf;
}
誤差上漲的當前狀態
在其他功能(BUFF - 準備好了!)
哪一行會拋出異常? –
BitmapFrame bf = BitmapFrame.Create(bmpImage); – curiousity
看看這裏http://imagetools.codeplex.com/ –