mirror of
https://git.code.sf.net/p/libpng/code.git
synced 2025-07-10 18:04:09 +02:00
Compare commits
18 Commits
v1.4.0beta
...
v1.2.13
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
efe95a6953 | ||
|
|
e88a5eca8b | ||
|
|
2e3980e1de | ||
|
|
0ff85c6923 | ||
|
|
e3358d1839 | ||
|
|
f5eac0c7fa | ||
|
|
6034592a27 | ||
|
|
7b00d826d3 | ||
|
|
52ef3586b9 | ||
|
|
4118fcdd14 | ||
|
|
d9e18047d3 | ||
|
|
734f320ade | ||
|
|
79f25cdeb2 | ||
|
|
413f3db617 | ||
|
|
4db11d5143 | ||
|
|
78d28c6b96 | ||
|
|
24df7333a2 | ||
|
|
8694cd8bf5 |
68
ANNOUNCE
68
ANNOUNCE
@@ -1,72 +1,52 @@
|
||||
|
||||
Libpng 1.2.10rc1 - April 19, 2006
|
||||
Libpng 1.2.13 - November 15, 2006
|
||||
|
||||
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.
|
||||
This is a public release of libpng, intended for use in production codes.
|
||||
|
||||
Files available for download:
|
||||
|
||||
Source files with LF line endings (for Unix/Linux) and with a
|
||||
"configure" script
|
||||
|
||||
1.2.10rc1.tar.gz
|
||||
1.2.10rc1.tar.bz2
|
||||
libpng-1.2.13.tar.gz
|
||||
libpng-1.2.13.tar.bz2
|
||||
|
||||
Source files with LF line endings (for Unix/Linux) without the
|
||||
"configure" script
|
||||
|
||||
1.2.10rc1-no-config.tar.gz
|
||||
1.2.10rc1-no-config.tar.bz2
|
||||
libpng-1.2.13-no-config.tar.gz
|
||||
libpng-1.2.13-no-config.tar.bz2
|
||||
|
||||
Source files with CRLF line endings (for Windows), without the
|
||||
"configure" script
|
||||
|
||||
lp1210r01.zip
|
||||
lp1210r01.tar.bz2
|
||||
lpng1213.zip
|
||||
lpng1213.tar.bz2
|
||||
|
||||
Project files
|
||||
|
||||
1.2.10rc1-project-netware.zip
|
||||
1.2.10rc1-project-wince.zip
|
||||
libpng-1.2.13-project-netware.zip
|
||||
libpng-1.2.13-project-wince.zip
|
||||
|
||||
Other information:
|
||||
|
||||
1.2.10rc1-README.txt
|
||||
1.2.10rc1-KNOWNBUGS.txt
|
||||
1.2.10rc1-LICENSE.txt
|
||||
1.2.10rc1-Y2K-compliance.txt
|
||||
libpng-1.2.13-README.txt
|
||||
libpng-1.2.13-KNOWNBUGS.txt
|
||||
libpng-1.2.13-LICENSE.txt
|
||||
libpng-1.2.13-Y2K-compliance.txt
|
||||
|
||||
Changes since the last public release (1.2.9):
|
||||
Changes since the last public release (1.2.12):
|
||||
|
||||
version 1.2.10beta1 [April 15, 2006]
|
||||
Renamed "config.h" to "png_conf.h" and revised Makefile.am to add
|
||||
-DPNG_BUILDING_LIBPNG to compile directive, and modified pngconf.h
|
||||
to include png_conf.h only when PNG_BUILDING_LIBPNG is defined.
|
||||
version 1.2.13 [November 15, 2006]
|
||||
|
||||
version 1.2.10beta2 [April 15, 2006]
|
||||
Manually updated Makefile.in and configure. Changed png_conf.h.in
|
||||
back to config.h.
|
||||
|
||||
version 1.2.10beta3 [April 15, 2006]
|
||||
Change png_conf.h back to config.h in pngconf.h.
|
||||
|
||||
version 1.2.10beta4 [April 16, 2006]
|
||||
Change PNG_BUILDING_LIBPNG to PNG_CONFIGURE_LIBPNG in config/Makefile*.
|
||||
|
||||
version 1.2.10beta5 [April 16, 2006]
|
||||
Added a configure check for compiling assembler code in pnggccrd.c
|
||||
|
||||
version 1.2.10beta6 [April 17, 2006]
|
||||
Revised the configure check for pnggccrd.c
|
||||
Moved -DPNG_CONFIGURE_LIBPNG into @LIBPNG_DEFINES@
|
||||
Added @LIBPNG_DEFINES@ to arguments when building libpng.sym
|
||||
|
||||
version 1.2.10beta7 [April 18, 2006]
|
||||
Change "exec_prefix=$prefix" to "exec_prefix=$(prefix)" in makefiles.
|
||||
|
||||
version 1.2.10beta8 [April 19, 2006]
|
||||
Ensure pngconf.h doesn't define both PNG_USE_PNGGCCRD and PNG_USE_PNGVCRD
|
||||
Fixed "LN_FS" typo in makefile.sco and makefile.solaris.
|
||||
version 1.0.21 and 1.2.13 [November 15, 2006]
|
||||
Removed AC_FUNC_MALLOC from configure.ac
|
||||
Work around Intel-Mac compiler bug by setting PNG_NO_MMX_CODE in pngconf.h
|
||||
Change "logical" to "bitwise" throughout documentation.
|
||||
Fix Makefile.am to not try to link to noexistent files.
|
||||
Detect and fix attempt to write wrong iCCP profile length.
|
||||
Fix potential buffer overflow in sPLT chunk handler.
|
||||
Check all exported functions for NULL png_ptr.
|
||||
|
||||
Send comments/corrections/commendations to png-mng-implement at lists.sf.net
|
||||
(subscription required; visit
|
||||
|
||||
83
CHANGES
83
CHANGES
@@ -1480,7 +1480,7 @@ version 1.2.9beta5 [March 4, 2006]
|
||||
Restored scripts/makefile.elf which was inadvertently deleted.
|
||||
|
||||
version 1.2.9beta6 [March 6, 2006]
|
||||
Fixed typo (10) in configuration files.
|
||||
Fixed typo (13) in configuration files.
|
||||
|
||||
version 1.2.9beta7 [March 7, 2006]
|
||||
Removed libpng.vers and libpng.sym from libpng12_la_SOURCES in Makefile.am
|
||||
@@ -1552,14 +1552,79 @@ version 1.2.10rc1 [April 19, 2006]
|
||||
Ensure pngconf.h doesn't define both PNG_USE_PNGGCCRD and PNG_USE_PNGVCRD
|
||||
Fixed "LN_FS" typo in makefile.sco and makefile.solaris.
|
||||
|
||||
version 1.4.0beta1 [future]
|
||||
Enabled iTXt support (changes png_struct, thus requires so-number change).
|
||||
Removed deprecated functions png_read_init, png_write_init, png_info_init,
|
||||
png_permit_empty_plte, png_set_gray_1_2_4_to_8, and removed the
|
||||
deprecated macro PNG_MAX_UINT.
|
||||
Cleaned up PNG_ASSEMBLER_CODE_SUPPORTED vs PNG_MMX_CODE_SUPPORTED
|
||||
Cleaned up WINCE project.
|
||||
Moved "PNG_INTERNAL" parts of png.h into a new private header, pngintrn.h
|
||||
version 1.2.10rc2 [April 20, 2006]
|
||||
Added a backslash between -DPNG_CONFIGURE_LIBPNG and -DPNG_NO_ASSEMBLER_CODE
|
||||
in configure.ac and configure
|
||||
Made the configure warning about versioned symbols less arrogant.
|
||||
|
||||
version 1.2.10rc3 [April 21, 2006]
|
||||
Added a note in libpng.txt that png_set_sig_bytes(8) can be used when
|
||||
writing an embedded PNG without the 8-byte signature.
|
||||
Revised makefiles and configure to avoid making links to libpng.so.*
|
||||
|
||||
version 1.2.10 [April 23, 2006]
|
||||
Reverted configure to "rc2" state.
|
||||
|
||||
version 1.2.11beta1 [May 31, 2006]
|
||||
scripts/libpng.pc.in contained "configure" style version info and would
|
||||
not work with makefiles.
|
||||
The shared-library makefiles were linking to libpng.so.0 instead of
|
||||
libpng.so.3 compatibility as the library.
|
||||
|
||||
version 1.2.11beta2 [June 2, 2006]
|
||||
Increased sprintf buffer from 50 to 52 chars in pngrutil.c to avoid
|
||||
buffer overflow.
|
||||
Fixed bug in example.c (png_set_palette_rgb -> png_set_palette_to_rgb)
|
||||
|
||||
version 1.2.11beta3 [June 5, 2006]
|
||||
Prepended "#! /bin/sh" to ltmail.sh and contrib/pngminus/*.sh (Cosmin).
|
||||
Removed the accidental leftover Makefile.in~ (Cosmin).
|
||||
Avoided potential buffer overflow and optimized buffer in
|
||||
png_write_sCAL(), png_write_sCAL_s() (Cosmin).
|
||||
Removed the include directories and libraries from CFLAGS and LDFLAGS
|
||||
in scripts/makefile.gcc (Nelson A. de Oliveira, Cosmin).
|
||||
|
||||
version 1.2.11beta4 [June 6, 2006]
|
||||
Allow zero-length IDAT chunks after the entire zlib datastream, but not
|
||||
after another intervening chunk type.
|
||||
|
||||
version 1.0.19rc1, 1.2.11rc1 [June 13, 2006]
|
||||
Deleted extraneous square brackets from [config.h] in configure.ac
|
||||
|
||||
version 1.0.19rc2, 1.2.11rc2 [June 14, 2006]
|
||||
Added prototypes for PNG_INCH_CONVERSIONS functions to png.h
|
||||
Revised INSTALL and autogen.sh
|
||||
Fixed typo in several makefiles (-W1 should be -Wl)
|
||||
Added typedef for png_int_32 and png_uint_32 on 64-bit systems.
|
||||
|
||||
version 1.0.19rc3, 1.2.11rc3 [June 15, 2006]
|
||||
Removed the new typedefs for 64-bit systems (delay until version 1.4.0)
|
||||
Added one zero element to png_gamma_shift[] array in pngrtran.c to avoid
|
||||
reading out of bounds.
|
||||
|
||||
version 1.0.19rc4, 1.2.11rc4 [June 15, 2006]
|
||||
Really removed the new typedefs for 64-bit systems.
|
||||
|
||||
version 1.0.19rc5, 1.2.11rc5 [June 22, 2006]
|
||||
Removed png_sig_bytes entry from scripts/pngw32.def
|
||||
|
||||
version 1.0.19, 1.2.11 [June 26, 2006]
|
||||
None.
|
||||
|
||||
version 1.0.20, 1.2.12 [June 27, 2006]
|
||||
Really increased sprintf buffer from 50 to 52 chars in pngrutil.c to avoid
|
||||
buffer overflow.
|
||||
|
||||
version 1.2.13beta1 [October 2, 2006]
|
||||
Removed AC_FUNC_MALLOC from configure.ac
|
||||
Work around Intel-Mac compiler bug by setting PNG_NO_MMX_CODE in pngconf.h
|
||||
Change "logical" to "bitwise" throughout documentation.
|
||||
Detect and fix attempt to write wrong iCCP profile length.
|
||||
|
||||
version 1.0.21, 1.2.13 [November 15, 2006]
|
||||
Fix potential buffer overflow in sPLT chunk handler.
|
||||
Fix Makefile.am to not try to link to noexistent files.
|
||||
Check all exported functions for NULL png_ptr.
|
||||
|
||||
Send comments/corrections/commendations to png-mng-implement at lists.sf.net
|
||||
(subscription required; visit
|
||||
|
||||
28
INSTALL
28
INSTALL
@@ -1,16 +1,24 @@
|
||||
|
||||
Installing libpng version 1.2.10rc1 - April 19, 2006
|
||||
Installing libpng version 1.2.13 - November 15, 2006
|
||||
|
||||
On Unix/Linux and similar systems, you can simply type
|
||||
|
||||
./autogen.sh
|
||||
./configure [--prefix=$HOME]
|
||||
make check
|
||||
make install
|
||||
|
||||
and ignore the rest of this document.
|
||||
|
||||
Or you can use one of the custom-built makefiles in the
|
||||
If configure does not work on your system and you have a reasonably
|
||||
up-to-date set of tools, running ./autogen.sh before running ./configure
|
||||
may fix the problem. You can also run the individual commands in
|
||||
autogen.sh with the --force option, if supported by your version of
|
||||
the tools. If you run 'libtoolize --force', though, this will replace
|
||||
the distributed, patched, version of ltmain.sh with an unpatched version
|
||||
and your shared library builds may fail to produce libraries with the
|
||||
correct version numbers.
|
||||
|
||||
Instead, you can use one of the custom-built makefiles in the
|
||||
"scripts" directory
|
||||
|
||||
cp scripts/makefile.system makefile
|
||||
@@ -29,7 +37,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.2.10rc1" or "lpng109" and "zlib-1.2.1"
|
||||
might be called "libpng-1.2.13" or "lpng109" and "zlib-1.2.1"
|
||||
or "zlib121") so that you have directories called "zlib" and "libpng".
|
||||
|
||||
Your directory structure should look like this:
|
||||
@@ -85,11 +93,11 @@ include
|
||||
|
||||
makefile.std => Generic UNIX makefile (cc, creates static libpng.a)
|
||||
makefile.elf => Linux/ELF makefile symbol versioning,
|
||||
gcc, creates libpng12.so.0.1.2.10rc1)
|
||||
gcc, creates libpng12.so.0.1.2.13)
|
||||
makefile.linux => Linux/ELF makefile
|
||||
(gcc, creates libpng12.so.0.1.2.10rc1)
|
||||
(gcc, creates libpng12.so.0.1.2.13)
|
||||
makefile.gcmmx => Linux/ELF makefile
|
||||
(gcc, creates libpng12.so.0.1.2.10rc1,
|
||||
(gcc, creates libpng12.so.0.1.2.13,
|
||||
uses assembler code tuned for Intel MMX platform)
|
||||
makefile.gcc => Generic makefile (gcc, creates static libpng.a)
|
||||
makefile.knr => Archaic UNIX Makefile that converts files with
|
||||
@@ -112,12 +120,12 @@ include
|
||||
makefile.openbsd => OpenBSD makefile
|
||||
makefile.sgi => Silicon Graphics IRIX makefile (cc, creates static lib)
|
||||
makefile.sggcc => Silicon Graphics (gcc,
|
||||
creates libpng12.so.0.1.2.10rc1)
|
||||
creates libpng12.so.0.1.2.13)
|
||||
makefile.sunos => Sun makefile
|
||||
makefile.solaris => Solaris 2.X makefile (gcc,
|
||||
creates libpng12.so.0.1.2.10rc1)
|
||||
creates libpng12.so.0.1.2.13)
|
||||
makefile.so9 => Solaris 9 makefile (gcc,
|
||||
creates libpng12.so.0.1.2.10rc1)
|
||||
creates libpng12.so.0.1.2.13)
|
||||
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
|
||||
|
||||
2
KNOWNBUG
2
KNOWNBUG
@@ -1,5 +1,5 @@
|
||||
|
||||
Known bugs in libpng version 1.2.10rc1
|
||||
Known bugs in libpng version 1.2.13
|
||||
|
||||
1. April 22, 2001: pnggccrd.c has been reported to crash on NetBSD when
|
||||
reading interlaced PNG files, when assembler code is enabled but running
|
||||
|
||||
4
LICENSE
4
LICENSE
@@ -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.10rc1, April 19, 2006, are
|
||||
libpng versions 1.2.6, August 15, 2004, through 1.2.13, November 15, 2006, are
|
||||
Copyright (c) 2004, 2006 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
|
||||
April 19, 2006
|
||||
November 15, 2006
|
||||
|
||||
24
Makefile.am
24
Makefile.am
@@ -85,7 +85,8 @@ EXTRA_DIST= \
|
||||
$(TESTS) \
|
||||
example.c libpng.txt pngvcrd.c
|
||||
|
||||
CLEANFILES= pngout.png libpng12.pc libpng12-config libpng.vers libpng.sym
|
||||
CLEANFILES= pngout.png libpng12.pc libpng12-config libpng.vers \
|
||||
libpng.sym
|
||||
|
||||
$(PNGLIB_BASENAME).pc: libpng.pc
|
||||
cp libpng.pc $@
|
||||
@@ -95,7 +96,7 @@ $(PNGLIB_BASENAME)-config: libpng-config
|
||||
|
||||
libpng.sym: png.h pngconf.h
|
||||
rm -f $@ $@.new
|
||||
$(CPP) @LIBPNG_DEFINES@ $(CPPFLAGS) -DPNG_BUILDSYMS $(srcdir)/png.h | \
|
||||
$(CPP) @LIBPNG_DEFINES@ $(CPPFLAGS) -DPNG_BUILDSYMS png.h | \
|
||||
$(SED) -n -e 's|^.*PNG_FUNCTION_EXPORT[ ]*\([a-zA-Z0-9_]*\).*$$|\1|p' \
|
||||
-e 's|^.*PNG_DATA_EXPORT[ ]*\([a-zA-Z0-9_]*\).*$$|\1|p' \
|
||||
>$@.new
|
||||
@@ -116,19 +117,18 @@ install-data-hook:
|
||||
cd $(DESTDIR)$(pkgconfigdir); rm -f libpng.pc
|
||||
cd $(DESTDIR)$(pkgconfigdir); $(LN_S) $(PNGLIB_BASENAME).pc libpng.pc
|
||||
|
||||
# do evil things to libpng to cause libpng12 to be used, if
|
||||
# the compat library is not being built do nothing.
|
||||
# do evil things to libpng to cause libpng12 to be used
|
||||
install-exec-hook:
|
||||
cd $(DESTDIR)$(bindir); rm -f libpng-config
|
||||
cd $(DESTDIR)$(bindir); $(LN_S) $(PNGLIB_BASENAME)-config libpng-config
|
||||
@if test -n "@compatlib@"; then\
|
||||
set -x;\
|
||||
cd $(DESTDIR)$(libdir);\
|
||||
for ext in a la so; do\
|
||||
rm -f libpng.$$ext;\
|
||||
$(LN_S) $(PNGLIB_BASENAME).$$ext libpng.$$ext;\
|
||||
done;\
|
||||
fi
|
||||
@set -x;\
|
||||
cd $(DESTDIR)$(libdir);\
|
||||
for ext in a la so; do\
|
||||
rm -f libpng.$$ext;\
|
||||
if test -f $(PNGLIB_BASENAME).$$ext; then\
|
||||
$(LN_S) $(PNGLIB_BASENAME).$$ext libpng.$$ext;\
|
||||
fi;\
|
||||
done
|
||||
|
||||
uninstall-hook:
|
||||
cd $(DESTDIR)$(includedir); rm -f png.h pngconf.h
|
||||
|
||||
17
Makefile.in
17
Makefile.in
@@ -1258,19 +1258,16 @@ install-data-hook:
|
||||
cd $(DESTDIR)$(pkgconfigdir); rm -f libpng.pc
|
||||
cd $(DESTDIR)$(pkgconfigdir); $(LN_S) $(PNGLIB_BASENAME).pc libpng.pc
|
||||
|
||||
# do evil things to libpng to cause libpng12 to be used, if
|
||||
# the compat library is not being built do nothing.
|
||||
# do evil things to libpng to cause libpng12 to be used
|
||||
install-exec-hook:
|
||||
cd $(DESTDIR)$(bindir); rm -f libpng-config
|
||||
cd $(DESTDIR)$(bindir); $(LN_S) $(PNGLIB_BASENAME)-config libpng-config
|
||||
@if test -n "@compatlib@"; then\
|
||||
set -x;\
|
||||
cd $(DESTDIR)$(libdir);\
|
||||
for ext in a la so; do\
|
||||
rm -f libpng.$$ext;\
|
||||
$(LN_S) $(PNGLIB_BASENAME).$$ext libpng.$$ext;\
|
||||
done;\
|
||||
fi
|
||||
@set -x;\
|
||||
cd $(DESTDIR)$(libdir);\
|
||||
for ext in a la so; do\
|
||||
rm -f libpng.$$ext;\
|
||||
$(LN_S) $(PNGLIB_BASENAME).$$ext libpng.$$ext;\
|
||||
done
|
||||
|
||||
uninstall-hook:
|
||||
cd $(DESTDIR)$(includedir); rm -f png.h pngconf.h
|
||||
|
||||
14
README
14
README
@@ -1,4 +1,4 @@
|
||||
README for libpng version 1.2.10rc1 - April 19, 2006 (shared library 12.0)
|
||||
README for libpng version 1.2.13 - November 15, 2006 (shared library 12.0)
|
||||
See the note about version numbers near the top of png.h
|
||||
|
||||
See INSTALL for instructions on how to install libpng.
|
||||
@@ -190,11 +190,11 @@ Files in this distribution:
|
||||
descrip.mms => VMS makefile for MMS or MMK
|
||||
makefile.std => Generic UNIX makefile (cc, creates static libpng.a)
|
||||
makefile.elf => Linux/ELF makefile symbol versioning,
|
||||
gcc, creates libpng12.so.0.1.2.10rc1)
|
||||
gcc, creates libpng12.so.0.1.2.13)
|
||||
makefile.linux => Linux/ELF makefile
|
||||
(gcc, creates libpng12.so.0.1.2.10rc1)
|
||||
(gcc, creates libpng12.so.0.1.2.13)
|
||||
makefile.gcmmx => Linux/ELF makefile
|
||||
(gcc, creates libpng12.so.0.1.2.10rc1,
|
||||
(gcc, creates libpng12.so.0.1.2.13,
|
||||
uses assembler code tuned for Intel MMX platform)
|
||||
makefile.gcc => Generic makefile (gcc, creates static libpng.a)
|
||||
makefile.knr => Archaic UNIX Makefile that converts files with
|
||||
@@ -216,12 +216,12 @@ Files in this distribution:
|
||||
makefile.openbsd => OpenBSD makefile
|
||||
makefile.sgi => Silicon Graphics IRIX (cc, creates static lib)
|
||||
makefile.sggcc => Silicon Graphics
|
||||
(gcc, creates libpng12.so.0.1.2.10rc1)
|
||||
(gcc, creates libpng12.so.0.1.2.13)
|
||||
makefile.sunos => Sun makefile
|
||||
makefile.solaris => Solaris 2.X makefile
|
||||
(gcc, creates libpng12.so.0.1.2.10rc1)
|
||||
(gcc, creates libpng12.so.0.1.2.13)
|
||||
makefile.so9 => Solaris 9 makefile
|
||||
(gcc, creates libpng12.so.0.1.2.10rc1)
|
||||
(gcc, creates libpng12.so.0.1.2.13)
|
||||
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
|
||||
|
||||
4
Y2KINFO
4
Y2KINFO
@@ -1,13 +1,13 @@
|
||||
Y2K compliance in libpng:
|
||||
=========================
|
||||
|
||||
April 19, 2006
|
||||
November 15, 2006
|
||||
|
||||
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.10rc1 are Y2K compliant. It is my belief that earlier
|
||||
upward through 1.2.13 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
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
#
|
||||
# WARNING: if you run this you will change the versions
|
||||
# of the tools which are used and, maybe, required!
|
||||
touch Makefile.am configure.ac
|
||||
{
|
||||
echo "running libtoolize" >&2
|
||||
libtoolize --copy --automake
|
||||
|
||||
110
configure
vendored
110
configure
vendored
@@ -1,6 +1,6 @@
|
||||
#! /bin/sh
|
||||
# Guess values for system-dependent variables and create Makefiles.
|
||||
# Generated by GNU Autoconf 2.59 for libpng 1.2.10rc1.
|
||||
# Generated by GNU Autoconf 2.59 for libpng 1.2.13.
|
||||
#
|
||||
# Report bugs to <png-mng-implement@lists.sourceforge.net>.
|
||||
#
|
||||
@@ -423,8 +423,8 @@ SHELL=${CONFIG_SHELL-/bin/sh}
|
||||
# Identity of this package.
|
||||
PACKAGE_NAME='libpng'
|
||||
PACKAGE_TARNAME='libpng'
|
||||
PACKAGE_VERSION='1.2.10rc1'
|
||||
PACKAGE_STRING='libpng 1.2.10rc1'
|
||||
PACKAGE_VERSION='1.2.13'
|
||||
PACKAGE_STRING='libpng 1.2.13'
|
||||
PACKAGE_BUGREPORT='png-mng-implement@lists.sourceforge.net'
|
||||
|
||||
ac_unique_file="pngget.c"
|
||||
@@ -954,7 +954,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.2.10rc1 to adapt to many kinds of systems.
|
||||
\`configure' configures libpng 1.2.13 to adapt to many kinds of systems.
|
||||
|
||||
Usage: $0 [OPTION]... [VAR=VALUE]...
|
||||
|
||||
@@ -1020,7 +1020,7 @@ fi
|
||||
|
||||
if test -n "$ac_init_help"; then
|
||||
case $ac_init_help in
|
||||
short | recursive ) echo "Configuration of libpng 1.2.10rc1:";;
|
||||
short | recursive ) echo "Configuration of libpng 1.2.13:";;
|
||||
esac
|
||||
cat <<\_ACEOF
|
||||
|
||||
@@ -1167,7 +1167,7 @@ fi
|
||||
test -n "$ac_init_help" && exit 0
|
||||
if $ac_init_version; then
|
||||
cat <<\_ACEOF
|
||||
libpng configure 1.2.10rc1
|
||||
libpng configure 1.2.13
|
||||
generated by GNU Autoconf 2.59
|
||||
|
||||
Copyright (C) 2003 Free Software Foundation, Inc.
|
||||
@@ -1181,7 +1181,7 @@ cat >&5 <<_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.2.10rc1, which was
|
||||
It was created by libpng $as_me 1.2.13, which was
|
||||
generated by GNU Autoconf 2.59. Invocation command line was
|
||||
|
||||
$ $0 $@
|
||||
@@ -1824,7 +1824,7 @@ fi
|
||||
|
||||
# Define the identity of the package.
|
||||
PACKAGE='libpng'
|
||||
VERSION='1.2.10rc1'
|
||||
VERSION='1.2.13'
|
||||
|
||||
|
||||
cat >>confdefs.h <<_ACEOF
|
||||
@@ -1979,9 +1979,9 @@ fi
|
||||
|
||||
|
||||
|
||||
PNGLIB_VERSION=1.2.10rc1
|
||||
PNGLIB_VERSION=1.2.13
|
||||
PNGLIB_MAJOR=12
|
||||
PNGLIB_MINOR=10
|
||||
PNGLIB_MINOR=13
|
||||
|
||||
|
||||
|
||||
@@ -19451,86 +19451,6 @@ fi
|
||||
|
||||
done
|
||||
|
||||
echo "$as_me:$LINENO: checking for GNU libc compatible malloc" >&5
|
||||
echo $ECHO_N "checking for GNU libc compatible malloc... $ECHO_C" >&6
|
||||
if test "${ac_cv_func_malloc_0_nonnull+set}" = set; then
|
||||
echo $ECHO_N "(cached) $ECHO_C" >&6
|
||||
else
|
||||
if test "$cross_compiling" = yes; then
|
||||
ac_cv_func_malloc_0_nonnull=no
|
||||
else
|
||||
cat >conftest.$ac_ext <<_ACEOF
|
||||
/* confdefs.h. */
|
||||
_ACEOF
|
||||
cat confdefs.h >>conftest.$ac_ext
|
||||
cat >>conftest.$ac_ext <<_ACEOF
|
||||
/* end confdefs.h. */
|
||||
#if STDC_HEADERS || HAVE_STDLIB_H
|
||||
# include <stdlib.h>
|
||||
#else
|
||||
char *malloc ();
|
||||
#endif
|
||||
|
||||
int
|
||||
main ()
|
||||
{
|
||||
exit (malloc (0) ? 0 : 1);
|
||||
;
|
||||
return 0;
|
||||
}
|
||||
_ACEOF
|
||||
rm -f conftest$ac_exeext
|
||||
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
|
||||
(eval $ac_link) 2>&5
|
||||
ac_status=$?
|
||||
echo "$as_me:$LINENO: \$? = $ac_status" >&5
|
||||
(exit $ac_status); } && { ac_try='./conftest$ac_exeext'
|
||||
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
|
||||
(eval $ac_try) 2>&5
|
||||
ac_status=$?
|
||||
echo "$as_me:$LINENO: \$? = $ac_status" >&5
|
||||
(exit $ac_status); }; }; then
|
||||
ac_cv_func_malloc_0_nonnull=yes
|
||||
else
|
||||
echo "$as_me: program exited with status $ac_status" >&5
|
||||
echo "$as_me: failed program was:" >&5
|
||||
sed 's/^/| /' conftest.$ac_ext >&5
|
||||
|
||||
( exit $ac_status )
|
||||
ac_cv_func_malloc_0_nonnull=no
|
||||
fi
|
||||
rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
|
||||
fi
|
||||
fi
|
||||
echo "$as_me:$LINENO: result: $ac_cv_func_malloc_0_nonnull" >&5
|
||||
echo "${ECHO_T}$ac_cv_func_malloc_0_nonnull" >&6
|
||||
if test $ac_cv_func_malloc_0_nonnull = yes; then
|
||||
|
||||
cat >>confdefs.h <<\_ACEOF
|
||||
#define HAVE_MALLOC 1
|
||||
_ACEOF
|
||||
|
||||
else
|
||||
cat >>confdefs.h <<\_ACEOF
|
||||
#define HAVE_MALLOC 0
|
||||
_ACEOF
|
||||
|
||||
case $LIBOBJS in
|
||||
"malloc.$ac_objext" | \
|
||||
*" malloc.$ac_objext" | \
|
||||
"malloc.$ac_objext "* | \
|
||||
*" malloc.$ac_objext "* ) ;;
|
||||
*) LIBOBJS="$LIBOBJS malloc.$ac_objext" ;;
|
||||
esac
|
||||
|
||||
|
||||
cat >>confdefs.h <<\_ACEOF
|
||||
#define malloc rpl_malloc
|
||||
_ACEOF
|
||||
|
||||
fi
|
||||
|
||||
|
||||
|
||||
echo "$as_me:$LINENO: checking for working strtod" >&5
|
||||
echo $ECHO_N "checking for working strtod... $ECHO_C" >&6
|
||||
@@ -20185,7 +20105,7 @@ else
|
||||
echo "$as_me: failed program was:" >&5
|
||||
sed 's/^/| /' conftest.$ac_ext >&5
|
||||
|
||||
LIBPNG_DEFINES=-DPNG_CONFIGURE_LIBPNG -DPNG_NO_ASSEMBLER_CODE
|
||||
LIBPNG_DEFINES=-DPNG_CONFIGURE_LIBPNG\ -DPNG_NO_ASSEMBLER_CODE
|
||||
fi
|
||||
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
|
||||
if test "$LIBPNG_DEFINES"; then
|
||||
@@ -20209,8 +20129,8 @@ else
|
||||
have_ld_version_script=no
|
||||
echo "$as_me:$LINENO: result: no" >&5
|
||||
echo "${ECHO_T}no" >&6
|
||||
{ echo "$as_me:$LINENO: WARNING: *** You may want to rerun configure using --with-gnu-ld to enable versioned symbols." >&5
|
||||
echo "$as_me: WARNING: *** You may want to rerun configure using --with-gnu-ld to enable versioned symbols." >&2;}
|
||||
{ echo "$as_me:$LINENO: WARNING: *** You have not enabled versioned symbols." >&5
|
||||
echo "$as_me: WARNING: *** You have not enabled versioned symbols." >&2;}
|
||||
fi
|
||||
|
||||
|
||||
@@ -20681,7 +20601,7 @@ _ASBOX
|
||||
} >&5
|
||||
cat >&5 <<_CSEOF
|
||||
|
||||
This file was extended by libpng $as_me 1.2.10rc1, which was
|
||||
This file was extended by libpng $as_me 1.2.13, which was
|
||||
generated by GNU Autoconf 2.59. Invocation command line was
|
||||
|
||||
CONFIG_FILES = $CONFIG_FILES
|
||||
@@ -20744,7 +20664,7 @@ _ACEOF
|
||||
|
||||
cat >>$CONFIG_STATUS <<_ACEOF
|
||||
ac_cs_version="\\
|
||||
libpng config.status 1.2.10rc1
|
||||
libpng config.status 1.2.13
|
||||
configured by $0, generated by GNU Autoconf 2.59,
|
||||
with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
|
||||
|
||||
|
||||
13
configure.ac
13
configure.ac
@@ -18,19 +18,19 @@ AC_PREREQ(2.59)
|
||||
|
||||
dnl Version number stuff here:
|
||||
|
||||
AC_INIT([libpng], [1.2.10rc1], [png-mng-implement@lists.sourceforge.net])
|
||||
AC_INIT([libpng], [1.2.13], [png-mng-implement@lists.sourceforge.net])
|
||||
AM_INIT_AUTOMAKE
|
||||
dnl stop configure from automagically running automake
|
||||
AM_MAINTAINER_MODE
|
||||
|
||||
PNGLIB_VERSION=1.2.10rc1
|
||||
PNGLIB_VERSION=1.2.13
|
||||
PNGLIB_MAJOR=12
|
||||
PNGLIB_MINOR=10
|
||||
PNGLIB_MINOR=13
|
||||
|
||||
dnl End of version number stuff
|
||||
|
||||
AC_CONFIG_SRCDIR([pngget.c])
|
||||
AM_CONFIG_HEADER([config.h])
|
||||
AM_CONFIG_HEADER(config.h)
|
||||
|
||||
# Checks for programs.
|
||||
AC_PROG_CC
|
||||
@@ -52,7 +52,6 @@ AC_TYPE_SIZE_T
|
||||
AC_STRUCT_TM
|
||||
|
||||
# Checks for library functions.
|
||||
AC_FUNC_MALLOC
|
||||
AC_FUNC_STRTOD
|
||||
AC_CHECK_FUNCS([memset], , AC_ERROR([memset not found in libc]))
|
||||
AC_CHECK_FUNCS([pow], , AC_CHECK_LIB(m, pow, , AC_ERROR([cannot find pow])) )
|
||||
@@ -63,7 +62,7 @@ AC_TRY_COMPILE(
|
||||
[#include "pnggccrd.c"],
|
||||
[return 0;],
|
||||
LIBPNG_DEFINES=,
|
||||
LIBPNG_DEFINES=-DPNG_CONFIGURE_LIBPNG -DPNG_NO_ASSEMBLER_CODE)
|
||||
LIBPNG_DEFINES=-DPNG_CONFIGURE_LIBPNG\ -DPNG_NO_ASSEMBLER_CODE)
|
||||
if test "$LIBPNG_DEFINES"; then
|
||||
AC_MSG_RESULT(no)
|
||||
else
|
||||
@@ -80,7 +79,7 @@ if test "$GLD"; then
|
||||
else
|
||||
have_ld_version_script=no
|
||||
AC_MSG_RESULT(no)
|
||||
AC_MSG_WARN(*** You may want to rerun configure using --with-gnu-ld to enable versioned symbols.)
|
||||
AC_MSG_WARN(*** You have not enabled versioned symbols.)
|
||||
fi
|
||||
AM_CONDITIONAL(HAVE_LD_VERSION_SCRIPT, test "$have_ld_version_script" = "yes")
|
||||
|
||||
|
||||
@@ -20,7 +20,7 @@ Soon after the creation of PNG in 1995, the need was felt for a set of
|
||||
pnmtopng / pngtopnm utilities. Independantly Alexander Lehmann and I
|
||||
(Willem van Schaik) started such a project. Luckily we discovered this
|
||||
and merged the two together into pnmtopng.tar.gz, which is available
|
||||
from a/o ftp://swrinde.nde.swri.edu/pub/png/.
|
||||
from a/o ftp://ftp.simplesystems.org/pub/libpng/png/.
|
||||
|
||||
These two utilities have many, many options and make use of most of the
|
||||
features of PNG, like gamma, alpha, sbit, text-chunks, etc. This makes
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
#!/bin/sh
|
||||
# -- grayscale
|
||||
./png2pnm -noraw ../pngsuite/basn0g01.png basn0g01.pgm
|
||||
./png2pnm -noraw ../pngsuite/basn0g02.png basn0g02.pgm
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
#!/bin/sh
|
||||
make -f makefile.std
|
||||
sh png2pnm.sh
|
||||
sh pnm2png.sh
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
#!/bin/sh
|
||||
# -- grayscale
|
||||
./pnm2png basn0g01.pgm basn0g01.png
|
||||
./pnm2png basn0g02.pgm basn0g02.png
|
||||
|
||||
@@ -200,7 +200,7 @@ void read_png(FILE *fp, unsigned int sig_read) /* file is already open */
|
||||
|
||||
/* Expand paletted colors into true RGB triplets */
|
||||
if (color_type == PNG_COLOR_TYPE_PALETTE)
|
||||
png_set_palette_rgb(png_ptr);
|
||||
png_set_palette_to_rgb(png_ptr);
|
||||
|
||||
/* Expand grayscale images to the full 8 bits from 1, 2, or 4 bits/pixel */
|
||||
if (color_type == PNG_COLOR_TYPE_GRAY && bit_depth < 8)
|
||||
|
||||
62
libpng.3
62
libpng.3
@@ -1,6 +1,6 @@
|
||||
.TH LIBPNG 3 "April 19, 2006"
|
||||
.TH LIBPNG 3 "November 15, 2006"
|
||||
.SH NAME
|
||||
libpng \- Portable Network Graphics (PNG) Reference Library 1.2.10rc1
|
||||
libpng \- Portable Network Graphics (PNG) Reference Library 1.2.13
|
||||
.SH SYNOPSIS
|
||||
\fI\fB
|
||||
|
||||
@@ -821,7 +821,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.2.10rc1 - April 19, 2006
|
||||
libpng version 1.2.13 - November 15, 2006
|
||||
Updated and distributed by Glenn Randers-Pehrson
|
||||
<glennrp at users.sourceforge.net>
|
||||
Copyright (c) 1998-2005 Glenn Randers-Pehrson
|
||||
@@ -1213,7 +1213,7 @@ dithering, and setting filler.) If this is the case, simply do this:
|
||||
|
||||
png_read_png(png_ptr, info_ptr, png_transforms, NULL)
|
||||
|
||||
where png_transforms is an integer containing the logical OR of
|
||||
where png_transforms is an integer containing the bitwise OR of
|
||||
some set of transformation flags. This call is equivalent to png_read_info(),
|
||||
followed the set of transformations indicated by the transform mask,
|
||||
then png_read_image(), and finally png_read_end().
|
||||
@@ -2093,7 +2093,7 @@ point to libpng-allocated storage with the following function:
|
||||
|
||||
png_free_data(png_ptr, info_ptr, mask, seq)
|
||||
mask - identifies data to be freed, a mask
|
||||
containing the logical OR of one or
|
||||
containing the bitwise OR of one or
|
||||
more of
|
||||
PNG_FREE_PLTE, PNG_FREE_TRNS,
|
||||
PNG_FREE_HIST, PNG_FREE_ICCP,
|
||||
@@ -2155,7 +2155,7 @@ application instead of by libpng, you can use
|
||||
|
||||
png_set_invalid(png_ptr, info_ptr, mask);
|
||||
mask - identifies the chunks to be made invalid,
|
||||
containing the logical OR of one or
|
||||
containing the bitwise OR of one or
|
||||
more of
|
||||
PNG_INFO_gAMA, PNG_INFO_sBIT,
|
||||
PNG_INFO_cHRM, PNG_INFO_PLTE,
|
||||
@@ -2422,6 +2422,14 @@ Libpng section below.
|
||||
|
||||
png_init_io(png_ptr, fp);
|
||||
|
||||
If you are embedding your PNG into a datastream such as MNG, and don't
|
||||
want libpng to write the 8-byte signature, or if you have already
|
||||
written the signature in your application, use
|
||||
|
||||
png_set_sig_bytes(png_ptr, 8);
|
||||
|
||||
to inform libpng that it should not write a signature.
|
||||
|
||||
.SS Write callbacks
|
||||
|
||||
At this point, you can set up a callback function that will be
|
||||
@@ -2459,7 +2467,7 @@ types.
|
||||
|
||||
/* turn on or off filtering, and/or choose
|
||||
specific filters. You can use either a single
|
||||
PNG_FILTER_VALUE_NAME or the logical OR of one
|
||||
PNG_FILTER_VALUE_NAME or the bitwise OR of one
|
||||
or more PNG_FILTER_NAME masks. */
|
||||
png_set_filter(png_ptr, 0,
|
||||
PNG_FILTER_NONE | PNG_FILTER_VALUE_NONE |
|
||||
@@ -2832,7 +2840,7 @@ png_set_rows() to put image data in the info structure), simply do this:
|
||||
|
||||
png_write_png(png_ptr, info_ptr, png_transforms, NULL)
|
||||
|
||||
where png_transforms is an integer containing the logical OR of some set of
|
||||
where png_transforms is an integer containing the bitwise OR of some set of
|
||||
transformation flags. This call is equivalent to png_write_info(),
|
||||
followed the set of transformations indicated by the transform mask,
|
||||
then png_write_image(), and finally png_write_end().
|
||||
@@ -3092,7 +3100,7 @@ point to libpng-allocated storage with the following function:
|
||||
|
||||
png_free_data(png_ptr, info_ptr, mask, seq)
|
||||
mask - identifies data to be freed, a mask
|
||||
containing the logical OR of one or
|
||||
containing the bitwise OR of one or
|
||||
more of
|
||||
PNG_FREE_PLTE, PNG_FREE_TRNS,
|
||||
PNG_FREE_HIST, PNG_FREE_ICCP,
|
||||
@@ -3636,7 +3644,7 @@ defined:
|
||||
#if defined(PNG_USE_PNGGCCRD) && defined(PNG_ASSEMBLER_CODE_SUPPORTED) \
|
||||
&& defined(PNG_THREAD_UNSAFE_OK)
|
||||
/* Disable thread-unsafe features of pnggccrd */
|
||||
if (png_access_version() >= 10200)
|
||||
if (png_access_version_number() >= 10200)
|
||||
{
|
||||
png_uint_32 mmx_disable_mask = 0;
|
||||
png_uint_32 asm_flags;
|
||||
@@ -3662,12 +3670,12 @@ Libpng can support some of these extensions. To enable them, use the
|
||||
png_permit_mng_features() function:
|
||||
|
||||
feature_set = png_permit_mng_features(png_ptr, mask)
|
||||
mask is a png_uint_32 containing the logical OR of the
|
||||
mask is a png_uint_32 containing the bitwise OR of the
|
||||
features you want to enable. These include
|
||||
PNG_FLAG_MNG_EMPTY_PLTE
|
||||
PNG_FLAG_MNG_FILTER_64
|
||||
PNG_ALL_MNG_FEATURES
|
||||
feature_set is a png_uint_32 that is the logical AND of
|
||||
feature_set is a png_uint_32 that is the bitwise AND of
|
||||
your mask with the set of MNG features that is
|
||||
supported by the version of libpng that you are using.
|
||||
|
||||
@@ -3730,13 +3738,13 @@ application:
|
||||
|
||||
.SH IX. Y2K Compliance in libpng
|
||||
|
||||
April 19, 2006
|
||||
November 15, 2006
|
||||
|
||||
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.10rc1 are Y2K compliant. It is my belief that earlier
|
||||
upward through 1.2.13 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
|
||||
@@ -3880,20 +3888,32 @@ the first widely used release:
|
||||
1.0.16 10 10016 10.so.0.1.0.16
|
||||
1.2.6 13 10206 12.so.0.1.2.6
|
||||
1.2.7beta1-2 13 10207 12.so.0.1.2.7beta1-2
|
||||
1.0.17rc1 10 10017 12.so.0.1.0.17rc1
|
||||
1.0.17rc1 10 10017 10.so.0.1.0.17rc1
|
||||
1.2.7rc1 13 10207 12.so.0.1.2.7rc1
|
||||
1.0.17 10 10017 12.so.0.1.0.17
|
||||
1.0.17 10 10017 10.so.0.1.0.17
|
||||
1.2.7 13 10207 12.so.0.1.2.7
|
||||
1.2.8beta1-5 13 10208 12.so.0.1.2.8beta1-5
|
||||
1.0.18rc1-5 10 10018 12.so.0.1.0.18rc1-5
|
||||
1.0.18rc1-5 10 10018 10.so.0.1.0.18rc1-5
|
||||
1.2.8rc1-5 13 10208 12.so.0.1.2.8rc1-5
|
||||
1.0.18 10 10018 12.so.0.1.0.18
|
||||
1.0.18 10 10018 10.so.0.1.0.18
|
||||
1.2.8 13 10208 12.so.0.1.2.8
|
||||
1.2.9beta1-3 13 10209 12.so.0.1.2.9beta1-3
|
||||
1.2.9beta4-11 13 10209 12.so.0.9[.0]
|
||||
1.2.9rc1 13 10209 12.so.0.9[.0]
|
||||
1.2.9 13 10209 12.so.0.9[.0]
|
||||
1.2.10beta1-8 13 10210 12.so.0.10[.0]
|
||||
1.2.10rc1-3 13 10210 12.so.0.10[.0]
|
||||
1.2.10 13 10210 12.so.0.10[.0]
|
||||
1.2.11beta1-4 13 10211 12.so.0.11[.0]
|
||||
1.0.19rc1-5 10 10019 10.so.0.19[.0]
|
||||
1.2.11rc1-5 13 10211 12.so.0.11[.0]
|
||||
1.0.19 10 10019 10.so.0.19[.0]
|
||||
1.2.11 13 10211 12.so.0.11[.0]
|
||||
1.0.20 10 10020 10.so.0.20[.0]
|
||||
1.2.12 13 10212 12.so.0.12[.0]
|
||||
1.2.13beta1 13 10211 12.so.0.11[.0]
|
||||
1.0.21 10 10021 10.so.0.21[.0]
|
||||
1.2.13 13 10213 12.so.0.13[.0]
|
||||
|
||||
Henceforth the source version will match the shared-library minor
|
||||
and patch numbers; the shared-library major version number will be
|
||||
@@ -3949,7 +3969,7 @@ possible without all of you.
|
||||
|
||||
Thanks to Frank J. T. Wojcik for helping with the documentation.
|
||||
|
||||
Libpng version 1.2.10rc1 - April 19, 2006:
|
||||
Libpng version 1.2.13 - November 15, 2006:
|
||||
Initially created in 1995 by Guy Eric Schalnat, then of Group 42, Inc.
|
||||
Currently maintained by Glenn Randers-Pehrson (glennrp at users.sourceforge.net).
|
||||
|
||||
@@ -3970,7 +3990,7 @@ included in the libpng distribution, the latter shall prevail.)
|
||||
If you modify libpng you may insert additional notices immediately following
|
||||
this sentence.
|
||||
|
||||
libpng versions 1.2.6, August 15, 2004, through 1.2.10rc1, April 19, 2006, are
|
||||
libpng versions 1.2.6, August 15, 2004, through 1.2.13, November 15, 2006, are
|
||||
Copyright (c) 2004-2006 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
|
||||
@@ -4069,7 +4089,7 @@ certification mark of the Open Source Initiative.
|
||||
|
||||
Glenn Randers-Pehrson
|
||||
glennrp at users.sourceforge.net
|
||||
April 19, 2006
|
||||
November 15, 2006
|
||||
|
||||
.\" end of man page
|
||||
|
||||
|
||||
32
libpng.txt
32
libpng.txt
@@ -1,6 +1,6 @@
|
||||
libpng.txt - A description on how to use and modify libpng
|
||||
|
||||
libpng version 1.2.10rc1 - April 19, 2006
|
||||
libpng version 1.2.13 - November 15, 2006
|
||||
Updated and distributed by Glenn Randers-Pehrson
|
||||
<glennrp at users.sourceforge.net>
|
||||
Copyright (c) 1998-2005 Glenn Randers-Pehrson
|
||||
@@ -392,7 +392,7 @@ dithering, and setting filler.) If this is the case, simply do this:
|
||||
|
||||
png_read_png(png_ptr, info_ptr, png_transforms, NULL)
|
||||
|
||||
where png_transforms is an integer containing the logical OR of
|
||||
where png_transforms is an integer containing the bitwise OR of
|
||||
some set of transformation flags. This call is equivalent to png_read_info(),
|
||||
followed the set of transformations indicated by the transform mask,
|
||||
then png_read_image(), and finally png_read_end().
|
||||
@@ -1272,7 +1272,7 @@ point to libpng-allocated storage with the following function:
|
||||
|
||||
png_free_data(png_ptr, info_ptr, mask, seq)
|
||||
mask - identifies data to be freed, a mask
|
||||
containing the logical OR of one or
|
||||
containing the bitwise OR of one or
|
||||
more of
|
||||
PNG_FREE_PLTE, PNG_FREE_TRNS,
|
||||
PNG_FREE_HIST, PNG_FREE_ICCP,
|
||||
@@ -1334,7 +1334,7 @@ application instead of by libpng, you can use
|
||||
|
||||
png_set_invalid(png_ptr, info_ptr, mask);
|
||||
mask - identifies the chunks to be made invalid,
|
||||
containing the logical OR of one or
|
||||
containing the bitwise OR of one or
|
||||
more of
|
||||
PNG_INFO_gAMA, PNG_INFO_sBIT,
|
||||
PNG_INFO_cHRM, PNG_INFO_PLTE,
|
||||
@@ -1601,6 +1601,14 @@ Libpng section below.
|
||||
|
||||
png_init_io(png_ptr, fp);
|
||||
|
||||
If you are embedding your PNG into a datastream such as MNG, and don't
|
||||
want libpng to write the 8-byte signature, or if you have already
|
||||
written the signature in your application, use
|
||||
|
||||
png_set_sig_bytes(png_ptr, 8);
|
||||
|
||||
to inform libpng that it should not write a signature.
|
||||
|
||||
Write callbacks
|
||||
|
||||
At this point, you can set up a callback function that will be
|
||||
@@ -1638,7 +1646,7 @@ types.
|
||||
|
||||
/* turn on or off filtering, and/or choose
|
||||
specific filters. You can use either a single
|
||||
PNG_FILTER_VALUE_NAME or the logical OR of one
|
||||
PNG_FILTER_VALUE_NAME or the bitwise OR of one
|
||||
or more PNG_FILTER_NAME masks. */
|
||||
png_set_filter(png_ptr, 0,
|
||||
PNG_FILTER_NONE | PNG_FILTER_VALUE_NONE |
|
||||
@@ -2011,7 +2019,7 @@ png_set_rows() to put image data in the info structure), simply do this:
|
||||
|
||||
png_write_png(png_ptr, info_ptr, png_transforms, NULL)
|
||||
|
||||
where png_transforms is an integer containing the logical OR of some set of
|
||||
where png_transforms is an integer containing the bitwise OR of some set of
|
||||
transformation flags. This call is equivalent to png_write_info(),
|
||||
followed the set of transformations indicated by the transform mask,
|
||||
then png_write_image(), and finally png_write_end().
|
||||
@@ -2271,7 +2279,7 @@ point to libpng-allocated storage with the following function:
|
||||
|
||||
png_free_data(png_ptr, info_ptr, mask, seq)
|
||||
mask - identifies data to be freed, a mask
|
||||
containing the logical OR of one or
|
||||
containing the bitwise OR of one or
|
||||
more of
|
||||
PNG_FREE_PLTE, PNG_FREE_TRNS,
|
||||
PNG_FREE_HIST, PNG_FREE_ICCP,
|
||||
@@ -2815,7 +2823,7 @@ defined:
|
||||
#if defined(PNG_USE_PNGGCCRD) && defined(PNG_ASSEMBLER_CODE_SUPPORTED) \
|
||||
&& defined(PNG_THREAD_UNSAFE_OK)
|
||||
/* Disable thread-unsafe features of pnggccrd */
|
||||
if (png_access_version() >= 10200)
|
||||
if (png_access_version_number() >= 10200)
|
||||
{
|
||||
png_uint_32 mmx_disable_mask = 0;
|
||||
png_uint_32 asm_flags;
|
||||
@@ -2841,12 +2849,12 @@ Libpng can support some of these extensions. To enable them, use the
|
||||
png_permit_mng_features() function:
|
||||
|
||||
feature_set = png_permit_mng_features(png_ptr, mask)
|
||||
mask is a png_uint_32 containing the logical OR of the
|
||||
mask is a png_uint_32 containing the bitwise OR of the
|
||||
features you want to enable. These include
|
||||
PNG_FLAG_MNG_EMPTY_PLTE
|
||||
PNG_FLAG_MNG_FILTER_64
|
||||
PNG_ALL_MNG_FEATURES
|
||||
feature_set is a png_uint_32 that is the logical AND of
|
||||
feature_set is a png_uint_32 that is the bitwise AND of
|
||||
your mask with the set of MNG features that is
|
||||
supported by the version of libpng that you are using.
|
||||
|
||||
@@ -2909,13 +2917,13 @@ application:
|
||||
|
||||
IX. Y2K Compliance in libpng
|
||||
|
||||
April 19, 2006
|
||||
November 15, 2006
|
||||
|
||||
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.10rc1 are Y2K compliant. It is my belief that earlier
|
||||
upward through 1.2.13 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
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
.TH LIBPNGPF 3 "April 19, 2006"
|
||||
.TH LIBPNGPF 3 "November 15, 2006"
|
||||
.SH NAME
|
||||
libpng \- Portable Network Graphics (PNG) Reference Library 1.2.10rc1
|
||||
libpng \- Portable Network Graphics (PNG) Reference Library 1.2.13
|
||||
(private functions)
|
||||
.SH SYNOPSIS
|
||||
\fB#include <png.h>\fP
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
#! /bin/sh
|
||||
# ltmain.sh - Provide generalized library-building support services.
|
||||
# NOTE: Changing this file will not affect anything until you rerun configure.
|
||||
#
|
||||
|
||||
2
png.5
2
png.5
@@ -1,4 +1,4 @@
|
||||
.TH PNG 5 "April 19, 2006"
|
||||
.TH PNG 5 "November 15, 2006"
|
||||
.SH NAME
|
||||
png \- Portable Network Graphics (PNG) format
|
||||
.SH DESCRIPTION
|
||||
|
||||
16
png.c
16
png.c
@@ -1,7 +1,7 @@
|
||||
|
||||
/* png.c - location for general purpose libpng functions
|
||||
*
|
||||
* Last changed in libpng 1.2.9 April 14, 2006
|
||||
* Last changed in libpng 1.2.13 November 13, 2006
|
||||
* For conditions of distribution and use, see copyright notice in png.h
|
||||
* Copyright (c) 1998-2006 Glenn Randers-Pehrson
|
||||
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
|
||||
@@ -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_10rc1 Your_png_h_is_not_version_1_2_10rc1;
|
||||
typedef version_1_2_13 Your_png_h_is_not_version_1_2_13;
|
||||
|
||||
/* Version information for C files. This had better match the version
|
||||
* string defined in png.h. */
|
||||
@@ -97,6 +97,7 @@ const int FARDATA png_pass_dsp_mask[]
|
||||
void PNGAPI
|
||||
png_set_sig_bytes(png_structp png_ptr, int num_bytes)
|
||||
{
|
||||
if(png_ptr == NULL) return;
|
||||
png_debug(1, "in png_set_sig_bytes\n");
|
||||
if (num_bytes > 8)
|
||||
png_error(png_ptr, "Too many bytes for PNG signature.");
|
||||
@@ -157,6 +158,7 @@ png_zalloc(voidpf png_ptr, uInt items, uInt size)
|
||||
png_uint_32 save_flags=p->flags;
|
||||
png_uint_32 num_bytes;
|
||||
|
||||
if(png_ptr == NULL) return (NULL);
|
||||
if (items > PNG_UINT_32_MAX/size)
|
||||
{
|
||||
png_warning (png_ptr, "Potential overflow in png_zalloc()");
|
||||
@@ -265,6 +267,7 @@ png_create_info_struct(png_structp png_ptr)
|
||||
void PNGAPI
|
||||
png_destroy_info_struct(png_structp png_ptr, png_infopp info_ptr_ptr)
|
||||
{
|
||||
if(png_ptr == NULL) return;
|
||||
png_infop info_ptr = NULL;
|
||||
|
||||
png_debug(1, "in png_destroy_info_struct\n");
|
||||
@@ -304,6 +307,8 @@ png_info_init_3(png_infopp ptr_ptr, png_size_t png_info_struct_size)
|
||||
{
|
||||
png_infop info_ptr = *ptr_ptr;
|
||||
|
||||
if(info_ptr == NULL) return;
|
||||
|
||||
png_debug(1, "in png_info_init_3\n");
|
||||
|
||||
if(png_sizeof(png_info) > png_info_struct_size)
|
||||
@@ -611,6 +616,7 @@ png_info_destroy(png_structp png_ptr, png_infop info_ptr)
|
||||
png_voidp PNGAPI
|
||||
png_get_io_ptr(png_structp png_ptr)
|
||||
{
|
||||
if(png_ptr == NULL) return (NULL);
|
||||
return (png_ptr->io_ptr);
|
||||
}
|
||||
|
||||
@@ -626,6 +632,7 @@ void PNGAPI
|
||||
png_init_io(png_structp png_ptr, png_FILE_p fp)
|
||||
{
|
||||
png_debug(1, "in png_init_io\n");
|
||||
if(png_ptr == NULL) return;
|
||||
png_ptr->io_ptr = (png_voidp)fp;
|
||||
}
|
||||
#endif
|
||||
@@ -641,6 +648,7 @@ png_convert_to_rfc1123(png_structp png_ptr, png_timep ptime)
|
||||
{"Jan", "Feb", "Mar", "Apr", "May", "Jun",
|
||||
"Jul", "Aug", "Sep", "Oct", "Nov", "Dec"};
|
||||
|
||||
if(png_ptr == NULL) return (NULL);
|
||||
if (png_ptr->time_buffer == NULL)
|
||||
{
|
||||
png_ptr->time_buffer = (png_charp)png_malloc(png_ptr, (png_uint_32)(29*
|
||||
@@ -693,7 +701,7 @@ png_charp PNGAPI
|
||||
png_get_copyright(png_structp png_ptr)
|
||||
{
|
||||
if (&png_ptr != NULL) /* silence compiler warning about unused png_ptr */
|
||||
return ((png_charp) "\n libpng version 1.2.10rc1 - April 19, 2006\n\
|
||||
return ((png_charp) "\n libpng version 1.2.13 - November 15, 2006\n\
|
||||
Copyright (c) 1998-2006 Glenn Randers-Pehrson\n\
|
||||
Copyright (c) 1996-1997 Andreas Dilger\n\
|
||||
Copyright (c) 1995-1996 Guy Eric Schalnat, Group 42, Inc.\n");
|
||||
@@ -757,6 +765,7 @@ png_handle_as_unknown(png_structp png_ptr, png_bytep chunk_name)
|
||||
int PNGAPI
|
||||
png_reset_zstream(png_structp png_ptr)
|
||||
{
|
||||
if (png_ptr == NULL) return Z_STREAM_ERROR;
|
||||
return (inflateReset(&png_ptr->zstream));
|
||||
}
|
||||
#endif /* defined(PNG_READ_SUPPORTED) || defined(PNG_WRITE_SUPPORTED) */
|
||||
@@ -778,6 +787,7 @@ png_access_version_number(void)
|
||||
void /* PRIVATE */
|
||||
png_init_mmx_flags (png_structp png_ptr)
|
||||
{
|
||||
if(png_ptr == NULL) return;
|
||||
png_ptr->mmx_rowbytes_threshold = 0;
|
||||
png_ptr->mmx_bitdepth_threshold = 0;
|
||||
|
||||
|
||||
72
png.h
72
png.h
@@ -1,7 +1,7 @@
|
||||
|
||||
/* png.h - header file for PNG reference library
|
||||
*
|
||||
* libpng version 1.2.10rc1 - April 19, 2006
|
||||
* libpng version 1.2.13 - November 15, 2006
|
||||
* Copyright (c) 1998-2006 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.)
|
||||
@@ -9,7 +9,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.2.10rc1 - April 19, 2006: Glenn
|
||||
* libpng versions 0.97, January 1998, through 1.2.13 - November 15, 2006: Glenn
|
||||
* See also "Contributing Authors", below.
|
||||
*
|
||||
* Note about libpng version numbers:
|
||||
@@ -103,20 +103,32 @@
|
||||
* 1.0.16 10 10016 10.so.0.1.0.16
|
||||
* 1.2.6 13 10206 12.so.0.1.2.6
|
||||
* 1.2.7beta1-2 13 10207 12.so.0.1.2.7beta1-2
|
||||
* 1.0.17rc1 10 10017 12.so.0.1.0.17rc1
|
||||
* 1.0.17rc1 10 10017 10.so.0.1.0.17rc1
|
||||
* 1.2.7rc1 13 10207 12.so.0.1.2.7rc1
|
||||
* 1.0.17 10 10017 12.so.0.1.0.17
|
||||
* 1.0.17 10 10017 10.so.0.1.0.17
|
||||
* 1.2.7 13 10207 12.so.0.1.2.7
|
||||
* 1.2.8beta1-5 13 10208 12.so.0.1.2.8beta1-5
|
||||
* 1.0.18rc1-5 10 10018 12.so.0.1.0.18rc1-5
|
||||
* 1.0.18rc1-5 10 10018 10.so.0.1.0.18rc1-5
|
||||
* 1.2.8rc1-5 13 10208 12.so.0.1.2.8rc1-5
|
||||
* 1.0.18 10 10018 12.so.0.1.0.18
|
||||
* 1.0.18 10 10018 10.so.0.1.0.18
|
||||
* 1.2.8 13 10208 12.so.0.1.2.8
|
||||
* 1.2.9beta1-3 13 10209 12.so.0.1.2.9beta1-3
|
||||
* 1.2.9beta4-11 13 10209 12.so.0.9[.0]
|
||||
* 1.2.9rc1 13 10209 12.so.0.9[.0]
|
||||
* 1.2.9 13 10209 12.so.0.9[.0]
|
||||
* 1.2.10beta1-8 13 10210 12.so.0.10[.0]
|
||||
* 1.2.10rc1-3 13 10210 12.so.0.10[.0]
|
||||
* 1.2.10 13 10210 12.so.0.10[.0]
|
||||
* 1.2.11beta1-4 13 10211 12.so.0.11[.0]
|
||||
* 1.0.19rc1-5 10 10019 10.so.0.19[.0]
|
||||
* 1.2.11rc1-5 13 10211 12.so.0.11[.0]
|
||||
* 1.0.19 10 10019 10.so.0.19[.0]
|
||||
* 1.2.11 13 10211 12.so.0.11[.0]
|
||||
* 1.0.20 10 10020 10.so.0.20[.0]
|
||||
* 1.2.12 13 10212 12.so.0.12[.0]
|
||||
* 1.2.13beta1 13 10211 12.so.0.11[.0]
|
||||
* 1.0.21 10 10021 10.so.0.21[.0]
|
||||
* 1.2.13 13 10213 12.so.0.13[.0]
|
||||
*
|
||||
* Henceforth the source version will match the shared-library major
|
||||
* and minor numbers; the shared-library major version number will be
|
||||
@@ -146,7 +158,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.10rc1, April 19, 2006, are
|
||||
* libpng versions 1.2.6, August 15, 2004, through 1.2.13, November 15, 2006, are
|
||||
* Copyright (c) 2004, 2006 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:
|
||||
@@ -258,13 +270,13 @@
|
||||
* Y2K compliance in libpng:
|
||||
* =========================
|
||||
*
|
||||
* April 19, 2006
|
||||
* November 15, 2006
|
||||
*
|
||||
* 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.10rc1 are Y2K compliant. It is my belief that earlier
|
||||
* upward through 1.2.13 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
|
||||
@@ -320,9 +332,9 @@
|
||||
*/
|
||||
|
||||
/* Version information for png.h - this should match the version in png.c */
|
||||
#define PNG_LIBPNG_VER_STRING "1.2.10rc1"
|
||||
#define PNG_LIBPNG_VER_STRING "1.2.13"
|
||||
#define PNG_HEADER_VERSION_STRING \
|
||||
" libpng version 1.2.10rc1 - April 19, 2006 (header)\n"
|
||||
" libpng version 1.2.13 - November 15, 2006 (header)\n"
|
||||
|
||||
#define PNG_LIBPNG_VER_SONUM 0
|
||||
#define PNG_LIBPNG_VER_DLLNUM 13
|
||||
@@ -330,11 +342,11 @@
|
||||
/* 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 10
|
||||
#define PNG_LIBPNG_VER_RELEASE 13
|
||||
/* This should match the numeric part of the final component of
|
||||
* PNG_LIBPNG_VER_STRING, omitting any leading zero: */
|
||||
|
||||
#define PNG_LIBPNG_VER_BUILD 1
|
||||
#define PNG_LIBPNG_VER_BUILD 0
|
||||
|
||||
/* Release Status */
|
||||
#define PNG_LIBPNG_BUILD_ALPHA 1
|
||||
@@ -351,14 +363,14 @@
|
||||
#define PNG_LIBPNG_BUILD_SPECIAL 32 /* Cannot be OR'ed with
|
||||
PNG_LIBPNG_BUILD_PRIVATE */
|
||||
|
||||
#define PNG_LIBPNG_BUILD_BASE_TYPE PNG_LIBPNG_BUILD_RC
|
||||
#define PNG_LIBPNG_BUILD_BASE_TYPE PNG_LIBPNG_BUILD_STABLE
|
||||
|
||||
/* Careful here. At one time, Guy wanted to use 082, but that would be octal.
|
||||
* We must not include leading zeros.
|
||||
* 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 10210 /* 1.2.10 */
|
||||
#define PNG_LIBPNG_VER 10213 /* 1.2.13 */
|
||||
|
||||
#ifndef PNG_VERSION_INFO_ONLY
|
||||
/* include the compression library's header */
|
||||
@@ -461,7 +473,7 @@ PNG_EXPORT_VAR (const int FARDATA) png_pass_ystart[7];
|
||||
PNG_EXPORT_VAR (const int FARDATA) png_pass_yinc[7];
|
||||
PNG_EXPORT_VAR (const int FARDATA) png_pass_mask[7];
|
||||
PNG_EXPORT_VAR (const int FARDATA) png_pass_dsp_mask[7];
|
||||
#ifdef PNG_HAVE_ASSEMBLER_COMBINE_ROW
|
||||
#ifdef PNG_USE_PNGGCCRD
|
||||
PNG_EXPORT_VAR (const int FARDATA) png_pass_width[7];
|
||||
#endif
|
||||
/* This isn't currently used. If you need it, see png.c for more details.
|
||||
@@ -1364,7 +1376,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_10rc1;
|
||||
typedef png_structp version_1_2_13;
|
||||
|
||||
typedef png_struct FAR * FAR * png_structpp;
|
||||
|
||||
@@ -2647,7 +2659,7 @@ extern PNG_EXPORT(void,png_save_uint_16)
|
||||
#define PNG_HAVE_IHDR 0x01
|
||||
#define PNG_HAVE_PLTE 0x02
|
||||
#define PNG_HAVE_IDAT 0x04
|
||||
#define PNG_AFTER_IDAT 0x08
|
||||
#define PNG_AFTER_IDAT 0x08 /* Have complete zlib datastream */
|
||||
#define PNG_HAVE_IEND 0x10
|
||||
#define PNG_HAVE_gAMA 0x20
|
||||
#define PNG_HAVE_cHRM 0x40
|
||||
@@ -2657,6 +2669,7 @@ extern PNG_EXPORT(void,png_save_uint_16)
|
||||
#define PNG_WROTE_INFO_BEFORE_PLTE 0x400
|
||||
#define PNG_BACKGROUND_IS_GRAY 0x800
|
||||
#define PNG_HAVE_PNG_SIGNATURE 0x1000
|
||||
#define PNG_HAVE_CHUNK_AFTER_IDAT 0x2000 /* Have another chunk after IDAT */
|
||||
|
||||
/* flags for the transformations the PNG library does on the image data */
|
||||
#define PNG_BGR 0x0001
|
||||
@@ -3435,6 +3448,29 @@ PNG_EXTERN void png_do_write_intrapixel PNGARG((png_row_infop row_info,
|
||||
/* png.c */ /* PRIVATE */
|
||||
PNG_EXTERN void png_init_mmx_flags PNGARG((png_structp png_ptr));
|
||||
#endif
|
||||
|
||||
#if defined(PNG_INCH_CONVERSIONS) && defined(PNG_FLOATING_POINT_SUPPORTED)
|
||||
PNG_EXTERN png_uint_32 png_get_pixels_per_inch PNGARG((png_structp png_ptr,
|
||||
png_infop info_ptr));
|
||||
|
||||
PNG_EXTERN png_uint_32 png_get_x_pixels_per_inch PNGARG((png_structp png_ptr,
|
||||
png_infop info_ptr));
|
||||
|
||||
PNG_EXTERN png_uint_32 png_get_y_pixels_per_inch PNGARG((png_structp png_ptr,
|
||||
png_infop info_ptr));
|
||||
|
||||
PNG_EXTERN float png_get_x_offset_inches PNGARG((png_structp png_ptr,
|
||||
png_infop info_ptr));
|
||||
|
||||
PNG_EXTERN float png_get_y_offset_inches PNGARG((png_structp png_ptr,
|
||||
png_infop info_ptr));
|
||||
|
||||
#if defined(PNG_pHYs_SUPPORTED)
|
||||
PNG_EXTERN png_uint_32 png_get_pHYs_dpi PNGARG((png_structp png_ptr,
|
||||
png_infop info_ptr, png_uint_32 *res_x, png_uint_32 *res_y, int *unit_type));
|
||||
#endif /* PNG_pHYs_SUPPORTED */
|
||||
#endif /* PNG_INCH_CONVERSIONS && PNG_FLOATING_POINT_SUPPORTED */
|
||||
|
||||
/* Maintainer: Put new private prototypes here ^ and in libpngpf.3 */
|
||||
|
||||
#endif /* PNG_INTERNAL */
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
|
||||
/* pngconf.h - machine configurable file for libpng
|
||||
*
|
||||
* libpng version 1.2.10rc1 - April 19, 2006
|
||||
* libpng version 1.2.13 - November 15, 2006
|
||||
* For conditions of distribution and use, see copyright notice in png.h
|
||||
* Copyright (c) 1998-2005 Glenn Randers-Pehrson
|
||||
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
|
||||
@@ -726,6 +726,10 @@
|
||||
# ifndef PNG_ASSEMBLER_CODE_SUPPORTED
|
||||
# define PNG_ASSEMBLER_CODE_SUPPORTED
|
||||
# endif
|
||||
# if defined(XP_MACOSX) && !defined(PNG_NO_MMX_CODE)
|
||||
/* work around Intel-Mac compiler bug */
|
||||
# define PNG_NO_MMX_CODE
|
||||
# endif
|
||||
# if !defined(PNG_MMX_CODE_SUPPORTED) && !defined(PNG_NO_MMX_CODE) && \
|
||||
defined(__MMX__)
|
||||
# define PNG_MMX_CODE_SUPPORTED
|
||||
|
||||
23
pngerror.c
23
pngerror.c
@@ -1,7 +1,7 @@
|
||||
|
||||
/* pngerror.c - stub functions for i/o and memory allocation
|
||||
*
|
||||
* Last changed in libpng 1.2.9 April 14, 2006
|
||||
* Last changed in libpng 1.2.13 November 13, 2006
|
||||
* For conditions of distribution and use, see copyright notice in png.h
|
||||
* Copyright (c) 1998-2006 Glenn Randers-Pehrson
|
||||
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
|
||||
@@ -157,8 +157,11 @@ png_chunk_error(png_structp png_ptr, png_const_charp error_message)
|
||||
char msg[18+64];
|
||||
if (png_ptr == NULL)
|
||||
png_error(png_ptr, error_message);
|
||||
png_format_buffer(png_ptr, msg, error_message);
|
||||
png_error(png_ptr, msg);
|
||||
else
|
||||
{
|
||||
png_format_buffer(png_ptr, msg, error_message);
|
||||
png_error(png_ptr, msg);
|
||||
}
|
||||
}
|
||||
|
||||
void PNGAPI
|
||||
@@ -167,8 +170,11 @@ png_chunk_warning(png_structp png_ptr, png_const_charp warning_message)
|
||||
char msg[18+64];
|
||||
if (png_ptr == NULL)
|
||||
png_warning(png_ptr, warning_message);
|
||||
png_format_buffer(png_ptr, msg, warning_message);
|
||||
png_warning(png_ptr, msg);
|
||||
else
|
||||
{
|
||||
png_format_buffer(png_ptr, msg, warning_message);
|
||||
png_warning(png_ptr, msg);
|
||||
}
|
||||
}
|
||||
|
||||
/* This is the default error handling function. Note that replacements for
|
||||
@@ -206,6 +212,8 @@ png_default_error(png_structp png_ptr, png_const_charp error_message)
|
||||
#endif
|
||||
|
||||
#ifdef PNG_SETJMP_SUPPORTED
|
||||
if (png_ptr)
|
||||
{
|
||||
# ifdef USE_FAR_KEYWORD
|
||||
{
|
||||
jmp_buf jmpbuf;
|
||||
@@ -214,10 +222,9 @@ png_default_error(png_structp png_ptr, png_const_charp error_message)
|
||||
}
|
||||
# else
|
||||
longjmp(png_ptr->jmpbuf, 1);
|
||||
# endif
|
||||
# endif
|
||||
}
|
||||
#else
|
||||
/* make compiler happy */ ;
|
||||
if (png_ptr)
|
||||
PNG_ABORT();
|
||||
#endif
|
||||
#ifdef PNG_NO_CONSOLE_IO
|
||||
|
||||
11
pngmem.c
11
pngmem.c
@@ -1,7 +1,7 @@
|
||||
|
||||
/* pngmem.c - stub functions for memory allocation
|
||||
*
|
||||
* Last changed in libpng 1.2.9 April 14, 2006
|
||||
* Last changed in libpng 1.2.13 November 13, 2006
|
||||
* For conditions of distribution and use, see copyright notice in png.h
|
||||
* Copyright (c) 1998-2006 Glenn Randers-Pehrson
|
||||
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
|
||||
@@ -137,6 +137,9 @@ png_malloc_default(png_structp png_ptr, png_uint_32 size)
|
||||
png_voidp ret;
|
||||
#endif /* PNG_USER_MEM_SUPPORTED */
|
||||
|
||||
if (png_ptr == NULL || size == 0)
|
||||
return (NULL);
|
||||
|
||||
#ifdef PNG_MAX_MALLOC_64K
|
||||
if (size > (png_uint_32)65536L)
|
||||
{
|
||||
@@ -290,6 +293,8 @@ png_free_default(png_structp png_ptr, png_voidp ptr)
|
||||
{
|
||||
#endif /* PNG_USER_MEM_SUPPORTED */
|
||||
|
||||
if(png_ptr == NULL) return;
|
||||
|
||||
if (png_ptr->offset_table != NULL)
|
||||
{
|
||||
int i;
|
||||
@@ -536,6 +541,7 @@ png_voidp PNGAPI
|
||||
png_malloc_warn(png_structp png_ptr, png_uint_32 size)
|
||||
{
|
||||
png_voidp ptr;
|
||||
if(png_ptr == NULL) return (NULL);
|
||||
png_uint_32 save_flags=png_ptr->flags;
|
||||
|
||||
png_ptr->flags|=PNG_FLAG_MALLOC_NULL_MEM_OK;
|
||||
@@ -580,9 +586,11 @@ void PNGAPI
|
||||
png_set_mem_fn(png_structp png_ptr, png_voidp mem_ptr, png_malloc_ptr
|
||||
malloc_fn, png_free_ptr free_fn)
|
||||
{
|
||||
if(png_ptr != NULL) {
|
||||
png_ptr->mem_ptr = mem_ptr;
|
||||
png_ptr->malloc_fn = malloc_fn;
|
||||
png_ptr->free_fn = free_fn;
|
||||
}
|
||||
}
|
||||
|
||||
/* This function returns a pointer to the mem_ptr associated with the user
|
||||
@@ -592,6 +600,7 @@ png_set_mem_fn(png_structp png_ptr, png_voidp mem_ptr, png_malloc_ptr
|
||||
png_voidp PNGAPI
|
||||
png_get_mem_ptr(png_structp png_ptr)
|
||||
{
|
||||
if(png_ptr == NULL) return (NULL);
|
||||
return ((png_voidp)png_ptr->mem_ptr);
|
||||
}
|
||||
#endif /* PNG_USER_MEM_SUPPORTED */
|
||||
|
||||
19
pngpread.c
19
pngpread.c
@@ -1,9 +1,9 @@
|
||||
|
||||
/* pngpread.c - read a png file in push mode
|
||||
*
|
||||
* Last changed in libpng 1.2.8 - December 3, 2004
|
||||
* Last changed in libpng 1.2.13 November 13, 2006
|
||||
* For conditions of distribution and use, see copyright notice in png.h
|
||||
* Copyright (c) 1998-2004 Glenn Randers-Pehrson
|
||||
* Copyright (c) 1998-2006 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.)
|
||||
*/
|
||||
@@ -28,6 +28,7 @@ void PNGAPI
|
||||
png_process_data(png_structp png_ptr, png_infop info_ptr,
|
||||
png_bytep buffer, png_size_t buffer_size)
|
||||
{
|
||||
if(png_ptr == NULL) return;
|
||||
png_push_restore_buffer(png_ptr, buffer, buffer_size);
|
||||
|
||||
while (png_ptr->buffer_size)
|
||||
@@ -42,6 +43,7 @@ png_process_data(png_structp png_ptr, png_infop info_ptr,
|
||||
void /* PRIVATE */
|
||||
png_process_some_data(png_structp png_ptr, png_infop info_ptr)
|
||||
{
|
||||
if(png_ptr == NULL) return;
|
||||
switch (png_ptr->process_mode)
|
||||
{
|
||||
case PNG_READ_SIG_MODE:
|
||||
@@ -214,6 +216,10 @@ png_push_read_chunk(png_structp png_ptr, png_infop info_ptr)
|
||||
png_ptr->mode |= PNG_HAVE_CHUNK_HEADER;
|
||||
}
|
||||
|
||||
if (!png_memcmp(png_ptr->chunk_name, (png_bytep)png_IDAT, 4))
|
||||
if(png_ptr->mode & PNG_AFTER_IDAT)
|
||||
png_ptr->mode |= PNG_HAVE_CHUNK_AFTER_IDAT;
|
||||
|
||||
if (!png_memcmp(png_ptr->chunk_name, png_IHDR, 4))
|
||||
{
|
||||
if (png_ptr->push_length + 4 > png_ptr->buffer_size)
|
||||
@@ -281,8 +287,9 @@ png_push_read_chunk(png_structp png_ptr, png_infop info_ptr)
|
||||
|
||||
if (png_ptr->mode & PNG_HAVE_IDAT)
|
||||
{
|
||||
if (png_ptr->push_length == 0)
|
||||
return;
|
||||
if (!(png_ptr->mode & PNG_HAVE_CHUNK_AFTER_IDAT))
|
||||
if (png_ptr->push_length == 0)
|
||||
return;
|
||||
|
||||
if (png_ptr->mode & PNG_AFTER_IDAT)
|
||||
png_error(png_ptr, "Too many IDAT's found");
|
||||
@@ -556,6 +563,7 @@ png_push_fill_buffer(png_structp png_ptr, png_bytep buffer, png_size_t length)
|
||||
{
|
||||
png_bytep ptr;
|
||||
|
||||
if(png_ptr == NULL) return;
|
||||
ptr = buffer;
|
||||
if (png_ptr->save_buffer_size)
|
||||
{
|
||||
@@ -1545,6 +1553,7 @@ void PNGAPI
|
||||
png_progressive_combine_row (png_structp png_ptr,
|
||||
png_bytep old_row, png_bytep new_row)
|
||||
{
|
||||
if(png_ptr == NULL) return;
|
||||
#ifdef PNG_USE_LOCAL_ARRAYS
|
||||
const int FARDATA png_pass_dsp_mask[7] =
|
||||
{0xff, 0x0f, 0xff, 0x33, 0xff, 0x55, 0xff};
|
||||
@@ -1558,6 +1567,7 @@ png_set_progressive_read_fn(png_structp png_ptr, png_voidp progressive_ptr,
|
||||
png_progressive_info_ptr info_fn, png_progressive_row_ptr row_fn,
|
||||
png_progressive_end_ptr end_fn)
|
||||
{
|
||||
if(png_ptr == NULL) return;
|
||||
png_ptr->info_fn = info_fn;
|
||||
png_ptr->row_fn = row_fn;
|
||||
png_ptr->end_fn = end_fn;
|
||||
@@ -1568,6 +1578,7 @@ png_set_progressive_read_fn(png_structp png_ptr, png_voidp progressive_ptr,
|
||||
png_voidp PNGAPI
|
||||
png_get_progressive_ptr(png_structp png_ptr)
|
||||
{
|
||||
if(png_ptr == NULL) return (NULL);
|
||||
return png_ptr->io_ptr;
|
||||
}
|
||||
#endif /* PNG_PROGRESSIVE_READ_SUPPORTED */
|
||||
|
||||
24
pngread.c
24
pngread.c
@@ -1,7 +1,7 @@
|
||||
|
||||
/* pngread.c - read a PNG file
|
||||
*
|
||||
* Last changed in libpng 1.2.9 April 14, 2006
|
||||
* Last changed in libpng 1.2.13 November 13, 2006
|
||||
* For conditions of distribution and use, see copyright notice in png.h
|
||||
* Copyright (c) 1998-2006 Glenn Randers-Pehrson
|
||||
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
|
||||
@@ -188,6 +188,7 @@ png_read_init_2(png_structp png_ptr, png_const_charp user_png_ver,
|
||||
png_size_t png_struct_size, png_size_t png_info_size)
|
||||
{
|
||||
/* We only come here via pre-1.0.12-compiled applications */
|
||||
if(png_ptr == NULL) return;
|
||||
#if !defined(PNG_NO_STDIO) && !defined(_WIN32_WCE)
|
||||
if(png_sizeof(png_struct) > png_struct_size ||
|
||||
png_sizeof(png_info) > png_info_size)
|
||||
@@ -239,6 +240,8 @@ png_read_init_3(png_structpp ptr_ptr, png_const_charp user_png_ver,
|
||||
|
||||
png_structp png_ptr=*ptr_ptr;
|
||||
|
||||
if(png_ptr == NULL) return;
|
||||
|
||||
do
|
||||
{
|
||||
if(user_png_ver[i] != png_libpng_ver[i])
|
||||
@@ -317,6 +320,7 @@ png_read_init_3(png_structpp ptr_ptr, png_const_charp user_png_ver,
|
||||
void PNGAPI
|
||||
png_read_info(png_structp png_ptr, png_infop info_ptr)
|
||||
{
|
||||
if(png_ptr == NULL) return;
|
||||
png_debug(1, "in png_read_info\n");
|
||||
/* If we haven't checked all of the PNG signature bytes, do so now. */
|
||||
if (png_ptr->sig_bytes < 8)
|
||||
@@ -413,6 +417,10 @@ png_read_info(png_structp png_ptr, png_infop info_ptr)
|
||||
/* This should be a binary subdivision search or a hash for
|
||||
* matching the chunk name rather than a linear search.
|
||||
*/
|
||||
if (!png_memcmp(png_ptr->chunk_name, (png_bytep)png_IDAT, 4))
|
||||
if(png_ptr->mode & PNG_AFTER_IDAT)
|
||||
png_ptr->mode |= PNG_HAVE_CHUNK_AFTER_IDAT;
|
||||
|
||||
if (!png_memcmp(png_ptr->chunk_name, png_IHDR, 4))
|
||||
png_handle_IHDR(png_ptr, info_ptr, length);
|
||||
else if (!png_memcmp(png_ptr->chunk_name, png_IEND, 4))
|
||||
@@ -529,6 +537,7 @@ void PNGAPI
|
||||
png_read_update_info(png_structp png_ptr, png_infop info_ptr)
|
||||
{
|
||||
png_debug(1, "in png_read_update_info\n");
|
||||
if(png_ptr == NULL) return;
|
||||
if (!(png_ptr->flags & PNG_FLAG_ROW_INIT))
|
||||
png_read_start_row(png_ptr);
|
||||
else
|
||||
@@ -547,6 +556,7 @@ void PNGAPI
|
||||
png_start_read_image(png_structp png_ptr)
|
||||
{
|
||||
png_debug(1, "in png_start_read_image\n");
|
||||
if(png_ptr == NULL) return;
|
||||
if (!(png_ptr->flags & PNG_FLAG_ROW_INIT))
|
||||
png_read_start_row(png_ptr);
|
||||
}
|
||||
@@ -562,6 +572,7 @@ png_read_row(png_structp png_ptr, png_bytep row, png_bytep dsp_row)
|
||||
const int png_pass_mask[7] = {0x80, 0x08, 0x88, 0x22, 0xaa, 0x55, 0xff};
|
||||
#endif
|
||||
int ret;
|
||||
if(png_ptr == NULL) return;
|
||||
png_debug2(1, "in png_read_row (row %lu, pass %d)\n",
|
||||
png_ptr->row_number, png_ptr->pass);
|
||||
if (!(png_ptr->flags & PNG_FLAG_ROW_INIT))
|
||||
@@ -820,6 +831,7 @@ png_read_rows(png_structp png_ptr, png_bytepp row,
|
||||
png_bytepp dp;
|
||||
|
||||
png_debug(1, "in png_read_rows\n");
|
||||
if(png_ptr == NULL) return;
|
||||
rp = row;
|
||||
dp = display_row;
|
||||
if (rp != NULL && dp != NULL)
|
||||
@@ -868,6 +880,7 @@ png_read_image(png_structp png_ptr, png_bytepp image)
|
||||
png_bytepp rp;
|
||||
|
||||
png_debug(1, "in png_read_image\n");
|
||||
if(png_ptr == NULL) return;
|
||||
|
||||
#ifdef PNG_READ_INTERLACING_SUPPORTED
|
||||
pass = png_set_interlace_handling(png_ptr);
|
||||
@@ -906,6 +919,7 @@ png_read_end(png_structp png_ptr, png_infop info_ptr)
|
||||
png_uint_32 length;
|
||||
|
||||
png_debug(1, "in png_read_end\n");
|
||||
if(png_ptr == NULL) return;
|
||||
png_crc_finish(png_ptr, 0); /* Finish off CRC from last IDAT chunk */
|
||||
|
||||
do
|
||||
@@ -985,11 +999,9 @@ png_read_end(png_structp png_ptr, png_infop info_ptr)
|
||||
{
|
||||
if (!png_memcmp(png_ptr->chunk_name, png_IDAT, 4))
|
||||
{
|
||||
if (length > 0 || png_ptr->mode & PNG_AFTER_IDAT)
|
||||
if ((length > 0) || (png_ptr->mode & PNG_HAVE_CHUNK_AFTER_IDAT))
|
||||
png_error(png_ptr, "Too many IDAT's found");
|
||||
}
|
||||
else
|
||||
png_ptr->mode |= PNG_AFTER_IDAT;
|
||||
png_handle_unknown(png_ptr, info_ptr, length);
|
||||
if (!png_memcmp(png_ptr->chunk_name, png_PLTE, 4))
|
||||
png_ptr->mode |= PNG_HAVE_PLTE;
|
||||
@@ -1000,7 +1012,7 @@ png_read_end(png_structp png_ptr, png_infop info_ptr)
|
||||
/* Zero length IDATs are legal after the last IDAT has been
|
||||
* read, but not after other chunks have been read.
|
||||
*/
|
||||
if (length > 0 || png_ptr->mode & PNG_AFTER_IDAT)
|
||||
if ((length > 0) || (png_ptr->mode & PNG_HAVE_CHUNK_AFTER_IDAT))
|
||||
png_error(png_ptr, "Too many IDAT's found");
|
||||
png_crc_finish(png_ptr, length);
|
||||
}
|
||||
@@ -1298,6 +1310,7 @@ png_read_destroy(png_structp png_ptr, png_infop info_ptr, png_infop end_info_ptr
|
||||
void PNGAPI
|
||||
png_set_read_status_fn(png_structp png_ptr, png_read_status_ptr read_row_fn)
|
||||
{
|
||||
if(png_ptr == NULL) return;
|
||||
png_ptr->read_row_fn = read_row_fn;
|
||||
}
|
||||
|
||||
@@ -1311,6 +1324,7 @@ png_read_png(png_structp png_ptr, png_infop info_ptr,
|
||||
{
|
||||
int row;
|
||||
|
||||
if(png_ptr == NULL) return;
|
||||
#if defined(PNG_READ_INVERT_ALPHA_SUPPORTED)
|
||||
/* invert the alpha channel from opacity to transparency
|
||||
*/
|
||||
|
||||
5
pngrio.c
5
pngrio.c
@@ -1,7 +1,7 @@
|
||||
|
||||
/* pngrio.c - functions for data input
|
||||
*
|
||||
* Last changed in libpng 1.2.9 April 14, 2006
|
||||
* Last changed in libpng 1.2.13 November 13, 2006
|
||||
* For conditions of distribution and use, see copyright notice in png.h
|
||||
* Copyright (c) 1998-2006 Glenn Randers-Pehrson
|
||||
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
|
||||
@@ -46,6 +46,7 @@ png_default_read_data(png_structp png_ptr, png_bytep data, png_size_t length)
|
||||
{
|
||||
png_size_t check;
|
||||
|
||||
if(png_ptr == NULL) return;
|
||||
/* fread() returns 0 on error, so it is OK to store this in a png_size_t
|
||||
* instead of an int, which is what fread() actually returns.
|
||||
*/
|
||||
@@ -76,6 +77,7 @@ png_default_read_data(png_structp png_ptr, png_bytep data, png_size_t length)
|
||||
png_byte *n_data;
|
||||
png_FILE_p io_ptr;
|
||||
|
||||
if(png_ptr == NULL) return;
|
||||
/* Check if data really is near. If so, use usual code. */
|
||||
n_data = (png_byte *)CVT_PTR_NOCHECK(data);
|
||||
io_ptr = (png_FILE_p)CVT_PTR(png_ptr->io_ptr);
|
||||
@@ -136,6 +138,7 @@ void PNGAPI
|
||||
png_set_read_fn(png_structp png_ptr, png_voidp io_ptr,
|
||||
png_rw_ptr read_data_fn)
|
||||
{
|
||||
if(png_ptr == NULL) return;
|
||||
png_ptr->io_ptr = io_ptr;
|
||||
|
||||
#if !defined(PNG_NO_STDIO)
|
||||
|
||||
17
pngrtran.c
17
pngrtran.c
@@ -1,7 +1,7 @@
|
||||
|
||||
/* pngrtran.c - transforms the data in a row for PNG readers
|
||||
*
|
||||
* Last changed in libpng 1.2.9 April 14, 2006
|
||||
* Last changed in libpng 1.2.13 November 13, 2006
|
||||
* For conditions of distribution and use, see copyright notice in png.h
|
||||
* Copyright (c) 1998-2006 Glenn Randers-Pehrson
|
||||
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
|
||||
@@ -24,6 +24,7 @@ png_set_crc_action(png_structp png_ptr, int crit_action, int ancil_action)
|
||||
{
|
||||
png_debug(1, "in png_set_crc_action\n");
|
||||
/* Tell libpng how we react to CRC errors in critical chunks */
|
||||
if(png_ptr == NULL) return;
|
||||
switch (crit_action)
|
||||
{
|
||||
case PNG_CRC_NO_CHANGE: /* leave setting as is */
|
||||
@@ -80,6 +81,7 @@ png_set_background(png_structp png_ptr,
|
||||
int need_expand, double background_gamma)
|
||||
{
|
||||
png_debug(1, "in png_set_background\n");
|
||||
if(png_ptr == NULL) return;
|
||||
if (background_gamma_code == PNG_BACKGROUND_GAMMA_UNKNOWN)
|
||||
{
|
||||
png_warning(png_ptr, "Application must supply a known background gamma");
|
||||
@@ -112,6 +114,7 @@ void PNGAPI
|
||||
png_set_strip_16(png_structp png_ptr)
|
||||
{
|
||||
png_debug(1, "in png_set_strip_16\n");
|
||||
if(png_ptr == NULL) return;
|
||||
png_ptr->transformations |= PNG_16_TO_8;
|
||||
}
|
||||
#endif
|
||||
@@ -121,6 +124,7 @@ void PNGAPI
|
||||
png_set_strip_alpha(png_structp png_ptr)
|
||||
{
|
||||
png_debug(1, "in png_set_strip_alpha\n");
|
||||
if(png_ptr == NULL) return;
|
||||
png_ptr->flags |= PNG_FLAG_STRIP_ALPHA;
|
||||
}
|
||||
#endif
|
||||
@@ -150,6 +154,7 @@ png_set_dither(png_structp png_ptr, png_colorp palette,
|
||||
int full_dither)
|
||||
{
|
||||
png_debug(1, "in png_set_dither\n");
|
||||
if(png_ptr == NULL) return;
|
||||
png_ptr->transformations |= PNG_DITHER;
|
||||
|
||||
if (!full_dither)
|
||||
@@ -533,6 +538,7 @@ void PNGAPI
|
||||
png_set_gamma(png_structp png_ptr, double scrn_gamma, double file_gamma)
|
||||
{
|
||||
png_debug(1, "in png_set_gamma\n");
|
||||
if(png_ptr == NULL) return;
|
||||
if ((fabs(scrn_gamma * file_gamma - 1.0) > PNG_GAMMA_THRESHOLD) ||
|
||||
(png_ptr->color_type & PNG_COLOR_MASK_ALPHA) ||
|
||||
(png_ptr->color_type == PNG_COLOR_TYPE_PALETTE))
|
||||
@@ -551,6 +557,7 @@ void PNGAPI
|
||||
png_set_expand(png_structp png_ptr)
|
||||
{
|
||||
png_debug(1, "in png_set_expand\n");
|
||||
if(png_ptr == NULL) return;
|
||||
png_ptr->transformations |= (PNG_EXPAND | PNG_EXPAND_tRNS);
|
||||
}
|
||||
|
||||
@@ -576,6 +583,7 @@ void PNGAPI
|
||||
png_set_palette_to_rgb(png_structp png_ptr)
|
||||
{
|
||||
png_debug(1, "in png_set_palette_to_rgb\n");
|
||||
if(png_ptr == NULL) return;
|
||||
png_ptr->transformations |= (PNG_EXPAND | PNG_EXPAND_tRNS);
|
||||
}
|
||||
|
||||
@@ -585,6 +593,7 @@ void PNGAPI
|
||||
png_set_expand_gray_1_2_4_to_8(png_structp png_ptr)
|
||||
{
|
||||
png_debug(1, "in png_set_expand_gray_1_2_4_to_8\n");
|
||||
if(png_ptr == NULL) return;
|
||||
png_ptr->transformations |= PNG_EXPAND_tRNS;
|
||||
}
|
||||
#endif
|
||||
@@ -596,6 +605,7 @@ void PNGAPI
|
||||
png_set_gray_1_2_4_to_8(png_structp png_ptr)
|
||||
{
|
||||
png_debug(1, "in png_set_gray_1_2_4_to_8\n");
|
||||
if(png_ptr == NULL) return;
|
||||
png_ptr->transformations |= (PNG_EXPAND | PNG_EXPAND_tRNS);
|
||||
}
|
||||
#endif
|
||||
@@ -631,6 +641,7 @@ png_set_rgb_to_gray(png_structp png_ptr, int error_action, double red,
|
||||
{
|
||||
int red_fixed = (int)((float)red*100000.0 + 0.5);
|
||||
int green_fixed = (int)((float)green*100000.0 + 0.5);
|
||||
if(png_ptr == NULL) return;
|
||||
png_set_rgb_to_gray_fixed(png_ptr, error_action, red_fixed, green_fixed);
|
||||
}
|
||||
#endif
|
||||
@@ -640,6 +651,7 @@ png_set_rgb_to_gray_fixed(png_structp png_ptr, int error_action,
|
||||
png_fixed_point red, png_fixed_point green)
|
||||
{
|
||||
png_debug(1, "in png_set_rgb_to_gray\n");
|
||||
if(png_ptr == NULL) return;
|
||||
switch(error_action)
|
||||
{
|
||||
case 1: png_ptr->transformations |= PNG_RGB_TO_GRAY;
|
||||
@@ -690,6 +702,7 @@ png_set_read_user_transform_fn(png_structp png_ptr, png_user_transform_ptr
|
||||
read_user_transform_fn)
|
||||
{
|
||||
png_debug(1, "in png_set_read_user_transform_fn\n");
|
||||
if(png_ptr == NULL) return;
|
||||
#if defined(PNG_READ_USER_TRANSFORM_SUPPORTED)
|
||||
png_ptr->transformations |= PNG_USER_TRANSFORM;
|
||||
png_ptr->read_user_transform_fn = read_user_transform_fn;
|
||||
@@ -3938,7 +3951,7 @@ png_do_dither(png_row_infop row_info, png_bytep row,
|
||||
#ifdef PNG_FLOATING_POINT_SUPPORTED
|
||||
#if defined(PNG_READ_GAMMA_SUPPORTED)
|
||||
static int png_gamma_shift[] =
|
||||
{0x10, 0x21, 0x42, 0x84, 0x110, 0x248, 0x550, 0xff0};
|
||||
{0x10, 0x21, 0x42, 0x84, 0x110, 0x248, 0x550, 0xff0, 0x00};
|
||||
|
||||
/* We build the 8- or 16-bit gamma tables here. Note that for 16-bit
|
||||
* tables, we don't make a full table if we are reducing to 8-bit in
|
||||
|
||||
10
pngrutil.c
10
pngrutil.c
@@ -1,7 +1,7 @@
|
||||
|
||||
/* pngrutil.c - utilities to read a PNG file
|
||||
*
|
||||
* Last changed in libpng 1.2.9 April 14, 2006
|
||||
* Last changed in libpng 1.2.13 November 13, 2006
|
||||
* For conditions of distribution and use, see copyright notice in png.h
|
||||
* Copyright (c) 1998-2006 Glenn Randers-Pehrson
|
||||
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
|
||||
@@ -90,6 +90,7 @@ png_get_uint_16(png_bytep buf)
|
||||
void /* PRIVATE */
|
||||
png_crc_read(png_structp png_ptr, png_bytep buf, png_size_t length)
|
||||
{
|
||||
if(png_ptr == NULL) return;
|
||||
png_read_data(png_ptr, buf, length);
|
||||
png_calculate_crc(png_ptr, buf, length);
|
||||
}
|
||||
@@ -276,7 +277,7 @@ png_decompress_chunk(png_structp png_ptr, int comp_type,
|
||||
if (ret != Z_STREAM_END)
|
||||
{
|
||||
#if !defined(PNG_NO_STDIO) && !defined(_WIN32_WCE)
|
||||
char umsg[50];
|
||||
char umsg[52];
|
||||
|
||||
if (ret == Z_BUF_ERROR)
|
||||
sprintf(umsg,"Buffer error in compressed datastream in %s chunk",
|
||||
@@ -829,7 +830,7 @@ png_handle_cHRM(png_structp png_ptr, png_infop info_ptr, png_uint_32 length)
|
||||
#endif
|
||||
|
||||
#if defined(PNG_READ_sRGB_SUPPORTED)
|
||||
if (info_ptr != NULL && (info_ptr->valid & PNG_INFO_sRGB))
|
||||
if ((info_ptr != NULL) && (info_ptr->valid & PNG_INFO_sRGB))
|
||||
{
|
||||
if (PNG_OUT_OF_RANGE(int_x_white, 31270, 1000) ||
|
||||
PNG_OUT_OF_RANGE(int_y_white, 32900, 1000) ||
|
||||
@@ -840,7 +841,6 @@ png_handle_cHRM(png_structp png_ptr, png_infop info_ptr, png_uint_32 length)
|
||||
PNG_OUT_OF_RANGE(int_x_blue, 15000, 1000) ||
|
||||
PNG_OUT_OF_RANGE(int_y_blue, 6000, 1000))
|
||||
{
|
||||
|
||||
png_warning(png_ptr,
|
||||
"Ignoring incorrect cHRM value when sRGB is also present");
|
||||
#ifndef PNG_NO_CONSOLE_IO
|
||||
@@ -3105,7 +3105,7 @@ defined(PNG_USER_TRANSFORM_PTR_SUPPORTED)
|
||||
if ((png_uint_32)png_ptr->rowbytes + 1 > (png_uint_32)65536L)
|
||||
png_error(png_ptr, "This image requires a row greater than 64KB");
|
||||
#endif
|
||||
if ((png_uint_32)png_ptr->rowbytes > PNG_SIZE_MAX - 1)
|
||||
if ((png_uint_32)png_ptr->rowbytes > (png_uint_32)(PNG_SIZE_MAX - 1))
|
||||
png_error(png_ptr, "Row has too many bytes to allocate in memory.");
|
||||
png_ptr->prev_row = (png_bytep)png_malloc(png_ptr, (png_uint_32)(
|
||||
png_ptr->rowbytes + 1));
|
||||
|
||||
9
pngset.c
9
pngset.c
@@ -1,7 +1,7 @@
|
||||
|
||||
/* pngset.c - storage of image information into info struct
|
||||
*
|
||||
* Last changed in libpng 1.2.9 April 14, 2006
|
||||
* Last changed in libpng 1.2.13 November 13, 2006
|
||||
* For conditions of distribution and use, see copyright notice in png.h
|
||||
* Copyright (c) 1998-2006 Glenn Randers-Pehrson
|
||||
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
|
||||
@@ -976,10 +976,10 @@ png_set_sPLT(png_structp png_ptr,
|
||||
/* TODO: use png_malloc_warn */
|
||||
png_strcpy(to->name, from->name);
|
||||
to->entries = (png_sPLT_entryp)png_malloc(png_ptr,
|
||||
from->nentries * png_sizeof(png_sPLT_t));
|
||||
from->nentries * png_sizeof(png_sPLT_entry));
|
||||
/* TODO: use png_malloc_warn */
|
||||
png_memcpy(to->entries, from->entries,
|
||||
from->nentries * png_sizeof(png_sPLT_t));
|
||||
from->nentries * png_sizeof(png_sPLT_entry));
|
||||
to->nentries = from->nentries;
|
||||
to->depth = from->depth;
|
||||
}
|
||||
@@ -1224,7 +1224,7 @@ png_set_asm_flags (png_structp png_ptr, png_uint_32 asm_flags)
|
||||
}
|
||||
|
||||
/* we're replacing the settable bits with those passed in by the user,
|
||||
* so first zero them out of the master copy, then logical-OR in the
|
||||
* so first zero them out of the master copy, then bitwise-OR in the
|
||||
* allowed subset that was requested */
|
||||
|
||||
png_ptr->asm_flags &= ~settable_asm_flags; /* zero them */
|
||||
@@ -1256,6 +1256,7 @@ png_set_user_limits (png_structp png_ptr, png_uint_32 user_width_max,
|
||||
* rejected by png_set_IHDR(). To accept any PNG datastream
|
||||
* regardless of dimensions, set both limits to 0x7ffffffL.
|
||||
*/
|
||||
if(png_ptr == NULL) return;
|
||||
png_ptr->user_width_max = user_width_max;
|
||||
png_ptr->user_height_max = user_height_max;
|
||||
}
|
||||
|
||||
@@ -1549,4 +1549,4 @@ main(int argc, char *argv[])
|
||||
}
|
||||
|
||||
/* Generate a compiler error if there is an old png.h in the search path. */
|
||||
typedef version_1_2_10rc1 your_png_h_is_not_version_1_2_10rc1;
|
||||
typedef version_1_2_13 your_png_h_is_not_version_1_2_13;
|
||||
|
||||
21
pngtrans.c
21
pngtrans.c
@@ -1,7 +1,7 @@
|
||||
|
||||
/* pngtrans.c - transforms the data in a row (used by both readers and writers)
|
||||
*
|
||||
* Last changed in libpng 1.2.9 April 14, 2006
|
||||
* Last changed in libpng 1.2.13 November 13, 2006
|
||||
* For conditions of distribution and use, see copyright notice in png.h
|
||||
* Copyright (c) 1998-2006 Glenn Randers-Pehrson
|
||||
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
|
||||
@@ -18,6 +18,7 @@ void PNGAPI
|
||||
png_set_bgr(png_structp png_ptr)
|
||||
{
|
||||
png_debug(1, "in png_set_bgr\n");
|
||||
if(png_ptr == NULL) return;
|
||||
png_ptr->transformations |= PNG_BGR;
|
||||
}
|
||||
#endif
|
||||
@@ -28,6 +29,7 @@ void PNGAPI
|
||||
png_set_swap(png_structp png_ptr)
|
||||
{
|
||||
png_debug(1, "in png_set_swap\n");
|
||||
if(png_ptr == NULL) return;
|
||||
if (png_ptr->bit_depth == 16)
|
||||
png_ptr->transformations |= PNG_SWAP_BYTES;
|
||||
}
|
||||
@@ -39,6 +41,7 @@ void PNGAPI
|
||||
png_set_packing(png_structp png_ptr)
|
||||
{
|
||||
png_debug(1, "in png_set_packing\n");
|
||||
if(png_ptr == NULL) return;
|
||||
if (png_ptr->bit_depth < 8)
|
||||
{
|
||||
png_ptr->transformations |= PNG_PACK;
|
||||
@@ -53,6 +56,7 @@ void PNGAPI
|
||||
png_set_packswap(png_structp png_ptr)
|
||||
{
|
||||
png_debug(1, "in png_set_packswap\n");
|
||||
if(png_ptr == NULL) return;
|
||||
if (png_ptr->bit_depth < 8)
|
||||
png_ptr->transformations |= PNG_PACKSWAP;
|
||||
}
|
||||
@@ -63,6 +67,7 @@ void PNGAPI
|
||||
png_set_shift(png_structp png_ptr, png_color_8p true_bits)
|
||||
{
|
||||
png_debug(1, "in png_set_shift\n");
|
||||
if(png_ptr == NULL) return;
|
||||
png_ptr->transformations |= PNG_SHIFT;
|
||||
png_ptr->shift = *true_bits;
|
||||
}
|
||||
@@ -74,7 +79,7 @@ int PNGAPI
|
||||
png_set_interlace_handling(png_structp png_ptr)
|
||||
{
|
||||
png_debug(1, "in png_set_interlace handling\n");
|
||||
if (png_ptr->interlaced)
|
||||
if (png_ptr && png_ptr->interlaced)
|
||||
{
|
||||
png_ptr->transformations |= PNG_INTERLACE;
|
||||
return (7);
|
||||
@@ -94,6 +99,7 @@ void PNGAPI
|
||||
png_set_filler(png_structp png_ptr, png_uint_32 filler, int filler_loc)
|
||||
{
|
||||
png_debug(1, "in png_set_filler\n");
|
||||
if(png_ptr == NULL) return;
|
||||
png_ptr->transformations |= PNG_FILLER;
|
||||
png_ptr->filler = (png_byte)filler;
|
||||
if (filler_loc == PNG_FILLER_AFTER)
|
||||
@@ -126,6 +132,7 @@ void PNGAPI
|
||||
png_set_add_alpha(png_structp png_ptr, png_uint_32 filler, int filler_loc)
|
||||
{
|
||||
png_debug(1, "in png_set_add_alpha\n");
|
||||
if(png_ptr == NULL) return;
|
||||
png_set_filler(png_ptr, filler, filler_loc);
|
||||
png_ptr->transformations |= PNG_ADD_ALPHA;
|
||||
}
|
||||
@@ -139,6 +146,7 @@ void PNGAPI
|
||||
png_set_swap_alpha(png_structp png_ptr)
|
||||
{
|
||||
png_debug(1, "in png_set_swap_alpha\n");
|
||||
if(png_ptr == NULL) return;
|
||||
png_ptr->transformations |= PNG_SWAP_ALPHA;
|
||||
}
|
||||
#endif
|
||||
@@ -149,6 +157,7 @@ void PNGAPI
|
||||
png_set_invert_alpha(png_structp png_ptr)
|
||||
{
|
||||
png_debug(1, "in png_set_invert_alpha\n");
|
||||
if(png_ptr == NULL) return;
|
||||
png_ptr->transformations |= PNG_INVERT_ALPHA;
|
||||
}
|
||||
#endif
|
||||
@@ -158,6 +167,7 @@ void PNGAPI
|
||||
png_set_invert_mono(png_structp png_ptr)
|
||||
{
|
||||
png_debug(1, "in png_set_invert_mono\n");
|
||||
if(png_ptr == NULL) return;
|
||||
png_ptr->transformations |= PNG_INVERT_MONO;
|
||||
}
|
||||
|
||||
@@ -621,6 +631,7 @@ png_set_user_transform_info(png_structp png_ptr, png_voidp
|
||||
user_transform_ptr, int user_transform_depth, int user_transform_channels)
|
||||
{
|
||||
png_debug(1, "in png_set_user_transform_info\n");
|
||||
if(png_ptr == NULL) return;
|
||||
#if defined(PNG_USER_TRANSFORM_PTR_SUPPORTED)
|
||||
png_ptr->user_transform_ptr = user_transform_ptr;
|
||||
png_ptr->user_transform_depth = (png_byte)user_transform_depth;
|
||||
@@ -641,12 +652,10 @@ png_set_user_transform_info(png_structp png_ptr, png_voidp
|
||||
png_voidp PNGAPI
|
||||
png_get_user_transform_ptr(png_structp png_ptr)
|
||||
{
|
||||
if (png_ptr == NULL) return (NULL);
|
||||
#if defined(PNG_USER_TRANSFORM_PTR_SUPPORTED)
|
||||
return ((png_voidp)png_ptr->user_transform_ptr);
|
||||
#else
|
||||
if(png_ptr)
|
||||
return (NULL);
|
||||
return (NULL);
|
||||
#endif
|
||||
return (NULL);
|
||||
}
|
||||
#endif /* PNG_READ_SUPPORTED || PNG_WRITE_SUPPORTED */
|
||||
|
||||
6
pngwio.c
6
pngwio.c
@@ -1,7 +1,7 @@
|
||||
|
||||
/* pngwio.c - functions for data output
|
||||
*
|
||||
* Last changed in libpng 1.2.3 - May 21, 2002
|
||||
* Last changed in libpng 1.2.13 November 13, 2006
|
||||
* For conditions of distribution and use, see copyright notice in png.h
|
||||
* Copyright (c) 1998-2002 Glenn Randers-Pehrson
|
||||
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
|
||||
@@ -45,6 +45,7 @@ png_default_write_data(png_structp png_ptr, png_bytep data, png_size_t length)
|
||||
{
|
||||
png_uint_32 check;
|
||||
|
||||
if(png_ptr == NULL) return;
|
||||
#if defined(_WIN32_WCE)
|
||||
if ( !WriteFile((HANDLE)(png_ptr->io_ptr), data, length, &check, NULL) )
|
||||
check = 0;
|
||||
@@ -70,6 +71,7 @@ png_default_write_data(png_structp png_ptr, png_bytep data, png_size_t length)
|
||||
png_byte *near_data; /* Needs to be "png_byte *" instead of "png_bytep" */
|
||||
png_FILE_p io_ptr;
|
||||
|
||||
if(png_ptr == NULL) return;
|
||||
/* Check if data really is near. If so, use usual code. */
|
||||
near_data = (png_byte *)CVT_PTR_NOCHECK(data);
|
||||
io_ptr = (png_FILE_p)CVT_PTR(png_ptr->io_ptr);
|
||||
@@ -129,6 +131,7 @@ png_flush(png_structp png_ptr)
|
||||
void PNGAPI
|
||||
png_default_flush(png_structp png_ptr)
|
||||
{
|
||||
if(png_ptr == NULL) return;
|
||||
#if !defined(_WIN32_WCE)
|
||||
png_FILE_p io_ptr;
|
||||
io_ptr = (png_FILE_p)CVT_PTR((png_ptr->io_ptr));
|
||||
@@ -165,6 +168,7 @@ void PNGAPI
|
||||
png_set_write_fn(png_structp png_ptr, png_voidp io_ptr,
|
||||
png_rw_ptr write_data_fn, png_flush_ptr output_flush_fn)
|
||||
{
|
||||
if(png_ptr == NULL) return;
|
||||
png_ptr->io_ptr = io_ptr;
|
||||
|
||||
#if !defined(PNG_NO_STDIO)
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
|
||||
/* pngwrite.c - general routines to write a PNG file
|
||||
*
|
||||
* Last changed in libpng 1.2.9 April 14, 2006
|
||||
* Last changed in libpng 1.2.13 November 13, 2006
|
||||
* For conditions of distribution and use, see copyright notice in png.h
|
||||
* Copyright (c) 1998-2006 Glenn Randers-Pehrson
|
||||
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
|
||||
@@ -576,6 +576,7 @@ png_write_init_2(png_structp png_ptr, png_const_charp user_png_ver,
|
||||
png_size_t png_struct_size, png_size_t png_info_size)
|
||||
{
|
||||
/* We only come here via pre-1.0.12-compiled applications */
|
||||
if(png_ptr == NULL) return;
|
||||
#if !defined(PNG_NO_STDIO) && !defined(_WIN32_WCE)
|
||||
if(png_sizeof(png_struct) > png_struct_size ||
|
||||
png_sizeof(png_info) > png_info_size)
|
||||
|
||||
85
pngwutil.c
85
pngwutil.c
@@ -1,7 +1,7 @@
|
||||
|
||||
/* pngwutil.c - utilities to write a PNG file
|
||||
*
|
||||
* Last changed in libpng 1.2.9 April 14, 2006
|
||||
* Last changed in libpng 1.2.13 November 13, 2006
|
||||
* For conditions of distribution and use, see copyright notice in png.h
|
||||
* Copyright (c) 1998-2006 Glenn Randers-Pehrson
|
||||
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
|
||||
@@ -62,6 +62,7 @@ void PNGAPI
|
||||
png_write_chunk(png_structp png_ptr, png_bytep chunk_name,
|
||||
png_bytep data, png_size_t length)
|
||||
{
|
||||
if(png_ptr == NULL) return;
|
||||
png_write_chunk_start(png_ptr, chunk_name, (png_uint_32)length);
|
||||
png_write_chunk_data(png_ptr, data, length);
|
||||
png_write_chunk_end(png_ptr);
|
||||
@@ -77,6 +78,7 @@ png_write_chunk_start(png_structp png_ptr, png_bytep chunk_name,
|
||||
{
|
||||
png_byte buf[4];
|
||||
png_debug2(0, "Writing %s chunk (%lu bytes)\n", chunk_name, length);
|
||||
if(png_ptr == NULL) return;
|
||||
|
||||
/* write the length */
|
||||
png_save_uint_32(buf, length);
|
||||
@@ -98,6 +100,7 @@ void PNGAPI
|
||||
png_write_chunk_data(png_structp png_ptr, png_bytep data, png_size_t length)
|
||||
{
|
||||
/* write the data, and run the CRC over it */
|
||||
if(png_ptr == NULL) return;
|
||||
if (data != NULL && length > 0)
|
||||
{
|
||||
png_calculate_crc(png_ptr, data, length);
|
||||
@@ -111,6 +114,8 @@ png_write_chunk_end(png_structp png_ptr)
|
||||
{
|
||||
png_byte buf[4];
|
||||
|
||||
if(png_ptr == NULL) return;
|
||||
|
||||
/* write the crc */
|
||||
png_save_uint_32(buf, png_ptr->crc);
|
||||
|
||||
@@ -728,6 +733,7 @@ png_write_iCCP(png_structp png_ptr, png_charp name, int compression_type,
|
||||
png_size_t name_len;
|
||||
png_charp new_name;
|
||||
compression_state comp;
|
||||
int embedded_profile_len = 0;
|
||||
|
||||
png_debug(1, "in png_write_iCCP\n");
|
||||
|
||||
@@ -750,6 +756,24 @@ png_write_iCCP(png_structp png_ptr, png_charp name, int compression_type,
|
||||
if (profile == NULL)
|
||||
profile_len = 0;
|
||||
|
||||
if (profile_len > 3)
|
||||
embedded_profile_len = ((*(profile ))<<24) | ((*(profile+1))<<16) |
|
||||
((*(profile+2))<< 8) | ((*(profile+3)) );
|
||||
|
||||
if (profile_len < embedded_profile_len)
|
||||
{
|
||||
png_warning(png_ptr,
|
||||
"Embedded profile length too large in iCCP chunk");
|
||||
return;
|
||||
}
|
||||
|
||||
if (profile_len > embedded_profile_len)
|
||||
{
|
||||
png_warning(png_ptr,
|
||||
"Truncating profile to actual length in iCCP chunk");
|
||||
profile_len = embedded_profile_len;
|
||||
}
|
||||
|
||||
if (profile_len)
|
||||
profile_len = png_text_compress(png_ptr, profile, (png_size_t)profile_len,
|
||||
PNG_COMPRESSION_TYPE_BASE, &comp);
|
||||
@@ -1567,39 +1591,41 @@ png_write_pCAL(png_structp png_ptr, png_charp purpose, png_int_32 X0,
|
||||
/* write the sCAL chunk */
|
||||
#if defined(PNG_FLOATING_POINT_SUPPORTED) && !defined(PNG_NO_STDIO)
|
||||
void /* PRIVATE */
|
||||
png_write_sCAL(png_structp png_ptr, int unit, double width,double height)
|
||||
png_write_sCAL(png_structp png_ptr, int unit, double width, double height)
|
||||
{
|
||||
#ifdef PNG_USE_LOCAL_ARRAYS
|
||||
PNG_sCAL;
|
||||
#endif
|
||||
char buf[64];
|
||||
png_size_t total_len;
|
||||
char wbuf[32], hbuf[32];
|
||||
png_byte bunit = (png_byte)unit;
|
||||
|
||||
png_debug(1, "in png_write_sCAL\n");
|
||||
|
||||
buf[0] = (char)unit;
|
||||
#if defined(_WIN32_WCE)
|
||||
/* sprintf() function is not supported on WindowsCE */
|
||||
{
|
||||
wchar_t wc_buf[32];
|
||||
size_t wc_len;
|
||||
swprintf(wc_buf, TEXT("%12.12e"), width);
|
||||
WideCharToMultiByte(CP_ACP, 0, wc_buf, -1, wbuf, 32, NULL, NULL);
|
||||
wc_len = wcslen(wc_buf);
|
||||
WideCharToMultiByte(CP_ACP, 0, wc_buf, -1, buf + 1, wc_len, NULL, NULL);
|
||||
total_len = wc_len + 2;
|
||||
swprintf(wc_buf, TEXT("%12.12e"), height);
|
||||
WideCharToMultiByte(CP_ACP, 0, wc_buf, -1, hbuf, 32, NULL, NULL);
|
||||
wc_len = wcslen(wc_buf);
|
||||
WideCharToMultiByte(CP_ACP, 0, wc_buf, -1, buf + total_len, wc_len,
|
||||
NULL, NULL);
|
||||
total_len += wc_len;
|
||||
}
|
||||
#else
|
||||
sprintf(wbuf, "%12.12e", width);
|
||||
sprintf(hbuf, "%12.12e", height);
|
||||
sprintf(buf + 1, "%12.12e", width);
|
||||
total_len = 1 + png_strlen(buf + 1) + 1;
|
||||
sprintf(buf + total_len, "%12.12e", height);
|
||||
total_len += png_strlen(buf + total_len);
|
||||
#endif
|
||||
total_len = 1 + png_strlen(wbuf)+1 + png_strlen(hbuf);
|
||||
|
||||
png_debug1(3, "sCAL total length = %d\n", (int)total_len);
|
||||
png_write_chunk_start(png_ptr, (png_bytep)png_sCAL, (png_uint_32)total_len);
|
||||
png_write_chunk_data(png_ptr, (png_bytep)&bunit, 1);
|
||||
png_write_chunk_data(png_ptr, (png_bytep)wbuf, png_strlen(wbuf)+1);
|
||||
png_write_chunk_data(png_ptr, (png_bytep)hbuf, png_strlen(hbuf));
|
||||
|
||||
png_write_chunk_end(png_ptr);
|
||||
png_debug1(3, "sCAL total length = %u\n", (unsigned int)total_len);
|
||||
png_write_chunk(png_ptr, (png_bytep)png_sCAL, (png_bytep)buf, total_len);
|
||||
}
|
||||
#else
|
||||
#ifdef PNG_FIXED_POINT_SUPPORTED
|
||||
@@ -1610,23 +1636,26 @@ png_write_sCAL_s(png_structp png_ptr, int unit, png_charp width,
|
||||
#ifdef PNG_USE_LOCAL_ARRAYS
|
||||
PNG_sCAL;
|
||||
#endif
|
||||
png_size_t total_len;
|
||||
char wbuf[32], hbuf[32];
|
||||
png_byte bunit = unit;
|
||||
png_byte buf[64];
|
||||
png_size_t wlen, hlen, total_len;
|
||||
|
||||
png_debug(1, "in png_write_sCAL_s\n");
|
||||
|
||||
png_strcpy(wbuf,(const char *)width);
|
||||
png_strcpy(hbuf,(const char *)height);
|
||||
total_len = 1 + png_strlen(wbuf)+1 + png_strlen(hbuf);
|
||||
wlen = png_strlen(width);
|
||||
hlen = png_strlen(height);
|
||||
total_len = wlen + hlen + 2;
|
||||
if (total_len > 64)
|
||||
{
|
||||
png_warning(png_ptr, "Can't write sCAL (buffer too small)");
|
||||
return;
|
||||
}
|
||||
|
||||
png_debug1(3, "sCAL total length = %d\n", total_len);
|
||||
png_write_chunk_start(png_ptr, (png_bytep)png_sCAL, (png_uint_32)total_len);
|
||||
png_write_chunk_data(png_ptr, (png_bytep)&bunit, 1);
|
||||
png_write_chunk_data(png_ptr, (png_bytep)wbuf, png_strlen(wbuf)+1);
|
||||
png_write_chunk_data(png_ptr, (png_bytep)hbuf, png_strlen(hbuf));
|
||||
buf[0] = (png_byte)unit;
|
||||
png_memcpy(buf + 1, width, wlen + 1); /* append the '\0' here */
|
||||
png_memcpy(buf + wlen + 2, height, hlen); /* do NOT append the '\0' here */
|
||||
|
||||
png_write_chunk_end(png_ptr);
|
||||
png_debug1(3, "sCAL total length = %u\n", (unsigned int)total_len);
|
||||
png_write_chunk(png_ptr, (png_bytep)png_sCAL, buf, total_len);
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
|
||||
# Modeled after libxml-config.
|
||||
|
||||
version=1.2.10rc1
|
||||
version=1.2.13
|
||||
prefix=""
|
||||
libdir=""
|
||||
libs=""
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
prefix=@prefix@
|
||||
exec_prefix=@exec_prefix@
|
||||
libdir=@libdir@
|
||||
includedir=@includedir@/libpng@PNGLIB_MAJOR@
|
||||
includedir=@includedir@/libpng12
|
||||
|
||||
Name: libpng
|
||||
Description: Loads and saves PNG files
|
||||
Version: @PNGLIB_VERSION@
|
||||
Libs: -L${libdir} -lpng@PNGLIB_MAJOR@
|
||||
Version: 1.2.13
|
||||
Libs: -L${libdir} -lpng12
|
||||
Cflags: -I${includedir}
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
# Library name:
|
||||
LIBNAME=libpng12
|
||||
PNGMAJ = 0
|
||||
PNGMIN = 1.2.10rc1
|
||||
PNGMIN = 1.2.13
|
||||
PNGVER = $(PNGMAJ).$(PNGMIN)
|
||||
|
||||
# Shared library names:
|
||||
@@ -16,8 +16,8 @@ LIBSO=$(LIBNAME).so
|
||||
LIBSOMAJ=$(LIBNAME).so.$(PNGMAJ)
|
||||
LIBSOVER=$(LIBNAME).so.$(PNGVER)
|
||||
OLDSO=libpng.so
|
||||
OLDSOMAJ=libpng.so.0
|
||||
OLDSOVER=libpng.so.0.$(PNGMIN)
|
||||
OLDSOMAJ=libpng.so.3
|
||||
OLDSOVER=libpng.so.3.$(PNGMIN)
|
||||
|
||||
# Utilities:
|
||||
CC=cc
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
# Library name:
|
||||
LIBNAME=libpng12
|
||||
PNGMAJ = 0
|
||||
PNGMIN = 1.2.10rc1
|
||||
PNGMIN = 1.2.13
|
||||
PNGVER = $(PNGMAJ).$(PNGMIN)
|
||||
|
||||
# Shared library names:
|
||||
@@ -16,8 +16,8 @@ LIBSO=$(LIBNAME).so
|
||||
LIBSOMAJ=$(LIBNAME).so.$(PNGMAJ)
|
||||
LIBSOVER=$(LIBNAME).so.$(PNGVER)
|
||||
OLDSO=libpng.so
|
||||
OLDSOMAJ=libpng.so.0
|
||||
OLDSOVER=libpng.so.0.$(PNGMIN)
|
||||
OLDSOMAJ=libpng.so.3
|
||||
OLDSOVER=libpng.so.3.$(PNGMIN)
|
||||
|
||||
# Utilities:
|
||||
CC=cc
|
||||
|
||||
@@ -20,7 +20,7 @@ LN_SF = ln -f -s
|
||||
|
||||
LIBNAME=libpng12
|
||||
PNGMAJ = 0
|
||||
PNGMIN = 1.2.10rc1
|
||||
PNGMIN = 1.2.13
|
||||
PNGVER = $(PNGMAJ).$(PNGMIN)
|
||||
|
||||
prefix=/usr/local
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
# Library name:
|
||||
LIBNAME=libpng12
|
||||
PNGMAJ = 0
|
||||
PNGMIN = 1.2.10rc1
|
||||
PNGMIN = 1.2.13
|
||||
PNGVER = $(PNGMAJ).$(PNGMIN)
|
||||
|
||||
# Shared library names:
|
||||
@@ -16,8 +16,8 @@ LIBSO=$(LIBNAME).so
|
||||
LIBSOMAJ=$(LIBNAME).so.$(PNGMAJ)
|
||||
LIBSOVER=$(LIBNAME).so.$(PNGVER)
|
||||
OLDSO=libpng.so
|
||||
OLDSOMAJ=libpng.so.0
|
||||
OLDSOVER=libpng.so.0.$(PNGMIN)
|
||||
OLDSOMAJ=libpng.so.3
|
||||
OLDSOVER=libpng.so.3.$(PNGMIN)
|
||||
|
||||
# Utilities:
|
||||
CC=gcc
|
||||
@@ -185,7 +185,7 @@ test-dd:
|
||||
echo Testing installed dynamic shared library in $(DL).
|
||||
$(CC) -I$(DI) $(CFLAGS) \
|
||||
`$(BINPATH)/$(LIBNAME)-config --cflags` pngtest.c \
|
||||
-L$(DL) -L$(ZLIBLIB) -W1,-rpath $(ZLIBLIB):$(DL) \
|
||||
-L$(DL) -L$(ZLIBLIB) -Wl,-rpath $(ZLIBLIB):$(DL) \
|
||||
-o pngtestd `$(BINPATH)/$(LIBNAME)-config --ldflags`
|
||||
./pngtestd pngtest.png
|
||||
|
||||
|
||||
@@ -80,7 +80,7 @@ CFLAGS= $(strip $(MINGW_CCFLAGS) $(addprefix -I,$(ZLIBINC)) \
|
||||
LIBNAME = libpng12
|
||||
PNGMAJ = 0
|
||||
CYGDLL = 12
|
||||
PNGMIN = 1.2.10rc1
|
||||
PNGMIN = 1.2.13
|
||||
PNGVER = $(PNGMAJ).$(PNGMIN)
|
||||
|
||||
SHAREDLIB=cygpng$(CYGDLL).dll
|
||||
|
||||
@@ -19,7 +19,7 @@ ZLIBINC=../zlib
|
||||
# Library name:
|
||||
LIBNAME = libpng12
|
||||
PNGMAJ = 0
|
||||
PNGMIN = 1.2.10rc1
|
||||
PNGMIN = 1.2.13
|
||||
PNGVER = $(PNGMAJ).$(PNGMIN)
|
||||
|
||||
# Shared library names:
|
||||
@@ -27,8 +27,8 @@ LIBSO=$(LIBNAME).dylib
|
||||
LIBSOMAJ=$(LIBNAME).$(PNGMAJ).dylib
|
||||
LIBSOVER=$(LIBNAME).$(PNGVER).dylib
|
||||
OLDSO=libpng.dylib
|
||||
OLDSOMAJ=libpng.0.dylib
|
||||
OLDSOVER=libpng.0.$(PNGMIN).dylib
|
||||
OLDSOMAJ=libpng.3.dylib
|
||||
OLDSOVER=libpng.3.$(PNGMIN).dylib
|
||||
|
||||
# Utilities:
|
||||
CC=cc
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
|
||||
# Library name:
|
||||
PNGMAJ = 0
|
||||
PNGMIN = 1.2.10rc1
|
||||
PNGMIN = 1.2.13
|
||||
PNGVER = $(PNGMAJ).$(PNGMIN)
|
||||
LIBNAME = libpng12
|
||||
|
||||
@@ -14,8 +14,8 @@ LIBSO=$(LIBNAME).so
|
||||
LIBSOMAJ=$(LIBNAME).so.$(PNGMAJ)
|
||||
LIBSOVER=$(LIBNAME).so.$(PNGVER)
|
||||
OLDSO=libpng.so
|
||||
OLDSOMAJ=libpng.so.0
|
||||
OLDSOVER=libpng.so.0.$(PNGMIN)
|
||||
OLDSOMAJ=libpng.so.3
|
||||
OLDSOVER=libpng.so.3.$(PNGMIN)
|
||||
|
||||
# Utilities:
|
||||
AR_RC=ar rc
|
||||
|
||||
@@ -6,13 +6,13 @@
|
||||
# Modified for Debian by Junichi Uekawa and Josselin Mouette
|
||||
# Major modifications are:
|
||||
# * link libpng explicitly with libz and libm
|
||||
# * $(OLDSO).%OLDSONUM% is a symlink rather than a different library
|
||||
# * $(OLDSO).3 is a symlink rather than a different library
|
||||
# * versioned symbols
|
||||
|
||||
# Library name:
|
||||
LIBNAME = libpng12
|
||||
PNGMAJ = 0
|
||||
PNGMIN = 1.2.10rc1
|
||||
PNGMIN = 1.2.13
|
||||
PNGVER = $(PNGMAJ).$(PNGMIN)
|
||||
|
||||
# Shared library names:
|
||||
@@ -20,8 +20,8 @@ LIBSO=$(LIBNAME).so
|
||||
LIBSOMAJ=$(LIBNAME).so.$(PNGMAJ)
|
||||
LIBSOVER=$(LIBNAME).so.$(PNGVER)
|
||||
OLDSO=libpng.so
|
||||
OLDSOMAJ=libpng.so.0
|
||||
OLDSOVER=libpng.so.0.$(PNGMIN)
|
||||
OLDSOMAJ=libpng.so.3
|
||||
OLDSOVER=libpng.so.3.$(PNGMIN)
|
||||
|
||||
# Utilities:
|
||||
AR_RC=ar rc
|
||||
@@ -229,7 +229,7 @@ test-dd:
|
||||
echo Testing installed dynamic shared library in $(DL).
|
||||
$(CC) -I$(DI) -I$(ZLIBINC) \
|
||||
`$(BINPATH)/$(LIBNAME)-config --cflags` pngtest.c \
|
||||
-L$(DL) -L$(ZLIBLIB) -W1, -rpath,$(DL) -Wl,-rpath,$(ZLIBLIB) \
|
||||
-L$(DL) -L$(ZLIBLIB) -Wl, -rpath,$(DL) -Wl,-rpath,$(ZLIBLIB) \
|
||||
-o pngtestd `$(BINPATH)/$(LIBNAME)-config --ldflags`
|
||||
./pngtestd pngtest.png
|
||||
|
||||
|
||||
@@ -18,34 +18,47 @@ CDEBUG = -g -DPNG_DEBUG=5
|
||||
LDDEBUG =
|
||||
CRELEASE = -O2
|
||||
LDRELEASE = -s
|
||||
CFLAGS = -I$(ZLIBINC) -Wall $(CRELEASE)
|
||||
LDFLAGS = -L. -L$(ZLIBLIB) -lpng -lz -lm $(LDRELEASE)
|
||||
#CFLAGS = -Wall $(CDEBUG)
|
||||
CFLAGS = -Wall $(CRELEASE)
|
||||
#LDFLAGS = $(LDDEBUG)
|
||||
LDFLAGS = $(LDRELEASE)
|
||||
LIBS = -lz -lm
|
||||
|
||||
# File extensions
|
||||
O=.o
|
||||
A=.a
|
||||
E=
|
||||
EXE=
|
||||
|
||||
# Variables
|
||||
OBJS = png$(O) pngerror$(O) pngget$(O) pngmem$(O) pngpread$(O) \
|
||||
pngread$(O) pngrio$(O) pngrtran$(O) pngrutil$(O) pngset$(O) \
|
||||
pngtrans$(O) pngwio$(O) pngwrite$(O) pngwtran$(O) pngwutil$(O)
|
||||
pngread$(O) pngrio$(O) pngrtran$(O) pngrutil$(O) pngset$(O) \
|
||||
pngtrans$(O) pngwio$(O) pngwrite$(O) pngwtran$(O) pngwutil$(O)
|
||||
|
||||
# Targets
|
||||
all: libpng$(A) pngtest$(E)
|
||||
all: static
|
||||
|
||||
.c$(O):
|
||||
$(CC) -c $(CFLAGS) -I$(ZLIBINC) $<
|
||||
|
||||
static: libpng$(A) pngtest$(EXE)
|
||||
|
||||
shared:
|
||||
@echo This is a generic makefile that cannot create shared libraries.
|
||||
@echo Please use a configuration that is specific to your platform.
|
||||
@false
|
||||
|
||||
libpng$(A): $(OBJS)
|
||||
$(AR_RC) $@ $(OBJS)
|
||||
$(RANLIB) $@
|
||||
|
||||
test: pngtest$(E)
|
||||
./pngtest$(E)
|
||||
test: pngtest$(EXE)
|
||||
./pngtest$(EXE)
|
||||
|
||||
pngtest$(E): pngtest$(O) libpng$(A)
|
||||
$(LD) -o $@ pngtest$(O) $(LDFLAGS)
|
||||
pngtest$(EXE): pngtest$(O) libpng$(A)
|
||||
$(LD) $(LDFLAGS) -L$(ZLIBLIB) -o $@ pngtest$(O) libpng$(A) $(LIBS)
|
||||
|
||||
clean:
|
||||
$(RM_F) *$(O) libpng$(A) pngtest$(E) pngout.png
|
||||
$(RM_F) *$(O) libpng$(A) pngtest$(EXE) pngout.png
|
||||
|
||||
png$(O): png.h pngconf.h
|
||||
pngerror$(O): png.h pngconf.h
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
# Library name:
|
||||
LIBNAME = libpng12
|
||||
PNGMAJ = 0
|
||||
PNGMIN = 1.2.10rc1
|
||||
PNGMIN = 1.2.13
|
||||
PNGVER = $(PNGMAJ).$(PNGMIN)
|
||||
|
||||
# Shared library names:
|
||||
@@ -24,8 +24,8 @@ LIBSO=$(LIBNAME).so
|
||||
LIBSOMAJ=$(LIBNAME).so.$(PNGMAJ)
|
||||
LIBSOVER=$(LIBNAME).so.$(PNGVER)
|
||||
OLDSO=libpng.so
|
||||
OLDSOMAJ=libpng.so.0
|
||||
OLDSOVER=libpng.so.0.$(PNGMIN)
|
||||
OLDSOMAJ=libpng.so.3
|
||||
OLDSOVER=libpng.so.3.$(PNGMIN)
|
||||
|
||||
# Utilities:
|
||||
CC = gcc
|
||||
@@ -235,7 +235,7 @@ test-dd:
|
||||
echo Testing installed dynamic shared library in $(DL).
|
||||
$(CC) -I$(DI) -I$(ZLIBINC) \
|
||||
`$(BINPATH)/$(LIBNAME)-config --cflags` pngtest.c \
|
||||
-L$(DL) -L$(ZLIBLIB) -W1, -rpath,$(DL) -Wl,-rpath,$(ZLIBLIB) \
|
||||
-L$(DL) -L$(ZLIBLIB) -Wl, -rpath,$(DL) -Wl,-rpath,$(ZLIBLIB) \
|
||||
-o pngtestd `$(BINPATH)/$(LIBNAME)-config --ldflags`
|
||||
./pngtestd pngtest.png
|
||||
|
||||
|
||||
@@ -18,7 +18,7 @@ ZLIBINC=/opt/zlib/include
|
||||
# Library name:
|
||||
LIBNAME = libpng12
|
||||
PNGMAJ = 0
|
||||
PNGMIN = 1.2.10rc1
|
||||
PNGMIN = 1.2.13
|
||||
PNGVER = $(PNGMAJ).$(PNGMIN)
|
||||
|
||||
# Shared library names:
|
||||
@@ -26,8 +26,8 @@ LIBSO=$(LIBNAME).sl
|
||||
LIBSOMAJ=$(LIBNAME).sl.$(PNGMAJ)
|
||||
LIBSOVER=$(LIBNAME).sl.$(PNGVER)
|
||||
OLDSO=libpng.sl
|
||||
OLDSOMAJ=libpng.sl.0
|
||||
OLDSOVER=libpng.sl.0.$(PNGMIN)
|
||||
OLDSOMAJ=libpng.sl.3
|
||||
OLDSOVER=libpng.sl.3.$(PNGMIN)
|
||||
|
||||
# Utilities:
|
||||
AR_RC=ar rc
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
# Library name:
|
||||
LIBNAME = libpng12
|
||||
PNGMAJ = 0
|
||||
PNGMIN = 1.2.10rc1
|
||||
PNGMIN = 1.2.13
|
||||
PNGVER = $(PNGMAJ).$(PNGMIN)
|
||||
|
||||
# Shared library names:
|
||||
@@ -16,8 +16,8 @@ LIBSO=$(LIBNAME).sl
|
||||
LIBSOMAJ=$(LIBNAME).sl.$(PNGMAJ)
|
||||
LIBSOVER=$(LIBNAME).sl.$(PNGVER)
|
||||
OLDSO=libpng.sl
|
||||
OLDSOMAJ=libpng.sl.0
|
||||
OLDSOVER=libpng.sl.0.$(PNGMIN)
|
||||
OLDSOMAJ=libpng.sl.3
|
||||
OLDSOVER=libpng.sl.3.$(PNGMIN)
|
||||
|
||||
# Utilities:
|
||||
CC=gcc
|
||||
@@ -197,7 +197,7 @@ test-dd:
|
||||
echo Testing installed dynamic shared library in $(DL).
|
||||
$(CC) -I$(DI) -I$(ZLIBINC) \
|
||||
`$(BINPATH)/$(LIBNAME)-config --cflags` pngtest.c \
|
||||
-L$(DL) -L$(ZLIBLIB) -W1,-rpath,$(DL) -Wl,-rpath,$(ZLIBLIB) \
|
||||
-L$(DL) -L$(ZLIBLIB) -Wl,-rpath,$(DL) -Wl,-rpath,$(ZLIBLIB) \
|
||||
-o pngtestd `$(BINPATH)/$(LIBNAME)-config --ldflags`
|
||||
./pngtestd pngtest.png
|
||||
|
||||
|
||||
@@ -18,7 +18,7 @@ ZLIBINC=/opt/zlib/include
|
||||
# Library name:
|
||||
LIBNAME = libpng12
|
||||
PNGMAJ = 0
|
||||
PNGMIN = 1.2.10rc1
|
||||
PNGMIN = 1.2.13
|
||||
PNGVER = $(PNGMAJ).$(PNGMIN)
|
||||
|
||||
# Shared library names:
|
||||
@@ -26,8 +26,8 @@ LIBSO=$(LIBNAME).sl
|
||||
LIBSOMAJ=$(LIBNAME).sl.$(PNGMAJ)
|
||||
LIBSOVER=$(LIBNAME).sl.$(PNGVER)
|
||||
OLDSO=libpng.sl
|
||||
OLDSOMAJ=libpng.sl.0
|
||||
OLDSOVER=libpng.sl.0.$(PNGMIN)
|
||||
OLDSOMAJ=libpng.sl.3
|
||||
OLDSOVER=libpng.sl.3.$(PNGMIN)
|
||||
|
||||
# Utilities:
|
||||
AR_RC=ar rc
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
# Library name:
|
||||
LIBNAME = libpng12
|
||||
PNGMAJ = 0
|
||||
PNGMIN = 1.2.10rc1
|
||||
PNGMIN = 1.2.13
|
||||
PNGVER = $(PNGMAJ).$(PNGMIN)
|
||||
|
||||
# Shared library names:
|
||||
@@ -14,8 +14,8 @@ LIBSO=$(LIBNAME).so
|
||||
LIBSOMAJ=$(LIBNAME).so.$(PNGMAJ)
|
||||
LIBSOVER=$(LIBNAME).so.$(PNGVER)
|
||||
OLDSO=libpng.so
|
||||
OLDSOMAJ=libpng.so.0
|
||||
OLDSOVER=libpng.so.0.$(PNGMIN)
|
||||
OLDSOMAJ=libpng.so.3
|
||||
OLDSOVER=libpng.so.3.$(PNGMIN)
|
||||
|
||||
# Utilities:
|
||||
AR_RC=ar rc
|
||||
@@ -203,7 +203,7 @@ test-dd:
|
||||
echo Testing installed dynamic shared library in $(DL).
|
||||
$(CC) -I$(DI) -I$(ZLIBINC) \
|
||||
`$(BINPATH)/$(LIBNAME)-config --cflags` pngtest.c \
|
||||
-L$(DL) -L$(ZLIBLIB) -W1, -rpath,$(DL) -Wl,-rpath,$(ZLIBLIB) \
|
||||
-L$(DL) -L$(ZLIBLIB) -Wl, -rpath,$(DL) -Wl,-rpath,$(ZLIBLIB) \
|
||||
-o pngtestd `$(BINPATH)/$(LIBNAME)-config --ldflags`
|
||||
./pngtestd pngtest.png
|
||||
|
||||
|
||||
@@ -76,7 +76,7 @@ CFLAGS= $(strip $(MINGW_CCFLAGS) $(addprefix -I,$(ZLIBINC)) \
|
||||
LIBNAME = libpng12
|
||||
PNGMAJ = 0
|
||||
MINGDLL = 12
|
||||
PNGMIN = 1.2.10rc1
|
||||
PNGMIN = 1.2.13
|
||||
PNGVER = $(PNGMAJ).$(PNGMIN)
|
||||
|
||||
SHAREDLIB=libpng$(MINGDLL).dll
|
||||
|
||||
@@ -13,7 +13,7 @@ INCSDIR=${LOCALBASE}/include/libpng12
|
||||
|
||||
LIB= png12
|
||||
SHLIB_MAJOR= 0
|
||||
SHLIB_MINOR= 1.2.10rc1
|
||||
SHLIB_MINOR= 1.2.13
|
||||
SRCS= pnggccrd.c 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
|
||||
|
||||
@@ -13,7 +13,7 @@ INCSDIR=${LOCALBASE}/include/libpng
|
||||
|
||||
LIB= png
|
||||
SHLIB_MAJOR= 3
|
||||
SHLIB_MINOR= 1.2.10rc1
|
||||
SHLIB_MINOR= 1.2.13
|
||||
SRCS= pnggccrd.c 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
|
||||
|
||||
@@ -7,7 +7,7 @@ LIBDIR= ${PREFIX}/lib
|
||||
MANDIR= ${PREFIX}/man/cat
|
||||
|
||||
SHLIB_MAJOR= 0
|
||||
SHLIB_MINOR= 1.2.10rc1
|
||||
SHLIB_MINOR= 1.2.13
|
||||
|
||||
LIB= png
|
||||
SRCS= png.c pngerror.c pnggccrd.c pngget.c pngmem.c pngpread.c \
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
# Library name:
|
||||
LIBNAME = libpng12
|
||||
PNGMAJ = 0
|
||||
PNGMIN = 1.2.10rc1
|
||||
PNGMIN = 1.2.13
|
||||
PNGVER = $(PNGMAJ).$(PNGMIN)
|
||||
|
||||
# Shared library names:
|
||||
@@ -17,8 +17,8 @@ LIBSO=$(LIBNAME).so
|
||||
LIBSOMAJ=$(LIBNAME).so.$(PNGMAJ)
|
||||
LIBSOVER=$(LIBNAME).so.$(PNGVER)
|
||||
OLDSO=libpng.so
|
||||
OLDSOMAJ=libpng.so.0
|
||||
OLDSOVER=libpng.so.0.$(PNGMIN)
|
||||
OLDSOMAJ=libpng.so.3
|
||||
OLDSOVER=libpng.so.3.$(PNGMIN)
|
||||
|
||||
# Utilities:
|
||||
CC=cc
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
# Library name:
|
||||
LIBNAME=libpng12
|
||||
PNGMAJ = 0
|
||||
PNGMIN = 1.2.10rc1
|
||||
PNGMIN = 1.2.13
|
||||
PNGVER = $(PNGMAJ).$(PNGMIN)
|
||||
|
||||
# Shared library names:
|
||||
@@ -14,8 +14,8 @@ LIBSO=$(LIBNAME).so
|
||||
LIBSOMAJ=$(LIBNAME).so.$(PNGMAJ)
|
||||
LIBSOVER=$(LIBNAME).so.$(PNGVER)
|
||||
OLDSO=libpng.so
|
||||
OLDSOMAJ=libpng.so.0
|
||||
OLDSOVER=libpng.so.0.$(PNGMIN)
|
||||
OLDSOMAJ=libpng.so.3
|
||||
OLDSOVER=libpng.so.3.$(PNGMIN)
|
||||
|
||||
# Utilities:
|
||||
AR_RC=ar rc
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
# Library name:
|
||||
LIBNAME=libpng12
|
||||
PNGMAJ = 0
|
||||
PNGMIN = 1.2.10rc1
|
||||
PNGMIN = 1.2.13
|
||||
PNGVER = $(PNGMAJ).$(PNGMIN)
|
||||
|
||||
# Shared library names:
|
||||
@@ -14,8 +14,8 @@ LIBSO=$(LIBNAME).so
|
||||
LIBSOMAJ=$(LIBNAME).so.$(PNGMAJ)
|
||||
LIBSOVER=$(LIBNAME).so.$(PNGVER)
|
||||
OLDSO=libpng.so
|
||||
OLDSOMAJ=libpng.so.0
|
||||
OLDSOVER=libpng.so.0.$(PNGMIN)
|
||||
OLDSOMAJ=libpng.so.3
|
||||
OLDSOVER=libpng.so.3.$(PNGMIN)
|
||||
|
||||
# Utilities:
|
||||
AR_RC=ar rc
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
|
||||
# Library name:
|
||||
PNGMAJ = 0
|
||||
PNGMIN = 1.2.10rc1
|
||||
PNGMIN = 1.2.13
|
||||
PNGVER = $(PNGMAJ).$(PNGMIN)
|
||||
LIBNAME = libpng12
|
||||
|
||||
@@ -17,8 +17,8 @@ LIBSO=$(LIBNAME).so
|
||||
LIBSOMAJ=$(LIBNAME).so.$(PNGMAJ)
|
||||
LIBSOVER=$(LIBNAME).so.$(PNGVER)
|
||||
OLDSO=libpng.so
|
||||
OLDSOMAJ=libpng.so.0
|
||||
OLDSOVER=libpng.so.0.$(PNGMIN)
|
||||
OLDSOMAJ=libpng.so.3
|
||||
OLDSOVER=libpng.so.3.$(PNGMIN)
|
||||
|
||||
# Utilities:
|
||||
# gcc 2.95 doesn't work.
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
# Library name:
|
||||
LIBNAME = libpng12
|
||||
PNGMAJ = 0
|
||||
PNGMIN = 1.2.10rc1
|
||||
PNGMIN = 1.2.13
|
||||
PNGVER = $(PNGMAJ).$(PNGMIN)
|
||||
|
||||
# Shared library names:
|
||||
@@ -16,8 +16,8 @@ LIBSO=$(LIBNAME).so
|
||||
LIBSOMAJ=$(LIBNAME).so.$(PNGMAJ)
|
||||
LIBSOVER=$(LIBNAME).so.$(PNGVER)
|
||||
OLDSO=libpng.so
|
||||
OLDSOMAJ=libpng.so.0
|
||||
OLDSOVER=libpng.so.0.$(PNGMIN)
|
||||
OLDSOMAJ=libpng.so.3
|
||||
OLDSOVER=libpng.so.3.$(PNGMIN)
|
||||
|
||||
# Utilities:
|
||||
AR_RC=ar rc
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
; PNG.LIB module definition file for OS/2
|
||||
;----------------------------------------
|
||||
|
||||
; Version 1.2.10rc1
|
||||
; Version 1.2.13
|
||||
|
||||
LIBRARY PNG
|
||||
DESCRIPTION "PNG image compression library for OS/2"
|
||||
@@ -88,7 +88,7 @@ EXPORTS
|
||||
png_read_end
|
||||
png_read_image
|
||||
png_read_info
|
||||
png_read_init ; deprecated
|
||||
; png_read_init ; deprecated
|
||||
png_read_png
|
||||
png_read_row
|
||||
png_read_rows
|
||||
@@ -118,7 +118,7 @@ EXPORTS
|
||||
png_set_gAMA
|
||||
png_set_gAMA_fixed
|
||||
png_set_gamma
|
||||
png_set_gray_1_2_4_to_8 ; deprecated as of libpng-1.2.9
|
||||
; png_set_gray_1_2_4_to_8 ; deprecated as of libpng-1.2.9
|
||||
png_set_gray_to_rgb
|
||||
png_set_hIST
|
||||
png_set_iCCP
|
||||
@@ -173,7 +173,7 @@ EXPORTS
|
||||
png_write_image
|
||||
png_write_info
|
||||
png_write_info_before_PLTE
|
||||
png_write_init ; deprecated
|
||||
; png_write_init ; deprecated
|
||||
png_write_png
|
||||
png_write_row
|
||||
png_write_rows
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
LIBRARY
|
||||
|
||||
EXPORTS
|
||||
;Version 1.2.10rc1
|
||||
;Version 1.2.13
|
||||
png_build_grayscale_palette @1
|
||||
png_check_sig @2
|
||||
png_chunk_error @3
|
||||
@@ -114,7 +114,8 @@ EXPORTS
|
||||
png_set_gAMA @104
|
||||
png_set_gAMA_fixed @105
|
||||
png_set_gamma @106
|
||||
png_set_gray_1_2_4_to_8 @107 ; deprecated
|
||||
; png_set_gray_1_2_4_to_8 is deprecated
|
||||
png_set_gray_1_2_4_to_8 @107
|
||||
png_set_gray_to_rgb @108
|
||||
png_set_hIST @109
|
||||
png_set_iCCP @110
|
||||
@@ -178,14 +179,14 @@ EXPORTS
|
||||
png_read_init_2 @166
|
||||
png_write_init_2 @167
|
||||
png_access_version_number @168
|
||||
; png_sig_bytes @169
|
||||
; png_libpng_ver @170
|
||||
; png_sig_bytes @169
|
||||
png_libpng_ver @170
|
||||
png_init_io @171
|
||||
png_convert_to_rfc1123 @172
|
||||
png_set_invalid @173
|
||||
; Added at version 1.0.12
|
||||
; For compatibility with 1.0.7-1.0.11
|
||||
png_info_init @174
|
||||
; png_info_init @174
|
||||
png_read_init_3 @175
|
||||
png_write_init_3 @176
|
||||
png_info_init_3 @177
|
||||
@@ -201,13 +202,13 @@ EXPORTS
|
||||
png_permit_mng_features @184
|
||||
; MMX support
|
||||
png_mmx_support @185
|
||||
png_get_mmx_flagmask @186
|
||||
; png_get_mmx_flagmask @186
|
||||
png_get_asm_flagmask @187
|
||||
png_get_asm_flags @188
|
||||
png_get_mmx_bitdepth_threshold @189
|
||||
png_get_mmx_rowbytes_threshold @190
|
||||
; png_get_mmx_bitdepth_threshold @189
|
||||
; png_get_mmx_rowbytes_threshold @190
|
||||
png_set_asm_flags @191
|
||||
png_init_mmx_flags @192
|
||||
; png_init_mmx_flags @192
|
||||
; Strip error numbers
|
||||
png_set_strip_error_numbers @193
|
||||
; Added at version 1.2.2
|
||||
|
||||
Reference in New Issue
Block a user