WriteableBitmap Konstruktoren
Definition
Wichtig
Einige Informationen beziehen sich auf Vorabversionen, die vor dem Release ggf. grundlegend überarbeitet werden. Microsoft übernimmt hinsichtlich der hier bereitgestellten Informationen keine Gewährleistungen, seien sie ausdrücklich oder konkludent.
Initialisiert eine neue Instanz der WriteableBitmap-Klasse.
Überlädt
| Name | Beschreibung |
|---|---|
| WriteableBitmap(BitmapSource) |
Initialisiert eine neue Instanz der Klasse mithilfe der WriteableBitmap 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 Klasse mithilfe der WriteableBitmap 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
Der BitmapSource für die Initialisierung zu verwendende Code.
- Attribute
Hinweise
Der WriteableBitmap(Int32, Int32, Double, Double, PixelFormat, BitmapPalette) Konstruktor wird gegenüber der Verwendung dieses Konstruktors bevorzugt.
Wenn source kein systemeigenes unterstütztes Bitmapformat verwendet wird, werden Formatkonvertierungen für jedes Frameupdate angewendet, wodurch die Leistung reduziert 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
Die PixelFormat Bitmap.
- palette
- BitmapPalette
Die BitmapPalette Bitmap.
- Attribute
Hinweise
Die bevorzugten Werte sind pixelFormatBgr32 und Pbgra32. Diese Formate werden nativ unterstützt und erfordern keine Formatkonvertierung. Andere pixelFormat Werte erfordern eine Formatkonvertierung für jede Frameaktualisierung, wodurch die Leistung reduziert wird.