#ifndef _RGBIMAGE #define _RGBIMAGE #include "global.h" #include typedef uint8_t byte; typedef uint16_t byte2; typedef uint32_t byte4; typedef struct ARGB { byte a; byte r; byte g; byte b; } ARGB; void ARGB_set(ARGB* rgb, byte4 color); void ARGB_merge(ARGB* bottom, ARGB top); typedef struct RGBImage { u32 width; u32 height; ARGB* img; } RGBImage; RGBImage RGBImage_new(u32 width, u32 height); void RGBImage_free(RGBImage img); void RGBImage_delete(RGBImage* img); ARGB* RGBImage_at(RGBImage img, int row, int col); int ppm6_write(FILE* f, RGBImage img); RGBImage ppm_read(FILE* f); #endif /* _RGBIMAGE */