Mercurial > repos > blastem
view png.h @ 1848:ef3d368d59b0
16-bit wide save RAM is stored in memory byteswapped for performance reasons, but saving it to disc that way isn't great. Swap before save/after load to fix
author | Michael Pavone <pavone@retrodev.com> |
---|---|
date | Tue, 23 Apr 2019 18:37:08 -0700 |
parents | 0ec89dadb36d |
children | eb45ad9d8a3f |
line wrap: on
line source
#ifndef PNG_H_ #define PNG_H_ void save_png24(FILE *f, uint32_t *buffer, uint32_t width, uint32_t height, uint32_t pitch); void save_png(FILE *f, uint32_t *buffer, uint32_t width, uint32_t height, uint32_t pitch); uint32_t *load_png(uint8_t *buffer, uint32_t buf_size, uint32_t *width, uint32_t *height); #endif //PNG_H_