Table of Contents

Interface IBitmap

Namespace
Splat
Assembly
Splat.Drawing.dll

Defines an interface for a bitmap image that supports retrieving its dimensions and saving the image in a compressed format. Every platform provides FromNative and ToNative methods to convert this object to the platform-specific versions.

public interface IBitmap : IDisposable
Inherited Members
Extension Methods

Remarks

Implementations of this interface provide access to bitmap image data and allow saving the image to a stream in various compressed formats. The interface inherits from IDisposable, so implementations may hold unmanaged resources that should be released when no longer needed.

Properties

Height

Gets the height in pixel units (depending on platform).

float Height { get; }

Property Value

float

Width

Gets the width in pixel units (depending on platform).

float Width { get; }

Property Value

float

Methods

Save(CompressedBitmapFormat, float, Stream)

Saves an image to a target stream.

Task Save(CompressedBitmapFormat format, float quality, Stream target)

Parameters

format CompressedBitmapFormat

The format to save the image in.

quality float

If JPEG is specified, this is a quality factor between 0.0 and 1.0f where 1.0f is the best quality.

target Stream

The target stream to save to.

Returns

Task

A signal indicating the Save has completed.