WriteableBitmap Class

Summary

Holds a writeable bitmap image.
Namespace
Avalonia.Media.Imaging
Interfaces
Base Types
graph BT Type-->Base0["Bitmap"] click Base0 "/api/Avalonia.Media.Imaging/Bitmap" Base0-->Base1["object"] Type-.->Interface0["IBitmap"] click Interface0 "/api/Avalonia.Media.Imaging/IBitmap" Type-.->Interface1["IImage"] click Interface1 "/api/Avalonia.Media/IImage" Type-.->Interface2["IDisposable"] Type["WriteableBitmap"] class Type type-node

Syntax

public class WriteableBitmap : Bitmap, IBitmap, IImage, IDisposable

Constructors

Name Summary
WriteableBitmap(PixelSize, Vector, PixelFormat, AlphaFormat) Initializes a new instance of the WriteableBitmap class.
WriteableBitmap(PixelSize, Vector, PixelFormat?) Initializes a new instance of the WriteableBitmap class.

Properties

Name Value Summary
Dpi Vector
Gets the dots per inch (DPI) of the image.
Inherited from Bitmap
PixelSize PixelSize
Gets the size of the bitmap, in device pixels.
Inherited from Bitmap
PlatformImpl IRef<IBitmapImpl>
Gets the platform-specific bitmap implementation.
Inherited from Bitmap
Size Size
Gets the size of the image, in device independent pixels.
Inherited from Bitmap

Methods

Name Value Summary
CreateScaledBitmap(PixelSize, BitmapInterpolationMode) Bitmap
Creates a Bitmap scaled to a specified size from the current bitmap.
Inherited from Bitmap
DecodeToHeight(Stream, int, BitmapInterpolationMode) Bitmap
Loads a Bitmap from a stream and decodes at the desired height. Aspect ratio is maintained. This is more efficient than loading and then resizing.
Inherited from Bitmap
static
DecodeToWidth(Stream, int, BitmapInterpolationMode) Bitmap
Loads a Bitmap from a stream and decodes at the desired width. Aspect ratio is maintained. This is more efficient than loading and then resizing.
Inherited from Bitmap
static
Dispose() void
Inherited from Bitmap
Lock() ILockedFramebuffer
Save(Stream) void
Saves the bitmap to a stream.
Inherited from Bitmap
Save(string) void
Saves the bitmap to a file.
Inherited from Bitmap