|
ginnOS
The reference: libc, the libraries and the kernel
|
load PNG, JPEG and BMP files into libgfx buffers. More...
#include <gfx.h>Go to the source code of this file.
Macros | |
| #define | IMAGE_MAX_SIDE 8192 |
Functions | |
| gfx_buffer_t * | image_load (const char *path, const char **error) |
| load an image file. | |
| gfx_buffer_t * | image_decode (const uint8_t *data, size_t size, const char **error) |
| decode an image from memory. | |
| int32_t | image_inflate (const uint8_t *in, size_t in_size, uint8_t *out, size_t out_size) |
| decompress zlib data (RFC 1950) into a buffer of known size. | |
load PNG, JPEG and BMP files into libgfx buffers.
the decoder is stb_image (public domain, src/lib/stb). the result is a gfx_buffer_t of premultiplied ARGB; an image without alpha is opaque.
| #define IMAGE_MAX_SIDE 8192 |
| gfx_buffer_t * image_load | ( | const char * | path, |
| const char ** | error ) |
load an image file.
| error | receives a short reason on failure (may be NULL). |
| gfx_buffer_t * image_decode | ( | const uint8_t * | data, |
| size_t | size, | ||
| const char ** | error ) |
decode an image from memory.