21 lines
464 B
C

#ifndef IMG_PNG_H
#define IMG_PNG_H
#include <stdint.h>
#include <stdio.h>
#include "../common/image.h"
#include "../common/image_loader.h"
struct img_png_chunk {
unsigned char* chunk_data;
uint32_t length;
uint32_t crc;
char chunk_type[4];
};
image_decoder_t* png_decoder_create (void);
int png_can_decode (const uint8_t *data, size_t size);
image_t* png_decode (const uint8_t *data, size_t size);
void png_destroy (struct image_decoder *self);
#endif