diff --git a/pipi/pipi.h b/pipi/pipi.h index 5dc72aa..c0819f0 100644 --- a/pipi/pipi.h +++ b/pipi/pipi.h @@ -20,6 +20,7 @@ #define __PIPI_H__ #include +#include #ifdef __cplusplus extern "C" @@ -51,6 +52,25 @@ typedef enum } pipi_format_t; +struct pixel_u32 +{ + uint8_t r, g, b, a; +}; +struct pixel_float +{ + float r, g, b, a; +}; + +typedef struct +{ + union + { + struct pixel_u32 pixel_u32; + struct pixel_float pixel_float; + }; +} +pipi_pixel_t; + /* pipi_pixels_t: this structure stores a pixel view of an image. */ typedef struct { @@ -117,6 +137,7 @@ extern pipi_image_t *pipi_dither_ostromoukhov(pipi_image_t *, pipi_scan_t); extern pipi_image_t *pipi_dither_dbs(pipi_image_t *); extern void pipi_dither_24to16(pipi_image_t *); + #ifdef __cplusplus } #endif