我有一個RenderTargetBitmap
,我需要將其轉換爲BitmapImage
。請檢查下面的代碼。轉換RenderTargetBitmap到BitmapImage的
RenderTargetBitmap bitMap = getRenderTargetBitmap();
Image image = new Image();// This is a Image
image.Source = bitMap;
在上面的代碼中我使用了Image.Now,我需要使用BitmapImage。我怎樣才能做到這一點?
RenderTargetBitmap bitMap = getRenderTargetBitmap();
BitmapImage image = new BitmapImage();// This is a BitmapImage
// how to set bitMap as source of BitmapImage ?
喬治,我需要將RenderTargetBitmap轉換爲BitmapImage。 – sharmila
可能重複:[RenderTargetBitmap到的BitmapImage在WPF(http://stackoverflow.com/questions/3361579/rendertargetbitmap-to-bitmapimage-in-wpf) – khellang
類似的東西:http://msdn.microsoft.com/en -us/library/aa969819.aspx – GeorgesD