WriteableBitmap 构造函数

定义

初始化 WriteableBitmap 类的新实例。

重载

名称 说明
WriteableBitmap(BitmapSource)

使用给定WriteableBitmap的初始化类的新实例BitmapSource

WriteableBitmap(Int32, Int32, Double, Double, PixelFormat, BitmapPalette)

使用指定的参数初始化类的新实例 WriteableBitmap

WriteableBitmap(BitmapSource)

使用给定WriteableBitmap的初始化类的新实例BitmapSource

public:
 WriteableBitmap(System::Windows::Media::Imaging::BitmapSource ^ source);
[System.Security.SecurityCritical]
public WriteableBitmap(System.Windows.Media.Imaging.BitmapSource source);
public WriteableBitmap(System.Windows.Media.Imaging.BitmapSource source);
[<System.Security.SecurityCritical>]
new System.Windows.Media.Imaging.WriteableBitmap : System.Windows.Media.Imaging.BitmapSource -> System.Windows.Media.Imaging.WriteableBitmap
new System.Windows.Media.Imaging.WriteableBitmap : System.Windows.Media.Imaging.BitmapSource -> System.Windows.Media.Imaging.WriteableBitmap
Public Sub New (source As BitmapSource)

参数

source
BitmapSource

BitmapSource用于初始化。

属性

注解

WriteableBitmap(Int32, Int32, Double, Double, PixelFormat, BitmapPalette) 构造函数优先于使用此构造函数。

如果不 source 使用本机支持的位图格式,则为每个帧更新应用格式转换,从而减少性能。

适用于

WriteableBitmap(Int32, Int32, Double, Double, PixelFormat, BitmapPalette)

使用指定的参数初始化类的新实例 WriteableBitmap

public:
 WriteableBitmap(int pixelWidth, int pixelHeight, double dpiX, double dpiY, System::Windows::Media::PixelFormat pixelFormat, System::Windows::Media::Imaging::BitmapPalette ^ palette);
[System.Security.SecurityCritical]
public WriteableBitmap(int pixelWidth, int pixelHeight, double dpiX, double dpiY, System.Windows.Media.PixelFormat pixelFormat, System.Windows.Media.Imaging.BitmapPalette palette);
public WriteableBitmap(int pixelWidth, int pixelHeight, double dpiX, double dpiY, System.Windows.Media.PixelFormat pixelFormat, System.Windows.Media.Imaging.BitmapPalette palette);
[<System.Security.SecurityCritical>]
new System.Windows.Media.Imaging.WriteableBitmap : int * int * double * double * System.Windows.Media.PixelFormat * System.Windows.Media.Imaging.BitmapPalette -> System.Windows.Media.Imaging.WriteableBitmap
new System.Windows.Media.Imaging.WriteableBitmap : int * int * double * double * System.Windows.Media.PixelFormat * System.Windows.Media.Imaging.BitmapPalette -> System.Windows.Media.Imaging.WriteableBitmap
Public Sub New (pixelWidth As Integer, pixelHeight As Integer, dpiX As Double, dpiY As Double, pixelFormat As PixelFormat, palette As BitmapPalette)

参数

pixelWidth
Int32

位图的所需宽度。

pixelHeight
Int32

位图的所需高度。

dpiX
Double

位图的水平点/英寸(dpi)。

dpiY
Double

位图的垂直点/英寸(dpi)。

pixelFormat
PixelFormat

PixelFormat 图。

palette
BitmapPalette

BitmapPalette 图。

属性

注解

的首选值为pixelFormatBgr32Pbgra32。 这些格式原生受支持,不需要格式转换。 其他 pixelFormat 值需要对每个帧更新进行格式转换,从而减少性能。

适用于