updated libpng to 1.2.35
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@29973 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
parent
c51d0337a1
commit
b29b9ac3d4
@ -1,14 +1,14 @@
|
||||
/* png.h - header file for PNG reference library
|
||||
*
|
||||
* libpng version 1.2.34 - December 18, 2008
|
||||
* Copyright (c) 1998-2008 Glenn Randers-Pehrson
|
||||
* libpng version 1.2.35 - February 14, 2009
|
||||
* Copyright (c) 1998-2009 Glenn Randers-Pehrson
|
||||
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
|
||||
* (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
|
||||
*
|
||||
* Authors and maintainers:
|
||||
* 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.97, January 1998, through 1.2.34 - December 18, 2008: Glenn
|
||||
* libpng versions 0.97, January 1998, through 1.2.35 - February 14, 2009: Glenn
|
||||
* See also "Contributing Authors", below.
|
||||
*
|
||||
* Note about libpng version numbers:
|
||||
@ -217,6 +217,11 @@
|
||||
* 1.2.34rc01 13 10234 12.so.0.34[.0]
|
||||
* 1.0.42 10 10042 10.so.0.42[.0]
|
||||
* 1.2.34 13 10234 12.so.0.34[.0]
|
||||
* 1.2.35beta01-03 13 10235 12.so.0.35[.0]
|
||||
* 1.0.43rc01-02 10 10043 10.so.0.43[.0]
|
||||
* 1.2.35rc01-02 13 10235 12.so.0.35[.0]
|
||||
* 1.0.43 10 10043 10.so.0.43[.0]
|
||||
* 1.2.35 13 10235 12.so.0.35[.0]
|
||||
*
|
||||
* Henceforth the source version will match the shared-library major
|
||||
* and minor numbers; the shared-library major version number will be
|
||||
@ -246,7 +251,7 @@
|
||||
* If you modify libpng you may insert additional notices immediately following
|
||||
* this sentence.
|
||||
*
|
||||
* libpng versions 1.2.6, August 15, 2004, through 1.2.34, December 18, 2008, are
|
||||
* libpng versions 1.2.6, August 15, 2004, through 1.2.35, February 14, 2009, are
|
||||
* Copyright (c) 2004, 2006-2008 Glenn Randers-Pehrson, and are
|
||||
* distributed according to the same disclaimer and license as libpng-1.2.5
|
||||
* with the following individual added to the list of Contributing Authors:
|
||||
@ -358,13 +363,13 @@
|
||||
* Y2K compliance in libpng:
|
||||
* =========================
|
||||
*
|
||||
* December 18, 2008
|
||||
* February 14, 2009
|
||||
*
|
||||
* Since the PNG Development group is an ad-hoc body, we can't make
|
||||
* an official declaration.
|
||||
*
|
||||
* This is your unofficial assurance that libpng from version 0.71 and
|
||||
* upward through 1.2.34 are Y2K compliant. It is my belief that earlier
|
||||
* upward through 1.2.35 are Y2K compliant. It is my belief that earlier
|
||||
* versions were also Y2K compliant.
|
||||
*
|
||||
* Libpng only has three year fields. One is a 2-byte unsigned integer
|
||||
@ -420,9 +425,9 @@
|
||||
*/
|
||||
|
||||
/* Version information for png.h - this should match the version in png.c */
|
||||
#define PNG_LIBPNG_VER_STRING "1.2.34"
|
||||
#define PNG_LIBPNG_VER_STRING "1.2.35"
|
||||
#define PNG_HEADER_VERSION_STRING \
|
||||
" libpng version 1.2.34 - December 18, 2008\n"
|
||||
" libpng version 1.2.35 - February 14, 2009\n"
|
||||
|
||||
#define PNG_LIBPNG_VER_SONUM 0
|
||||
#define PNG_LIBPNG_VER_DLLNUM 13
|
||||
@ -430,7 +435,7 @@
|
||||
/* These should match the first 3 components of PNG_LIBPNG_VER_STRING: */
|
||||
#define PNG_LIBPNG_VER_MAJOR 1
|
||||
#define PNG_LIBPNG_VER_MINOR 2
|
||||
#define PNG_LIBPNG_VER_RELEASE 34
|
||||
#define PNG_LIBPNG_VER_RELEASE 35
|
||||
/* This should match the numeric part of the final component of
|
||||
* PNG_LIBPNG_VER_STRING, omitting any leading zero: */
|
||||
|
||||
@ -458,7 +463,7 @@
|
||||
* Versions 0.7 through 1.0.0 were in the range 0 to 100 here (only
|
||||
* version 1.0.0 was mis-numbered 100 instead of 10000). From
|
||||
* version 1.0.1 it's xxyyzz, where x=major, y=minor, z=release */
|
||||
#define PNG_LIBPNG_VER 10234 /* 1.2.34 */
|
||||
#define PNG_LIBPNG_VER 10235 /* 1.2.35 */
|
||||
|
||||
#ifndef PNG_VERSION_INFO_ONLY
|
||||
/* include the compression library's header */
|
||||
@ -1482,7 +1487,7 @@ struct png_struct_def
|
||||
/* This triggers a compiler error in png.c, if png.c and png.h
|
||||
* do not agree upon the version number.
|
||||
*/
|
||||
typedef png_structp version_1_2_34;
|
||||
typedef png_structp version_1_2_35;
|
||||
|
||||
typedef png_struct FAR * FAR * png_structpp;
|
||||
|
||||
|
@ -1,9 +1,9 @@
|
||||
|
||||
/* pngconf.h - machine configurable file for libpng
|
||||
*
|
||||
* libpng version 1.2.34 - December 18, 2008
|
||||
* libpng version 1.2.35 - February 14, 2009
|
||||
* For conditions of distribution and use, see copyright notice in png.h
|
||||
* Copyright (c) 1998-2008 Glenn Randers-Pehrson
|
||||
* Copyright (c) 1998-2009 Glenn Randers-Pehrson
|
||||
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
|
||||
* (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
|
||||
*/
|
||||
@ -233,6 +233,8 @@
|
||||
# include <windows.h>
|
||||
/* Console I/O functions are not supported on WindowsCE */
|
||||
# define PNG_NO_CONSOLE_IO
|
||||
/* abort() may not be supported on some/all Windows CE platforms */
|
||||
# define PNG_ABORT() exit(-1)
|
||||
# ifdef PNG_DEBUG
|
||||
# undef PNG_DEBUG
|
||||
# endif
|
||||
|
@ -8,7 +8,7 @@ COPYRIGHT NOTICE, DISCLAIMER, and LICENSE:
|
||||
If you modify libpng you may insert additional notices immediately following
|
||||
this sentence.
|
||||
|
||||
libpng versions 1.2.6, August 15, 2004, through 1.2.33, October 31, 2008, are
|
||||
libpng versions 1.2.6, August 15, 2004, through 1.2.35, February 14, 2009, are
|
||||
Copyright (c) 2004, 2006-2008 Glenn Randers-Pehrson, and are
|
||||
distributed according to the same disclaimer and license as libpng-1.2.5
|
||||
with the following individual added to the list of Contributing Authors
|
||||
@ -106,4 +106,4 @@ certification mark of the Open Source Initiative.
|
||||
|
||||
Glenn Randers-Pehrson
|
||||
glennrp at users.sourceforge.net
|
||||
October 31, 2008
|
||||
February 14, 2009
|
||||
|
@ -13,7 +13,7 @@
|
||||
#include "png.h"
|
||||
|
||||
/* Generate a compiler error if there is an old png.h in the search path. */
|
||||
typedef version_1_2_34 Your_png_h_is_not_version_1_2_34;
|
||||
typedef version_1_2_35 Your_png_h_is_not_version_1_2_35;
|
||||
|
||||
/* Version information for C files. This had better match the version
|
||||
* string defined in png.h. */
|
||||
@ -694,7 +694,7 @@ png_charp PNGAPI
|
||||
png_get_copyright(png_structp png_ptr)
|
||||
{
|
||||
png_ptr = png_ptr; /* silence compiler warning about unused png_ptr */
|
||||
return ((png_charp) "\n libpng version 1.2.34 - December 18, 2008\n\
|
||||
return ((png_charp) "\n libpng version 1.2.35 - February 14, 2009\n\
|
||||
Copyright (c) 1998-2008 Glenn Randers-Pehrson\n\
|
||||
Copyright (c) 1996-1997 Andreas Dilger\n\
|
||||
Copyright (c) 1995-1996 Guy Eric Schalnat, Group 42, Inc.\n");
|
||||
|
@ -883,7 +883,7 @@ png_get_mmx_rowbytes_threshold (png_structp png_ptr)
|
||||
#endif /* ?PNG_ASSEMBLER_CODE_SUPPORTED */
|
||||
|
||||
#ifdef PNG_SET_USER_LIMITS_SUPPORTED
|
||||
/* these functions were added to libpng 1.2.6 */
|
||||
/* These functions were added to libpng 1.2.6 */
|
||||
png_uint_32 PNGAPI
|
||||
png_get_user_width_max (png_structp png_ptr)
|
||||
{
|
||||
|
@ -1,9 +1,9 @@
|
||||
|
||||
/* pngread.c - read a PNG file
|
||||
*
|
||||
* Last changed in libpng 1.2.30 [August 15, 2008]
|
||||
* Last changed in libpng 1.2.35 [February 14, 2009]
|
||||
* For conditions of distribution and use, see copyright notice in png.h
|
||||
* Copyright (c) 1998-2008 Glenn Randers-Pehrson
|
||||
* Copyright (c) 1998-2009 Glenn Randers-Pehrson
|
||||
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
|
||||
* (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
|
||||
*
|
||||
@ -1437,12 +1437,12 @@ png_read_png(png_structp png_ptr, png_infop info_ptr,
|
||||
#ifdef PNG_FREE_ME_SUPPORTED
|
||||
info_ptr->free_me |= PNG_FREE_ROWS;
|
||||
#endif
|
||||
png_memset(info_ptr->row_pointers, 0, info_ptr->height
|
||||
* png_sizeof(png_bytep));
|
||||
for (row = 0; row < (int)info_ptr->height; row++)
|
||||
{
|
||||
info_ptr->row_pointers[row] = (png_bytep)png_malloc(png_ptr,
|
||||
png_get_rowbytes(png_ptr, info_ptr));
|
||||
}
|
||||
}
|
||||
|
||||
png_read_image(png_ptr, info_ptr->row_pointers);
|
||||
info_ptr->valid |= PNG_INFO_IDAT;
|
||||
|
@ -1,9 +1,9 @@
|
||||
|
||||
/* pngrtran.c - transforms the data in a row for PNG readers
|
||||
*
|
||||
* Last changed in libpng 1.2.30 [August 15, 2008]
|
||||
* Last changed in libpng 1.2.35 [February 14, 2009]
|
||||
* For conditions of distribution and use, see copyright notice in png.h
|
||||
* Copyright (c) 1998-2008 Glenn Randers-Pehrson
|
||||
* Copyright (c) 1998-2009 Glenn Randers-Pehrson
|
||||
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
|
||||
* (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
|
||||
*
|
||||
@ -309,9 +309,7 @@ png_set_dither(png_structp png_ptr, png_colorp palette,
|
||||
|
||||
hash = (png_dsortpp)png_malloc(png_ptr, (png_uint_32)(769 *
|
||||
png_sizeof(png_dsortp)));
|
||||
for (i = 0; i < 769; i++)
|
||||
hash[i] = NULL;
|
||||
/* png_memset(hash, 0, 769 * png_sizeof(png_dsortp)); */
|
||||
png_memset(hash, 0, 769 * png_sizeof(png_dsortp));
|
||||
|
||||
num_new_palette = num_palette;
|
||||
|
||||
@ -4133,6 +4131,8 @@ png_build_gamma_table(png_structp png_ptr)
|
||||
double fin, fout;
|
||||
png_uint_32 last, max;
|
||||
|
||||
png_memset(png_ptr->gamma_16_table, 0, num * png_sizeof(png_uint_16p));
|
||||
|
||||
for (i = 0; i < num; i++)
|
||||
{
|
||||
png_ptr->gamma_16_table[i] = (png_uint_16p)png_malloc(png_ptr,
|
||||
@ -4188,6 +4188,8 @@ png_build_gamma_table(png_structp png_ptr)
|
||||
png_ptr->gamma_16_to_1 = (png_uint_16pp)png_malloc(png_ptr,
|
||||
(png_uint_32)(num * png_sizeof(png_uint_16p )));
|
||||
|
||||
png_memset(png_ptr->gamma_16_to_1, 0, num * png_sizeof(png_uint_16p));
|
||||
|
||||
for (i = 0; i < num; i++)
|
||||
{
|
||||
png_ptr->gamma_16_to_1[i] = (png_uint_16p)png_malloc(png_ptr,
|
||||
@ -4211,6 +4213,9 @@ png_build_gamma_table(png_structp png_ptr)
|
||||
png_ptr->gamma_16_from_1 = (png_uint_16pp)png_malloc(png_ptr,
|
||||
(png_uint_32)(num * png_sizeof(png_uint_16p)));
|
||||
|
||||
png_memset(png_ptr->gamma_16_from_1, 0,
|
||||
num * png_sizeof(png_uint_16p));
|
||||
|
||||
for (i = 0; i < num; i++)
|
||||
{
|
||||
png_ptr->gamma_16_from_1[i] = (png_uint_16p)png_malloc(png_ptr,
|
||||
|
@ -1118,6 +1118,7 @@ png_handle_sPLT(png_structp png_ptr, png_infop info_ptr, png_uint_32 length)
|
||||
|
||||
png_debug(1, "in png_handle_sPLT");
|
||||
|
||||
|
||||
if (!(png_ptr->mode & PNG_HAVE_IHDR))
|
||||
png_error(png_ptr, "Missing IHDR before sPLT");
|
||||
else if (png_ptr->mode & PNG_HAVE_IDAT)
|
||||
@ -1904,6 +1905,7 @@ png_handle_tEXt(png_structp png_ptr, png_infop info_ptr, png_uint_32 length)
|
||||
|
||||
png_debug(1, "in png_handle_tEXt");
|
||||
|
||||
|
||||
if (!(png_ptr->mode & PNG_HAVE_IHDR))
|
||||
png_error(png_ptr, "Missing IHDR before tEXt");
|
||||
|
||||
@ -1920,6 +1922,7 @@ png_handle_tEXt(png_structp png_ptr, png_infop info_ptr, png_uint_32 length)
|
||||
#endif
|
||||
|
||||
png_free(png_ptr, png_ptr->chunkdata);
|
||||
|
||||
png_ptr->chunkdata = (png_charp)png_malloc_warn(png_ptr, length + 1);
|
||||
if (png_ptr->chunkdata == NULL)
|
||||
{
|
||||
@ -1937,6 +1940,7 @@ png_handle_tEXt(png_structp png_ptr, png_infop info_ptr, png_uint_32 length)
|
||||
}
|
||||
|
||||
key = png_ptr->chunkdata;
|
||||
|
||||
key[slength] = 0x00;
|
||||
|
||||
for (text = key; *text; text++)
|
||||
@ -1986,6 +1990,8 @@ png_handle_zTXt(png_structp png_ptr, png_infop info_ptr, png_uint_32 length)
|
||||
png_size_t slength, prefix_len, data_len;
|
||||
|
||||
png_debug(1, "in png_handle_zTXt");
|
||||
|
||||
|
||||
if (!(png_ptr->mode & PNG_HAVE_IHDR))
|
||||
png_error(png_ptr, "Missing IHDR before zTXt");
|
||||
|
||||
@ -2090,6 +2096,7 @@ png_handle_iTXt(png_structp png_ptr, png_infop info_ptr, png_uint_32 length)
|
||||
|
||||
png_debug(1, "in png_handle_iTXt");
|
||||
|
||||
|
||||
if (!(png_ptr->mode & PNG_HAVE_IHDR))
|
||||
png_error(png_ptr, "Missing IHDR before iTXt");
|
||||
|
||||
@ -2216,6 +2223,7 @@ png_handle_unknown(png_structp png_ptr, png_infop info_ptr, png_uint_32 length)
|
||||
|
||||
png_debug(1, "in png_handle_unknown");
|
||||
|
||||
|
||||
if (png_ptr->mode & PNG_HAVE_IDAT)
|
||||
{
|
||||
#ifdef PNG_USE_LOCAL_ARRAYS
|
||||
@ -3204,9 +3212,9 @@ defined(PNG_USER_TRANSFORM_PTR_SUPPORTED)
|
||||
png_debug1(3, "width = %lu,", png_ptr->width);
|
||||
png_debug1(3, "height = %lu,", png_ptr->height);
|
||||
png_debug1(3, "iwidth = %lu,", png_ptr->iwidth);
|
||||
png_debug1(3, "num_rows = %lu", png_ptr->num_rows);
|
||||
png_debug1(3, "num_rows = %lu,", png_ptr->num_rows);
|
||||
png_debug1(3, "rowbytes = %lu,", png_ptr->rowbytes);
|
||||
png_debug1(3, "irowbytes = %lu,", png_ptr->irowbytes);
|
||||
png_debug1(3, "irowbytes = %lu", png_ptr->irowbytes);
|
||||
|
||||
png_ptr->flags |= PNG_FLAG_ROW_INIT;
|
||||
}
|
||||
|
@ -1,9 +1,9 @@
|
||||
|
||||
/* pngset.c - storage of image information into info struct
|
||||
*
|
||||
* Last changed in libpng 1.2.34 [December 18, 2008]
|
||||
* Last changed in libpng 1.2.35 [February 14, 2009]
|
||||
* For conditions of distribution and use, see copyright notice in png.h
|
||||
* Copyright (c) 1998-2008 Glenn Randers-Pehrson
|
||||
* Copyright (c) 1998-2009 Glenn Randers-Pehrson
|
||||
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
|
||||
* (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
|
||||
*
|
||||
@ -61,7 +61,8 @@ png_set_cHRM(png_structp png_ptr, png_infop info_ptr,
|
||||
#endif
|
||||
info_ptr->valid |= PNG_INFO_cHRM;
|
||||
}
|
||||
#endif
|
||||
#endif /* PNG_FLOATING_POINT_SUPPORTED */
|
||||
|
||||
#ifdef PNG_FIXED_POINT_SUPPORTED
|
||||
void PNGAPI
|
||||
png_set_cHRM_fixed(png_structp png_ptr, png_infop info_ptr,
|
||||
@ -382,7 +383,11 @@ png_set_pCAL(png_structp png_ptr, png_infop info_ptr,
|
||||
return;
|
||||
}
|
||||
|
||||
info_ptr->pcal_params[nparams] = NULL;
|
||||
#ifdef PNG_FREE_ME_SUPPORTED
|
||||
info_ptr->free_me |= PNG_FREE_PCAL;
|
||||
#endif
|
||||
|
||||
png_memset(info_ptr->pcal_params, 0, (nparams + 1) * png_sizeof(png_charp));
|
||||
|
||||
for (i = 0; i < nparams; i++)
|
||||
{
|
||||
@ -399,9 +404,6 @@ png_set_pCAL(png_structp png_ptr, png_infop info_ptr,
|
||||
}
|
||||
|
||||
info_ptr->valid |= PNG_INFO_pCAL;
|
||||
#ifdef PNG_FREE_ME_SUPPORTED
|
||||
info_ptr->free_me |= PNG_FREE_PCAL;
|
||||
#endif
|
||||
}
|
||||
#endif
|
||||
|
||||
@ -635,7 +637,7 @@ png_set_sRGB_gAMA_and_cHRM(png_structp png_ptr, png_infop info_ptr,
|
||||
}
|
||||
#endif /* cHRM */
|
||||
}
|
||||
#endif
|
||||
#endif /* sRGB */
|
||||
|
||||
|
||||
#if defined(PNG_iCCP_SUPPORTED)
|
||||
@ -959,6 +961,7 @@ png_set_sPLT(png_structp png_ptr,
|
||||
|
||||
png_memcpy(np, info_ptr->splt_palettes,
|
||||
info_ptr->splt_palettes_num * png_sizeof(png_sPLT_t));
|
||||
|
||||
png_free(png_ptr, info_ptr->splt_palettes);
|
||||
info_ptr->splt_palettes=NULL;
|
||||
|
||||
|
@ -1,9 +1,9 @@
|
||||
|
||||
/* pngwio.c - functions for data output
|
||||
*
|
||||
* Last changed in libpng 1.2.30 [August 15, 2008]
|
||||
* Last changed in libpng 1.2.35 [February 14, 2009]
|
||||
* For conditions of distribution and use, see copyright notice in png.h
|
||||
* Copyright (c) 1998-2008 Glenn Randers-Pehrson
|
||||
* Copyright (c) 1998-2009 Glenn Randers-Pehrson
|
||||
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
|
||||
* (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
|
||||
*
|
||||
@ -137,7 +137,7 @@ png_default_flush(png_structp png_ptr)
|
||||
if (png_ptr == NULL) return;
|
||||
#if !defined(_WIN32_WCE)
|
||||
io_ptr = (png_FILE_p)CVT_PTR((png_ptr->io_ptr));
|
||||
if (io_ptr != NULL)
|
||||
if (io_ptr != NULL && fileno(io_ptr) != -1)
|
||||
fflush(io_ptr);
|
||||
#endif
|
||||
}
|
||||
|
@ -1,7 +1,7 @@
|
||||
|
||||
/* pngwrite.c - general routines to write a PNG file
|
||||
*
|
||||
* Last changed in libpng 1.2.31 [August 19, 2008]
|
||||
* Last changed in libpng 1.2.34 [December 18, 2008]
|
||||
* For conditions of distribution and use, see copyright notice in png.h
|
||||
* Copyright (c) 1998-2008 Glenn Randers-Pehrson
|
||||
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
|
||||
|
Loading…
Reference in New Issue
Block a user