README 9.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182
  1. README for libpng version 1.6.40
  2. ================================
  3. See the note about version numbers near the top of `png.h`.
  4. See `INSTALL` for instructions on how to install libpng.
  5. Libpng comes in several distribution formats. Get `libpng-*.tar.gz`
  6. or `libpng-*.tar.xz` if you want UNIX-style line endings in the text
  7. files, or `lpng*.7z` or `lpng*.zip` if you want DOS-style line endings.
  8. For a detailed description on using libpng, read `libpng-manual.txt`.
  9. For examples of libpng in a program, see `example.c` and `pngtest.c`.
  10. For usage information and restrictions (what little they are) on libpng,
  11. see `png.h`. For a description on using zlib (the compression library
  12. used by libpng) and zlib's restrictions, see `zlib.h`.
  13. You should use zlib 1.0.4 or later to run this, but it _may_ work with
  14. versions as old as zlib 0.95. Even so, there are bugs in older zlib
  15. versions which can cause the output of invalid compression streams for
  16. some images.
  17. You should also note that zlib is a compression library that is useful
  18. for more things than just PNG files. You can use zlib as a drop-in
  19. replacement for `fread()` and `fwrite()`, if you are so inclined.
  20. zlib should be available at the same place that libpng is, or at
  21. https://zlib.net .
  22. You may also want a copy of the PNG specification. It is available
  23. as an RFC, a W3C Recommendation, and an ISO/IEC Standard. You can find
  24. these at http://www.libpng.org/pub/png/pngdocs.html .
  25. This code is currently being archived at https://libpng.sourceforge.io
  26. in the download area, and at http://libpng.download/src .
  27. This release, based in a large way on Glenn's, Guy's and Andreas'
  28. earlier work, was created and will be supported by myself and the PNG
  29. development group.
  30. Send comments, corrections and commendations to `png-mng-implement`
  31. at `lists.sourceforge.net`. (Subscription is required; visit
  32. https://lists.sourceforge.net/lists/listinfo/png-mng-implement
  33. to subscribe.)
  34. Send general questions about the PNG specification to `png-mng-misc`
  35. at `lists.sourceforge.net`. (Subscription is required; visit
  36. https://lists.sourceforge.net/lists/listinfo/png-mng-misc
  37. to subscribe.)
  38. Historical notes
  39. ----------------
  40. The libpng library has been in extensive use and testing since mid-1995.
  41. Version 0.89, published a year later, was the first official release.
  42. By late 1997, it had finally gotten to the stage where there hadn't
  43. been significant changes to the API in some time, and people have a bad
  44. feeling about libraries with versions below 1.0. Version 1.0.0 was
  45. released in March 1998.
  46. Note that some of the changes to the `png_info` structure render this
  47. version of the library binary incompatible with libpng-0.89 or
  48. earlier versions if you are using a shared library. The type of the
  49. `filler` parameter for `png_set_filler()` has changed from `png_byte`
  50. to `png_uint_32`, which will affect shared-library applications that
  51. use this function.
  52. To avoid problems with changes to the internals of the `info_struct`,
  53. new APIs have been made available in 0.95 to avoid direct application
  54. access to `info_ptr`. These functions are the `png_set_<chunk>` and
  55. `png_get_<chunk>` functions. These functions should be used when
  56. accessing/storing the `info_struct` data, rather than manipulating it
  57. directly, to avoid such problems in the future.
  58. It is important to note that the APIs did not make current programs
  59. that access the info struct directly incompatible with the new
  60. library, through libpng-1.2.x. In libpng-1.4.x, which was meant to
  61. be a transitional release, members of the `png_struct` and the
  62. `info_struct` can still be accessed, but the compiler will issue a
  63. warning about deprecated usage. Since libpng-1.5.0, direct access
  64. to these structs is not allowed, and the definitions of the structs
  65. reside in private `pngstruct.h` and `pnginfo.h` header files that are
  66. not accessible to applications. It is strongly suggested that new
  67. programs use the new APIs (as shown in `example.c` and `pngtest.c`),
  68. and older programs be converted to the new format, to facilitate
  69. upgrades in the future.
  70. The additions since 0.89 include the ability to read from a PNG stream
  71. which has had some (or all) of the signature bytes read by the calling
  72. application. This also allows the reading of embedded PNG streams that
  73. do not have the PNG file signature. As well, it is now possible to set
  74. the library action on the detection of chunk CRC errors. It is possible
  75. to set different actions based on whether the CRC error occurred in a
  76. critical or an ancillary chunk.
  77. The additions since 0.90 include the ability to compile libpng as a
  78. Windows DLL, and new APIs for accessing data in the `info_struct`.
  79. Experimental functions included the ability to set weighting and cost
  80. factors for row filter selection, direct reads of integers from buffers
  81. on big-endian processors that support misaligned data access, faster
  82. methods of doing alpha composition, and more accurate 16-to-8 bit color
  83. conversion. Some of these experimental functions, such as the weighted
  84. filter heuristics, have since been removed.
  85. Files included in this distribution
  86. -----------------------------------
  87. ANNOUNCE => Announcement of this version, with recent changes
  88. AUTHORS => List of contributing authors
  89. CHANGES => Description of changes between libpng versions
  90. INSTALL => Instructions to install libpng
  91. LICENSE => License to use and redistribute libpng
  92. README => This file
  93. TODO => Things not implemented in the current library
  94. TRADEMARK => Trademark information
  95. example.c => Example code for using libpng functions
  96. libpng.3 => Manual page for libpng (includes libpng-manual.txt)
  97. libpng-manual.txt => Description of libpng and its functions
  98. libpngpf.3 => Manual page for libpng's private functions (deprecated)
  99. png.5 => Manual page for the PNG format
  100. png.c => Basic interface functions common to library
  101. png.h => Library function and interface declarations (public)
  102. pngpriv.h => Library function and interface declarations (private)
  103. pngconf.h => System specific library configuration (public)
  104. pngstruct.h => png_struct declaration (private)
  105. pnginfo.h => png_info struct declaration (private)
  106. pngdebug.h => debugging macros (private)
  107. pngerror.c => Error/warning message I/O functions
  108. pngget.c => Functions for retrieving info from struct
  109. pngmem.c => Memory handling functions
  110. pngbar.png => PNG logo, 88x31
  111. pngnow.png => PNG logo, 98x31
  112. pngpread.c => Progressive reading functions
  113. pngread.c => Read data/helper high-level functions
  114. pngrio.c => Lowest-level data read I/O functions
  115. pngrtran.c => Read data transformation functions
  116. pngrutil.c => Read data utility functions
  117. pngset.c => Functions for storing data into the info_struct
  118. pngtest.c => Library test program
  119. pngtest.png => Library test sample image
  120. pngtrans.c => Common data transformation functions
  121. pngwio.c => Lowest-level write I/O functions
  122. pngwrite.c => High-level write functions
  123. pngwtran.c => Write data transformations
  124. pngwutil.c => Write utility functions
  125. arm/ => Optimized code for the ARM platform
  126. intel/ => Optimized code for the INTEL-SSE2 platform
  127. mips/ => Optimized code for the MIPS platform
  128. powerpc/ => Optimized code for the PowerPC platform
  129. ci/ => Scripts for continuous integration
  130. contrib/ => External contributions
  131. arm-neon/ => Optimized code for the ARM-NEON platform
  132. mips-msa/ => Optimized code for the MIPS-MSA platform
  133. powerpc-vsx/ => Optimized code for the POWERPC-VSX platform
  134. examples/ => Examples of libpng usage
  135. gregbook/ => Source code for PNG reading and writing, from
  136. "PNG: The Definitive Guide" by Greg Roelofs,
  137. O'Reilly, 1999
  138. libtests/ => Test programs
  139. oss-fuzz/ => Files used by the OSS-Fuzz project for fuzz-testing
  140. libpng
  141. pngminim/ => Minimal decoder, encoder, and progressive decoder
  142. programs demonstrating the use of pngusr.dfa
  143. pngminus/ => Simple pnm2png and png2pnm programs
  144. pngsuite/ => Test images
  145. testpngs/ => Test images
  146. tools/ => Various tools
  147. visupng/ => VisualPng, a Windows viewer for PNG images
  148. projects/ => Project files and workspaces for various IDEs
  149. owatcom/ => OpenWatcom project
  150. visualc71/ => Microsoft Visual C++ 7.1 workspace
  151. vstudio/ => Microsoft Visual Studio workspace
  152. scripts/ => Scripts and makefiles for building libpng
  153. (see scripts/README.txt for the complete list)
  154. tests/ => Test scripts
  155. Good luck, and happy coding!
  156. * Cosmin Truta (current maintainer, since 2018)
  157. * Glenn Randers-Pehrson (former maintainer, 1998-2018)
  158. * Andreas Eric Dilger (former maintainer, 1996-1997)
  159. * Guy Eric Schalnat (original author and former maintainer, 1995-1996)
  160. (formerly of Group 42, Inc.)