Difference between a BitmapFrame and BitmapImage in WPF

前端 未结 3 1504
情话喂你
情话喂你 2021-02-13 22:03

What is the difference between a BitmapFrame and BitmapImage in WPF? Where would you use each (ie. why would you use a BitmapFrame rather than a BitmapImage?)

3条回答
  •  滥情空心
    2021-02-13 22:06

    BitmapFrame is a low level primitive for image manipulation. It is usually used when you want to encode/decode some image from one format to another.

    BitmapImage is more high level abstraction that has some neat data-binding properties (UriSource, etc).

    If you are just displaying images and want some fine tuning BitmapImage is what you need.

    If you are doing low level image manipulation then you will need BitmapFrame.

提交回复
热议问题