diff options
Diffstat (limited to 'core/png.h')
| -rw-r--r-- | core/png.h | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/core/png.h b/core/png.h new file mode 100644 index 0000000..cd5960a --- /dev/null +++ b/core/png.h @@ -0,0 +1,27 @@ +#pragma once + +#include "types.h" + +struct PngImage +{ + uint16_t m_width; + uint16_t m_height; + + // pixels are always assumed to be 32 bit + uint32_t* m_data; +}; + +bool PngLoad(const char* filename, PngImage& image); +void PngFree(PngImage& image); + +struct HdrImage +{ + uint16_t m_width; + uint16_t m_height; + + float* m_data; +}; + +bool HdrLoad(const char* filename, HdrImage& image); +void HdrFree(HdrImage& image); + |