Set the image data from unencoded image data, stored in memory, and scales it while loading.
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. The aspect ratio will
always be maintained.
this |
An Image |
buffer |
A buffer pointing to encoded image data |
buffer_free_func |
A function to free |
width |
Width to scale the image to, or -1 |
height |
Height to scale the image to, or -1 |
buffer_size |
The size of |
|