support libpng compiled without iTXt support
This commit is contained in:
parent
836ad157fa
commit
1f6ceeaa3a
@ -6568,7 +6568,13 @@ void Load_PNG_Sub(T_IO_Context * context, FILE * file, const char * memory_buffe
|
|||||||
while (num_text--)
|
while (num_text--)
|
||||||
{
|
{
|
||||||
int size = COMMENT_SIZE;
|
int size = COMMENT_SIZE;
|
||||||
|
#ifdef PNG_iTXt_SUPPORTED
|
||||||
size_t length = (text_ptr[num_text].compression >= 1) ? text_ptr[num_text].itxt_length : text_ptr[num_text].text_length;
|
size_t length = (text_ptr[num_text].compression >= 1) ? text_ptr[num_text].itxt_length : text_ptr[num_text].text_length;
|
||||||
|
#else
|
||||||
|
size_t length = text_ptr[num_text].text_length;
|
||||||
|
if (text_ptr[num_text].compression >= 1)
|
||||||
|
continue; // skip iTXt
|
||||||
|
#endif
|
||||||
if (length > 0 && length < COMMENT_SIZE)
|
if (length > 0 && length < COMMENT_SIZE)
|
||||||
size = (int)length;
|
size = (int)length;
|
||||||
GFX2_Log(GFX2_DEBUG, "PNG Text %d \"%s\" (%ul bytes): %.*s\n",
|
GFX2_Log(GFX2_DEBUG, "PNG Text %d \"%s\" (%ul bytes): %.*s\n",
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user