PeachImage
PeachImage.Image
Image.Load Method
| Overloads | |
|---|---|
| Load(string, DecoderOptions) | Loads an image from path, auto-detecting its format. |
| Load(Stream, DecoderOptions) | Loads an image from stream, auto-detecting its format by sniffing its header bytes. |
| Load(ReadOnlySpan<byte>, DecoderOptions) | Loads an image from an in-memory buffer, auto-detecting its format by sniffing its header bytes. Decodes directly from data’s pinned memory via System.IO.UnmanagedMemoryStream — no intermediate copy, unlike wrapping a System.IO.MemoryStream around data.ToArray(). |
Image.Load(string, DecoderOptions) Method
Loads an image from path, auto-detecting its format.
public static PeachImage.Image Load(string path, PeachImage.DecoderOptions? options=null);
Parameters
path System.String
options DecoderOptions
Returns
Image.Load(Stream, DecoderOptions) Method
Loads an image from stream, auto-detecting its format by sniffing its header bytes.
public static PeachImage.Image Load(System.IO.Stream stream, PeachImage.DecoderOptions? options=null);
Parameters
stream System.IO.Stream
options DecoderOptions
Returns
Image.Load(ReadOnlySpan<byte>, DecoderOptions) Method
Loads an image from an in-memory buffer, auto-detecting its format by sniffing its header bytes.
Decodes directly from data’s pinned memory via System.IO.UnmanagedMemoryStream
— no intermediate copy, unlike wrapping a System.IO.MemoryStream around data.ToArray().
public static PeachImage.Image Load(System.ReadOnlySpan<byte> data, PeachImage.DecoderOptions? options=null);
Parameters
data System.ReadOnlySpan<System.Byte>
options DecoderOptions