[master] Update png.h and pngconf.h to revert iTXt support.

This commit is contained in:
Glenn Randers-Pehrson 2009-11-08 15:14:32 -06:00
parent ed4c9fc4e9
commit bd6f1edea8
4 changed files with 57 additions and 77 deletions

View File

@ -1,5 +1,5 @@
Libpng 1.2.41beta14 - November 4, 2009 Libpng 1.2.41beta14 - November 8, 2009
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.
@ -116,9 +116,14 @@ version 1.2.41beta13 [November 3, 2009]
Patched ltmain.sh for wince support. Patched ltmain.sh for wince support.
Added PNG_CONVERT_tIME_SUPPORTED macro. Added PNG_CONVERT_tIME_SUPPORTED macro.
version 1.2.41beta14 [November 4, 2009] version 1.2.41beta14 [November 8, 2009]
Make inclusion of time.h in pngconf.h depend on PNG_CONVERT_tIME_SUPPORTED Make inclusion of time.h in pngconf.h depend on PNG_CONVERT_tIME_SUPPORTED
Make #define PNG_CONVERT_tIME_SUPPORTED depend on PNG_WRITE_tIME_SUPPORTED Make #define PNG_CONVERT_tIME_SUPPORTED depend on PNG_WRITE_tIME_SUPPORTED
Reverted iTXt compatibility stuff from 1.2.41beta05, 1.2.41beta11, and
1.2.41beta12.
Reverted IOSTATE feature, user_cache_max, and premultiply_alpha features
from 1.2.41beta08.
Retained png_calloc() from 1.2.41beta08 but as a non-exported function
Send comments/corrections/commendations to png-mng-implement at lists.sf.net Send comments/corrections/commendations to png-mng-implement at lists.sf.net

20
CHANGES
View File

@ -2466,7 +2466,7 @@ version 1.2.40beta01 [August 20, 2009]
version 1.2.40rc01 [September 2, 2009] version 1.2.40rc01 [September 2, 2009]
Various bugfixes and improvements to CMakeLists.txt (Philip Lowman) Various bugfixes and improvements to CMakeLists.txt (Philip Lowman)
version 1.2.40 and 1.0.49 [November 4, 2009] version 1.2.40 and 1.0.49 [September 2, 2009]
No changes. No changes.
version 1.0.50 [September 10, 2009] version 1.0.50 [September 10, 2009]
@ -2546,9 +2546,25 @@ version 1.2.41beta13 [November 3, 2009]
Patched ltmain.sh for wince support. Patched ltmain.sh for wince support.
Added PNG_CONVERT_tIME_SUPPORTED macro. Added PNG_CONVERT_tIME_SUPPORTED macro.
version 1.2.41beta14 [November 4, 2009] version 1.2.41beta14 [November 8, 2009]
Make inclusion of time.h in pngconf.h depend on PNG_CONVERT_tIME_SUPPORTED Make inclusion of time.h in pngconf.h depend on PNG_CONVERT_tIME_SUPPORTED
Make #define PNG_CONVERT_tIME_SUPPORTED depend on PNG_WRITE_tIME_SUPPORTED Make #define PNG_CONVERT_tIME_SUPPORTED depend on PNG_WRITE_tIME_SUPPORTED
Reverted iTXt compatibility stuff from 1.2.41beta05, 1.2.41beta11, and
1.2.41beta12.
Reverted IOSTATE feature, user_cache_max, and premultiply_alpha features
from 1.2.41beta08.
Retained png_calloc() from 1.2.41beta08 but as a non-exported function.
Send comments/corrections/commendations to png-mng-implement at lists.sf.net
(subscription required; visit
https://lists.sourceforge.net/lists/listinfo/png-mng-implement
to subscribe)
or to glennrp at users.sourceforge.net
Glenn R-P
*/
versions 1.2.41beta01 through 1.2.41beta13 were abandoned [November 5, 2009].
The 1.0.x/1.2.x series will only receive security updates from now on.
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

68
png.h
View File

@ -1,6 +1,6 @@
/* png.h - header file for PNG reference library /* png.h - header file for PNG reference library
* *
* libpng version 1.2.41beta14 - November 3, 2009 * libpng version 1.2.41beta14 - November 8, 2009
* Copyright (c) 1998-2009 Glenn Randers-Pehrson * Copyright (c) 1998-2009 Glenn Randers-Pehrson
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger) * (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
* (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.) * (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
@ -10,7 +10,7 @@
* Authors and maintainers: * Authors and maintainers:
* libpng versions 0.71, May 1995, through 0.88, January 1996: Guy Schalnat * libpng versions 0.71, May 1995, through 0.88, January 1996: Guy Schalnat
* libpng versions 0.89c, June 1996, through 0.96, May 1997: Andreas Dilger * libpng versions 0.89c, June 1996, through 0.96, May 1997: Andreas Dilger
* libpng versions 0.97, January 1998, through 1.2.41beta14 - November 3, 2009: Glenn * libpng versions 0.97, January 1998, through 1.2.41beta14 - November 8, 2009: Glenn
* See also "Contributing Authors", below. * See also "Contributing Authors", below.
* *
* Note about libpng version numbers: * Note about libpng version numbers:
@ -277,7 +277,7 @@
* *
* This code is released under the libpng license. * This code is released under the libpng license.
* *
* libpng versions 1.2.6, August 15, 2004, through 1.2.41beta14, November 3, 2009, are * libpng versions 1.2.6, August 15, 2004, through 1.2.41beta14, November 8, 2009, are
* Copyright (c) 2004, 2006-2009 Glenn Randers-Pehrson, and are * Copyright (c) 2004, 2006-2009 Glenn Randers-Pehrson, and are
* distributed according to the same disclaimer and license as libpng-1.2.5 * distributed according to the same disclaimer and license as libpng-1.2.5
* with the following individual added to the list of Contributing Authors: * with the following individual added to the list of Contributing Authors:
@ -389,7 +389,7 @@
* Y2K compliance in libpng: * Y2K compliance in libpng:
* ========================= * =========================
* *
* November 3, 2009 * November 8, 2009
* *
* Since the PNG Development group is an ad-hoc body, we can't make * Since the PNG Development group is an ad-hoc body, we can't make
* an official declaration. * an official declaration.
@ -453,7 +453,7 @@
/* Version information for png.h - this should match the version in png.c */ /* Version information for png.h - this should match the version in png.c */
#define PNG_LIBPNG_VER_STRING "1.2.41beta14" #define PNG_LIBPNG_VER_STRING "1.2.41beta14"
#define PNG_HEADER_VERSION_STRING \ #define PNG_HEADER_VERSION_STRING \
" libpng version 1.2.41beta14 - November 3, 2009\n" " libpng version 1.2.41beta14 - November 8, 2009\n"
#define PNG_LIBPNG_VER_SONUM 0 #define PNG_LIBPNG_VER_SONUM 0
#define PNG_LIBPNG_VER_DLLNUM 13 #define PNG_LIBPNG_VER_DLLNUM 13
@ -1514,23 +1514,7 @@ struct png_struct_def
/* New member added in libpng-1.2.30 */ /* New member added in libpng-1.2.30 */
png_charp chunkdata; /* buffer for reading chunk data */ png_charp chunkdata; /* buffer for reading chunk data */
/* New member added in libpng-1.2.41 */
#ifdef PNG_SET_USER_LIMITS_SUPPORTED
/* Total number of sPLT, text, and unknown
* chunks that can be stored (0x7fffffff means unlimited).
*/
png_uint_32 user_chunk_cache_max;
#endif
/* New member added in libpng-1.2.41 */
#ifdef PNG_IO_STATE_SUPPORTED
png_uint_32 io_state;
#endif
/* New member added in libpng-1.2.41, will be removed from 1.4.0 */
#ifdef PNG_iTXt_SUPPORTED
png_charp user_png_ver; /* libpng version used to build calling app */
#endif
}; };
@ -1715,11 +1699,6 @@ extern PNG_EXPORT(void,png_set_swap_alpha) PNGARG((png_structp png_ptr));
extern PNG_EXPORT(void,png_set_invert_alpha) PNGARG((png_structp png_ptr)); extern PNG_EXPORT(void,png_set_invert_alpha) PNGARG((png_structp png_ptr));
#endif #endif
#ifdef PNG_READ_PREMULTIPLY_ALPHA_SUPPORTED
extern PNG_EXPORT(void,png_set_premultiply_alpha)
PNGARG((png_structp png_ptr));
#endif
#if defined(PNG_READ_FILLER_SUPPORTED) || defined(PNG_WRITE_FILLER_SUPPORTED) #if defined(PNG_READ_FILLER_SUPPORTED) || defined(PNG_WRITE_FILLER_SUPPORTED)
/* Add a filler byte to 8-bit Gray or 24-bit RGB images. */ /* Add a filler byte to 8-bit Gray or 24-bit RGB images. */
extern PNG_EXPORT(void,png_set_filler) PNGARG((png_structp png_ptr, extern PNG_EXPORT(void,png_set_filler) PNGARG((png_structp png_ptr,
@ -2125,9 +2104,6 @@ extern PNG_EXPORT(void,png_progressive_combine_row) PNGARG((png_structp png_ptr,
extern PNG_EXPORT(png_voidp,png_malloc) PNGARG((png_structp png_ptr, extern PNG_EXPORT(png_voidp,png_malloc) PNGARG((png_structp png_ptr,
png_uint_32 size)); png_uint_32 size));
/* Added at libpng version 1.2.41 */
extern PNG_EXPORT(png_voidp,png_calloc) PNGARG((png_structp png_ptr,
png_uint_32 size));
#ifdef PNG_1_0_X #ifdef PNG_1_0_X
# define png_malloc_warn png_malloc # define png_malloc_warn png_malloc
@ -2800,32 +2776,7 @@ extern PNG_EXPORT(png_uint_32,png_get_user_width_max) PNGARG((png_structp
png_ptr)); png_ptr));
extern PNG_EXPORT(png_uint_32,png_get_user_height_max) PNGARG((png_structp extern PNG_EXPORT(png_uint_32,png_get_user_height_max) PNGARG((png_structp
png_ptr)); png_ptr));
/* Added in libpng-1.2.41 */
extern PNG_EXPORT(void,png_set_chunk_cache_max) PNGARG((png_structp
png_ptr, png_uint_32 user_chunk_cache_max));
extern PNG_EXPORT(png_uint_32,png_get_chunk_cache_max)
PNGARG((png_structp png_ptr));
#endif #endif
/* Added in libpng-1.2.41 */
#ifdef PNG_IO_STATE_SUPPORTED
extern PNG_EXPORT(png_uint_32,png_get_io_state) PNGARG((png_structp png_ptr));
extern PNG_EXPORT(png_bytep,png_get_io_chunk_name)
PNGARG((png_structp png_ptr));
/* The flags returned by png_get_io_state() are the following: */
#define PNG_IO_NONE 0x0000 /* no I/O at this moment */
#define PNG_IO_READING 0x0001 /* currently reading */
#define PNG_IO_WRITING 0x0002 /* currently writing */
#define PNG_IO_SIGNATURE 0x0010 /* currently at the file signature */
#define PNG_IO_CHUNK_HDR 0x0020 /* currently at the chunk header */
#define PNG_IO_CHUNK_DATA 0x0040 /* currently at the chunk data */
#define PNG_IO_CHUNK_CRC 0x0080 /* currently at the chunk crc */
#define PNG_IO_MASK_OP 0x000f /* current operation: reading/writing */
#define PNG_IO_MASK_LOC 0x00f0 /* current location: sig/hdr/data/crc */
#endif /* ?PNG_IO_STATE_SUPPORTED */
/* Maintainer: Put new public prototypes here ^, in libpng.3, and in /* Maintainer: Put new public prototypes here ^, in libpng.3, and in
* project defs * project defs
*/ */
@ -3462,11 +3413,6 @@ PNG_EXTERN void png_do_strip_filler PNGARG((png_row_infop row_info,
png_bytep row, png_uint_32 flags)); png_bytep row, png_uint_32 flags));
#endif #endif
#ifdef PNG_READ_PREMULTIPLY_ALPHA_SUPPORTED
PNG_EXTERN void png_do_read_premultiply_alpha
PNGARG((png_row_infop row_info, png_bytep row));
#endif
#if defined(PNG_READ_SWAP_SUPPORTED) || defined(PNG_WRITE_SWAP_SUPPORTED) #if defined(PNG_READ_SWAP_SUPPORTED) || defined(PNG_WRITE_SWAP_SUPPORTED)
PNG_EXTERN void png_do_swap PNGARG((png_row_infop row_info, png_bytep row)); PNG_EXTERN void png_do_swap PNGARG((png_row_infop row_info, png_bytep row));
#endif #endif
@ -3773,6 +3719,10 @@ PNG_EXTERN void png_check_IHDR PNGARG((png_structp png_ptr,
int color_type, int interlace_type, int compression_type, int color_type, int interlace_type, int compression_type,
int filter_type)); int filter_type));
/* Added at libpng version 1.2.41 */
PNG_EXTERN png_voidp png_calloc PNGARG((png_structp png_ptr,
png_uint_32 size));
/* Maintainer: Put new private prototypes here ^ and in libpngpf.3 */ /* Maintainer: Put new private prototypes here ^ and in libpngpf.3 */
#endif /* PNG_INTERNAL */ #endif /* PNG_INTERNAL */

View File

@ -1,7 +1,7 @@
/* pngconf.h - machine configurable file for libpng /* pngconf.h - machine configurable file for libpng
* *
* libpng version 1.2.41beta14 - November 3, 2009 * libpng version 1.2.41beta14 - November 8, 2009
* Copyright (c) 1998-2009 Glenn Randers-Pehrson * Copyright (c) 1998-2009 Glenn Randers-Pehrson
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger) * (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
* (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.) * (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
@ -523,9 +523,30 @@
* iTXt support was added. iTXt support was turned off by default through * iTXt support was added. iTXt support was turned off by default through
* libpng-1.2.x, to support old apps that malloc the png_text structure * libpng-1.2.x, to support old apps that malloc the png_text structure
* instead of calling png_set_text() and letting libpng malloc it. It * instead of calling png_set_text() and letting libpng malloc it. It
* was turned on by default in libpng-1.2.41. * will be turned on by default in libpng-1.4.0.
*/ */
#if defined(PNG_1_0_X) || defined (PNG_1_2_X)
# ifndef PNG_NO_iTXt_SUPPORTED
# define PNG_NO_iTXt_SUPPORTED
# endif
# ifndef PNG_NO_READ_iTXt
# define PNG_NO_READ_iTXt
# endif
# ifndef PNG_NO_WRITE_iTXt
# define PNG_NO_WRITE_iTXt
# endif
#endif
#if !defined(PNG_NO_iTXt_SUPPORTED)
# if !defined(PNG_READ_iTXt_SUPPORTED) && !defined(PNG_NO_READ_iTXt)
# define PNG_READ_iTXt
# endif
# if !defined(PNG_WRITE_iTXt_SUPPORTED) && !defined(PNG_NO_WRITE_iTXt)
# define PNG_WRITE_iTXt
# endif
#endif
/* The following support, added after version 1.0.0, can be turned off here en /* The following support, added after version 1.0.0, can be turned off here en
* masse by defining PNG_LEGACY_SUPPORTED in case you need binary compatibility * masse by defining PNG_LEGACY_SUPPORTED in case you need binary compatibility
* with old applications that require the length of png_struct and png_info * with old applications that require the length of png_struct and png_info
@ -623,11 +644,6 @@
# ifndef PNG_NO_READ_INVERT_ALPHA # ifndef PNG_NO_READ_INVERT_ALPHA
# define PNG_READ_INVERT_ALPHA_SUPPORTED # define PNG_READ_INVERT_ALPHA_SUPPORTED
# endif # endif
#ifndef PNG_1_0_X
# ifndef PNG_NO_READ_PREMULTIPLY_ALPHA
# define PNG_READ_PREMULTIPLY_ALPHA_SUPPORTED
# endif
#endif
# ifndef PNG_NO_READ_STRIP_ALPHA # ifndef PNG_NO_READ_STRIP_ALPHA
# define PNG_READ_STRIP_ALPHA_SUPPORTED # define PNG_READ_STRIP_ALPHA_SUPPORTED
# endif # endif
@ -853,13 +869,6 @@
#endif #endif
#endif #endif
/* Added at libpng-1.2.41 */
#ifndef PNG_1_0_X
#if !defined(PNG_NO_IO_STATE) && !defined(PNG_IO_STATE_SUPPORTED)
# define PNG_IO_STATE_SUPPORTED
#endif
#endif
#ifndef PNG_LITERAL_SHARP #ifndef PNG_LITERAL_SHARP
# define PNG_LITERAL_SHARP 0x23 # define PNG_LITERAL_SHARP 0x23
#endif #endif