#ifndef PW_PNG_H #define PW_PNG_H #include /** * A pixel from a loaded PNG image. */ union pw_png_pixel { uint32_t raw; struct { uint8_t r; uint8_t g; uint8_t b; uint8_t a; } ch; }; SDL_COMPILE_TIME_ASSERT(pw_png_pixel_size, sizeof(union pw_png_pixel) == 4); /** * Loads a PNG with exact dimensions. */ union pw_png_pixel *pw_png_load(uint8_t const *data, size_t sz, int w, int h); #endif