mirror of
https://git.code.sf.net/p/libpng/code.git
synced 2025-07-10 18:04:09 +02:00
Fix duplicate tIME chunk from png_write_png
Also add an example program, pngcp.c, which illustrates the problem when used to copy pngtest.png (the result is an invalid PNG because the tIME chunk is duplicated.) Signed-off-by: John Bowler <jbowler@acm.org>
This commit is contained in:
@@ -400,6 +400,9 @@ struct png_struct_def
|
||||
unsigned int palette_index_check_disabled :1; /* defaults to 0, 'enabled' */
|
||||
unsigned int palette_index_check_issued :1; /* error message output */
|
||||
#endif /* CHECK_FOR_INVALID_INDEX */
|
||||
#ifdef PNG_WRITE_tIME_SUPPORTED
|
||||
unsigned int wrote_tIME :1; /* Stop writing of duplicate tIME chunks */
|
||||
#endif /* WRITE_tIME */
|
||||
#ifdef PNG_READ_tRNS_SUPPORTED
|
||||
png_color_16 trans_color; /* transparent color for non-paletted files */
|
||||
#endif /* READ_tRNS */
|
||||
|
||||
Reference in New Issue
Block a user