|
|
|
@ -214,7 +214,7 @@ qboolean Image_LoadPNG( const char *name, const byte *buffer, fs_offset_t filesi
@@ -214,7 +214,7 @@ qboolean Image_LoadPNG( const char *name, const byte *buffer, fs_offset_t filesi
|
|
|
|
|
if( ntohl( crc32 ) != crc32_check ) |
|
|
|
|
{ |
|
|
|
|
Con_DPrintf( S_ERROR "Image_LoadPNG: Found chunk with wrong CRC32 sum (%s)\n", name ); |
|
|
|
|
Mem_Free( idat_buf ); |
|
|
|
|
if( idat_buf ) Mem_Free( idat_buf ); |
|
|
|
|
return false; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
@ -222,6 +222,12 @@ qboolean Image_LoadPNG( const char *name, const byte *buffer, fs_offset_t filesi
@@ -222,6 +222,12 @@ qboolean Image_LoadPNG( const char *name, const byte *buffer, fs_offset_t filesi
|
|
|
|
|
buf_p += sizeof( crc32 ); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
if( oldsize == 0 ) |
|
|
|
|
{ |
|
|
|
|
Con_DPrintf( S_ERROR "Image_LoadPNG: Couldn't find IDAT chunks (%s)\n", name ); |
|
|
|
|
return false; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
if( png_hdr.ihdr_chunk.colortype == PNG_CT_PALLETE && !pallete ) |
|
|
|
|
{ |
|
|
|
|
Con_DPrintf( S_ERROR "Image_LoadPNG: PLTE chunk not found (%s)\n", name ); |
|
|
|
@ -243,12 +249,6 @@ qboolean Image_LoadPNG( const char *name, const byte *buffer, fs_offset_t filesi
@@ -243,12 +249,6 @@ qboolean Image_LoadPNG( const char *name, const byte *buffer, fs_offset_t filesi
|
|
|
|
|
return false; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
if( oldsize == 0 ) |
|
|
|
|
{ |
|
|
|
|
Con_DPrintf( S_ERROR "Image_LoadPNG: Couldn't find IDAT chunks (%s)\n", name ); |
|
|
|
|
return false; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
switch( png_hdr.ihdr_chunk.colortype ) |
|
|
|
|
{ |
|
|
|
|
case PNG_CT_GREY: |
|
|
|
|