diff --git a/ANNOUNCE b/ANNOUNCE index 4939c6be3..ef2bf4035 100644 --- a/ANNOUNCE +++ b/ANNOUNCE @@ -1,5 +1,5 @@ -Libpng 1.7.0beta52 - February 17, 2015 +Libpng 1.7.0beta52 - February 18, 2015 This is not intended to be a public release. It will be replaced within a few weeks by a public version or by another test version. @@ -722,7 +722,10 @@ Version 1.7.0beta51 [February 17, 2015] with a method that prevents overflow and does not increase cpu usage significantly. -Version 1.7.0beta52 [February 17, 2015] +Version 1.7.0beta52 [February 18, 2015] + Added information about setjmp/simplified API interaction in the + manual page and INSTALL file. Added information about using + row_pointers with a single height*width*bpp allocated block Send comments/corrections/commendations to png-mng-implement at lists.sf.net (subscription required; visit diff --git a/INSTALL b/INSTALL index 3493133ac..7eef94d3b 100644 --- a/INSTALL +++ b/INSTALL @@ -17,7 +17,7 @@ VIII. Configuring libpng for 16-bit platforms XII. Configuring for compiler xxx: XIII. Removing unwanted object code XIV. Changes to the build and configuration of libpng in libpng-1.5.x - XV. Configuring libpng for multiprocessing + XV. Setjmp/longjmp issues XVI. Other sources of information about libpng I. Simple installation @@ -362,7 +362,7 @@ $PREFIX/include directory). Do not edit pnglibconf.h after you have built libpng, because than the settings would not accurately reflect the settings that were used to build libpng. -XV. Configuring libpng for multiprocessing +XV. Setjmp/longjmp issues Libpng uses setjmp()/longjmp() for error handling. Unfortunately setjmp() is known to be not thread-safe on some platforms and we don't know of @@ -375,6 +375,11 @@ configure libpng with PNG_NO_SETJMP in your pngusr.dfa file, with in your pnglibconf.h or pngusr.h. +Starting with libpng-1.6.0, the library included a "simplified API". +This requires setjmp/longjmp, so you must either build the library +with PNG_SETJMP_SUPPORTED defined, or with PNG_SIMPLIFIED_READ_SUPPORTED +and PNG_SIMPLIFIED_WRITE_SUPPORTED undefined. + XVI. Other sources of information about libpng: Further information can be found in the README and libpng-manual.txt diff --git a/libpng-manual.txt b/libpng-manual.txt index a4b2ff32b..e94e1b4e8 100644 --- a/libpng-manual.txt +++ b/libpng-manual.txt @@ -1,6 +1,6 @@ libpng-manual.txt - A description on how to use and modify libpng - libpng version 1.7.0beta52 - February 17, 2015 + libpng version 1.7.0beta52 - February 18, 2015 Updated and distributed by Glenn Randers-Pehrson Copyright (c) 1998-2015 Glenn Randers-Pehrson @@ -11,7 +11,7 @@ libpng-manual.txt - A description on how to use and modify libpng Based on: - libpng versions 0.97, January 1998, through 1.7.0beta52 - February 17, 2015 + libpng versions 0.97, January 1998, through 1.7.0beta52 - February 18, 2015 Updated and distributed by Glenn Randers-Pehrson Copyright (c) 1998-2015 Glenn Randers-Pehrson @@ -434,6 +434,10 @@ You can #define PNG_ABORT to a function or other C code that does something more useful than abort(), as long as your function does not return. +If you do this, you cannot #define PNG_SIMPLIFIED_READ_SUPPORTED or +PNG_SIMPLIFIED_WRITE_SUPPORTED, because the simplified API requires +setjmp() support. + Now you need to set up the input code. The default for libpng is to use the C function fread(). If you use this, you will need to pass a valid FILE * in the function png_init_io(). Be sure that the file is @@ -1181,7 +1185,13 @@ row_pointers prior to calling png_read_png() with png_set_rows(png_ptr, info_ptr, &row_pointers); Alternatively you could allocate your image in one big block and define -row_pointers[i] to point into the proper places in your block. +row_pointers[i] to point into the proper places in your block. Allocate +extra memory after the last row to leave working room for reading the +entire row if you are doing reductions such as 16-to-8 or rgb-to-gray. +In the worst case, reducing 16-bit RGBA to 8-bit gray, you'd need to +allocate seven extra rows worth of memory (you don't need extra memory +for any but the last row, because for other rows the working space just +overlaps the next row(s). If you use png_set_rows(), the application is responsible for freeing row_pointers (and row_pointers[i], if they were separately allocated). @@ -5325,7 +5335,7 @@ Other rules can be inferred by inspecting the libpng source. XVII. Y2K Compliance in libpng -February 17, 2015 +February 18, 2015 Since the PNG Development group is an ad-hoc body, we can't make an official declaration. diff --git a/libpng.3 b/libpng.3 index c730a22c3..0a990e02b 100644 --- a/libpng.3 +++ b/libpng.3 @@ -1,4 +1,4 @@ -.TH LIBPNG 3 "February 17, 2015" +.TH LIBPNG 3 "February 18, 2015" .SH NAME libpng \- Portable Network Graphics (PNG) Reference Library 1.7.0beta52 .SH SYNOPSIS @@ -494,7 +494,7 @@ Following is a copy of the libpng-manual.txt file that accompanies libpng. .SH LIBPNG.TXT libpng-manual.txt - A description on how to use and modify libpng - libpng version 1.7.0beta52 - February 17, 2015 + libpng version 1.7.0beta52 - February 18, 2015 Updated and distributed by Glenn Randers-Pehrson Copyright (c) 1998-2015 Glenn Randers-Pehrson @@ -505,7 +505,7 @@ libpng-manual.txt - A description on how to use and modify libpng Based on: - libpng versions 0.97, January 1998, through 1.7.0beta52 - February 17, 2015 + libpng versions 0.97, January 1998, through 1.7.0beta52 - February 18, 2015 Updated and distributed by Glenn Randers-Pehrson Copyright (c) 1998-2015 Glenn Randers-Pehrson @@ -928,6 +928,10 @@ You can #define PNG_ABORT to a function or other C code that does something more useful than abort(), as long as your function does not return. +If you do this, you cannot #define PNG_SIMPLIFIED_READ_SUPPORTED or +PNG_SIMPLIFIED_WRITE_SUPPORTED, because the simplified API requires +setjmp() support. + Now you need to set up the input code. The default for libpng is to use the C function fread(). If you use this, you will need to pass a valid FILE * in the function png_init_io(). Be sure that the file is @@ -1675,7 +1679,13 @@ row_pointers prior to calling png_read_png() with png_set_rows(png_ptr, info_ptr, &row_pointers); Alternatively you could allocate your image in one big block and define -row_pointers[i] to point into the proper places in your block. +row_pointers[i] to point into the proper places in your block. Allocate +extra memory after the last row to leave working room for reading the +entire row if you are doing reductions such as 16-to-8 or rgb-to-gray. +In the worst case, reducing 16-bit RGBA to 8-bit gray, you'd need to +allocate seven extra rows worth of memory (you don't need extra memory +for any but the last row, because for other rows the working space just +overlaps the next row(s). If you use png_set_rows(), the application is responsible for freeing row_pointers (and row_pointers[i], if they were separately allocated). @@ -5819,7 +5829,7 @@ Other rules can be inferred by inspecting the libpng source. .SH XVII. Y2K Compliance in libpng -February 17, 2015 +February 18, 2015 Since the PNG Development group is an ad-hoc body, we can't make an official declaration. @@ -6089,7 +6099,7 @@ possible without all of you. Thanks to Frank J. T. Wojcik for helping with the documentation. -Libpng version 1.7.0beta52 - February 17, 2015: +Libpng version 1.7.0beta52 - February 18, 2015: Initially created in 1995 by Guy Eric Schalnat, then of Group 42, Inc. Currently maintained by Glenn Randers-Pehrson (glennrp at users.sourceforge.net). @@ -6112,7 +6122,7 @@ this sentence. This code is released under the libpng license. -libpng versions 1.2.6, August 15, 2004, through 1.7.0beta52, February 17, 2015, are +libpng versions 1.2.6, August 15, 2004, through 1.7.0beta52, February 18, 2015, are Copyright (c) 2004,2006-2007 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 @@ -6211,7 +6221,7 @@ certification mark of the Open Source Initiative. Glenn Randers-Pehrson glennrp at users.sourceforge.net -February 17, 2015 +February 18, 2015 .\" end of man page