mirror of
https://git.code.sf.net/p/libpng/code.git
synced 2025-07-10 18:04:09 +02:00
[libpng16] Changed chunk handler warnings into benign errors, incrementally
load iCCP
This commit is contained in:
committed by
Glenn Randers-Pehrson
parent
51624965e2
commit
b11b31aea2
@@ -1061,6 +1061,7 @@ int
|
||||
main(int argc, char **argv)
|
||||
{
|
||||
FILE *fp = stdout;
|
||||
const char *file_name = NULL;
|
||||
int color_type = 8; /* invalid */
|
||||
int bit_depth = 32; /* invalid */
|
||||
png_fixed_point gamma = 0; /* not set */
|
||||
@@ -1189,6 +1190,7 @@ main(int argc, char **argv)
|
||||
exit(1);
|
||||
}
|
||||
|
||||
file_name = arg;
|
||||
continue;
|
||||
}
|
||||
|
||||
@@ -1204,5 +1206,12 @@ main(int argc, char **argv)
|
||||
exit(1);
|
||||
}
|
||||
|
||||
return write_png(fp, color_type, bit_depth, gamma, head_insert);
|
||||
{
|
||||
int ret = write_png(fp, color_type, bit_depth, gamma, head_insert);
|
||||
|
||||
if (ret != 0 && file_name != NULL)
|
||||
remove(file_name);
|
||||
|
||||
return ret;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user