The error points to the second "if" statement.
bool load_png(char* file_name, png_type* png_type_pointer)
{
char header[8];
FILE* png_file = fopen(file_name, "rb");
if (png_file == NULL)
{
printf("Cannot open file %s\n", png_file);
return false;
}
char png_header[8]; // maximum header size
fread(png_header, 1, 8, png_file);
if (png_sig_cmp(png_header, 0, 8))
{
printf("File %s not recognized as png\n", file_name);
return false;
}
Cheers,
Shawn

New Topic/Question
Reply



MultiQuote





|