[]
Loads the image from a stream. JPEG, PNG, WEBP, GIF, BMP, TIFF, ICO, JPEG 2000 formats are supported.
public void Load(Stream stream, int frameIndex = 0, Rectangle? imageRect = null)
Public Sub Load(stream As Stream, Optional frameIndex As Integer = 0, Optional imageRect As Rectangle? = Nothing)
Type | Name | Description |
---|---|---|
Stream | stream | The source stream. |
int | frameIndex | Index of an image frame to read, pass 0 for image formats not supporting multiple frames. |
Rectangle? | imageRect | Clipping rectangle of the image to be loaded. |
Loads the image from a file. JPEG, PNG, WEBP, GIF, BMP, TIFF, ICO, JPEG 2000 formats are supported.
public void Load(string path, int frameIndex = 0, Rectangle? imageRect = null)
Public Sub Load(path As String, Optional frameIndex As Integer = 0, Optional imageRect As Rectangle? = Nothing)
Type | Name | Description |
---|---|---|
string | path | The file path to the image. |
int | frameIndex | Index of an image frame to read, pass 0 for image formats not supporting multiple frames. |
Rectangle? | imageRect | Clipping rectangle of the image to be loaded. |
Loads the image from a byte array. JPEG, PNG, WEBP, GIF, BMP, TIFF, ICO, JPEG 2000 formats are supported.
public void Load(byte[] bytes, int frameIndex = 0, Rectangle? imageRect = null)
Public Sub Load(bytes As Byte(), Optional frameIndex As Integer = 0, Optional imageRect As Rectangle? = Nothing)