set_from_buffer


Description:

public bool set_from_buffer (owned uint8[] buffer, DestroyNotify? buffer_free_func) throws Error

Set the image data from unencoded image data, stored in memory.

In case of failure, false is returned and error is set. It is expected that buffer will remain accessible for the duration of the load. Once it is finished with, buffer_free_func will be called.

Parameters:

this

An Image

buffer

A buffer pointing to encoded image data

buffer_free_func

A function to free buffer, or null

buffer_size

The size of buffer, in bytes

Returns:

true if the image was successfully updated




2022 vala-language.org