Table of Contents

Method TrySetEncodedData

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

TrySetEncodedData(byte[])

Sets the image encoded data to a MaaImageBuffer.

public bool TrySetEncodedData(byte[] data)

Parameters

data byte[]

The image data (PNG).

Returns

bool

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

TrySetEncodedData(Stream)

Sets the image encoded data to a MaaImageBuffer.

public bool TrySetEncodedData(Stream data)

Parameters

data Stream

The image data (PNG).

Returns

bool

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

TrySetEncodedData(ReadOnlySpan<byte>)

Sets the image encoded data to a MaaImageBuffer.

public bool TrySetEncodedData(ReadOnlySpan<byte> data)

Parameters

data ReadOnlySpan<byte>

The image data (PNG).

Returns

bool

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

TrySetEncodedData(nint, byte[])

Sets the image encoded data to a MaaImageBuffer.

public static bool TrySetEncodedData(nint handle, byte[] data)

Parameters

handle nint

The MaaImageBufferHandle.

data byte[]

The image data (PNG).

Returns

bool

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

TrySetEncodedData(nint, Stream)

Sets the image encoded data to a MaaImageBuffer.

public static bool TrySetEncodedData(nint handle, Stream data)

Parameters

handle nint

The MaaImageBufferHandle.

data Stream

The image data (PNG).

Returns

bool

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

TrySetEncodedData(nint, ReadOnlySpan<byte>)

Sets the image encoded data to a MaaImageBuffer.

public static bool TrySetEncodedData(nint handle, ReadOnlySpan<byte> data)

Parameters

handle nint

The MaaImageBufferHandle.

data ReadOnlySpan<byte>

The image data (PNG).

Returns

bool

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

TrySetEncodedData(nint, nint, ulong)

Sets the image encoded data to a MaaImageBuffer.

public static bool TrySetEncodedData(nint handle, nint data, ulong size)

Parameters

handle nint

The MaaImageBufferHandle.

data nint

The image data (PNG).

size ulong

The encoded size.

Returns

bool

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

TrySetEncodedData(byte[], Func<nint, bool>)

Sets the image encoded data to a function using MaaRectBuffer.

public static bool TrySetEncodedData(byte[] data, Func<nint, bool> readBuffer)

Parameters

data byte[]

The image data (PNG).

readBuffer Func<nint, bool>

The function used to read the data from the buffer.

Returns

bool

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

TrySetEncodedData(Stream, Func<nint, bool>)

Sets the image encoded data to a function using MaaRectBuffer.

public static bool TrySetEncodedData(Stream data, Func<nint, bool> readBuffer)

Parameters

data Stream

The image data (PNG).

readBuffer Func<nint, bool>

The function used to read the data from the buffer.

Returns

bool

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

TrySetEncodedData(ReadOnlySpan<byte>, Func<nint, bool>)

Sets the image encoded data to a function using MaaRectBuffer.

public static bool TrySetEncodedData(ReadOnlySpan<byte> data, Func<nint, bool> readBuffer)

Parameters

data ReadOnlySpan<byte>

The image data (PNG).

readBuffer Func<nint, bool>

The function used to read the data from the buffer.

Returns

bool

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