SkiaImage Class
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.
Represents an image implementation using SkiaSharp.
public ref class SkiaImage : IDisposable, Microsoft::Maui::Graphics::IImage
public class SkiaImage : IDisposable, Microsoft.Maui.Graphics.IImage
type SkiaImage = class
interface IImage
interface IDrawable
interface IDisposable
Public Class SkiaImage
Implements IDisposable, IImage
- Inheritance
-
SkiaImage
- Implements
Constructors
| SkiaImage(SKBitmap) |
Initializes a new instance of the SkiaImage class with the specified SkiaSharp bitmap. |
Properties
| Height |
Gets the height of the image in pixels. |
| PlatformRepresentation |
Gets the underlying SkiaSharp bitmap that this image wraps. |
| Width |
Gets the width of the image in pixels. |
Methods
| Dispose() |
Releases all resources used by this image. |
| Downsize(Single, Boolean) |
Creates a new image by downsizing this image to fit within the specified maximum dimension. |
| Downsize(Single, Single, Boolean) |
Creates a new image by downsizing this image to fit within the specified maximum dimensions. |
| Draw(ICanvas, RectF) |
Draws this image on the specified canvas within the specified rectangle. |
| FromStream(Stream, ImageFormat) |
Creates a new image from a stream. |
| Resize(Single, Single, ResizeMode, Boolean) |
Creates a new image by resizing this image to the specified dimensions. |
| 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 image from 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. |