fileformatsproject-legacy/lib/image.h

34 lines
537 B
C
Raw Normal View History

2023-12-04 23:27:48 +01:00
#ifndef __IMAGE__
#define __IMAGE__
#include <errno.h>
#include <stdio.h>
#include <stdlib.h>
#include "../libcproject/libcproject.h"
struct pixel {
byte_t red;
byte_t green;
byte_t blue;
};
struct image {
struct pixel** pixels;
size_t width;
size_t height;
};
/**
* @brief Initializes a new image (with all colors defaulting to 0 => black).
*
* @param width
* @param height
* @return struct image*
*/
struct image* image_initialization(size_t width, size_t height);
void image_free(struct image* image);
#endif