Installing libpng version 1.2.16 - January 31, 2007
Installing libpng version 1.2.25 - February 18, 2008
On Unix/Linux and similar systems, you can simply type
@ -44,7 +44,7 @@ to have access to the zlib.h and zconf.h include files that
@@ -44,7 +44,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.16" or "lpng109" and "zlib-1.2.1"
might be called "libpng-1.2.25" 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:
@ -101,15 +101,9 @@ include
@@ -101,15 +101,9 @@ include
makefile.sco => For SCO OSr5 ELF and Unixware 7 with Native cc
@ -152,10 +148,7 @@ include
@@ -152,10 +148,7 @@ include
makefile.tc3 => Turbo C 3.0 makefile
makefile.dj2 => DJGPP 2 makefile
makefile.msc => Microsoft C makefile
makefile.vcawin32 => makefile for Microsoft Visual C++ 5.0 and later (uses
assembler code tuned for Intel MMX platform)
makefile.vcwin32 => makefile for Microsoft Visual C++ 4.0 and later (does
not use assembler code)
makefile.vcwin32 => makefile for Microsoft Visual C++ 4.0 and later
makefile.os2 => OS/2 Makefile (gcc and emx, requires pngos2.def)
pngos2.def => OS/2 module definition file used by makefile.os2
makefile.watcom => Watcom 10a+ Makefile, 32-bit flat memory model
@ -204,23 +197,3 @@ instead, as demonstrated in contrib/visupng of the libpng distribution.
@@ -204,23 +197,3 @@ instead, as demonstrated in contrib/visupng of the libpng distribution.
Further information can be found in the README and libpng.txt
files, in the individual makefiles, in png.h, and the manual pages
libpng.3 and png.5.
Using the ./configure script -- 16 December 2002.
=================================================
The ./configure script should work compatibly with what scripts/makefile.*
did, however there are some options you need to add to configure explicitly,
which previously was done semi-automatically (if you didn't edit
README for libpng version 1.2.16 - January 31, 2007 (shared library 12.0)
README for libpng version 1.2.25 - February 18, 2008 (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.
Libpng comes in several distribution formats. Get libpng-*.tar.gz
or libpng-*.tar.bz2 if you want UNIX-style line endings in the text
files, or lpng*.zip if you want DOS-style line endings.
Libpng comes in several distribution formats. Get libpng-*.tar.gz,
libpng-*.tar.lzma, or libpng-*.tar.bz2 if you want UNIX-style line
endings in the text files, or lpng*.7z lpng*.zip if you want DOS-style
line endings.
Version 0.89 was the first official release of libpng. Don't let the
fact that it's the first release fool you. The libpng library has been in
@ -77,12 +78,12 @@ compression library that is useful for more things than just PNG files.
@@ -77,12 +78,12 @@ compression library that is useful for more things than just PNG files.
You can use zlib as a drop-in replacement for fread() and fwrite() if
you are so inclined.
zlib should be available at the same place that libpng is, or at.
ftp://ftp.info-zip.org/pub/infozip/zlib
zlib should be available at the same place that libpng is, or at
ftp://ftp.simplesystems.org/pub/png/src/
You may also want a copy of the PNG specification. It is available
as an RFC, a W3C Recommendation, and an ISO/IEC Standard. You can find
these at http://www.libpng.org/pub/png/documents/
these at http://www.libpng.org/pub/png/pngdocs.html
This code is currently being archived at libpng.sf.net in the
[DOWNLOAD] area, and on CompuServe, Lib 20 (PNG SUPPORT)
@ -113,8 +114,8 @@ given in previous versions of this document. He and Andreas will read mail
@@ -113,8 +114,8 @@ given in previous versions of this document. He and Andreas will read mail
addressed to the png-implement list, however.
Please do not send general questions about PNG. Send them to
the (png-list at ccrc.wustl.edu, subscription required, write to
majordomo at ccrc.wustl.edu with "subscribe png-list" in your message).
the (png-mng-misc at lists.sourceforge.net, subscription required, visit
https://lists.sourceforge.net/lists/listinfo/png-mng-implement to subscribe)
On the other hand,
please do not send libpng questions to that address, send them to me
or to the png-implement list. I'll
@ -125,7 +126,7 @@ and ...". If in doubt, send questions to me. I'll bounce them
@@ -125,7 +126,7 @@ and ...". If in doubt, send questions to me. I'll bounce them
to others, if necessary.
Please do not send suggestions on how to change PNG. We have
been discussing PNG for nine years now, and it is official and
been discussing PNG for twelve years now, and it is official and
finished. If you have suggestions for libpng, however, I'll
gladly listen. Even if your suggestion is not used immediately,
it may be used later.
@ -140,6 +141,7 @@ Files in this distribution:
@@ -140,6 +141,7 @@ Files in this distribution:
TODO => Things not implemented in the current library
Y2KINFO => Statement of Y2K compliance
example.c => Example code for using libpng functions
libpng-*-*-diff.txt => Diff from previous release
libpng.3 => manual page for libpng (includes libpng.txt)
libpng.txt => Description of libpng and its functions
libpngpf.3 => manual page for libpng's private functions
@ -147,7 +149,6 @@ Files in this distribution:
@@ -147,7 +149,6 @@ Files in this distribution:
png.c => Basic interface functions common to library
png.h => Library function and interface declarations
pngconf.h => System specific library configuration
pngasmrd.h => Header file for assembler-coded functions
pngerror.c => Error/warning message I/O functions
pngget.c => Functions for retrieving info from struct
pngmem.c => Memory handling functions
@ -190,11 +191,11 @@ Files in this distribution:
@@ -190,11 +191,11 @@ Files in this distribution:
@ -410,10 +410,10 @@ Following is a copy of the libpng.txt file that accompanies libpng.
@@ -410,10 +410,10 @@ Following is a copy of the libpng.txt file that accompanies libpng.
.SHLIBPNG.TXT
libpng.txt - A description on how to use and modify libpng
libpng version 1.2.16 - January 31, 2007
libpng version 1.2.25 - February 18, 2008
Updated and distributed by Glenn Randers-Pehrson
<glennrp at users.sourceforge.net>
Copyright (c) 1998-2005 Glenn Randers-Pehrson
Copyright (c) 1998-2008 Glenn Randers-Pehrson
For conditions of distribution and use, see copyright
notice in png.h.
@ -443,6 +443,10 @@ it is heavily commented and should include everything most people
@@ -443,6 +443,10 @@ it is heavily commented and should include everything most people
will need. We assume that libpng is already installed; see the
INSTALL file for instructions on how to install libpng.
For examples of libpng usage, see the files "example.c", "pngtest.c",
and the files in the "contrib" directory, all of which are included in the
libpng distribution.
Libpng was written as a companion to the PNG specification, as a way
of reducing the amount of time and effort it takes to support the PNG
file format in application programs.
@ -492,9 +496,7 @@ Libpng is thread safe, provided the threads are using different
@@ -492,9 +496,7 @@ Libpng is thread safe, provided the threads are using different
instances of the structures. Each thread should have its own
png_struct and png_info instances, and thus its own image.
Libpng does not protect itself against two threads using the
same instance of a structure. Note: thread safety may be defeated
by use of some of the MMX assembler code in pnggccrd.c, which is only
compiled when the user defines PNG_THREAD_UNSAFE_OK.
same instance of a structure.
.SHII.Structures
@ -2761,17 +2763,13 @@ For a more compact example of writing a PNG image, see the file example.c.
@@ -2761,17 +2763,13 @@ For a more compact example of writing a PNG image, see the file example.c.
.SHV.Modifying/Customizinglibpng:
There are three issues here. The first is changing how libpng does
There are two issues here. The first is changing how libpng does
standard things like memory allocation, input/output, and error handling.
The second deals with more complicated things like adding new chunks,
adding new transformations, and generally changing how libpng works.
Both of those are compile-time issues; that is, they are generally
determined at the time the code is written, and there is rarely a need
to provide the user with a means of changing them. The third is a
run-time issue: choosing between and/or tuning one or more alternate
versions of computationally intensive routines; specifically, optimized
assembly-language (and therefore compiler- and platform-dependent)
versions.
to provide the user with a means of changing them.
Memory allocation, input/output, and error handling
@ -3132,125 +3130,6 @@ When PNG_DEBUG = 1, the macros are defined, but only png_debug statements
@@ -3132,125 +3130,6 @@ When PNG_DEBUG = 1, the macros are defined, but only png_debug statements
having level = 0 will be printed. There aren't any such statements in
this version of libpng, but if you insert some they will be printed.
.SHVI.Runtimeoptimization
A new feature in libpng 1.2.0 is the ability to dynamically switch between
standard and optimized versions of some routines. Currently these are
limited to three computationally intensive tasks when reading PNG files:
decoding row filters, expanding interlacing, and combining interlaced or
transparent row data with previous row data. Currently the optimized
versions are available only for x86 (Intel, AMD, etc.) platforms with
MMX support, though this may change in future versions. (For example,
the non-MMX assembler optimizations for zlib might become similarly
runtime-selectable in future releases, in which case libpng could be
extended to support them. Alternatively, the compile-time choice of
floating-point versus integer routines for gamma correction might become
runtime-selectable.)
Because such optimizations tend to be very platform- and compiler-dependent,
both in how they are written and in how they perform, the new runtime code
in libpng has been written to allow programs to query, enable, and disable
either specific optimizations or all such optimizations. For example, to
enable all possible optimizations (bearing in mind that some "optimizations"
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.16 are Y2K compliant. It is my belief that earlier
upward through 1.2.25 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
@ -3515,6 +3394,40 @@ the first widely used release:
@@ -3515,6 +3394,40 @@ the first widely used release:
1.2.16rc1 13 10216 12.so.0.16[.0]
1.0.24 10 10024 10.so.0.24[.0]
1.2.16 13 10216 12.so.0.16[.0]
1.2.17beta1-2 13 10217 12.so.0.17[.0]
1.0.25rc1 10 10025 10.so.0.25[.0]
1.2.17rc1-3 13 10217 12.so.0.17[.0]
1.0.25 10 10025 10.so.0.25[.0]
1.2.17 13 10217 12.so.0.17[.0]
1.0.26 10 10026 10.so.0.26[.0]
1.2.18 13 10218 12.so.0.18[.0]
1.2.19beta1-31 13 10219 12.so.0.19[.0]
1.0.27rc1-6 10 10027 10.so.0.27[.0]
1.2.19rc1-6 13 10219 12.so.0.19[.0]
1.0.27 10 10027 10.so.0.27[.0]
1.2.19 13 10219 12.so.0.19[.0]
1.2.20beta01-04 13 10220 12.so.0.20[.0]
1.0.28rc1-6 10 10028 10.so.0.28[.0]
1.2.20rc1-6 13 10220 12.so.0.20[.0]
1.0.28 10 10028 10.so.0.28[.0]
1.2.20 13 10220 12.so.0.20[.0]
1.2.21beta1-2 13 10221 12.so.0.21[.0]
1.2.21rc1-3 13 10221 12.so.0.21[.0]
1.0.29 10 10029 10.so.0.29[.0]
1.2.21 13 10221 12.so.0.21[.0]
1.2.22beta1-4 13 10222 12.so.0.22[.0]
1.0.30rc1 13 10030 10.so.0.30[.0]
1.2.22rc1 13 10222 12.so.0.22[.0]
1.0.30 10 10030 10.so.0.30[.0]
1.2.22 13 10222 12.so.0.22[.0]
1.2.23beta01-05 13 10223 12.so.0.23[.0]
1.2.23rc01 13 10223 12.so.0.23[.0]
1.2.23 13 10223 12.so.0.23[.0]
1.2.24beta01-02 13 10224 12.so.0.24[.0]
1.2.24rc01 13 10224 12.so.0.24[.0]
1.2.24 13 10224 12.so.0.24[.0]
1.2.25beta01-06 13 10225 12.so.0.25[.0]
1.2.25rc01-02 13 10225 12.so.0.25[.0]
Henceforth the source version will match the shared-library minor
and patch numbers; the shared-library major version number will be
@ -3527,7 +3440,7 @@ version 1.0.6j; from then on they were given the upcoming public
@@ -3527,7 +3440,7 @@ version 1.0.6j; from then on they were given the upcoming public
release number plus "betaNN" or "rcN".
.SH"SEE ALSO"
libpngpf(3), png(5)
.IRlibpngpf(3)", "png(5)
.LP
.IRlibpng:
.IP
@ -3570,7 +3483,7 @@ possible without all of you.
@@ -3570,7 +3483,7 @@ possible without all of you.
Thanks to Frank J. T. Wojcik for helping with the documentation.
Libpng version 1.2.16 - January 31, 2007:
Libpng version 1.2.25 - February 18, 2008:
Initially created in 1995 by Guy Eric Schalnat, then of Group 42, Inc.
Currently maintained by Glenn Randers-Pehrson (glennrp at users.sourceforge.net).
@ -3591,8 +3504,8 @@ included in the libpng distribution, the latter shall prevail.)
@@ -3591,8 +3504,8 @@ 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.16, January 31, 2007, are
Copyright (c) 2004-2006 Glenn Randers-Pehrson, and are
libpng versions 1.2.6, August 15, 2004, through 1.2.25, February 18, 2008, are
Copyright (c) 2004,2006-2008 Glenn Randers-Pehrson, and are
distributed according to the same disclaimer and license as libpng-1.2.5
with the following individual added to the list of Contributing Authors
@ -3690,7 +3603,7 @@ certification mark of the Open Source Initiative.
@@ -3690,7 +3603,7 @@ certification mark of the Open Source Initiative.
libpng.txt - A description on how to use and modify libpng
libpng version 1.2.16 - January 31, 2007
libpng version 1.2.24 - December 14, 2007
Updated and distributed by Glenn Randers-Pehrson
<glennrp at users.sourceforge.net>
Copyright (c) 1998-2005 Glenn Randers-Pehrson
Copyright (c) 1998-2007 Glenn Randers-Pehrson
For conditions of distribution and use, see copyright
notice in png.h.
@ -33,6 +33,10 @@ it is heavily commented and should include everything most people
@@ -33,6 +33,10 @@ it is heavily commented and should include everything most people
will need. We assume that libpng is already installed; see the
INSTALL file for instructions on how to install libpng.
For examples of libpng usage, see the files "example.c", "pngtest.c",
and the files in the "contrib" directory, all of which are included in the
libpng distribution.
Libpng was written as a companion to the PNG specification, as a way
of reducing the amount of time and effort it takes to support the PNG
file format in application programs.
@ -82,9 +86,7 @@ Libpng is thread safe, provided the threads are using different
@@ -82,9 +86,7 @@ Libpng is thread safe, provided the threads are using different
instances of the structures. Each thread should have its own
png_struct and png_info instances, and thus its own image.
Libpng does not protect itself against two threads using the
same instance of a structure. Note: thread safety may be defeated
by use of some of the MMX assembler code in pnggccrd.c, which is only
compiled when the user defines PNG_THREAD_UNSAFE_OK.
same instance of a structure.
II. Structures
@ -2351,17 +2353,13 @@ For a more compact example of writing a PNG image, see the file example.c.
@@ -2351,17 +2353,13 @@ For a more compact example of writing a PNG image, see the file example.c.
V. Modifying/Customizing libpng:
There are three issues here. The first is changing how libpng does
There are two issues here. The first is changing how libpng does
standard things like memory allocation, input/output, and error handling.
The second deals with more complicated things like adding new chunks,
adding new transformations, and generally changing how libpng works.
Both of those are compile-time issues; that is, they are generally
determined at the time the code is written, and there is rarely a need
to provide the user with a means of changing them. The third is a
run-time issue: choosing between and/or tuning one or more alternate
versions of computationally intensive routines; specifically, optimized
assembly-language (and therefore compiler- and platform-dependent)
versions.
to provide the user with a means of changing them.
Memory allocation, input/output, and error handling
@ -2722,125 +2720,6 @@ When PNG_DEBUG = 1, the macros are defined, but only png_debug statements
@@ -2722,125 +2720,6 @@ When PNG_DEBUG = 1, the macros are defined, but only png_debug statements
having level = 0 will be printed. There aren't any such statements in
this version of libpng, but if you insert some they will be printed.
VI. Runtime optimization
A new feature in libpng 1.2.0 is the ability to dynamically switch between
standard and optimized versions of some routines. Currently these are
limited to three computationally intensive tasks when reading PNG files:
decoding row filters, expanding interlacing, and combining interlaced or
transparent row data with previous row data. Currently the optimized
versions are available only for x86 (Intel, AMD, etc.) platforms with
MMX support, though this may change in future versions. (For example,
the non-MMX assembler optimizations for zlib might become similarly
runtime-selectable in future releases, in which case libpng could be
extended to support them. Alternatively, the compile-time choice of
floating-point versus integer routines for gamma correction might become
runtime-selectable.)
Because such optimizations tend to be very platform- and compiler-dependent,
both in how they are written and in how they perform, the new runtime code
in libpng has been written to allow programs to query, enable, and disable
either specific optimizations or all such optimizations. For example, to
enable all possible optimizations (bearing in mind that some "optimizations"
@ -269,6 +269,6 @@ are listed alphabetically here as an aid to libpng maintainers.
@@ -269,6 +269,6 @@ are listed alphabetically here as an aid to libpng maintainers.
See png.h for more information on these functions.
@ -18,7 +18,7 @@ gamma and chromaticity data for improved color matching on heterogeneous
@@ -18,7 +18,7 @@ gamma and chromaticity data for improved color matching on heterogeneous
platforms.
.SH"SEE ALSO"
.IRlibpng(3),zlib(3),deflate(5),andzlib(5)
.IRlibpng(3)", "zlib(3)", "deflate(5)", and "zlib(5)
.LP
PNG specification (second edition), November 2003:
/* free our memory. png_free checks NULL for us. */
png_free(png_ptr,png_ptr->zbuf);
png_free(png_ptr,png_ptr->row_buf);
#ifndef PNG_NO_WRITE_FILTERING
png_free(png_ptr,png_ptr->prev_row);
png_free(png_ptr,png_ptr->sub_row);
png_free(png_ptr,png_ptr->up_row);
png_free(png_ptr,png_ptr->avg_row);
png_free(png_ptr,png_ptr->paeth_row);
#endif
#if defined(PNG_TIME_RFC1123_SUPPORTED)
png_free(png_ptr,png_ptr->time_buffer);
@ -1137,15 +1136,26 @@ png_set_filter(png_structp png_ptr, int method, int filters)
@@ -1137,15 +1136,26 @@ png_set_filter(png_structp png_ptr, int method, int filters)
{
switch(filters&(PNG_ALL_FILTERS|0x07))
{
#ifndef PNG_NO_WRITE_FILTER
case5:
case6:
case7:png_warning(png_ptr,"Unknown row filter for method 0");
default:png_warning(png_ptr,"Unknown row filter for method 0");
#endif /* PNG_NO_WRITE_FILTER */
}
/* If we have allocated the row_buf, this means we have already started
@ -1159,6 +1169,7 @@ png_set_filter(png_structp png_ptr, int method, int filters)
@@ -1159,6 +1169,7 @@ png_set_filter(png_structp png_ptr, int method, int filters)
@ -1213,6 +1224,7 @@ png_set_filter(png_structp png_ptr, int method, int filters)
@@ -1213,6 +1224,7 @@ png_set_filter(png_structp png_ptr, int method, int filters)
@ -1658,7 +1660,7 @@ png_write_sCAL_s(png_structp png_ptr, int unit, png_charp width,
@@ -1658,7 +1660,7 @@ png_write_sCAL_s(png_structp png_ptr, int unit, png_charp width,
png_memcpy(buf+wlen+2,height,hlen);/* do NOT append the '\0' here */
png_debug1(3,"sCAL total length = %u\n",(unsignedint)total_len);