Interface X11ClipboardComponent.IPngCodec
Png encoding/decoding interface for handling clipboard images.
Namespace: OpenTK.Platform.Native.X11
Assembly: OpenTK.Platform.dll
Syntax
public interface X11ClipboardComponent.IPngCodec
Properties
CanDecodePng
If this X11ClipboardComponent.IPngCodec instance can decode png images.
Declaration
bool CanDecodePng { get; }
Property Value
| Type | Description |
|---|---|
| bool |
See Also
CanEncodePng
If this X11ClipboardComponent.IPngCodec instance can encode png images.
Declaration
bool CanEncodePng { get; }
Property Value
| Type | Description |
|---|---|
| bool |
See Also
Methods
DecodePng(Span<byte>, ILogger?)
Function that decodes png image bytes into a Bitmap.
Declaration
Bitmap? DecodePng(Span<byte> imageData, ILogger? logger)
Parameters
| Type | Name | Description |
|---|---|---|
| Span<byte> | imageData | The png image bytes. This is untrusted data. |
| ILogger | logger | A logger that can be used to write diagnostic messages. |
Returns
| Type | Description |
|---|---|
| Bitmap | The decoded png or null if some error occured |
See Also
EncodePng(Bitmap, ILogger?)
Function that encodes a Bitmap into an array of bytes.
Declaration
byte[]? EncodePng(Bitmap image, ILogger? logger)
Parameters
| Type | Name | Description |
|---|---|---|
| Bitmap | image | The Bitmap instance to encode. |
| ILogger | logger | A logger that can be used to write diagnostic messages. |
Returns
| Type | Description |
|---|---|
| byte[] | The encoded png bytes or null if an error occured. |