IImage Interface
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Defines an interface for an image that can be drawn onto a canvas and manipulated.
public interface class IImage : IDisposable, Microsoft::Maui::Graphics::IDrawable
public interface IImage : IDisposable, Microsoft.Maui.Graphics.IDrawable
type IImage = interface
interface IDrawable
interface IDisposable
Public Interface IImage
Implements IDisposable, IDrawable
- Derived
- Implements
Properties
Height |
Gets the height of the image in pixels. |
Width |
Gets the width of the image in pixels. |
Methods
Downsize(Single, Boolean) |
Creates a downsized version of the image with the same aspect ratio. |
Downsize(Single, Single, Boolean) |
Creates a downsized version of the image that fits within the specified dimensions. |
Draw(ICanvas, RectF) |
Draws the content onto the specified canvas within the given rectangle. (Inherited from IDrawable) |
Resize(Single, Single, ResizeMode, Boolean) |
Resizes the image to the specified dimensions using the specified resize mode. |
Save(Stream, ImageFormat, Single) |
Saves the image to a stream in the specified format. |
SaveAsync(Stream, ImageFormat, Single) |
Asynchronously saves the image to a stream in the specified format. |
ToPlatformImage() |
Creates a platform-specific representation of this image. |
Extension Methods
AsBase64(IImage, ImageFormat, Single) | |
AsBytes(IImage, ImageFormat, Single) |
Converts an image to a byte array in the specified format. |
AsBytesAsync(IImage, ImageFormat, Single) | |
AsPaint(IImage) | |
AsStream(IImage, ImageFormat, Single) |
Converts an image to a stream in the specified format. |