2012-01-02 72 views

回答

2

如果圖像源是你可以使用這個項目..

var uri = new Uri("/ReferencedAssembly;component/default.png", UriKind.Relative); 
var streamInfo = System.Windows.Application.GetResourceStream(uri); 
var stream = streamInfo.Stream; 

流轉換爲字節數組..

,如果圖像是一個其他位置

Using httpwebrequest to get image from website to byte[]

關注

+0

該圖像是從數據庫是var二進制(最大)類型。 – 2012-01-02 07:39:15

+0

你想要保存圖像到數據庫的字節[]? – 2012-01-02 07:44:44

+0

是的..首先我必須轉換它然後字節[]必須插入分貝.. – 2012-01-02 08:45:45

相關問題