fukasawa e60969
README for libpng version 1.6.21 - January 15, 2016 (shared library 16.0)
fukasawa e60969
See the note about version numbers near the top of png.h
fukasawa e60969
fukasawa e60969
See INSTALL for instructions on how to install libpng.
fukasawa e60969
fukasawa e60969
Libpng comes in several distribution formats.  Get libpng-*.tar.gz or
fukasawa e60969
libpng-*.tar.xz or if you want UNIX-style line endings in the text files,
fukasawa e60969
or lpng*.7z or lpng*.zip if you want DOS-style line endings.
fukasawa e60969
fukasawa e60969
Version 0.89 was the first official release of libpng.  Don't let the
fukasawa e60969
fact that it's the first release fool you.  The libpng library has been in
fukasawa e60969
extensive use and testing since mid-1995.  By late 1997 it had
fukasawa e60969
finally gotten to the stage where there hadn't been significant
fukasawa e60969
changes to the API in some time, and people have a bad feeling about
fukasawa e60969
libraries with versions < 1.0.  Version 1.0.0 was released in
fukasawa e60969
March 1998.
fukasawa e60969
fukasawa e60969
****
fukasawa e60969
Note that some of the changes to the png_info structure render this
fukasawa e60969
version of the library binary incompatible with libpng-0.89 or
fukasawa e60969
earlier versions if you are using a shared library.  The type of the
fukasawa e60969
"filler" parameter for png_set_filler() has changed from png_byte to
fukasawa e60969
png_uint_32, which will affect shared-library applications that use
fukasawa e60969
this function.
fukasawa e60969
fukasawa e60969
To avoid problems with changes to the internals of png info_struct,
fukasawa e60969
new APIs have been made available in 0.95 to avoid direct application
fukasawa e60969
access to info_ptr.  These functions are the png_set_<chunk> and</chunk>
fukasawa e60969
png_get_<chunk> functions.  These functions should be used when</chunk>
fukasawa e60969
accessing/storing the info_struct data, rather than manipulating it
fukasawa e60969
directly, to avoid such problems in the future.
fukasawa e60969
fukasawa e60969
It is important to note that the APIs did not make current programs
fukasawa e60969
that access the info struct directly incompatible with the new
fukasawa e60969
library, through libpng-1.2.x.  In libpng-1.4.x, which was meant to
fukasawa e60969
be a transitional release, members of the png_struct and the
fukasawa e60969
info_struct can still be accessed, but the compiler will issue a
fukasawa e60969
warning about deprecated usage.  Since libpng-1.5.0, direct access
fukasawa e60969
to these structs is not allowed, and the definitions of the structs
fukasawa e60969
reside in private pngstruct.h and pnginfo.h header files that are not
fukasawa e60969
accessible to applications.  It is strongly suggested that new
fukasawa e60969
programs use the new APIs (as shown in example.c and pngtest.c), and
fukasawa e60969
older programs be converted to the new format, to facilitate upgrades
fukasawa e60969
in the future.
fukasawa e60969
****
fukasawa e60969
fukasawa e60969
Additions since 0.90 include the ability to compile libpng as a
fukasawa e60969
Windows DLL, and new APIs for accessing data in the info struct.
fukasawa e60969
Experimental functions include the ability to set weighting and cost
fukasawa e60969
factors for row filter selection, direct reads of integers from buffers
fukasawa e60969
on big-endian processors that support misaligned data access, faster
fukasawa e60969
methods of doing alpha composition, and more accurate 16->8 bit color
fukasawa e60969
conversion.
fukasawa e60969
fukasawa e60969
The additions since 0.89 include the ability to read from a PNG stream
fukasawa e60969
which has had some (or all) of the signature bytes read by the calling
fukasawa e60969
application.  This also allows the reading of embedded PNG streams that
fukasawa e60969
do not have the PNG file signature.  As well, it is now possible to set
fukasawa e60969
the library action on the detection of chunk CRC errors.  It is possible
fukasawa e60969
to set different actions based on whether the CRC error occurred in a
fukasawa e60969
critical or an ancillary chunk.
fukasawa e60969
fukasawa e60969
The changes made to the library, and bugs fixed are based on discussions
fukasawa e60969
on the PNG-implement mailing list and not on material submitted
fukasawa e60969
privately to Guy, Andreas, or Glenn.  They will forward any good
fukasawa e60969
suggestions to the list.
fukasawa e60969
fukasawa e60969
For a detailed description on using libpng, read libpng-manual.txt.  For
fukasawa e60969
examples of libpng in a program, see example.c and pngtest.c.  For usage
fukasawa e60969
information and restrictions (what little they are) on libpng, see
fukasawa e60969
png.h.  For a description on using zlib (the compression library used by
fukasawa e60969
libpng) and zlib's restrictions, see zlib.h
fukasawa e60969
fukasawa e60969
I have included a general makefile, as well as several machine and
fukasawa e60969
compiler specific ones, but you may have to modify one for your own needs.
fukasawa e60969
fukasawa e60969
You should use zlib 1.0.4 or later to run this, but it MAY work with
fukasawa e60969
versions as old as zlib 0.95.  Even so, there are bugs in older zlib
fukasawa e60969
versions which can cause the output of invalid compression streams for
fukasawa e60969
some images.  You will definitely need zlib 1.0.4 or later if you are
fukasawa e60969
taking advantage of the MS-DOS "far" structure allocation for the small
fukasawa e60969
and medium memory models.  You should also note that zlib is a
fukasawa e60969
compression library that is useful for more things than just PNG files.
fukasawa e60969
You can use zlib as a drop-in replacement for fread() and fwrite() if
fukasawa e60969
you are so inclined.
fukasawa e60969
fukasawa e60969
zlib should be available at the same place that libpng is, or at zlib.net.
fukasawa e60969
fukasawa e60969
You may also want a copy of the PNG specification.  It is available
fukasawa e60969
as an RFC, a W3C Recommendation, and an ISO/IEC Standard.  You can find
fukasawa e60969
these at http://www.libpng.org/pub/png/documents/
fukasawa e60969
fukasawa e60969
This code is currently being archived at libpng.sf.net in the
fukasawa e60969
[DOWNLOAD] area, and at ftp://ftp.simplesystems.org.  If you can't find it
fukasawa e60969
in any of those places, e-mail me, and I'll help you find it.
fukasawa e60969
fukasawa e60969
I am not a lawyer, but I believe that the Export Control Classification
fukasawa e60969
Number (ECCN) for libpng is EAR99, which means not subject to export
fukasawa e60969
controls or International Traffic in Arms Regulations (ITAR) because it
fukasawa e60969
is open source, publicly available software, that does not contain any
fukasawa e60969
encryption software.  See the EAR, paragraphs 734.3(b)(3) and 734.7(b).
fukasawa e60969
fukasawa e60969
If you have any code changes, requests, problems, etc., please e-mail
fukasawa e60969
them to me.  Also, I'd appreciate any make files or project files,
fukasawa e60969
and any modifications you needed to make to get libpng to compile,
fukasawa e60969
along with a #define variable to tell what compiler/system you are on.
fukasawa e60969
If you needed to add transformations to libpng, or wish libpng would
fukasawa e60969
provide the image in a different way, drop me a note (and code, if
fukasawa e60969
possible), so I can consider supporting the transformation.
fukasawa e60969
Finally, if you get any warning messages when compiling libpng
fukasawa e60969
(note: not zlib), and they are easy to fix, I'd appreciate the
fukasawa e60969
fix.  Please mention "libpng" somewhere in the subject line.  Thanks.
fukasawa e60969
fukasawa e60969
This release was created and will be supported by myself (of course
fukasawa e60969
based in a large way on Guy's and Andreas' earlier work), and the PNG
fukasawa e60969
development group.
fukasawa e60969
fukasawa e60969
Send comments/corrections/commendations to png-mng-implement at
fukasawa e60969
lists.sourceforge.net (subscription required; visit
fukasawa e60969
https://lists.sourceforge.net/lists/listinfo/png-mng-implement
fukasawa e60969
to subscribe) or to glennrp at users.sourceforge.net
fukasawa e60969
fukasawa e60969
You can't reach Guy, the original libpng author, at the addresses
fukasawa e60969
given in previous versions of this document.  He and Andreas will
fukasawa e60969
read mail addressed to the png-implement list, however.
fukasawa e60969
fukasawa e60969
Please do not send general questions about PNG.  Send them to
fukasawa e60969
png-mng-misc at lists.sf.net (subscription required; visit
fukasawa e60969
https://lists.sourceforge.net/lists/listinfo/png-mng-misc to
fukasawa e60969
subscribe).  If you have a question about something
fukasawa e60969
in the PNG specification that is related to using libpng, send it
fukasawa e60969
to me.  Send me any questions that start with "I was using libpng,
fukasawa e60969
and ...".  If in doubt, send questions to me.  I'll bounce them
fukasawa e60969
to others, if necessary.
fukasawa e60969
fukasawa e60969
Please do not send suggestions on how to change PNG.  We have
fukasawa e60969
been discussing PNG for twenty years now, and it is official and
fukasawa e60969
finished.  If you have suggestions for libpng, however, I'll
fukasawa e60969
gladly listen.  Even if your suggestion is not used immediately,
fukasawa e60969
it may be used later.
fukasawa e60969
fukasawa e60969
Files in this distribution:
fukasawa e60969
fukasawa e60969
      ANNOUNCE      =>  Announcement of this version, with recent changes
fukasawa e60969
      CHANGES       =>  Description of changes between libpng versions
fukasawa e60969
      KNOWNBUG      =>  List of known bugs and deficiencies
fukasawa e60969
      LICENSE       =>  License to use and redistribute libpng
fukasawa e60969
      README        =>  This file
fukasawa e60969
      TODO          =>  Things not implemented in the current library
fukasawa e60969
      Y2KINFO       =>  Statement of Y2K compliance
fukasawa e60969
      example.c     =>  Example code for using libpng functions
fukasawa e60969
      libpng.3      =>  manual page for libpng (includes libpng-manual.txt)
fukasawa e60969
      libpng-manual.txt  =>  Description of libpng and its functions
fukasawa e60969
      libpngpf.3    =>  manual page for libpng's private functions
fukasawa e60969
      png.5         =>  manual page for the PNG format
fukasawa e60969
      png.c         =>  Basic interface functions common to library
fukasawa e60969
      png.h         =>  Library function and interface declarations (public)
fukasawa e60969
      pngpriv.h     =>  Library function and interface declarations (private)
fukasawa e60969
      pngconf.h     =>  System specific library configuration (public)
fukasawa e60969
      pngstruct.h   =>  png_struct declaration (private)
fukasawa e60969
      pnginfo.h     =>  png_info struct declaration (private)
fukasawa e60969
      pngdebug.h    =>  debugging macros (private)
fukasawa e60969
      pngerror.c    =>  Error/warning message I/O functions
fukasawa e60969
      pngget.c      =>  Functions for retrieving info from struct
fukasawa e60969
      pngmem.c      =>  Memory handling functions
fukasawa e60969
      pngbar.png    =>  PNG logo, 88x31
fukasawa e60969
      pngnow.png    =>  PNG logo, 98x31
fukasawa e60969
      pngpread.c    =>  Progressive reading functions
fukasawa e60969
      pngread.c     =>  Read data/helper high-level functions
fukasawa e60969
      pngrio.c      =>  Lowest-level data read I/O functions
fukasawa e60969
      pngrtran.c    =>  Read data transformation functions
fukasawa e60969
      pngrutil.c    =>  Read data utility functions
fukasawa e60969
      pngset.c      =>  Functions for storing data into the info_struct
fukasawa e60969
      pngtest.c     =>  Library test program
fukasawa e60969
      pngtest.png   =>  Library test sample image
fukasawa e60969
      pngtrans.c    =>  Common data transformation functions
fukasawa e60969
      pngwio.c      =>  Lowest-level write I/O functions
fukasawa e60969
      pngwrite.c    =>  High-level write functions
fukasawa e60969
      pngwtran.c    =>  Write data transformations
fukasawa e60969
      pngwutil.c    =>  Write utility functions
fukasawa e60969
      arm           =>  Contains optimized code for the ARM platform
fukasawa e60969
      contrib       =>  Contributions
fukasawa e60969
       examples         =>  Example programs
fukasawa e60969
       gregbook         =>  source code for PNG reading and writing, from
fukasawa e60969
                            Greg Roelofs' "PNG: The Definitive Guide",
fukasawa e60969
                            O'Reilly, 1999
fukasawa e60969
       libtests         =>  Test programs
fukasawa e60969
       pngminim         =>  Minimal decoder, encoder, and progressive decoder
fukasawa e60969
                            programs demonstrating use of pngusr.dfa
fukasawa e60969
       pngminus         =>  Simple pnm2png and png2pnm programs
fukasawa e60969
       pngsuite         =>  Test images
fukasawa e60969
       tools            =>  Various tools
fukasawa e60969
       visupng          =>  Contains a MSVC workspace for VisualPng
fukasawa e60969
      projects      =>  Contains project files and workspaces for
fukasawa e60969
                        building a DLL
fukasawa e60969
       owatcom          =>  Contains a WATCOM project for building libpng
fukasawa e60969
       visualc71        =>  Contains a Microsoft Visual C++ (MSVC)
fukasawa e60969
                            workspace for building libpng and zlib
fukasawa e60969
       vstudio          =>  Contains a Microsoft Visual C++ (MSVC)
fukasawa e60969
                            workspace for building libpng and zlib
fukasawa e60969
      scripts       =>  Directory containing scripts for building libpng:
fukasawa e60969
                            (see scripts/README.txt for the list of scripts)
fukasawa e60969
fukasawa e60969
Good luck, and happy coding.
fukasawa e60969
fukasawa e60969
-Glenn Randers-Pehrson (current maintainer, since 1998)
fukasawa e60969
 Internet: glennrp at users.sourceforge.net
fukasawa e60969
fukasawa e60969
-Andreas Eric Dilger (former maintainer, 1996-1997)
fukasawa e60969
 Internet: adilger at enel.ucalgary.ca
fukasawa e60969
 Web: http://www-mddsp.enel.ucalgary.ca/People/adilger/
fukasawa e60969
fukasawa e60969
-Guy Eric Schalnat (original author and former maintainer, 1995-1996)
fukasawa e60969
 (formerly of Group 42, Inc)
fukasawa e60969
 Internet: gschal at infinet.com