Table of Contents

Method TryGetEncodedData

Namespace
MaaFramework.Binding.Buffers
Assembly
MaaFramework.Binding.dll

TryGetEncodedData(out byte[])

Gets the image encoded data from a MaaImageBuffer.

bool TryGetEncodedData(out byte[] data)

Parameters

data byte[]

The image data (PNG).

Returns

bool

true if the image encoded data was got successfully; otherwise, false.

TryGetEncodedData(out Stream)

Gets the image encoded data from a MaaImageBuffer.

bool TryGetEncodedData(out Stream data)

Parameters

data Stream

The image data (PNG).

Returns

bool

true if the image encoded data was got successfully; otherwise, false.

Remarks

Avoids disposing MaaFramework.Binding.Buffers.IMaaImageBuffer before the stream is read.

TryGetEncodedData(out ReadOnlySpan<byte>)

Gets the image encoded data from a MaaImageBuffer.

bool TryGetEncodedData(out ReadOnlySpan<byte> data)

Parameters

data ReadOnlySpan<byte>

The image data (PNG).

Returns

bool

true if the image encoded data was got successfully; otherwise, false.

Remarks

Avoids disposing MaaFramework.Binding.Buffers.IMaaImageBuffer before the span is read.