view png.h @ 2329:06d5e9b08bdb

Add NTSC composite shader by Sik
author Michael Pavone <pavone@retrodev.com>
date Wed, 23 Aug 2023 21:38:39 -0700
parents eb45ad9d8a3f
children
line wrap: on
line source

#ifndef PNG_H_
#define PNG_H_

typedef struct {
	uint32_t sequence_number;
	uint32_t num_frames;
	uint32_t num_frame_offset;
	uint16_t delay_num;
	uint16_t delay_den;
} apng_state;

void save_png24_frame(FILE *f, uint32_t *buffer, apng_state *apng, uint32_t width, uint32_t height, uint32_t pitch);
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);
apng_state* start_apng(FILE *f, uint32_t width, uint32_t height, float frame_rate);
void end_apng(FILE *f, apng_state *apng);
uint32_t *load_png(uint8_t *buffer, uint32_t buf_size, uint32_t *width, uint32_t *height);

#endif //PNG_H_