Export (0) Print
Expand All

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

Initializes a new instance of the WriteableBitmap class with the specified parameters.

Namespace:  System.Windows.Media.Imaging
Assembly:  PresentationCore (in PresentationCore.dll)

public WriteableBitmap(
	int pixelWidth,
	int pixelHeight,
	double dpiX,
	double dpiY,
	PixelFormat pixelFormat,
	BitmapPalette palette
)

Parameters

pixelWidth
Type: System.Int32

The desired width of the bitmap.

pixelHeight
Type: System.Int32

The desired height of the bitmap.

dpiX
Type: System.Double

The horizontal dots per inch (dpi) of the bitmap.

dpiY
Type: System.Double

The vertical dots per inch (dpi) of the bitmap.

pixelFormat
Type: System.Windows.Media.PixelFormat

The PixelFormat of the bitmap.

palette
Type: System.Windows.Media.Imaging.BitmapPalette

The BitmapPalette of the bitmap.

The preferred values for pixelFormat are Bgr32 and Pbgra32. These formats are natively supported and do not require a format conversion. Other pixelFormat values require a format conversion for each frame update, which reduces performance.

.NET Framework

Supported in: 4.6, 4.5, 4, 3.5, 3.0

.NET Framework Client Profile

Supported in: 4, 3.5 SP1

Show:
© 2015 Microsoft