blob: deabb5bfe7d7d9ed24c60ddf28757286330d425e [file] [log] [blame]
xNombred07bb0d2020-03-10 20:17:12 +01001README for libpng version 1.6.38.git
2====================================
The Android Open Source Project893912b2009-03-03 19:30:05 -08003
xNombred07bb0d2020-03-10 20:17:12 +01004See the note about version numbers near the top of png.h.
The Android Open Source Project893912b2009-03-03 19:30:05 -08005See INSTALL for instructions on how to install libpng.
6
Chris Craikb50c2172013-07-29 15:28:30 -07007Libpng comes in several distribution formats. Get libpng-*.tar.gz or
xNombred07bb0d2020-03-10 20:17:12 +01008libpng-*.tar.xz or if you want UNIX-style line endings in the text
9files, or lpng*.7z or lpng*.zip if you want DOS-style line endings.
The Android Open Source Project893912b2009-03-03 19:30:05 -080010
11Version 0.89 was the first official release of libpng. Don't let the
xNombred07bb0d2020-03-10 20:17:12 +010012fact that it's the first release fool you. The libpng library has been
13in extensive use and testing since mid-1995. By late 1997 it had
The Android Open Source Project893912b2009-03-03 19:30:05 -080014finally gotten to the stage where there hadn't been significant
15changes to the API in some time, and people have a bad feeling about
16libraries with versions < 1.0. Version 1.0.0 was released in
17March 1998.
18
19****
20Note that some of the changes to the png_info structure render this
21version of the library binary incompatible with libpng-0.89 or
22earlier versions if you are using a shared library. The type of the
23"filler" parameter for png_set_filler() has changed from png_byte to
24png_uint_32, which will affect shared-library applications that use
25this function.
26
Leon Scroggins III3cc83ac2017-10-06 11:02:56 -040027To avoid problems with changes to the internals of the png info_struct,
The Android Open Source Project893912b2009-03-03 19:30:05 -080028new APIs have been made available in 0.95 to avoid direct application
29access to info_ptr. These functions are the png_set_<chunk> and
30png_get_<chunk> functions. These functions should be used when
31accessing/storing the info_struct data, rather than manipulating it
32directly, to avoid such problems in the future.
33
Matt Sarett9b1fe632015-11-25 10:21:17 -050034It is important to note that the APIs did not make current programs
The Android Open Source Project893912b2009-03-03 19:30:05 -080035that access the info struct directly incompatible with the new
Matt Sarett9b1fe632015-11-25 10:21:17 -050036library, through libpng-1.2.x. In libpng-1.4.x, which was meant to
37be a transitional release, members of the png_struct and the
38info_struct can still be accessed, but the compiler will issue a
39warning about deprecated usage. Since libpng-1.5.0, direct access
40to these structs is not allowed, and the definitions of the structs
41reside in private pngstruct.h and pnginfo.h header files that are not
42accessible to applications. It is strongly suggested that new
43programs use the new APIs (as shown in example.c and pngtest.c), and
44older programs be converted to the new format, to facilitate upgrades
45in the future.
The Android Open Source Project893912b2009-03-03 19:30:05 -080046****
47
48Additions since 0.90 include the ability to compile libpng as a
49Windows DLL, and new APIs for accessing data in the info struct.
50Experimental functions include the ability to set weighting and cost
51factors for row filter selection, direct reads of integers from buffers
52on big-endian processors that support misaligned data access, faster
53methods of doing alpha composition, and more accurate 16->8 bit color
54conversion.
55
56The additions since 0.89 include the ability to read from a PNG stream
57which has had some (or all) of the signature bytes read by the calling
58application. This also allows the reading of embedded PNG streams that
59do not have the PNG file signature. As well, it is now possible to set
60the library action on the detection of chunk CRC errors. It is possible
61to set different actions based on whether the CRC error occurred in a
62critical or an ancillary chunk.
63
xNombred07bb0d2020-03-10 20:17:12 +010064For a detailed description on using libpng, read libpng-manual.txt.
65For examples of libpng in a program, see example.c and pngtest.c. For
66usage information and restrictions (what little they are) on libpng,
67see png.h. For a description on using zlib (the compression library
68used by libpng) and zlib's restrictions, see zlib.h
The Android Open Source Project893912b2009-03-03 19:30:05 -080069
70I have included a general makefile, as well as several machine and
xNombred07bb0d2020-03-10 20:17:12 +010071compiler specific ones, but you may have to modify one for your own
72needs.
The Android Open Source Project893912b2009-03-03 19:30:05 -080073
74You should use zlib 1.0.4 or later to run this, but it MAY work with
75versions as old as zlib 0.95. Even so, there are bugs in older zlib
76versions which can cause the output of invalid compression streams for
xNombred07bb0d2020-03-10 20:17:12 +010077some images.
The Android Open Source Project893912b2009-03-03 19:30:05 -080078
xNombred07bb0d2020-03-10 20:17:12 +010079You should also note that zlib is a compression library that is useful
80for more things than just PNG files. You can use zlib as a drop-in
81replacement for fread() and fwrite(), if you are so inclined.
82
83zlib should be available at the same place that libpng is, or at
84https://zlib.net.
The Android Open Source Project893912b2009-03-03 19:30:05 -080085
86You may also want a copy of the PNG specification. It is available
87as an RFC, a W3C Recommendation, and an ISO/IEC Standard. You can find
Leon Scroggins III3cc83ac2017-10-06 11:02:56 -040088these at http://www.libpng.org/pub/png/pngdocs.html .
The Android Open Source Project893912b2009-03-03 19:30:05 -080089
Leon Scroggins III3cc83ac2017-10-06 11:02:56 -040090This code is currently being archived at libpng.sourceforge.io in the
xNombred07bb0d2020-03-10 20:17:12 +010091[DOWNLOAD] area, and at http://libpng.download/src .
The Android Open Source Project893912b2009-03-03 19:30:05 -080092
xNombred07bb0d2020-03-10 20:17:12 +010093This release, based in a large way on Glenn's, Guy's and Andreas'
94earlier work, was created and will be supported by myself and the PNG
Patrick Scott5f6bd842010-06-28 16:55:16 -040095development group.
The Android Open Source Project893912b2009-03-03 19:30:05 -080096
Chris Craikb50c2172013-07-29 15:28:30 -070097Send comments/corrections/commendations to png-mng-implement at
98lists.sourceforge.net (subscription required; visit
The Android Open Source Project893912b2009-03-03 19:30:05 -080099https://lists.sourceforge.net/lists/listinfo/png-mng-implement
xNombred07bb0d2020-03-10 20:17:12 +0100100to subscribe).
The Android Open Source Project893912b2009-03-03 19:30:05 -0800101
xNombred07bb0d2020-03-10 20:17:12 +0100102Send general questions about the PNG specification to png-mng-misc
103at lists.sourceforge.net (subscription required; visit
Patrick Scott5f6bd842010-06-28 16:55:16 -0400104https://lists.sourceforge.net/lists/listinfo/png-mng-misc to
xNombred07bb0d2020-03-10 20:17:12 +0100105subscribe).
The Android Open Source Project893912b2009-03-03 19:30:05 -0800106
107Files in this distribution:
108
109 ANNOUNCE => Announcement of this version, with recent changes
xNombred07bb0d2020-03-10 20:17:12 +0100110 AUTHORS => List of contributing authors
The Android Open Source Project893912b2009-03-03 19:30:05 -0800111 CHANGES => Description of changes between libpng versions
112 KNOWNBUG => List of known bugs and deficiencies
113 LICENSE => License to use and redistribute libpng
114 README => This file
115 TODO => Things not implemented in the current library
xNombred07bb0d2020-03-10 20:17:12 +0100116 TRADEMARK => Trademark information
The Android Open Source Project893912b2009-03-03 19:30:05 -0800117 example.c => Example code for using libpng functions
Chris Craikb50c2172013-07-29 15:28:30 -0700118 libpng.3 => manual page for libpng (includes libpng-manual.txt)
119 libpng-manual.txt => Description of libpng and its functions
The Android Open Source Project893912b2009-03-03 19:30:05 -0800120 libpngpf.3 => manual page for libpng's private functions
121 png.5 => manual page for the PNG format
122 png.c => Basic interface functions common to library
Chris Craikb50c2172013-07-29 15:28:30 -0700123 png.h => Library function and interface declarations (public)
124 pngpriv.h => Library function and interface declarations (private)
125 pngconf.h => System specific library configuration (public)
126 pngstruct.h => png_struct declaration (private)
127 pnginfo.h => png_info struct declaration (private)
128 pngdebug.h => debugging macros (private)
The Android Open Source Project893912b2009-03-03 19:30:05 -0800129 pngerror.c => Error/warning message I/O functions
130 pngget.c => Functions for retrieving info from struct
131 pngmem.c => Memory handling functions
132 pngbar.png => PNG logo, 88x31
133 pngnow.png => PNG logo, 98x31
134 pngpread.c => Progressive reading functions
135 pngread.c => Read data/helper high-level functions
136 pngrio.c => Lowest-level data read I/O functions
137 pngrtran.c => Read data transformation functions
138 pngrutil.c => Read data utility functions
139 pngset.c => Functions for storing data into the info_struct
140 pngtest.c => Library test program
141 pngtest.png => Library test sample image
142 pngtrans.c => Common data transformation functions
143 pngwio.c => Lowest-level write I/O functions
144 pngwrite.c => High-level write functions
145 pngwtran.c => Write data transformations
146 pngwutil.c => Write utility functions
Chris Craikb50c2172013-07-29 15:28:30 -0700147 arm => Contains optimized code for the ARM platform
Leon Scroggins III3cc83ac2017-10-06 11:02:56 -0400148 powerpc => Contains optimized code for the PowerPC platform
The Android Open Source Project893912b2009-03-03 19:30:05 -0800149 contrib => Contributions
Alex Naidis7a055fd2016-10-01 12:23:07 +0200150 arm-neon => Optimized code for ARM-NEON platform
Leon Scroggins III3cc83ac2017-10-06 11:02:56 -0400151 powerpc-vsx => Optimized code for POWERPC-VSX platform
Chris Craikb50c2172013-07-29 15:28:30 -0700152 examples => Example programs
The Android Open Source Project893912b2009-03-03 19:30:05 -0800153 gregbook => source code for PNG reading and writing, from
154 Greg Roelofs' "PNG: The Definitive Guide",
155 O'Reilly, 1999
Chris Craikb50c2172013-07-29 15:28:30 -0700156 libtests => Test programs
Leon Scroggins III3cc83ac2017-10-06 11:02:56 -0400157 mips-msa => Optimized code for MIPS-MSA platform
Chris Craikb50c2172013-07-29 15:28:30 -0700158 pngminim => Minimal decoder, encoder, and progressive decoder
159 programs demonstrating use of pngusr.dfa
160 pngminus => Simple pnm2png and png2pnm programs
161 pngsuite => Test images
Alex Naidis7a055fd2016-10-01 12:23:07 +0200162 testpngs
Chris Craikb50c2172013-07-29 15:28:30 -0700163 tools => Various tools
Matt Sarett9b1fe632015-11-25 10:21:17 -0500164 visupng => Contains a MSVC workspace for VisualPng
Leon Scroggins III3cc83ac2017-10-06 11:02:56 -0400165 intel => Optimized code for INTEL-SSE2 platform
166 mips => Optimized code for MIPS platform
Patrick Scott5f6bd842010-06-28 16:55:16 -0400167 projects => Contains project files and workspaces for
168 building a DLL
Chris Craikb50c2172013-07-29 15:28:30 -0700169 owatcom => Contains a WATCOM project for building libpng
170 visualc71 => Contains a Microsoft Visual C++ (MSVC)
Patrick Scott5f6bd842010-06-28 16:55:16 -0400171 workspace for building libpng and zlib
Chris Craikb50c2172013-07-29 15:28:30 -0700172 vstudio => Contains a Microsoft Visual C++ (MSVC)
173 workspace for building libpng and zlib
The Android Open Source Project893912b2009-03-03 19:30:05 -0800174 scripts => Directory containing scripts for building libpng:
Chris Craikb50c2172013-07-29 15:28:30 -0700175 (see scripts/README.txt for the list of scripts)
The Android Open Source Project893912b2009-03-03 19:30:05 -0800176
xNombred07bb0d2020-03-10 20:17:12 +0100177Good luck, and happy coding!
The Android Open Source Project893912b2009-03-03 19:30:05 -0800178
xNombred07bb0d2020-03-10 20:17:12 +0100179 * Cosmin Truta (current maintainer, since 2018)
180 * Glenn Randers-Pehrson (former maintainer, 1998-2018)
181 * Andreas Eric Dilger (former maintainer, 1996-1997)
182 * Guy Eric Schalnat (original author and former maintainer, 1995-1996)
183 (formerly of Group 42, Inc.)