Method TryGetEncodedData
- Namespace
- MaaFramework.Binding.Buffers
- Assembly
- MaaFramework.Binding.Native.dll
TryGetEncodedData(out byte[])
Gets the image encoded data from a MaaImageBuffer.
public bool TryGetEncodedData(out byte[] data)
Parameters
data
byte[]-
The image data (PNG).
Returns
TryGetEncodedData(out Stream)
Gets the image encoded data from a MaaImageBuffer.
public bool TryGetEncodedData(out Stream data)
Parameters
data
Stream-
The image data (PNG).
Returns
Remarks
Avoids disposing MaaFramework.Binding.Buffers.IMaaImageBuffer before the stream is read.
TryGetEncodedData(out ReadOnlySpan<byte>)
Gets the image encoded data from a MaaImageBuffer.
public bool TryGetEncodedData(out ReadOnlySpan<byte> data)
Parameters
data
ReadOnlySpan<byte>-
The image data (PNG).
Returns
Remarks
Avoids disposing MaaFramework.Binding.Buffers.IMaaImageBuffer before the span is read.
TryGetEncodedData(nint, out byte[])
Gets the image encoded data from a MaaImageBuffer.
public static bool TryGetEncodedData(nint handle, out byte[] data)
Parameters
Returns
TryGetEncodedData(nint, out Stream)
Gets the image encoded data from a MaaImageBuffer.
public static bool TryGetEncodedData(nint handle, out Stream data)
Parameters
Returns
Remarks
Avoids disposing MaaFramework.Binding.Buffers.IMaaImageBuffer before the stream is read.
TryGetEncodedData(nint, out ReadOnlySpan<byte>)
Gets the image encoded data from a MaaImageBuffer.
public static bool TryGetEncodedData(nint handle, out ReadOnlySpan<byte> data)
Parameters
handle
nint-
The MaaImageBufferHandle.
data
ReadOnlySpan<byte>-
The image data (PNG).
Returns
Remarks
Avoids disposing MaaFramework.Binding.Buffers.IMaaImageBuffer before the span is read.
TryGetEncodedData(nint, out nint, out ulong)
Gets the image encoded data from a MaaImageBuffer.
public static bool TryGetEncodedData(nint handle, out nint data, out ulong size)
Parameters
Returns
TryGetEncodedData(out byte[], Func<nint, bool>)
Gets the image encoded data from a function using MaaRectBuffer.
public static bool TryGetEncodedData(out byte[] data, Func<nint, bool> writeBuffer)
Parameters
data
byte[]-
The image data (PNG).
writeBuffer
Func<nint, bool>-
The function used to write the data to the buffer.