WriteableBitmap을 바이트 배열로 변환하는 방법이 있습니까? writeablebitmap을 System.Windows.Controls.Image 소스에 할당하는 방법도 있습니다. 나는 이것을 시도했지만 FromHBitmap에 일반적인 GDI 예외가있다.WPF WriteableBitmap을 바이트 배열
System.Drawing.Image img = System.Drawing.Image.FromHbitmap(wb.BackBuffer);
MemoryStream ms = new MemoryStream();
img.Save(ms, System.Drawing.Imaging.ImageFormat.Png);
myarray = ms.ToArray();
코드의 WriteableBitmap은 어디에 있습니까? – thumbmunkeys
클래스 범위에서 선언되었지만 더 이해하기 위해 편집했습니다. – shady
데이터를 BackBuffer로 변경 했으므로 더 의미가 있습니다 – thumbmunkeys