comparison png.h @ 2295:eb45ad9d8a3f

WIP "video" recording in APNG format
author Michael Pavone <pavone@retrodev.com>
date Fri, 10 Feb 2023 23:17:43 -0800
parents 0ec89dadb36d
children
comparison
equal deleted inserted replaced
2294:7e995fb948c3 2295:eb45ad9d8a3f
1 #ifndef PNG_H_ 1 #ifndef PNG_H_
2 #define PNG_H_ 2 #define PNG_H_
3 3
4 typedef struct {
5 uint32_t sequence_number;
6 uint32_t num_frames;
7 uint32_t num_frame_offset;
8 uint16_t delay_num;
9 uint16_t delay_den;
10 } apng_state;
11
12 void save_png24_frame(FILE *f, uint32_t *buffer, apng_state *apng, uint32_t width, uint32_t height, uint32_t pitch);
4 void save_png24(FILE *f, uint32_t *buffer, uint32_t width, uint32_t height, uint32_t pitch); 13 void save_png24(FILE *f, uint32_t *buffer, uint32_t width, uint32_t height, uint32_t pitch);
5 void save_png(FILE *f, uint32_t *buffer, uint32_t width, uint32_t height, uint32_t pitch); 14 void save_png(FILE *f, uint32_t *buffer, uint32_t width, uint32_t height, uint32_t pitch);
15 apng_state* start_apng(FILE *f, uint32_t width, uint32_t height, float frame_rate);
16 void end_apng(FILE *f, apng_state *apng);
6 uint32_t *load_png(uint8_t *buffer, uint32_t buf_size, uint32_t *width, uint32_t *height); 17 uint32_t *load_png(uint8_t *buffer, uint32_t buf_size, uint32_t *width, uint32_t *height);
7 18
8 #endif //PNG_H_ 19 #endif //PNG_H_