[master] Imported from libpng-1.4.1beta07.tar

This commit is contained in:
Glenn Randers-Pehrson 2010-02-05 16:28:01 -06:00
parent d7225fdfce
commit 21b7aaa428
36 changed files with 151 additions and 118 deletions

View File

@ -2492,6 +2492,7 @@ version 1.4.1beta06 [January 28, 2010]
John Bowler.
version 1.4.1beta07 [February 5, 2010]
Folded some long lines in png.h
Added defineable PNG_USER_CHUNK_CACHE_MAX and PNG_USER_CHUNK_MALLOC_MAX
Send comments/corrections/commendations to png-mng-implement at lists.sf.net

View File

@ -209,7 +209,7 @@ configure_file(${CMAKE_CURRENT_SOURCE_DIR}/libpng-config.in
# SET UP LINKS
if(PNG_SHARED)
set_target_properties(${PNG_LIB_NAME} PROPERTIES
# VERSION 14.${PNGLIB_RELEASE}.1.4.1beta06
# VERSION 14.${PNGLIB_RELEASE}.1.4.1beta07
VERSION 14.${PNGLIB_RELEASE}.0
SOVERSION 14
CLEAN_DIRECT_OUTPUT 1)

View File

@ -1,5 +1,5 @@
Installing libpng version 1.4.1beta06 - January 28, 2010
Installing libpng version 1.4.1beta07 - February 5, 2010
On Unix/Linux and similar systems, you can simply type
@ -46,7 +46,7 @@ to have access to the zlib.h and zconf.h include files that
correspond to the version of zlib that's installed.
You can rename the directories that you downloaded (they
might be called "libpng-1.4.1beta06" or "libpng14" and "zlib-1.2.3"
might be called "libpng-1.4.1beta07" or "libpng14" and "zlib-1.2.3"
or "zlib123") so that you have directories called "zlib" and "libpng".
Your directory structure should look like this:

View File

@ -10,7 +10,7 @@ this sentence.
This code is released under the libpng license.
libpng versions 1.2.6, August 15, 2004, through 1.4.1beta06, January 28, 2010, are
libpng versions 1.2.6, August 15, 2004, through 1.4.1beta07, February 5, 2010, are
Copyright (c) 2004, 2006-2007 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
@ -108,4 +108,4 @@ certification mark of the Open Source Initiative.
Glenn Randers-Pehrson
glennrp at users.sourceforge.net
January 28, 2010
February 5, 2010

View File

@ -73,7 +73,7 @@ EXTRA_DIST= \
${srcdir}/contrib/pngsuite/* \
${srcdir}/contrib/visupng/* \
$(TESTS) \
example.c libpng-1.4.1beta06.txt
example.c libpng-1.4.1beta07.txt
CLEANFILES= pngout.png libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@.pc libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@-config libpng.vers \
libpng.sym

View File

@ -333,7 +333,7 @@ EXTRA_DIST = \
${srcdir}/contrib/pngsuite/* \
${srcdir}/contrib/visupng/* \
$(TESTS) \
example.c libpng-1.4.1beta06.txt
example.c libpng-1.4.1beta07.txt
CLEANFILES = pngout.png libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@.pc libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@-config libpng.vers \
libpng.sym

12
README
View File

@ -1,4 +1,4 @@
README for libpng version 1.4.1beta06 - January 28, 2010 (shared library 14.0)
README for libpng version 1.4.1beta07 - February 5, 2010 (shared library 14.0)
See the note about version numbers near the top of png.h
See INSTALL for instructions on how to install libpng.
@ -185,9 +185,9 @@ Files in this distribution:
makefile.std => Generic UNIX makefile (cc, creates static
libpng.a)
makefile.elf => Linux/ELF makefile symbol versioning,
gcc, creates libpng14.so.14.1.4.1beta06)
gcc, creates libpng14.so.14.1.4.1beta07)
makefile.linux => Linux/ELF makefile
(gcc, creates libpng14.so.14.1.4.1beta06)
(gcc, creates libpng14.so.14.1.4.1beta07)
makefile.gcc => Generic makefile (gcc, creates static libpng.a)
makefile.knr => Archaic UNIX Makefile that converts files with
ansi2knr (Requires ansi2knr.c from
@ -209,12 +209,12 @@ Files in this distribution:
makefile.openbsd => OpenBSD makefile
makefile.sgi => Silicon Graphics IRIX (cc, creates static lib)
makefile.sggcc => Silicon Graphics
(gcc, creates libpng14.so.14.1.4.1beta06)
(gcc, creates libpng14.so.14.1.4.1beta07)
makefile.sunos => Sun makefile
makefile.solaris => Solaris 2.X makefile
(gcc, creates libpng14.so.14.1.4.1beta06)
(gcc, creates libpng14.so.14.1.4.1beta07)
makefile.so9 => Solaris 9 makefile
(gcc, creates libpng14.so.14.1.4.1beta06)
(gcc, creates libpng14.so.14.1.4.1beta07)
makefile.32sunu => Sun Ultra 32-bit makefile
makefile.64sunu => Sun Ultra 64-bit makefile
makefile.sco => For SCO OSr5 ELF and Unixware 7 with Native cc

22
configure vendored
View File

@ -1,6 +1,6 @@
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
# Generated by GNU Autoconf 2.65 for libpng 1.4.1beta06.
# Generated by GNU Autoconf 2.65 for libpng 1.4.1beta07.
#
# Report bugs to <png-mng-implement@lists.sourceforge.net>.
#
@ -701,8 +701,8 @@ MAKEFLAGS=
# Identity of this package.
PACKAGE_NAME='libpng'
PACKAGE_TARNAME='libpng'
PACKAGE_VERSION='1.4.1beta06'
PACKAGE_STRING='libpng 1.4.1beta06'
PACKAGE_VERSION='1.4.1beta07'
PACKAGE_STRING='libpng 1.4.1beta07'
PACKAGE_BUGREPORT='png-mng-implement@lists.sourceforge.net'
PACKAGE_URL=''
@ -1432,7 +1432,7 @@ if test "$ac_init_help" = "long"; then
# Omit some internal or obsolete options to make the list less imposing.
# This message is too long to be a string in the A/UX 3.1 sh.
cat <<_ACEOF
\`configure' configures libpng 1.4.1beta06 to adapt to many kinds of systems.
\`configure' configures libpng 1.4.1beta07 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
@ -1502,7 +1502,7 @@ fi
if test -n "$ac_init_help"; then
case $ac_init_help in
short | recursive ) echo "Configuration of libpng 1.4.1beta06:";;
short | recursive ) echo "Configuration of libpng 1.4.1beta07:";;
esac
cat <<\_ACEOF
@ -1607,7 +1607,7 @@ fi
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
libpng configure 1.4.1beta06
libpng configure 1.4.1beta07
generated by GNU Autoconf 2.65
Copyright (C) 2009 Free Software Foundation, Inc.
@ -2032,7 +2032,7 @@ cat >config.log <<_ACEOF
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
It was created by libpng $as_me 1.4.1beta06, which was
It was created by libpng $as_me 1.4.1beta07, which was
generated by GNU Autoconf 2.65. Invocation command line was
$ $0 $@
@ -2840,7 +2840,7 @@ fi
# Define the identity of the package.
PACKAGE='libpng'
VERSION='1.4.1beta06'
VERSION='1.4.1beta07'
cat >>confdefs.h <<_ACEOF
@ -2904,7 +2904,7 @@ fi
PNGLIB_VERSION=1.4.1beta06
PNGLIB_VERSION=1.4.1beta07
PNGLIB_MAJOR=1
PNGLIB_MINOR=4
PNGLIB_RELEASE=1
@ -12027,7 +12027,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
# report actual input values of CONFIG_FILES etc. instead of their
# values after options handling.
ac_log="
This file was extended by libpng $as_me 1.4.1beta06, which was
This file was extended by libpng $as_me 1.4.1beta07, which was
generated by GNU Autoconf 2.65. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
@ -12093,7 +12093,7 @@ _ACEOF
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
ac_cs_version="\\
libpng config.status 1.4.1beta06
libpng config.status 1.4.1beta07
configured by $0, generated by GNU Autoconf 2.65,
with options \\"\$ac_cs_config\\"

View File

@ -18,12 +18,12 @@ AC_PREREQ(2.59)
dnl Version number stuff here:
AC_INIT([libpng], [1.4.1beta06], [png-mng-implement@lists.sourceforge.net])
AC_INIT([libpng], [1.4.1beta07], [png-mng-implement@lists.sourceforge.net])
AM_INIT_AUTOMAKE
dnl stop configure from automagically running automake
AM_MAINTAINER_MODE
PNGLIB_VERSION=1.4.1beta06
PNGLIB_VERSION=1.4.1beta07
PNGLIB_MAJOR=1
PNGLIB_MINOR=4
PNGLIB_RELEASE=1

View File

@ -1,6 +1,6 @@
libpng.txt - A description on how to use and modify libpng
libpng version 1.4.1beta06 - January 28, 2010
libpng version 1.4.1beta07 - February 5, 2010
Updated and distributed by Glenn Randers-Pehrson
<glennrp at users.sourceforge.net>
Copyright (c) 1998-2009 Glenn Randers-Pehrson
@ -11,7 +11,7 @@ libpng.txt - A description on how to use and modify libpng
Based on:
libpng versions 0.97, January 1998, through 1.4.1beta06 - January 28, 2010
libpng versions 0.97, January 1998, through 1.4.1beta07 - February 5, 2010
Updated and distributed by Glenn Randers-Pehrson
Copyright (c) 1998-2009 Glenn Randers-Pehrson
@ -899,7 +899,7 @@ things.
As of libpng version 1.2.9, png_set_expand_gray_1_2_4_to_8() was
added. It expands the sample depth without changing tRNS to alpha.
As of libpng version 1.4.1beta06, not all possible expansions are supported.
As of libpng version 1.4.1beta07, not all possible expansions are supported.
In the following table, the 01 means grayscale with depth<8, 31 means
indexed with depth<8, other numerals represent the color type, "T" means
@ -2500,7 +2500,7 @@ via
Your replacement memory functions must have prototypes as follows:
png_voidp malloc_fn(png_structp png_ptr,
png_size_t size);
png_alloc_size_t size);
void free_fn(png_structp png_ptr, png_voidp ptr);
Your malloc_fn() must return NULL in case of failure. The png_malloc()
@ -3084,6 +3084,8 @@ We changed the prototype for png_malloc() from
to
png_malloc(png_structp png_ptr, png_alloc_size_t size)
This also applies to the prototype for the user replacement malloc_fn().
The png_calloc() function was added and is used in place of
of "png_malloc(); png_memset();" except in the case in png_read_png()
where the array consists of pointers; in this case a "for" loop is used
@ -3243,13 +3245,13 @@ Other rules can be inferred by inspecting the libpng source.
XIII. Y2K Compliance in libpng
January 28, 2010
February 5, 2010
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.4.1beta06 are Y2K compliant. It is my belief that earlier
upward through 1.4.1beta07 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 that

View File

@ -1,6 +1,6 @@
.TH LIBPNG 3 "January 28, 2010"
.TH LIBPNG 3 "February 5, 2010"
.SH NAME
libpng \- Portable Network Graphics (PNG) Reference Library 1.4.1beta06
libpng \- Portable Network Graphics (PNG) Reference Library 1.4.1beta07
.SH SYNOPSIS
\fI\fB
@ -785,7 +785,7 @@ Following is a copy of the libpng.txt file that accompanies libpng.
.SH LIBPNG.TXT
libpng.txt - A description on how to use and modify libpng
libpng version 1.4.1beta06 - January 28, 2010
libpng version 1.4.1beta07 - February 5, 2010
Updated and distributed by Glenn Randers-Pehrson
<glennrp at users.sourceforge.net>
Copyright (c) 1998-2009 Glenn Randers-Pehrson
@ -796,7 +796,7 @@ libpng.txt - A description on how to use and modify libpng
Based on:
libpng versions 0.97, January 1998, through 1.4.1beta06 - January 28, 2010
libpng versions 0.97, January 1998, through 1.4.1beta07 - February 5, 2010
Updated and distributed by Glenn Randers-Pehrson
Copyright (c) 1998-2009 Glenn Randers-Pehrson
@ -1684,7 +1684,7 @@ things.
As of libpng version 1.2.9, png_set_expand_gray_1_2_4_to_8() was
added. It expands the sample depth without changing tRNS to alpha.
As of libpng version 1.4.1beta06, not all possible expansions are supported.
As of libpng version 1.4.1beta07, not all possible expansions are supported.
In the following table, the 01 means grayscale with depth<8, 31 means
indexed with depth<8, other numerals represent the color type, "T" means
@ -3285,7 +3285,7 @@ via
Your replacement memory functions must have prototypes as follows:
png_voidp malloc_fn(png_structp png_ptr,
png_size_t size);
png_alloc_size_t size);
void free_fn(png_structp png_ptr, png_voidp ptr);
Your malloc_fn() must return NULL in case of failure. The png_malloc()
@ -3869,6 +3869,8 @@ We changed the prototype for png_malloc() from
to
png_malloc(png_structp png_ptr, png_alloc_size_t size)
This also applies to the prototype for the user replacement malloc_fn().
The png_calloc() function was added and is used in place of
of "png_malloc(); png_memset();" except in the case in png_read_png()
where the array consists of pointers; in this case a "for" loop is used
@ -4028,13 +4030,13 @@ Other rules can be inferred by inspecting the libpng source.
.SH XIII. Y2K Compliance in libpng
January 28, 2010
February 5, 2010
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.4.1beta06 are Y2K compliant. It is my belief that earlier
upward through 1.4.1beta07 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 that
@ -4265,7 +4267,7 @@ possible without all of you.
Thanks to Frank J. T. Wojcik for helping with the documentation.
Libpng version 1.4.1beta06 - January 28, 2010:
Libpng version 1.4.1beta07 - February 5, 2010:
Initially created in 1995 by Guy Eric Schalnat, then of Group 42, Inc.
Currently maintained by Glenn Randers-Pehrson (glennrp at users.sourceforge.net).
@ -4288,7 +4290,7 @@ this sentence.
This code is released under the libpng license.
libpng versions 1.2.6, August 15, 2004, through 1.4.1beta06, January 28, 2010, are
libpng versions 1.2.6, August 15, 2004, through 1.4.1beta07, February 5, 2010, are
Copyright (c) 2004,2006-2007 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
@ -4387,7 +4389,7 @@ certification mark of the Open Source Initiative.
Glenn Randers-Pehrson
glennrp at users.sourceforge.net
January 28, 2010
February 5, 2010
.\" end of man page

View File

@ -1,6 +1,6 @@
.TH LIBPNGPF 3 "January 28, 2010"
.TH LIBPNGPF 3 "February 5, 2010"
.SH NAME
libpng \- Portable Network Graphics (PNG) Reference Library 1.4.1beta06
libpng \- Portable Network Graphics (PNG) Reference Library 1.4.1beta07
(private functions)
.SH SYNOPSIS
\fB#include <png.h>\fP

2
png.5
View File

@ -1,4 +1,4 @@
.TH PNG 5 "January 28, 2010"
.TH PNG 5 "February 5, 2010"
.SH NAME
png \- Portable Network Graphics (PNG) format
.SH DESCRIPTION

6
png.c
View File

@ -17,7 +17,7 @@
#include "pngpriv.h"
/* Generate a compiler error if there is an old png.h in the search path. */
typedef version_1_4_1beta06 Your_png_h_is_not_version_1_4_1beta06;
typedef version_1_4_1beta07 Your_png_h_is_not_version_1_4_1beta07;
/* Version information for C files. This had better match the version
* string defined in png.h.
@ -551,13 +551,13 @@ png_get_copyright(png_structp png_ptr)
#else
#ifdef __STDC__
return ((png_charp) PNG_STRING_NEWLINE \
"libpng version 1.4.1beta06 - January 28, 2010" PNG_STRING_NEWLINE \
"libpng version 1.4.1beta07 - February 5, 2010" PNG_STRING_NEWLINE \
"Copyright (c) 1998-2010 Glenn Randers-Pehrson" PNG_STRING_NEWLINE \
"Copyright (c) 1996-1997 Andreas Dilger" PNG_STRING_NEWLINE \
"Copyright (c) 1995-1996 Guy Eric Schalnat, Group 42, Inc." \
PNG_STRING_NEWLINE);
#else
return ((png_charp) "libpng version 1.4.1beta06 - January 28, 2010\
return ((png_charp) "libpng version 1.4.1beta07 - February 5, 2010\
Copyright (c) 1998-2010 Glenn Randers-Pehrson\
Copyright (c) 1996-1997 Andreas Dilger\
Copyright (c) 1995-1996 Guy Eric Schalnat, Group 42, Inc.");

14
png.h
View File

@ -1,7 +1,7 @@
/* png.h - header file for PNG reference library
*
* libpng version 1.4.1beta06 - February 5, 2010
* libpng version 1.4.1beta07 - February 5, 2010
* Copyright (c) 1998-2010 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.)
@ -11,7 +11,7 @@
* 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.4.1beta06 - February 5, 2010: Glenn
* libpng versions 0.97, January 1998, through 1.4.1beta07 - February 5, 2010: Glenn
* See also "Contributing Authors", below.
*
* Note about libpng version numbers:
@ -168,7 +168,7 @@
*
* This code is released under the libpng license.
*
* libpng versions 1.2.6, August 15, 2004, through 1.4.1beta06, February 5, 2010, are
* libpng versions 1.2.6, August 15, 2004, through 1.4.1beta07, February 5, 2010, are
* Copyright (c) 2004, 2006-2010 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:
@ -286,7 +286,7 @@
* an official declaration.
*
* This is your unofficial assurance that libpng from version 0.71 and
* upward through 1.4.1beta06 are Y2K compliant. It is my belief that earlier
* upward through 1.4.1beta07 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
@ -342,9 +342,9 @@
*/
/* Version information for png.h - this should match the version in png.c */
#define PNG_LIBPNG_VER_STRING "1.4.1beta06"
#define PNG_LIBPNG_VER_STRING "1.4.1beta07"
#define PNG_HEADER_VERSION_STRING \
" libpng version 1.4.1beta06 - February 5, 2010\n"
" libpng version 1.4.1beta07 - February 5, 2010\n"
#define PNG_LIBPNG_VER_SONUM 14
#define PNG_LIBPNG_VER_DLLNUM 14
@ -1467,7 +1467,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_4_1beta06;
typedef png_structp version_1_4_1beta07;
typedef png_struct FAR * FAR * png_structpp;

View File

@ -28,7 +28,9 @@
/* Added at libpng-1.2.9 */
/* config.h is created by and PNG_CONFIGURE_LIBPNG is set by the "configure" script. */
/* config.h is created by and PNG_CONFIGURE_LIBPNG is set by the "configure"
* script.
*/
#ifdef PNG_CONFIGURE_LIBPNG
# ifdef HAVE_CONFIG_H
# include "config.h"

View File

@ -201,7 +201,7 @@ png_malloc_default(png_structp png_ptr, png_alloc_size_t size)
{
#ifndef PNG_USER_MEM_SUPPORTED
if ((png_ptr->flags&PNG_FLAG_MALLOC_NULL_MEM_OK) == 0)
png_error(png_ptr, "Out Of Memory"); /* Note "O" and "M" */
png_error(png_ptr, "Out Of Memory"); /* Note "O", "M" */
else
png_warning(png_ptr, "Out Of Memory");
#endif
@ -229,7 +229,7 @@ png_malloc_default(png_structp png_ptr, png_alloc_size_t size)
{
#ifndef PNG_USER_MEM_SUPPORTED
if ((png_ptr->flags&PNG_FLAG_MALLOC_NULL_MEM_OK) == 0)
png_error(png_ptr, "Out Of memory"); /* Note "O" and "M" */
png_error(png_ptr, "Out Of memory"); /* Note "O", "m" */
else
png_warning(png_ptr, "Out Of memory");
#endif

View File

@ -1,7 +1,7 @@
/* pngpriv.h - private declarations for use inside libpng
*
* libpng version 1.4.1beta06 - January 28, 2010
* libpng version 1.4.1beta07 - February 5, 2010
* For conditions of distribution and use, see copyright notice in png.h
* Copyright (c) 1998-2010 Glenn Randers-Pehrson
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
@ -353,8 +353,8 @@ PNG_EXTERN void png_write_IEND PNGARG((png_structp png_ptr));
PNG_EXTERN void png_write_gAMA PNGARG((png_structp png_ptr, double file_gamma));
#endif
#ifdef PNG_FIXED_POINT_SUPPORTED
PNG_EXTERN void png_write_gAMA_fixed PNGARG((png_structp png_ptr, png_fixed_point
file_gamma));
PNG_EXTERN void png_write_gAMA_fixed PNGARG((png_structp png_ptr,
png_fixed_point file_gamma));
#endif
#endif
@ -558,7 +558,8 @@ PNG_EXTERN void png_do_strip_filler PNGARG((png_row_infop row_info,
PNG_EXTERN void png_do_swap PNGARG((png_row_infop row_info, png_bytep row));
#endif
#if defined(PNG_READ_PACKSWAP_SUPPORTED) || defined(PNG_WRITE_PACKSWAP_SUPPORTED)
#if defined(PNG_READ_PACKSWAP_SUPPORTED) || \
defined(PNG_WRITE_PACKSWAP_SUPPORTED)
PNG_EXTERN void png_do_packswap PNGARG((png_row_infop row_info, png_bytep row));
#endif

View File

@ -1,7 +1,7 @@
/* pngread.c - read a PNG file
*
* Last changed in libpng 1.4.1 [January 28, 2010]
* Last changed in libpng 1.4.1 [February 5, 2010]
* Copyright (c) 1998-2010 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.)
@ -31,7 +31,9 @@ png_create_read_struct(png_const_charp user_png_ver, png_voidp error_ptr,
warn_fn, NULL, NULL, NULL));
}
/* Alternate create PNG structure for reading, and allocate any memory needed. */
/* Alternate create PNG structure for reading, and allocate any memory
* needed.
*/
png_structp PNGAPI
png_create_read_struct_2(png_const_charp user_png_ver, png_voidp error_ptr,
png_error_ptr error_fn, png_error_ptr warn_fn, png_voidp mem_ptr,
@ -478,7 +480,8 @@ png_read_row(png_structp png_ptr, png_bytep row, png_bytep dsp_row)
if (png_ptr->transformations & PNG_FILLER)
png_warning(png_ptr, "PNG_READ_FILLER_SUPPORTED is not defined");
#endif
#if defined(PNG_WRITE_PACKSWAP_SUPPORTED) && !defined(PNG_READ_PACKSWAP_SUPPORTED)
#if defined(PNG_WRITE_PACKSWAP_SUPPORTED) && \
!defined(PNG_READ_PACKSWAP_SUPPORTED)
if (png_ptr->transformations & PNG_PACKSWAP)
png_warning(png_ptr, "PNG_READ_PACKSWAP_SUPPORTED is not defined");
#endif
@ -1045,7 +1048,8 @@ png_destroy_read_struct(png_structpp png_ptr_ptr, png_infopp info_ptr_ptr,
/* Free all memory used by the read (old method) */
void /* PRIVATE */
png_read_destroy(png_structp png_ptr, png_infop info_ptr, png_infop end_info_ptr)
png_read_destroy(png_structp png_ptr, png_infop info_ptr,
png_infop end_info_ptr)
{
#ifdef PNG_SETJMP_SUPPORTED
jmp_buf tmp_jmp;

View File

@ -432,8 +432,10 @@ png_set_dither(png_structp png_ptr, png_colorp palette,
png_ptr->palette_to_index[png_ptr->index_to_palette[j]]
= png_ptr->palette_to_index[num_new_palette];
png_ptr->index_to_palette[j] = (png_byte)num_new_palette;
png_ptr->palette_to_index[num_new_palette] = (png_byte)j;
png_ptr->index_to_palette[j] =
(png_byte)num_new_palette;
png_ptr->palette_to_index[num_new_palette] =
(png_byte)j;
}
if (num_new_palette <= maximum_colors)
break;
@ -502,7 +504,8 @@ png_set_dither(png_structp png_ptr, png_colorp palette,
{
/* int dr = abs(ir - r); */
int dr = ((ir > r) ? ir - r : r - ir);
int index_r = (ir << (PNG_DITHER_BLUE_BITS + PNG_DITHER_GREEN_BITS));
int index_r = (ir << (PNG_DITHER_BLUE_BITS +
PNG_DITHER_GREEN_BITS));
for (ig = 0; ig < num_green; ig++)
{
@ -747,8 +750,9 @@ png_init_read_transformations(png_structp png_ptr)
png_debug(1, "in png_init_read_transformations");
{
#if defined(PNG_READ_BACKGROUND_SUPPORTED) || defined(PNG_READ_SHIFT_SUPPORTED) \
|| defined(PNG_READ_GAMMA_SUPPORTED)
#if defined(PNG_READ_BACKGROUND_SUPPORTED) || \
defined(PNG_READ_SHIFT_SUPPORTED) || \
defined(PNG_READ_GAMMA_SUPPORTED)
int color_type = png_ptr->color_type;
#endif
@ -945,7 +949,8 @@ png_init_read_transformations(png_structp png_ptr)
back.red = (png_byte)(pow(
(double)png_ptr->background.red/255.0, gs) * 255.0 + .5);
back.green = (png_byte)(pow(
(double)png_ptr->background.green/255.0, gs) * 255.0 + .5);
(double)png_ptr->background.green/255.0, gs) * 255.0
+ .5);
back.blue = (png_byte)(pow(
(double)png_ptr->background.blue/255.0, gs) * 255.0 + .5);
}
@ -1357,7 +1362,8 @@ png_do_read_transformations(png_structp png_ptr)
if (png_ptr->transformations & PNG_RGB_TO_GRAY)
{
int rgb_error =
png_do_rgb_to_gray(png_ptr, &(png_ptr->row_info), png_ptr->row_buf + 1);
png_do_rgb_to_gray(png_ptr, &(png_ptr->row_info),
png_ptr->row_buf + 1);
if (rgb_error)
{
png_ptr->rgb_to_gray_status=1;
@ -2343,7 +2349,8 @@ png_do_rgb_to_gray(png_structp png_ptr, png_row_infop row_info, png_bytep row)
{
png_uint_16 red_1 = png_ptr->gamma_16_to_1[(red&0xff) >>
png_ptr->gamma_shift][red>>8];
png_uint_16 green_1 = png_ptr->gamma_16_to_1[(green&0xff) >>
png_uint_16 green_1 =
png_ptr->gamma_16_to_1[(green&0xff) >>
png_ptr->gamma_shift][green>>8];
png_uint_16 blue_1 = png_ptr->gamma_16_to_1[(blue&0xff) >>
png_ptr->gamma_shift][blue>>8];
@ -2439,13 +2446,14 @@ png_do_rgb_to_gray(png_structp png_ptr, png_row_infop row_info, png_bytep row)
else
{
png_uint_16 red_1 = png_ptr->gamma_16_to_1[(red&0xff) >>
png_ptr->gamma_shift][red>>8];
png_uint_16 green_1 = png_ptr->gamma_16_to_1[(green&0xff) >>
png_ptr->gamma_shift][green>>8];
png_ptr->gamma_shift][red>>8];
png_uint_16 green_1 =
png_ptr->gamma_16_to_1[(green&0xff) >>
png_ptr->gamma_shift][green>>8];
png_uint_16 blue_1 = png_ptr->gamma_16_to_1[(blue&0xff) >>
png_ptr->gamma_shift][blue>>8];
png_ptr->gamma_shift][blue>>8];
png_uint_16 gray16 = (png_uint_16)((rc * red_1
+ gc * green_1 + bc * blue_1)>>15);
+ gc * green_1 + bc * blue_1)>>15);
w = png_ptr->gamma_16_from_1[(gray16&0xff) >>
png_ptr->gamma_shift][gray16 >> 8];
rgb_error |= 1;
@ -3375,10 +3383,10 @@ png_do_gamma(png_row_infop row_info, png_bytep row,
int d = *sp & 0x03;
*sp = (png_byte)(
((((int)gamma_table[a|(a>>2)|(a>>4)|(a>>6)]) ) & 0xc0)|
((((int)gamma_table[(b<<2)|b|(b>>2)|(b>>4)])>>2) & 0x30)|
((((int)gamma_table[(c<<4)|(c<<2)|c|(c>>2)])>>4) & 0x0c)|
((((int)gamma_table[(d<<6)|(d<<4)|(d<<2)|d])>>6) ));
((((int)gamma_table[a|(a>>2)|(a>>4)|(a>>6)]) ) & 0xc0)|
((((int)gamma_table[(b<<2)|b|(b>>2)|(b>>4)])>>2) & 0x30)|
((((int)gamma_table[(c<<4)|(c<<2)|c|(c>>2)])>>4) & 0x0c)|
((((int)gamma_table[(d<<6)|(d<<4)|(d<<2)|d])>>6) ));
sp++;
}
}
@ -3392,7 +3400,7 @@ png_do_gamma(png_row_infop row_info, png_bytep row,
int lsb = *sp & 0x0f;
*sp = (png_byte)((((int)gamma_table[msb | (msb >> 4)]) & 0xf0)
| (((int)gamma_table[(lsb << 4) | lsb]) >> 4));
| (((int)gamma_table[(lsb << 4) | lsb]) >> 4));
sp++;
}
}

View File

@ -1,7 +1,7 @@
/* pngrutil.c - utilities to read a PNG file
*
* Last changed in libpng 1.4.1 [January 28, 2010]
* Last changed in libpng 1.4.1 [February 5, 2010]
* Copyright (c) 1998-2010 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.)
@ -241,10 +241,12 @@ png_measure_decompressed_chunk(png_structp png_ptr, int comp_type,
else /* Enlarge the decompression buffer */
{
text_size += png_ptr->zbuf_size - png_ptr->zstream.avail_out;
#ifdef PNG_CHUNK_MALLOC_LIMIT_SUPPORTED
#ifdef PNG_SET_CHUNK_MALLOC_LIMIT_SUPPORTED
if (text_size >= png_ptr->user_chunk_malloc_max - 1)
return 0;
#else
if (text_size >= PNG_USER_CHUNK_MALLOC_MAX)
#endif
return 0;
}
}
if (ret == Z_STREAM_END)
@ -1229,7 +1231,8 @@ png_handle_sPLT(png_structp png_ptr, png_infop info_ptr, png_uint_32 length)
png_ptr->chunkdata[slength] = 0x00;
for (entry_start = (png_bytep)png_ptr->chunkdata; *entry_start; entry_start++)
for (entry_start = (png_bytep)png_ptr->chunkdata; *entry_start;
entry_start++)
/* Empty loop to find end of name */ ;
++entry_start;
@ -2405,7 +2408,8 @@ png_handle_unknown(png_structp png_ptr, png_infop info_ptr, png_uint_32 length)
png_memcpy((png_charp)png_ptr->unknown_chunk.name,
(png_charp)png_ptr->chunk_name,
png_sizeof(png_ptr->unknown_chunk.name));
png_ptr->unknown_chunk.name[png_sizeof(png_ptr->unknown_chunk.name)-1] = '\0';
png_ptr->unknown_chunk.name[png_sizeof(png_ptr->unknown_chunk.name)-1]
= '\0';
png_ptr->unknown_chunk.size = (png_size_t)length;
if (length == 0)
png_ptr->unknown_chunk.data = NULL;
@ -2877,7 +2881,8 @@ png_do_read_interlace(png_structp png_ptr)
default:
{
png_size_t pixel_bytes = (row_info->pixel_depth >> 3);
png_bytep sp = row + (png_size_t)(row_info->width - 1) * pixel_bytes;
png_bytep sp = row + (png_size_t)(row_info->width - 1)
* pixel_bytes;
png_bytep dp = row + (png_size_t)(final_width - 1) * pixel_bytes;
int jstop = png_pass_inc[pass];

View File

@ -1,7 +1,7 @@
/* pngset.c - storage of image information into info struct
*
* Last changed in libpng 1.4.1 [January 28, 2010]
* Last changed in libpng 1.4.1 [February 5, 2010]
* Copyright (c) 1998-2010 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.)

View File

@ -859,8 +859,8 @@ test_one_file(PNG_CONST char *inname, PNG_CONST char *outname)
{
png_fixed_point white_x, white_y, red_x, red_y, green_x, green_y, blue_x,
blue_y;
if (png_get_cHRM_fixed(read_ptr, read_info_ptr, &white_x, &white_y, &red_x,
&red_y, &green_x, &green_y, &blue_x, &blue_y))
if (png_get_cHRM_fixed(read_ptr, read_info_ptr, &white_x, &white_y,
&red_x, &red_y, &green_x, &green_y, &blue_x, &blue_y))
{
png_set_cHRM_fixed(write_ptr, write_info_ptr, white_x, white_y, red_x,
red_y, green_x, green_y, blue_x, blue_y);
@ -1012,7 +1012,8 @@ test_one_file(PNG_CONST char *inname, PNG_CONST char *outname)
if (png_get_sCAL_s(read_ptr, read_info_ptr, &unit, &scal_width,
&scal_height))
{
png_set_sCAL_s(write_ptr, write_info_ptr, unit, scal_width, scal_height);
png_set_sCAL_s(write_ptr, write_info_ptr, unit, scal_width,
scal_height);
}
}
#endif
@ -1626,4 +1627,4 @@ main(int argc, char *argv[])
}
/* Generate a compiler error if there is an old png.h in the search path. */
typedef version_1_4_1beta06 your_png_h_is_not_version_1_4_1beta06;
typedef version_1_4_1beta07 your_png_h_is_not_version_1_4_1beta07;

View File

@ -38,7 +38,8 @@ png_write_info_before_PLTE(png_structp png_ptr, png_infop info_ptr)
/* Write PNG signature */
png_write_sig(png_ptr);
#ifdef PNG_MNG_FEATURES_SUPPORTED
if ((png_ptr->mode&PNG_HAVE_PNG_SIGNATURE)&&(png_ptr->mng_features_permitted))
if ((png_ptr->mode&PNG_HAVE_PNG_SIGNATURE) && \
(png_ptr->mng_features_permitted))
{
png_warning(png_ptr, "MNG features are not allowed in a PNG datastream");
png_ptr->mng_features_permitted = 0;
@ -680,9 +681,11 @@ png_write_row(png_structp png_ptr, png_bytep row)
if (png_ptr->transformations & PNG_FILLER)
png_warning(png_ptr, "PNG_WRITE_FILLER_SUPPORTED is not defined");
#endif
#if !defined(PNG_WRITE_PACKSWAP_SUPPORTED) && defined(PNG_READ_PACKSWAP_SUPPORTED)
#if !defined(PNG_WRITE_PACKSWAP_SUPPORTED) && \
defined(PNG_READ_PACKSWAP_SUPPORTED)
if (png_ptr->transformations & PNG_PACKSWAP)
png_warning(png_ptr, "PNG_WRITE_PACKSWAP_SUPPORTED is not defined");
png_warning(png_ptr,
%4+-% "PNG_WRITE_PACKSWAP_SUPPORTED is not defined");
#endif
#if !defined(PNG_WRITE_PACK_SUPPORTED) && defined(PNG_READ_PACK_SUPPORTED)
if (png_ptr->transformations & PNG_PACK)

View File

@ -30,7 +30,8 @@ png_do_write_transformations(png_structp png_ptr)
#ifdef PNG_WRITE_USER_TRANSFORM_SUPPORTED
if (png_ptr->transformations & PNG_USER_TRANSFORM)
if (png_ptr->write_user_transform_fn != NULL)
(*(png_ptr->write_user_transform_fn)) /* User write transform function */
(*(png_ptr->write_user_transform_fn)) /* User write transform
function */
(png_ptr, /* png_ptr */
&(png_ptr->row_info), /* row_info: */
/* png_uint_32 width; width of row */

View File

@ -436,7 +436,8 @@ png_write_IHDR(png_structp png_ptr, png_uint_32 width, png_uint_32 height,
case 4:
case 8:
case 16: png_ptr->channels = 1; break;
default: png_error(png_ptr, "Invalid bit depth for grayscale image");
default: png_error(png_ptr,
"Invalid bit depth for grayscale image");
}
break;
case PNG_COLOR_TYPE_RGB:
@ -639,7 +640,9 @@ png_write_PLTE(png_structp png_ptr, png_colorp palette, png_uint_32 num_pal)
png_write_chunk_data(png_ptr, buf, (png_size_t)3);
}
#else
/* This is a little slower but some buggy compilers need to do this instead */
/* This is a little slower but some buggy compilers need to do this
* instead
*/
pal_ptr=palette;
for (i = 0; i < num_pal; i++)
{

View File

@ -226,7 +226,7 @@
COPY_PHASE_STRIP = NO;
DYLIB_COMPATIBILITY_VERSION = 14;
DYLIB_CURRENT_VERSION = 14;
FRAMEWORK_VERSION = 1.4.1beta06;
FRAMEWORK_VERSION = 1.4.1beta07;
GCC_PRECOMPILE_PREFIX_HEADER = NO;
GCC_PREFIX_HEADER = "";
INFOPLIST_FILE = Info.plist;
@ -244,7 +244,7 @@
buildSettings = {
DYLIB_COMPATIBILITY_VERSION = 14;
DYLIB_CURRENT_VERSION = 14;
FRAMEWORK_VERSION = 1.4.1beta06;
FRAMEWORK_VERSION = 1.4.1beta07;
GCC_PRECOMPILE_PREFIX_HEADER = NO;
GCC_PREFIX_HEADER = "";
INFOPLIST_FILE = Info.plist;

View File

@ -1,8 +1,8 @@
Makefiles for libpng version 1.4.1beta06 - January 28, 2010
Makefiles for libpng version 1.4.1beta07 - February 5, 2010
makefile.linux => Linux/ELF makefile
(gcc, creates libpng14.so.14.1.4.1beta06)
(gcc, creates libpng14.so.14.1.4.1beta07)
makefile.gcc => Generic makefile (gcc, creates static libpng.a)
makefile.knr => Archaic UNIX Makefile that converts files with
ansi2knr (Requires ansi2knr.c from
@ -20,7 +20,7 @@ Makefiles for libpng version 1.4.1beta06 - January 28, 2010
makefile.dec => DEC Alpha UNIX makefile
makefile.dj2 => DJGPP 2 makefile
makefile.elf => Linux/ELF makefile symbol versioning,
gcc, creates libpng14.so.14.1.4.1beta06)
gcc, creates libpng14.so.14.1.4.1beta07)
makefile.freebsd => FreeBSD makefile
makefile.gcc => Generic gcc makefile
makefile.hpgcc => HPUX makefile using gcc
@ -36,12 +36,12 @@ Makefiles for libpng version 1.4.1beta06 - January 28, 2010
makefile.os2 => OS/2 Makefile (gcc and emx, requires pngos2.def)
makefile.sco => For SCO OSr5 ELF and Unixware 7 with Native cc
makefile.sggcc => Silicon Graphics (gcc,
creates libpng14.so.14.1.4.1beta06)
creates libpng14.so.14.1.4.1beta07)
makefile.sgi => Silicon Graphics IRIX makefile (cc, creates static lib)
makefile.solaris => Solaris 2.X makefile (gcc,
creates libpng14.so.14.1.4.1beta06)
creates libpng14.so.14.1.4.1beta07)
makefile.so9 => Solaris 9 makefile (gcc,
creates libpng14.so.14.1.4.1beta06)
creates libpng14.so.14.1.4.1beta07)
makefile.std => Generic UNIX makefile (cc, creates static libpng.a)
makefile.sunos => Sun makefile
makefile.32sunu => Sun Ultra 32-bit makefile

View File

@ -11,7 +11,7 @@
# Modeled after libxml-config.
version=1.4.1beta06
version=1.4.1beta07
prefix=""
libdir=""
libs=""

View File

@ -5,6 +5,6 @@ includedir=@includedir@/libpng14
Name: libpng
Description: Loads and saves PNG files
Version: 1.4.1beta06
Version: 1.4.1beta07
Libs: -L${libdir} -lpng14
Cflags: -I${includedir}

View File

@ -17,7 +17,7 @@ INCSDIR=${LOCALBASE}/include/libpng14
LIB= png14
SHLIB_MAJOR= 0
SHLIB_MINOR= 1.4.1beta06
SHLIB_MINOR= 1.4.1beta07
SRCS= png.c pngset.c pngget.c pngrutil.c pngtrans.c pngwutil.c \
pngread.c pngrio.c pngwio.c pngwrite.c pngrtran.c \
pngwtran.c pngmem.c pngerror.c pngpread.c

View File

@ -17,7 +17,7 @@ INCSDIR=${LOCALBASE}/include
LIB= png
SHLIB_MAJOR= 3
SHLIB_MINOR= 1.4.1beta06
SHLIB_MINOR= 1.4.1beta07
SRCS= png.c pngset.c pngget.c pngrutil.c pngtrans.c pngwutil.c \
pngread.c pngrio.c pngwio.c pngwrite.c pngrtran.c \
pngwtran.c pngmem.c pngerror.c pngpread.c

View File

@ -11,7 +11,7 @@ LIBDIR= ${PREFIX}/lib
MANDIR= ${PREFIX}/man/cat
SHLIB_MAJOR= 0
SHLIB_MINOR= 1.4.1beta06
SHLIB_MINOR= 1.4.1beta07
LIB= png
SRCS= png.c pngerror.c pngget.c pngmem.c pngpread.c \

View File

@ -15,7 +15,7 @@ LIBRARY lpngce
png_get_int_32
EXPORTS
;Version 1.4.1beta06
;Version 1.4.1beta07
png_build_grayscale_palette @1
; png_check_sig @2
png_chunk_error @3

View File

@ -2,7 +2,7 @@
; PNG.LIB module definition file for OS/2
;----------------------------------------
; Version 1.4.1beta06
; Version 1.4.1beta07
LIBRARY PNG
DESCRIPTION "PNG image compression library for OS/2"

View File

@ -5,7 +5,7 @@
LIBRARY
EXPORTS
;Version 1.4.1beta06
;Version 1.4.1beta07
png_build_grayscale_palette
png_chunk_error
png_chunk_warning