21 lines
495 B
C
21 lines
495 B
C
#include <stdio.h>
|
|
|
|
// PNG File Struct
|
|
struct PNG_FILE_STRUCT {
|
|
unsigned char file_sig[8];
|
|
int file_width;
|
|
int file_height;
|
|
int bit_depth;
|
|
int color_type;
|
|
int compression_method;
|
|
int filter_method;
|
|
int interlace_method;
|
|
};
|
|
|
|
extern const long png_signature[8];
|
|
|
|
int check_header_length(unsigned char *addr, long offset);
|
|
int check_file_header(char *addr);
|
|
int create_cc_file(unsigned char *addr, unsigned long file_length);
|
|
unsigned char* file_to_char_array(FILE *in_file, size_t* size);
|