Class SkiaHelper
Class SkiaHelper.
Inherited Members
Namespace: VisioForge.Core.Helpers
Assembly: VisioForge.Core.dll
Syntax
public static class SkiaHelper
Methods
ByteArrayRGBAToSKBitmap(byte[], int, int)
Converts the RGBA byte array to SKBitmap.
Declaration
public static SKBitmap ByteArrayRGBAToSKBitmap(byte[] frame, int width, int height)
Parameters
| Type | Name | Description |
|---|---|---|
| byte[] | frame | The frame. |
| int | width | The width. |
| int | height | The height. |
Returns
| Type | Description |
|---|---|
| SKBitmap | SKBitmap. |
ByteArrayRGBToSKBitmap(byte[], int, int)
Converts the RGB byte array to SKBitmap.
Declaration
public static SKBitmap ByteArrayRGBToSKBitmap(byte[] frame, int width, int height)
Parameters
| Type | Name | Description |
|---|---|---|
| byte[] | frame | The frame. |
| int | width | The width. |
| int | height | The height. |
Returns
| Type | Description |
|---|---|
| SKBitmap | SKBitmap. |
FlipHorizontal(SKBitmap)
Horizontal flip.
Declaration
public static SKBitmap FlipHorizontal(this SKBitmap bmp)
Parameters
| Type | Name | Description |
|---|---|---|
| SKBitmap | bmp | The bitmap. |
Returns
| Type | Description |
|---|---|
| SKBitmap | SKBitmap. |
FlipVertical(SKBitmap)
Vertical flip.
Declaration
public static SKBitmap FlipVertical(this SKBitmap bmp)
Parameters
| Type | Name | Description |
|---|---|---|
| SKBitmap | bmp | The bitmap. |
Returns
| Type | Description |
|---|---|
| SKBitmap | SKBitmap. |
RGBAToSKBitmap(nint, int, int)
Converts the RGBA frame to SKBitmap.
Declaration
public static SKBitmap RGBAToSKBitmap(nint data, int width, int height)
Parameters
| Type | Name | Description |
|---|---|---|
| nint | data | The data. |
| int | width | The width. |
| int | height | The height. |
Returns
| Type | Description |
|---|---|
| SKBitmap | SKBitmap. |
Rotate(SKBitmap, SKRotationAngle)
Declaration
public static SKBitmap Rotate(this SKBitmap originalBitmap, SKRotationAngle rotation)
Parameters
| Type | Name | Description |
|---|---|---|
| SKBitmap | originalBitmap | |
| SKRotationAngle | rotation |
Returns
| Type | Description |
|---|---|
| SKBitmap |
SaveToFile(SKBitmap, string, SKEncodedImageFormat, int)
Saves to file.
Declaration
public static void SaveToFile(this SKBitmap bitmap, string filename, SKEncodedImageFormat format = SKEncodedImageFormat.Png, int quality = 85)
Parameters
| Type | Name | Description |
|---|---|---|
| SKBitmap | bitmap | The bitmap. |
| string | filename | The filename. |
| SKEncodedImageFormat | format | The format. |
| int | quality | The quality. |
ToARGB(SKBitmap, out int)
Converts to ARGB array.
Declaration
public static nint ToARGB(this SKBitmap bitmap, out int length)
Parameters
| Type | Name | Description |
|---|---|---|
| SKBitmap | bitmap | The bitmap. |
| int | length | The length. |
Returns
| Type | Description |
|---|---|
| nint | IntPtr. |
ToColor(SKColor)
Converts color.
Declaration
public static Color ToColor(this SKColor color)
Parameters
| Type | Name | Description |
|---|---|---|
| SKColor | color | The color. |
Returns
| Type | Description |
|---|---|
| Color | System.Drawing.Color. |
ToSKColor(Color)
Converts color.
Declaration
public static SKColor ToSKColor(this Color color)
Parameters
| Type | Name | Description |
|---|---|---|
| Color | color | The color. |
Returns
| Type | Description |
|---|---|
| SKColor | SKColor. |
VideoFrameBGRAToSKBitmap(VideoFrameX)
Converts the BGRA frame to SKBitmap.
Declaration
public static SKBitmap VideoFrameBGRAToSKBitmap(this VideoFrameX frame)
Parameters
| Type | Name | Description |
|---|---|---|
| VideoFrameX | frame | The frame. |
Returns
| Type | Description |
|---|---|
| SKBitmap | SKBitmap. |
VideoFrameRGBAToSKBitmap(VideoFrame)
Converts the RGBA frame to SKBitmap.
Declaration
public static SKBitmap VideoFrameRGBAToSKBitmap(this VideoFrame frame)
Parameters
| Type | Name | Description |
|---|---|---|
| VideoFrame | frame | The frame. |
Returns
| Type | Description |
|---|---|
| SKBitmap | SKBitmap. |
VideoFrameRGBAToSKBitmap(VideoFrameX)
Converts the RGBA frame to SKBitmap.
Declaration
public static SKBitmap VideoFrameRGBAToSKBitmap(this VideoFrameX frame)
Parameters
| Type | Name | Description |
|---|---|---|
| VideoFrameX | frame | The frame. |
Returns
| Type | Description |
|---|---|
| SKBitmap | SKBitmap. |
VideoFrameRGBToSKBitmap(VideoFrameX)
Converts the RGB frame to SKBitmap.
Declaration
public static SKBitmap VideoFrameRGBToSKBitmap(this VideoFrameX frame)
Parameters
| Type | Name | Description |
|---|---|---|
| VideoFrameX | frame | The frame. |
Returns
| Type | Description |
|---|---|
| SKBitmap | SKBitmap. |