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
databyte[]-
The image data (PNG).
Returns
TryGetEncodedData(out Stream)
Gets the image encoded data from a MaaImageBuffer.
public bool TryGetEncodedData(out Stream data)Parameters
dataStream-
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
dataReadOnlySpan<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
handlenint-
The MaaImageBufferHandle.
dataReadOnlySpan<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
databyte[]-
The image data (PNG).
writeBufferFunc<nint, bool>-
The function used to write the data to the buffer.