WriteableBitmap Konstruktoren

Definition

Initialisiert eine neue Instanz der WriteableBitmap-Klasse.

Überlädt

WriteableBitmap(BitmapSource)

Initialisiert eine neue Instanz der WriteableBitmap-Klasse mit dem angegebenen BitmapSource.

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

Initialisiert eine neue Instanz der WriteableBitmap-Klasse mit den angegebenen Parametern.

WriteableBitmap(BitmapSource)

Initialisiert eine neue Instanz der WriteableBitmap-Klasse mit dem angegebenen 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)

Parameter

source
BitmapSource

Die für die Initialisierung zu verwendende BitmapSource.

Attribute

Hinweise

Der WriteableBitmap(Int32, Int32, Double, Double, PixelFormat, BitmapPalette) Konstruktor wird bevorzugt, um diesen Konstruktor zu verwenden.

Wenn source kein systemeigenes Bitmapformat verwendet wird, werden Formatkonvertierungen für jedes Frameupdate angewendet, wodurch die Leistung verringert wird.

Gilt für

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

Initialisiert eine neue Instanz der WriteableBitmap-Klasse mit den angegebenen Parametern.

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)

Parameter

pixelWidth
Int32

Die gewünschte Breite der Bitmap.

pixelHeight
Int32

Die gewünschte Höhe der Bitmap.

dpiX
Double

Die horizontalen Punkte pro Zoll (dpi) der Bitmap.

dpiY
Double

Die vertikalen Punkte pro Zoll (dpi) der Bitmap.

pixelFormat
PixelFormat

Das PixelFormat der Bitmap.

palette
BitmapPalette

Das BitmapPalette der Bitmap.

Attribute

Hinweise

Die bevorzugten Werte für pixelFormat sind Bgr32 und Pbgra32. Diese Formate werden systemeigenen unterstützt und benötigen keine Formatkonvertierung. Andere pixelFormat Werte erfordern eine Formatkonvertierung für jedes Frameupdate, wodurch die Leistung reduziert wird.

Gilt für