My Project
|
Image handling functions. More...
Go to the source code of this file.
Classes | |
struct | Image |
RGB image. More... | |
Macros | |
#define | pixel_at(img, x, y) ((img).pixels + (x) + (y) * (img).width) |
Get pixel at index. | |
#define | foreach_pixel(img, expression) |
Execute expression for each pixel. | |
Functions | |
struct | __attribute__ ((packed)) |
Pixel with 1-byte color depth. | |
Maybe (Image) | |
size_t | calc_image_size (uint32_t width, uint32_t height) |
Return required size for image pixels data. | |
MaybeImage | create_image (uint32_t width, uint32_t height) |
Create image structure with pre-allocated data. If memory cannot be allocated, image pixels are NULL. | |
void | destroy_image (Image img) |
Free image data. | |
Variables | |
Pixel | |
Image handling functions.
#define foreach_pixel | ( | img, | |
expression | |||
) |
Execute expression for each pixel.
struct __attribute__ | ( | (packed) | ) |
Pixel with 1-byte color depth.
< Red, green, and blue color values.