mirror of
https://git.code.sf.net/p/libpng/code.git
synced 2025-07-10 18:04:09 +02:00
[libpng16] tests backported from libpng 1.7
This updates libpng16 with all the test changes from libpng17, including changes to pngvalid.c to ensure that the original, distributed, version of contrib/visupng/cexcept.h can be used. pngvalid contains the correction to the use of SAVE/STORE_ UNKNOWN_CHUNKS; a bug revealed by changes in libpng 1.7. More tests contain the --strict option to detect warnings and the pngvalid-standard test has been corrected so that it does not turn on progresive-read (there is a separate test which does that.) Some signed/unsigned fixes have been made. Signed-off-by: John Bowler <jbowler@acm.org>
This commit is contained in:
@@ -107,7 +107,7 @@ typedef struct chunk_insert
|
||||
png_charp parameters[1];
|
||||
} chunk_insert;
|
||||
|
||||
static int
|
||||
static unsigned int
|
||||
channels_of_type(int color_type)
|
||||
{
|
||||
if (color_type & PNG_COLOR_MASK_PALETTE)
|
||||
@@ -128,7 +128,7 @@ channels_of_type(int color_type)
|
||||
}
|
||||
}
|
||||
|
||||
static int
|
||||
static unsigned int
|
||||
pixel_depth_of_type(int color_type, int bit_depth)
|
||||
{
|
||||
return channels_of_type(color_type) * bit_depth;
|
||||
@@ -682,7 +682,11 @@ write_png(const char **name, FILE *fp, int color_type, int bit_depth,
|
||||
png_set_filter(png_ptr, PNG_FILTER_TYPE_BASE, filters);
|
||||
|
||||
{
|
||||
int passes = png_set_interlace_handling(png_ptr);
|
||||
# ifdef PNG_WRITE_INTERLACING_SUPPORTED
|
||||
int passes = png_set_interlace_handling(png_ptr);
|
||||
# else /* !WRITE_INTERLACING */
|
||||
int passes = 1;
|
||||
# endif /* !WRITE_INTERLACING */
|
||||
int pass;
|
||||
png_size_t rowbytes = png_get_rowbytes(png_ptr, info_ptr);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user