mirror of
https://git.code.sf.net/p/libpng/code.git
synced 2025-07-10 18:04:09 +02:00
[libpng17] Sync contrib/libtests/pngimage.c with libpng16; update CHANGES and ANNOUNCE
This commit is contained in:
parent
6a574a84bd
commit
53bda5a7af
8
ANNOUNCE
8
ANNOUNCE
@ -1,5 +1,5 @@
|
|||||||
|
|
||||||
Libpng 1.7.0beta82 - June 24, 2016
|
Libpng 1.7.0beta82 - July 2, 2016
|
||||||
|
|
||||||
This is not intended to be a public release. It will be replaced
|
This is not intended to be a public release. It will be replaced
|
||||||
within a few weeks by a public version or by another test version.
|
within a few weeks by a public version or by another test version.
|
||||||
@ -1290,7 +1290,7 @@ Version 1.7.0beta80 [May 6, 2016]
|
|||||||
unreachable code in pz_default_settings and eliminated a spurious
|
unreachable code in pz_default_settings and eliminated a spurious
|
||||||
warning in pngcp for small files.
|
warning in pngcp for small files.
|
||||||
|
|
||||||
Version 1.7.0beta81 [June 24, 2016]
|
Version 1.7.0beta81 [June 11, 2016]
|
||||||
Check for CLOCK_PROCESS_CPUTIME_ID when building /contrib/libtests/timepng.
|
Check for CLOCK_PROCESS_CPUTIME_ID when building /contrib/libtests/timepng.
|
||||||
Otherwise it does not build on platforms that don't supply clock_gettime().
|
Otherwise it does not build on platforms that don't supply clock_gettime().
|
||||||
Add check for clock_gettime() in Makefile.am and configure.ac
|
Add check for clock_gettime() in Makefile.am and configure.ac
|
||||||
@ -1380,10 +1380,12 @@ Version 1.7.0beta81 [June 24, 2016]
|
|||||||
Avoid potential overflow of the PNG_IMAGE_SIZE macro. This macro
|
Avoid potential overflow of the PNG_IMAGE_SIZE macro. This macro
|
||||||
is not used within libpng, but is used in some of the examples.
|
is not used within libpng, but is used in some of the examples.
|
||||||
|
|
||||||
Version 1.7.0beta82 [June 24, 2016]
|
Version 1.7.0beta82 [July 2, 2016]
|
||||||
Put the SKIP definition in the correct place. It needs to come after the
|
Put the SKIP definition in the correct place. It needs to come after the
|
||||||
png.h include (see all the other .c files in contrib/libtests) because it
|
png.h include (see all the other .c files in contrib/libtests) because it
|
||||||
depends on PNG_LIBPNG_VER.
|
depends on PNG_LIBPNG_VER.
|
||||||
|
Moved pngcp to contrib/tools and added pngcp to the build together
|
||||||
|
with a pngcp.dfa configuration test (John Bowler)
|
||||||
|
|
||||||
Send comments/corrections/commendations to png-mng-implement at lists.sf.net
|
Send comments/corrections/commendations to png-mng-implement at lists.sf.net
|
||||||
(subscription required; visit
|
(subscription required; visit
|
||||||
|
|||||||
7
CHANGES
7
CHANGES
@ -5590,7 +5590,7 @@ Version 1.7.0beta80 [May 6, 2016]
|
|||||||
unreachable code in pz_default_settings and eliminated a spurious
|
unreachable code in pz_default_settings and eliminated a spurious
|
||||||
warning in pngcp for small files.
|
warning in pngcp for small files.
|
||||||
|
|
||||||
Version 1.7.0beta81 [June 24, 2016]
|
Version 1.7.0beta81 [June 11, 2016]
|
||||||
Check for CLOCK_PROCESS_CPUTIME_ID when building /contrib/libtests/timepng.
|
Check for CLOCK_PROCESS_CPUTIME_ID when building /contrib/libtests/timepng.
|
||||||
Otherwise it does not build on platforms that don't supply clock_gettime().
|
Otherwise it does not build on platforms that don't supply clock_gettime().
|
||||||
Add check for clock_gettime() in Makefile.am and configure.ac
|
Add check for clock_gettime() in Makefile.am and configure.ac
|
||||||
@ -5680,11 +5680,12 @@ Version 1.7.0beta81 [June 24, 2016]
|
|||||||
Avoid potential overflow of the PNG_IMAGE_SIZE macro. This macro
|
Avoid potential overflow of the PNG_IMAGE_SIZE macro. This macro
|
||||||
is not used within libpng, but is used in some of the examples.
|
is not used within libpng, but is used in some of the examples.
|
||||||
|
|
||||||
Version 1.7.0beta82 [June 24, 2016]
|
Version 1.7.0beta82 [July 2, 2016]
|
||||||
Put the SKIP definition in the correct place. It needs to come after the
|
Put the SKIP definition in the correct place. It needs to come after the
|
||||||
png.h include (see all the other .c files in contrib/libtests) because it
|
png.h include (see all the other .c files in contrib/libtests) because it
|
||||||
depends on PNG_LIBPNG_VER.
|
depends on PNG_LIBPNG_VER.
|
||||||
|
Moved pngcp to contrib/tools and added pngcp to the build together
|
||||||
|
with a pngcp.dfa configuration test (John Bowler)
|
||||||
|
|
||||||
Send comments/corrections/commendations to png-mng-implement at lists.sf.net
|
Send comments/corrections/commendations to png-mng-implement at lists.sf.net
|
||||||
(subscription required; visit
|
(subscription required; visit
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
*
|
*
|
||||||
* Copyright (c) 2015,2016 John Cunningham Bowler
|
* Copyright (c) 2015,2016 John Cunningham Bowler
|
||||||
*
|
*
|
||||||
* Last changed in libpng 1.6.22 [May 26, 2016]
|
* Last changed in libpng 1.6.24 [(PENDING RELEASE)]
|
||||||
*
|
*
|
||||||
* This code is released under the libpng license.
|
* This code is released under the libpng license.
|
||||||
* For conditions of distribution and use, see the disclaimer
|
* For conditions of distribution and use, see the disclaimer
|
||||||
@ -45,19 +45,8 @@
|
|||||||
# define SKIP 0
|
# define SKIP 0
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if PNG_LIBPNG_VER < 10700
|
#if defined(PNG_INFO_IMAGE_SUPPORTED) && defined(PNG_SEQUENTIAL_READ_SUPPORTED)\
|
||||||
/* READ_PNG and WRITE_PNG were not defined, so: */
|
&& (defined(PNG_READ_PNG_SUPPORTED) || PNG_LIBPNG_VER < 10700)
|
||||||
# ifdef PNG_INFO_IMAGE_SUPPORTED
|
|
||||||
# ifdef PNG_SEQUENTIAL_READ_SUPPORTED
|
|
||||||
# define PNG_READ_PNG_SUPPORTED
|
|
||||||
# endif /* SEQUENTIAL_READ */
|
|
||||||
# ifdef PNG_WRITE_SUPPORTED
|
|
||||||
# define PNG_WRITE_PNG_SUPPORTED
|
|
||||||
# endif /* WRITE */
|
|
||||||
# endif /* INFO_IMAGE */
|
|
||||||
#endif /* pre 1.7.0 */
|
|
||||||
|
|
||||||
#ifdef PNG_READ_PNG_SUPPORTED
|
|
||||||
/* If a transform is valid on both read and write this implies that if the
|
/* If a transform is valid on both read and write this implies that if the
|
||||||
* transform is applied to read it must also be applied on write to produce
|
* transform is applied to read it must also be applied on write to produce
|
||||||
* meaningful data. This is because these transforms when performed on read
|
* meaningful data. This is because these transforms when performed on read
|
||||||
@ -406,7 +395,7 @@ buffer_destroy(struct buffer *buffer)
|
|||||||
buffer_destroy_list(list);
|
buffer_destroy_list(list);
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef PNG_WRITE_PNG_SUPPORTED
|
#ifdef PNG_WRITE_SUPPORTED
|
||||||
static void
|
static void
|
||||||
buffer_start_write(struct buffer *buffer)
|
buffer_start_write(struct buffer *buffer)
|
||||||
{
|
{
|
||||||
@ -576,7 +565,7 @@ struct display
|
|||||||
png_structp read_pp;
|
png_structp read_pp;
|
||||||
png_infop read_ip;
|
png_infop read_ip;
|
||||||
|
|
||||||
# ifdef PNG_WRITE_PNG_SUPPORTED
|
# ifdef PNG_WRITE_SUPPORTED
|
||||||
/* Used to write a new image (the original info_ptr is used) */
|
/* Used to write a new image (the original info_ptr is used) */
|
||||||
png_structp write_pp;
|
png_structp write_pp;
|
||||||
struct buffer written_file; /* where the file gets written */
|
struct buffer written_file; /* where the file gets written */
|
||||||
@ -603,7 +592,7 @@ display_init(struct display *dp)
|
|||||||
dp->read_ip = NULL;
|
dp->read_ip = NULL;
|
||||||
buffer_init(&dp->original_file);
|
buffer_init(&dp->original_file);
|
||||||
|
|
||||||
# ifdef PNG_WRITE_PNG_SUPPORTED
|
# ifdef PNG_WRITE_SUPPORTED
|
||||||
dp->write_pp = NULL;
|
dp->write_pp = NULL;
|
||||||
buffer_init(&dp->written_file);
|
buffer_init(&dp->written_file);
|
||||||
# endif
|
# endif
|
||||||
@ -616,7 +605,7 @@ display_clean_read(struct display *dp)
|
|||||||
png_destroy_read_struct(&dp->read_pp, &dp->read_ip, NULL);
|
png_destroy_read_struct(&dp->read_pp, &dp->read_ip, NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef PNG_WRITE_PNG_SUPPORTED
|
#ifdef PNG_WRITE_SUPPORTED
|
||||||
static void
|
static void
|
||||||
display_clean_write(struct display *dp)
|
display_clean_write(struct display *dp)
|
||||||
{
|
{
|
||||||
@ -628,7 +617,7 @@ display_clean_write(struct display *dp)
|
|||||||
static void
|
static void
|
||||||
display_clean(struct display *dp)
|
display_clean(struct display *dp)
|
||||||
{
|
{
|
||||||
# ifdef PNG_WRITE_PNG_SUPPORTED
|
# ifdef PNG_WRITE_SUPPORTED
|
||||||
display_clean_write(dp);
|
display_clean_write(dp);
|
||||||
# endif
|
# endif
|
||||||
display_clean_read(dp);
|
display_clean_read(dp);
|
||||||
@ -646,7 +635,7 @@ static void
|
|||||||
display_destroy(struct display *dp)
|
display_destroy(struct display *dp)
|
||||||
{
|
{
|
||||||
/* Release any memory held in the display. */
|
/* Release any memory held in the display. */
|
||||||
# ifdef PNG_WRITE_PNG_SUPPORTED
|
# ifdef PNG_WRITE_SUPPORTED
|
||||||
buffer_destroy(&dp->written_file);
|
buffer_destroy(&dp->written_file);
|
||||||
# endif
|
# endif
|
||||||
|
|
||||||
@ -1264,7 +1253,7 @@ compare_read(struct display *dp, int applied_transforms)
|
|||||||
return 1; /* compare succeeded */
|
return 1; /* compare succeeded */
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef PNG_WRITE_PNG_SUPPORTED
|
#ifdef PNG_WRITE_SUPPORTED
|
||||||
static void
|
static void
|
||||||
buffer_write(struct display *dp, struct buffer *buffer, png_bytep data,
|
buffer_write(struct display *dp, struct buffer *buffer, png_bytep data,
|
||||||
png_size_t size)
|
png_size_t size)
|
||||||
@ -1363,7 +1352,7 @@ write_png(struct display *dp, png_infop ip, int transforms)
|
|||||||
*/
|
*/
|
||||||
display_clean_write(dp);
|
display_clean_write(dp);
|
||||||
}
|
}
|
||||||
#endif /* WRITE_PNG */
|
#endif /* WRITE_SUPPORTED */
|
||||||
|
|
||||||
static int
|
static int
|
||||||
skip_transform(struct display *dp, int tr)
|
skip_transform(struct display *dp, int tr)
|
||||||
@ -1425,7 +1414,7 @@ test_one_file(struct display *dp, const char *filename)
|
|||||||
return; /* no point testing more */
|
return; /* no point testing more */
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef PNG_WRITE_PNG_SUPPORTED
|
#ifdef PNG_WRITE_SUPPORTED
|
||||||
/* Second test: write the original PNG data out to a new file (to test the
|
/* Second test: write the original PNG data out to a new file (to test the
|
||||||
* write side) then read the result back in and make sure that it hasn't
|
* write side) then read the result back in and make sure that it hasn't
|
||||||
* changed.
|
* changed.
|
||||||
@ -1466,7 +1455,7 @@ test_one_file(struct display *dp, const char *filename)
|
|||||||
* out and read it back in again (without the reversible transforms)
|
* out and read it back in again (without the reversible transforms)
|
||||||
* we should get back to the place where we started.
|
* we should get back to the place where we started.
|
||||||
*/
|
*/
|
||||||
#ifdef PNG_WRITE_PNG_SUPPORTED
|
#ifdef PNG_WRITE_SUPPORTED
|
||||||
if ((current & write_transforms) == current)
|
if ((current & write_transforms) == current)
|
||||||
{
|
{
|
||||||
/* All transforms reversible: write the PNG with the transformations
|
/* All transforms reversible: write the PNG with the transformations
|
||||||
@ -1702,7 +1691,7 @@ main(const int argc, const char * const * const argv)
|
|||||||
return errors != 0;
|
return errors != 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#else /* !READ_PNG */
|
#else /* !INFO_IMAGE || !SEQUENTIAL_READ || !READ_PNG*/
|
||||||
int
|
int
|
||||||
main(void)
|
main(void)
|
||||||
{
|
{
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
*
|
*
|
||||||
* Copyright (c) 2016 John Cunningham Bowler
|
* Copyright (c) 2016 John Cunningham Bowler
|
||||||
*
|
*
|
||||||
* Last changed in libpng 1.6.24beta03 [June 27, 2016]
|
* Last changed in libpng 1.6.24 [(PENDING RELEASE)]
|
||||||
*
|
*
|
||||||
* This code is released under the libpng license.
|
* This code is released under the libpng license.
|
||||||
* For conditions of distribution and use, see the disclaimer
|
* For conditions of distribution and use, see the disclaimer
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user