在WPF中将RenderTargetBitmap转换为BitmapImage

时间:2010-07-29 10:35:18

标签: wpf

  

可能重复:
  Convert RenderTargetBitmap to BitmapImage

我需要执行转换RenderTargetBitmap - > BitmapImage的。这样做的方法是什么?

提前谢谢!

干杯

1 个答案:

答案 0 :(得分:1)

BitmapImage和RenderTargetBitmap都直接从BitmapSource继承。 BitmapImage通过BitmapSource提供的功能只是为了便于从URI加载。我想不出你需要一个BitmapImage而不是BitmapSource(RenderTargetBitmap已经是)之后你已经加载/渲染图像的任何场景。

你具体想做什么?