ANNOUNCE 17.8 KB
Newer Older
1

2
Libpng 1.5.0 - January 6, 2011
3

4
This is a public release of libpng, intended for use in production codes.
5

6 7 8 9 10
Files available for download:

Source files with LF line endings (for Unix/Linux) and with a
"configure" script

11 12 13
   libpng-1.5.0.tar.xz (LZMA-compressed, recommended)
   libpng-1.5.0.tar.gz
   libpng-1.5.0.tar.bz2
14

15 16 17
Source files with CRLF line endings (for Windows), without the
"configure" script

18 19
   lpng150.7z  (LZMA-compressed, recommended)
   lpng150.zip
20 21 22

Other information:

23 24
   libpng-1.5.0-README.txt
   libpng-1.5.0-LICENSE.txt
25

26
Changes since the last public release (1.4.1):
27

28 29
version 1.5.0 [January 6, 2011]

30 31 32 33 34 35 36 37
  Moved declaration of png_struct into private pngstruct.h and png_info
    into pnginfo.h
  Updated configure script to use SO number 15.
  Removed PNG_DEPSTRUCT markup in pngstruct.h and pnginfo.h, and undid the
    linewrapping that it entailed.
  Revised comments in pngstruct.h and pnginfo.h and added pointers to
    the libpng license.
  Removed the cbuilder5 project, which has not been updated to 1.4.0.
38 39 40
  Changed #ifdef PNG_NO_STDIO_SUPPORTED to #ifdef PNG_NO_CONSOLE_IO_SUPPORTED
    wherever png_snprintf() is used to construct error and warning messages.
  Removed obsolete unused MMX-querying support from contrib/gregbook
41
  Noted in scripts/makefile.mingw that it expects to be run under MSYS.
42
  Added exported png_longjmp() function.
43
  Removed the AIX redefinition of jmpbuf in png.h
44
  Changed the name of png_ptr->jmpbuf to png_ptr->png_jmpbuf in pngstruct.h
45
  Removed unused gzio.c from contrib/pngminim gather and makefile scripts
46
  Removed checking for already-included setjmp.h from pngconf.h
47
  Fixed inconsistent indentations and made numerous cosmetic changes.
48
  Revised the "SEE ALSO" style of libpng.3, libpngpf.3, and png.5
49 50 51 52
  Moved "#include png.h" inside pngpriv.h and removed "#include png.h" from
    the source files, along with "#define PNG_EXPOSE_INTERNAL_STRUCTURES"
    and "#define PNG_NO_PEDANTIC_WARNINGS" (John Bowler).
  Created new pngdebug.h and moved debug definitions there.
53
  Protect pngstruct.h, pnginfo.h, and pngdebug.h from being included twice.
54
  Moved the 'config.h' support from pngconf.h to pngpriv.h
55
  Removed PNGAPI from the png_longjmp_ptr typedef.
56
  Eliminated dependence of pngtest.c on the private pngdebug.h file.
57 58 59
  Make all png_debug macros into *unterminated* statements or
    expressions (i.e. a trailing ';' must always be added) and correct
    the format statements in various png_debug messages.
60
  Removed direct access to png_ptr->io_ptr from the Windows code in pngtest.c
61 62 63
  Corrected CE and OS/2 DEF files (scripts/png*def) for symbols removed and
    added ordinal numbers to the Windows DEF file and corrected the duplicated
    ordinal numbers on CE symbols that are commented out.
64 65 66 67 68 69
  PNG_EXPORT changed to include an 'ordinal' field for DEF file generation.
    PNG_CALLBACK added to make callback definitions uniform.  PNGAPI split
    into PNGCAPI (base C form), PNGAPI (exports) and PNGCBAPI (callbacks),
    and appropriate changes made to all files.  Cygwin builds re-hinged to
    allow procedure call standard changes and to remove the need for the DEF
    file (fixes build on Cygwin).
70 71 72 73 74 75
  Enabled 'attribute' warnings that are relevant to library APIs and callbacks.
  Changed rules for generation of the various symbol files and added a new
    rule for a DEF file (which is also added to the distribution).
  Updated the symbol file generation to stop it adding spurious spaces
    to EOL (coming from preprocessor macro expansion).  Added a facility
    to join tokens in the output and rewrite *.dfn to use this.
76
  Eliminated scripts/*.def in favor of libpng.def; updated projects/visualc71
77
    and removed scripts/makefile.cygwin and makefile.mingw.
78 79 80 81
  Made PNG_BUILD_DLL safe: it can be set whenever a DLL is being built.
  Removed the include of sys/types.h - apparently unnecessary now on the
    platforms on which it happened (all but Mac OS and RISC OS).
  Moved the Mac OS test into pngpriv.h (the only place it is used.)
82 83
  Added symbols.chk target to Makefile.am to validate the symbols in png.h
    against the new DEF file scripts/symbols.def.
84
  Eliminated PNG_NO_EXTERN and PNG_ALL_EXTERN
85
  Make png_text_struct independent of PNG_iTXt_SUPPORTED, so that
86 87 88 89 90 91
    fields are initialized in all configurations.  The READ/WRITE
    macros (PNG_(READ|WRITE)_iTXt_SUPPORTED) still function as
    before to disable code to actually read or write iTXt chunks
    and iTXt_SUPPORTED can be used to detect presence of either
    read or write support (but it is probably better to check for
    the one actually required - read or write.)
92
  Combined multiple png_warning() calls for a single error.
93
  Restored the macro definition of png_check_sig().
94
  Added some "(long)" typecasts to printf calls in png_handle_cHRM().
95 96 97 98 99
  Documented the fact that png_set_dither() was disabled since libpng-1.4.0.
  Reenabled png_set_dither() but renamed it to png_set_quantize() to reflect
    more accurately what it actually does.  At the same time, renamed
    the PNG_DITHER_[RED,GREEN_BLUE]_BITS macros to
    PNG_QUANTIZE_[RED,GREEN,BLUE]_BITS.
100 101 102 103 104 105 106 107 108
  Freeze build-time only configuration in the build.
    In all prior versions of libpng most configuration options
    controlled by compiler #defines had to be repeated by the
    application code that used libpng.  This patch changes this
    so that compilation options that can only be changed at build
    time are frozen in the build.  Options that are compiler
    dependent (and those that are system dependent) are evaluated
    each time - pngconf.h holds these.  Options that can be changed
    per-file in the application are in png.h.  Frozen options are
109
    in the new installed header file pnglibconf.h (John Bowler)
110 111
  Removed the xcode project because it has not been updated to work
    with libpng-1.5.0.
112 113 114 115 116
  Moved replacements for png_error() and png_warning() from the
    contrib/pngminim project to pngerror.c, for use when warnings or
    errors are disabled via PNG_NO_WARN or PNG_NO_ERROR_TEXT, to avoid
    storing unneeded error/warning text.
  Updated contrib/pngminim project to work with the new pnglibconf.h
117
  Added some PNG_NO_* defines to contrib/pngminim/*/pngusr.h to save space.
118 119 120 121 122 123
  Added PNG_{READ,WRITE}_INT_FUNCTIONS_SUPPORTED.  This allows the functions
    to read and write ints to be disabled independently of PNG_USE_READ_MACROS,
    which allows libpng to be built with the functions even though the default
    is to use the macros - this allows applications to choose at app build
    time whether or not to use macros (previously impossible because the
    functions weren't in the default build.)
124 125 126 127 128
  Changed Windows calling convention back to __cdecl for API functions.
    For Windows/x86 platforms only:
      __stdcall is no longer needed for Visual Basic, so libpng-1.5.0 uses
      __cdecl throughout (both API functions and callbacks) on Windows/x86
      platforms.
129
  Replaced the visualc6 project with new vstudio project.
130
  Relaxed the overly-restrictive permissions of some files.
131 132
  Set PNG_NO_READ_BGR, PNG_NO_IO_STATE, and PNG_NO_TIME_RFC1123 in
    contrib/pngminim/decoder/pngusr.h to make a smaller decoder application.
133 134
  Fixed dependencies of GET_INT_32 - it does not require READ_INT_FUNCTIONS
    because it has a macro equivalent.
135
  Improved the options.awk script; added an "everything off" option.
136
  Revised contrib/pngminim to use the "everything off" option in pngusr.dfa.
137
  Corrected PNG_REMOVED macro to take five arguments.
138 139
  Corrected PNG_UNKNOWN_CHUNKS_SUPPORTED to PNG_HANDLE_AS_UNKNOWN_SUPPORTED
    in gregbook/readpng2.c
140 141 142
  Corrected protection of png_get_user_transform_ptr. The API declaration in
    png.h is removed if both READ and WRITE USER_TRANSFORM are turned off
    but was left defined in pngtrans.c
143 144 145 146
  Added logunsupported=1 to cause pnglibconf.h to document disabled options.
    This makes the installed pnglibconf.h more readable but causes no
    other change.  The intention is that users of libpng will find it
    easier to understand if an API they need is missing.
147
  Include png_reset_zstream() in png.c only when PNG_READ_SUPPORTED is defined.
148
  Removed dummy_inflate.c from contrib/pngminim/encoder
149
  Removed contrib/pngminim/*/gather.sh; gathering is now done in the makefile.
150 151 152
  Use bitwise "&" instead of arithmetic mod in pngrutil.c calculation of the
    offset of the png_ptr->rowbuf pointer into png_ptr->big_row_buf.
  Added more blank lines for readability.
153
  In pngpread.c: png_push_process_row() add check for too many rows.
154 155
  Rewrote png_process_IDAT_data to consistently treat extra data as warnings
    and handle end conditions more cleanly.
156
  Removed the now-redundant check for out-of-bounds new_row from example.c
157 158
  Revised scripts/options.awk to work on Sunos (but still doesn't work)
  Added comment to options.awk and contrib/pngminim/*/makefile to try nawk.
159
  Stop memory leak when reading a malformed sCAL chunk.
160 161 162
  Made FIXED and FLOATING options consistent in the APIs they enable and
    disable.  Corrected scripts/options.awk to handle both command line
    options and options specified in the .dfa files.
163
  Changed char *msg to PNG_CONST char *msg in pngrutil.c
164 165
  Make png_set_sRGB_gAMA_and_cHRM set values using either the fixed or
    floating point APIs, but not both.
166 167
  Changed "extern PNG_EXPORT" to "PNG_EXPORT" in png.h (Jan Nijtmans)
  Changed "extern" to "PNG_EXTERN" in pngpriv.h (except for the 'extern "C" {')
168
  Put #ifndef PNG_EXTERN, #endif around the define PNG_EXTERN in pngpriv.h
169
  Added -DNO_PNG_SNPRINTF to CFLAGS in scripts/makefile.dj2
170 171
  Moved the definition of png_snprintf() outside of the enclosing
    #ifdef blocks in pngconf.h
G
[devel]  
Glenn Randers-Pehrson 已提交
172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190
  Patches by John Bowler:
  Fixed point APIs are now supported throughout (no missing APIs).
  Internal fixed point arithmetic support exists for all internal floating
    point operations.
  sCAL validates the floating point strings it is passed.
  Safe, albeit rudimentary, Watcom support is provided by PNG_API_RULE==2
  Two new APIs exist to get the number of passes without turning on the
    PNG_INTERLACE transform and to get the number of rows in the current
    pass.
  A new test program, pngvalid.c, validates the gamma code.
  Errors in the 16 bit gamma correction (overflows) have been corrected.
  cHRM chunk testing is done consistently (previously the floating point
    API bypassed it, because the test really didn't work on FP, now the test
    is performed on the actual values to be stored in the PNG file so it
    works in the FP case too.)
  Most floating point APIs now simply call the fixed point APIs after
    converting the values to the fixed point form used in the PNG file.
  The standard headers no longer include zlib.h, which is currently only
    required for pngstruct.h and can therefore be internal.
191 192
  Revised png_get_int_32 to undo the PNG two's complement representation of
    negative numbers.
193 194
  Added a typecast in png_get_int_32() in png.h and pngrutil.h to avoid
    a compiler warning.
195
  Replaced oFFs 0,0 with oFFs -10,20 in pngtest.png
196 197 198 199 200 201 202 203
  VisualC/GCC warning fixes, VisualC build fixes
  The changes include support for function attributes in VC in addition to
    those already present in GCC - necessary because without these some
    warnings are unavoidable.  Fixes include signed/unsigned fixes in
    pngvalid and checks with gcc -Wall -Wextra -Wunused.
  VC requires function attributes on function definitions as well as
    declarations, PNG_FUNCTION has been added to enable this and the
    relevant function definitions changed.
204
  Added the sRGB and cHRM chunks to pngtest.png
205 206
  Don't try to use version-script with cygwin/mingw.
  Revised contrib/gregbook to work under cygwin/mingw.
207 208
  Made all API functions that have const arguments and constant string
    literal pointers declare them (John Bowler).
209 210 211 212
  Removed spurious tabs, shorten long lines (no source change)
    Also added scripts/chkfmt to validate the format of all the files that can
    reasonably be validated (it is suggested to run "make distclean" before
    checking, because some machine generated files have long lines.)
213
    Reformatted the CHANGES file to be more consistent throughout.
214 215 216
  Made changes to address various issues identified by GCC, mostly
    signed/unsigned and shortening problems on assignment but also a few
    difficult to optimize (for GCC) loops.
217
  Use cexcept.h in pngvalid.c.
218 219 220 221 222
  Updated CMakeLists.txt to use CMAKE_INSTALL_LIBDIR variable; useful for
    installing libpng in /usr/lib64 (Funda Wang).
  Revised CMakeLists.txt to put the man pages in share/man/man* not man/man*
  Revised CMakeLists.txt to make symlinks instead of copies when installing.
  Changed PNG_LIB_NAME from pngNN to libpngNN in CMakeLists.txt (Philip Lowman)
223
  Implemented memory checks within pngvalid
224
  Reformatted/rearranged pngvalid.c to assist use of progressive reader.
225
  Check interlaced images in pngvalid
226
  Clarified pngusr.h comments in pnglibconf.dfa
227
  Simplified the pngvalid error-handling code now that cexcept.h is in place.
228
  Implemented progressive reader in pngvalid.c for standard tests
229
  Implemented progressive read in pngvalid.c gamma tests
230
  Turn on progressive reader in pngvalid.c by default and tidy code.
231 232 233 234 235
  Added an explicit make step to projects/vstudio for pnglibconf.h
    Also corrected zlib.vcxproj into which Visual Studio had introduced
    what it calls an "authoring error".  The change to make pnglibconf.h
    simply copies the file; in the future it may actually generate the
    file from scripts/pnglibconf.dfa as the other build systems do.
236
  Changed pngvalid to work when floating point APIs are disabled
237
  Renamed the prebuilt scripts/pnglibconf.h to scripts/pnglibconf.h.prebuilt
238
  Supply default values for PNG_USER_PRIVATEBUILD and PNG_USER_DLLFNAME_POSTFIX
239
    in pngpriv.h in case the user neglected to define them in their pngusr.h
240
  Added new private header files to libpng_sources in CMakeLists.txt
241
  Added PNG_READ_16BIT, PNG_WRITE_16BIT, and PNG_16BIT options.
242
  Added reference to scripts/pnglibconf.h.prebuilt in the visualc71 project.
243 244
  Fixed a number of problems with 64-bit compilation reported by Visual
    Studio 2010 (John Bowler).
245 246
  Revised autogen.sh to recognize and use $AUTOCONF, $AUTOMAKE, $AUTOHEADER,
    $AUTOPOINT, $ACLOCAL and $LIBTOOLIZE
247
  Removed unused mkinstalldirs and revised Makefile.in accorgingly.
248
  Added some "(unsigned long)" typecasts in printf statements in pngvalid.c.
249
  Suppressed a compiler warning in png_handle_sPLT().
250
  Check for out-of-range text compression mode in png_set_text().
251 252
  Changed many embedded dates to "(PENDING RELEASE) in beta releases (and
    future rc releases) to minimize the difference between releases.
253 254
  Updated INSTALL to mention using "make maintainer-clean" and to remove
    obsolete statement about a custom ltmain.sh
255 256
  Disabled "color-tests" by default in Makefile.am so it will work with
    automake versions earlier than 1.11.1
257 258
  Use document name "libpng-manual.txt" instead of "libpng-<version>.txt"
    to simplify version differences.
259
  Removed obsolete remarks about setjmp handling from INSTALL.
260 261
  Revised and renamed the typedef in png.h and png.c that was designed
    to catch library and header mismatch.
262
  Require 48 bytes, not 64 bytes, for big_row_buf in overflow checks.
263
  Used a consistent structure for the pngget.c functions.
264 265 266 267 268
  Revised png_get_uint_32, png_get_int_32, png_get_uint_16 (Cosmin)
  Moved reading of file signature into png_read_sig (Cosmin)
  Fixed atomicity of chunk header serialization (Cosmin)
  Added test for io_state in pngtest.c (Cosmin)
  Added "#!/bin/sh" at the top of contrib/pngminim/*/gather.sh scripts.
269 270 271 272 273 274 275 276
  Changes to remove gcc warnings (John Bowler)
    Certain optional gcc warning flags resulted in warnings in libpng code.
    With these changes only -Wconversion and -Wcast-qual cannot be turned on.
    Changes are trivial rearrangements of code.  -Wconversion is not possible
    for pngrutil.c (because of the widespread use of += et al on variables
    smaller than (int) or (unsigned int)) and -Wcast-qual is not possible
    with pngwio.c and pngwutil.c because the 'write' callback and zlib
    compression both fail to declare their input buffers with 'const'.
277
  Added the private PNG_UNUSED() macro definition in pngpriv.h.
G
[devel]  
Glenn Randers-Pehrson 已提交
278
  Added some commentary about PNG_EXPORT in png.h and pngconf.h
279 280
  Revised PNG_EXPORT() macro and added PNG_EXPORTA() macro, with the
    objective of simplifying and improving the cosmetic appearance of png.h.
281
  Fixed some incorrect "=" macro names in pnglibconf.dfa
282
  Included documentation of changes in 1.5.0 from 1.4.x in libpng-manual.txt
283 284
  Documented the pngvalid gamma error summary with additional comments and
    print statements.
285 286 287
  Improved missing symbol handling in checksym.awk; symbols missing in both
    the old and new files can now be optionally ignored, treated as errors
    or warnings.
288
  Removed references to pngvcrd.c and pnggccrd.c from the vstudio project.
289
  Updated "libpng14" to "libpng15" in the visualc71 project.
290
  Enabled the strip16 tests in pngvalid.
291 292
  Don't display test results (except PASS/FAIL) when running "make test".
    Instead put them in pngtest-log.txt
293
  Updated the prebuilt configuration files to autoconf version 2.68
294
  Fixed interlace image handling and add test cases (John Bowler)
295 296
  Fixed the clean rule in Makefile.am to remove pngtest-log.txt
  Made minor changes to work around warnings in gcc 3.4
297
  Eliminated references to the scripts/*.def files in project/visualc71.
298
  Eliminated scripts/*.def and revised Makefile.am accordingly
299 300
  Fixed bug in background transformation handling in pngrtran.c (it was
    looking for the flag in png_ptr->transformations instead of in
301 302
    png_ptr->flags) (David Raymond).
  Fixed typo in a comment in CMakeLists.txt (libpng14 => libpng15) (Cosmin)
303
  Added "--with-zlib-prefix=<string>" to configure.ac
304

305
Send comments/corrections/commendations to png-mng-implement at lists.sf.net
306
(subscription required; visit
307 308
https://lists.sourceforge.net/lists/listinfo/png-mng-implement
to subscribe) or to glennrp at users.sourceforge.net
309

310
Glenn R-P