wip
This commit is contained in:
@@ -1,15 +1,29 @@
|
||||
#include <stdio.h>
|
||||
|
||||
// PNG File Struct
|
||||
struct PNG_FILE_STRUCT {
|
||||
struct PNG_START_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;
|
||||
unsigned char ihdr_length[4];
|
||||
unsigned char ihdr_header[4];
|
||||
unsigned char file_width[4];
|
||||
unsigned char file_height[4];
|
||||
unsigned char bit_depth[1];
|
||||
unsigned char color_type[1];
|
||||
unsigned char compression_method[1];
|
||||
unsigned char filter_method[1];
|
||||
unsigned char interlace_method[1];
|
||||
unsigned char ihdr_crc[4];
|
||||
};
|
||||
|
||||
struct PNG_IDAT_FILE_STRUCT {
|
||||
unsigned char idat_length[4];
|
||||
unsigned char idat_header[4];
|
||||
unsigned char idat_crc[4];
|
||||
unsigned char idat_data[];
|
||||
};
|
||||
|
||||
struct PNG_FILE_STRUCT {
|
||||
struct PNG_START_FILE_STRUCT png_start_data;
|
||||
};
|
||||
|
||||
extern const long png_signature[8];
|
||||
@@ -18,3 +32,5 @@ 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);
|
||||
void populate_start_png(unsigned char *addr, struct PNG_START_FILE_STRUCT *png_data);
|
||||
void populate_idat_png(unsigned char *addr, struct PNG_IDAT_FILE_STRUCT *png_data, unsigned long offset);
|
||||
|
||||
Reference in New Issue
Block a user