Summary
Holds a bitmap image.
- Namespace
- Avalonia
.Media .Imaging - Interfaces
- Base Types
-
- object
- Derived Types
graph BT
Type-->Base0["object"]
Type-.->Interface0["IBitmap"]
click Interface0 "/api/Avalonia.Media.Imaging/IBitmap"
Type-.->Interface1["IImage"]
click Interface1 "/api/Avalonia.Media/IImage"
Type-.->Interface2["IDisposable"]
Type["Bitmap"]
class Type type-node
Derived0["RenderTargetBitmap"]-->Type
click Derived0 "/api/Avalonia.Media.Imaging/RenderTargetBitmap"
Derived1["WriteableBitmap"]-->Type
click Derived1 "/api/Avalonia.Media.Imaging/WriteableBitmap"
Syntax
public class Bitmap : IBitmap, IImage, IDisposable
Constructors
Name | Summary |
---|---|
Bitmap |
Initializes a new instance of the Bitmap class.
|
Bitmap |
Initializes a new instance of the Bitmap class.
|
Bitmap |
Initializes a new instance of the Bitmap class.
|
Bitmap |
Initializes a new instance of the Bitmap class.
|
Bitmap |
Initializes a new instance of the Bitmap class.
|
Bitmap |
Initializes a new instance of the Bitmap class.
|
Properties
Name | Value | Summary |
---|---|---|
Dpi | Vector |
Gets the dots per inch (DPI) of the image.
|
PixelSize | PixelSize |
Gets the size of the bitmap, in device pixels.
|
PlatformImpl | IRef |
Gets the platform-specific bitmap implementation.
|
Size | Size |
Gets the size of the image, in device independent pixels.
|
Methods
Name | Value | Summary |
---|---|---|
CreateScaledBitmap |
Bitmap |
Creates a Bitmap scaled to a specified size from the current bitmap.
|
DecodeToHeight |
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.
static
|
DecodeToWidth |
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.
static
|
Dispose |
void | |
Save |
void |
Saves the bitmap to a stream.
|
Save |
void |
Saves the bitmap to a file.
|