[libpng17] Fixed some typos in comments; updated manual.

This commit is contained in:
Glenn Randers-Pehrson 2012-12-15 17:06:43 -06:00
parent 0cf9c7d63d
commit bbabd977d1
9 changed files with 61 additions and 43 deletions

View File

@ -41,7 +41,7 @@ Version 1.7.0alpha01 [December 15, 2012]
3) In a number of cases the code to access the 16-bit table did not round;
it did a simple shift, which was wrong and made the side effects of (2)
even worse.
The new gamma code does not have the 16-to-8 problem at the cost of slighly
The new gamma code does not have the 16-to-8 problem at the cost of slightly
more calculations and the algorithm used to minimize the number of
calculations has been extended to all the 16-bit tables; it has advantages
for any significant gamma correction.
@ -65,6 +65,8 @@ Version 1.7.0alpha02 [December 15, 2012]
Removed functions that were deprecated in libpng-1.6.0:
png_reset_zstream(), png_info_init_3(), and png_data_freer() and its
associated flags.
Removed some duplicated lines from contrib/tools/scale.c and png.c.
Changed some instances of png_warning() to png_app_error().
Send comments/corrections/commendations to png-mng-implement at lists.sf.net
(subscription required; visit

View File

@ -4326,7 +4326,7 @@ Version 1.7.0alpha01 [December 15, 2012]
3) In a number of cases the code to access the 16-bit table did not round;
it did a simple shift, which was wrong and made the side effects of (2)
even worse.
The new gamma code does not have the 16-to-8 problem at the cost of slighly
The new gamma code does not have the 16-to-8 problem at the cost of slightly
more calculations and the algorithm used to minimize the number of
calculations has been extended to all the 16-bit tables; it has advantages
for any significant gamma correction.
@ -4350,6 +4350,8 @@ Version 1.7.0alpha02 [December 15, 2012]
Removed functions that were deprecated in libpng-1.6.0:
png_reset_zstream(), png_info_init_3(), and png_data_freer() and its
associated flags.
Removed some duplicated lines from contrib/tools/scale.c and png.c.
Changed some instances of png_warning() to png_app_error().
Send comments/corrections/commendations to png-mng-implement at lists.sf.net
(subscription required; visit

View File

@ -1873,7 +1873,7 @@ typedef struct png_modifier
/* Run the odd-sized image and interlace read/write tests? */
unsigned int test_size :1;
/* Run tests on reading with a combiniation of transforms, */
/* Run tests on reading with a combination of transforms, */
unsigned int test_transform :1;
/* When to use the use_input_precision option, this controls the gamma
@ -6638,7 +6638,7 @@ image_transform_png_set_rgb_to_gray_ini(PNG_CONST image_transform *this,
*
* Each component of which is +/-1/65535 from the gamma_to_1 table
* lookup, resulting in a base error of +/-6. The gamma_from_1
* convertion adds another +/-2 in the 16-bit case and
* conversion adds another +/-2 in the 16-bit case and
* +/-(1<<(15-PNG_MAX_GAMMA_8)) in the 8-bit case.
*/
that->pm->limit += pow(
@ -6964,7 +6964,7 @@ image_transform_png_set_rgb_to_gray_mod(PNG_CONST image_transform *this,
else if (data.gamma == 1)
{
/* There is no need to do the convertions to and from linear space,
/* There is no need to do the conversions to and from linear space,
* so the calculation should be a lot more accurate. There is a
* built in 1/32768 error in the coefficients because they only have
* 15 bits and are adjusted to make sure they add up to 32768, so

View File

@ -42,10 +42,11 @@ libpng-manual.txt - A description on how to use and modify libpng
X. Changes to Libpng from version 1.0.x/1.2.x to 1.4.x
XI. Changes to Libpng from version 1.4.x to 1.5.x
XII. Changes to Libpng from version 1.5.x to 1.6.x
XIII. Detecting libpng
XIV. Source code repository
XV. Coding style
XVI. Y2K Compliance in libpng
XIII. Changes to Libpng from version 1.6.x to 1.7.x
XIV. Detecting libpng
XV. Source code repository
XVI. Coding style
XVII. Y2K Compliance in libpng
I. Introduction
@ -4965,7 +4966,18 @@ This adds more correct option control of the unknown handling, corrects
a pre-existing bug where the per-chunk 'keep' setting is ignored, and makes
it possible to skip IDAT chunks in the sequential reader.
XIII. Detecting libpng
XIII. Changes to Libpng from version 1.6.x to 1.7.x
Some functions that were deprecated in libpng-1.6.0 were removed:
png_reset_zstream(),
png_info_init_3(),
and png_data_freer() and its associated flags.
The 8-bit compose and rgb_to_grayscale operatons were made more accurate.
While these did not introduce API incompatibility, there may be differences
in unit test results.
XIV. Detecting libpng
The png_get_io_ptr() function has been present since libpng-0.88, has never
changed, and is unaffected by conditional compilation macros. It is the
@ -4998,7 +5010,7 @@ simple verbal discriptions of bug fixes, reported either to the
SourceForge bug tracker, to the png-mng-implement at lists.sf.net
mailing list, or directly to glennrp.
XV. Coding style
XVI. Coding style
Our coding style is similar to the "Allman" style, with curly
braces on separate lines:
@ -5124,7 +5136,7 @@ Lines do not exceed 80 characters.
Other rules can be inferred by inspecting the libpng source.
XVI. Y2K Compliance in libpng
XVII. Y2K Compliance in libpng
December 15, 2012

View File

@ -1027,10 +1027,11 @@ libpng-manual.txt - A description on how to use and modify libpng
X. Changes to Libpng from version 1.0.x/1.2.x to 1.4.x
XI. Changes to Libpng from version 1.4.x to 1.5.x
XII. Changes to Libpng from version 1.5.x to 1.6.x
XIII. Detecting libpng
XIV. Source code repository
XV. Coding style
XVI. Y2K Compliance in libpng
XIII. Changes to Libpng from version 1.6.x to 1.7.x
XIV. Detecting libpng
XV. Source code repository
XVI. Coding style
XVII. Y2K Compliance in libpng
.SH I. Introduction
@ -5951,7 +5952,18 @@ This adds more correct option control of the unknown handling, corrects
a pre-existing bug where the per-chunk 'keep' setting is ignored, and makes
it possible to skip IDAT chunks in the sequential reader.
.SH XIII. Detecting libpng
.SH XIII. Changes to Libpng from version 1.6.x to 1.7.x
Some functions that were deprecated in libpng-1.6.0 were removed:
png_reset_zstream(),
png_info_init_3(),
and png_data_freer() and its associated flags.
The 8-bit compose and rgb_to_grayscale operatons were made more accurate.
While these did not introduce API incompatibility, there may be differences
in unit test results.
.SH XIV. Detecting libpng
The png_get_io_ptr() function has been present since libpng-0.88, has never
changed, and is unaffected by conditional compilation macros. It is the
@ -5984,7 +5996,7 @@ simple verbal discriptions of bug fixes, reported either to the
SourceForge bug tracker, to the png-mng-implement at lists.sf.net
mailing list, or directly to glennrp.
.SH XV. Coding style
.SH XVI. Coding style
Our coding style is similar to the "Allman" style, with curly
braces on separate lines:
@ -6110,7 +6122,7 @@ Lines do not exceed 80 characters.
Other rules can be inferred by inspecting the libpng source.
.SH XVI. Y2K Compliance in libpng
.SH XVII. Y2K Compliance in libpng
December 15, 2012

30
png.h
View File

@ -1055,8 +1055,10 @@ PNG_EXPORTA(9, void, png_longjmp, (png_const_structrp png_ptr, int val),
PNG_NORETURN);
#ifdef PNG_READ_SUPPORTED
/* Reset the compression stream */
PNG_EXPORTA(10, int, png_reset_zstream, (png_structrp png_ptr), PNG_DEPRECATED);
/* Reset the compression stream
* Removed from libpng-1.7.0
*/
PNG_REMOVED(10, int, png_reset_zstream, (png_structrp png_ptr), PNG_DEPRECATED);
#endif
/* New functions added in libpng-1.0.2 (not enabled by default until 1.2.0) */
@ -1095,11 +1097,9 @@ PNG_EXPORT(17, void, png_write_chunk_end, (png_structrp png_ptr));
PNG_EXPORTA(18, png_infop, png_create_info_struct, (png_const_structrp png_ptr),
PNG_ALLOCATED);
/* DEPRECATED: this function allowed init structures to be created using the
* default allocation method (typically malloc). Use is deprecated in 1.6.0 and
* the API will be removed in the future.
*/
PNG_EXPORTA(19, void, png_info_init_3, (png_infopp info_ptr,
/* Removed from libpng-1.7.0 */
PNG_REMOVED(19, void, png_info_init_3, (png_infopp info_ptr,
png_size_t png_info_struct_size), PNG_DEPRECATED);
/* Writes all the PNG information before the image. */
@ -1117,7 +1117,7 @@ PNG_EXPORT(22, void, png_read_info,
#ifdef PNG_TIME_RFC1123_SUPPORTED
/* Convert to a US string format: there is no localization support in this
* routine. The original implementation used a 29 character buffer in
* png_struct, this has been removed.
* png_struct; this was removed from libpng-1.7.0
*/
PNG_REMOVED(23, png_const_charp, png_convert_to_rfc1123, (png_structrp png_ptr,
png_const_timep ptime),PNG_DEPRECATED)
@ -1927,20 +1927,10 @@ PNG_EXPORT(97, void, png_free, (png_const_structrp png_ptr, png_voidp ptr));
PNG_EXPORT(98, void, png_free_data, (png_const_structrp png_ptr,
png_inforp info_ptr, png_uint_32 free_me, int num));
/* Reassign responsibility for freeing existing data, whether allocated
* by libpng or by the application; this works on the png_info structure passed
* in, it does not change the state for other png_info structures.
*
* It is unlikely that this function works correctly as of 1.6.0 and using it
* may result either in memory leaks or double free of allocated data.
*/
PNG_EXPORTA(99, void, png_data_freer, (png_const_structrp png_ptr,
/* Removed from libpng-1.7.0 */
PNG_REMOVED(99, void, png_data_freer, (png_const_structrp png_ptr,
png_inforp info_ptr, int freer, png_uint_32 mask), PNG_DEPRECATED);
/* Assignments for png_data_freer */
#define PNG_DESTROY_WILL_FREE_DATA 1
#define PNG_SET_WILL_FREE_DATA 1
#define PNG_USER_WILL_FREE_DATA 2
/* Flags for png_ptr->free_me and info_ptr->free_me */
#define PNG_FREE_HIST 0x0008
#define PNG_FREE_ICCP 0x0010

View File

@ -1225,7 +1225,7 @@ png_init_background_transformations(png_structrp png_ptr)
bit_depth = 16;
}
/* Now make the background have the correct format, this involves reading the
/* Now make the background have the correct format. This involves reading the
* correct fields from png_ptr->background, adjusting the bit depth of the
* result and potentially gamma correcting the value then calculating the
* png_ptr->background_1 values too.
@ -1570,7 +1570,7 @@ png_init_read_transformations(png_structrp png_ptr)
png_init_rgb_transformations(png_ptr);
#ifdef PNG_READ_BACKGROUND_SUPPORTED
/* Set up the background information if required, it is only used if
/* Set up the background information if required. It is only used if
* PNG_COMPOSE is specified.
*/
if (png_ptr->transformations & PNG_COMPOSE)

View File

@ -3873,7 +3873,7 @@ png_init_filter_functions(png_structrp pp)
* the filter is the first transformation performed on the row data. It is
* performed in place, therefore an implementation can be selected based on
* the image pixel format. If the implementation depends on image width then
* take care to ensure that it works corretly if the image is interlaced -
* take care to ensure that it works correctly if the image is interlaced -
* interlacing causes the actual row width to vary.
*/
{

View File

@ -48,7 +48,7 @@
/* zlib.h declares a magic type 'uInt' that limits the amount of data that zlib
* can handle at once. This type need be no larger than 16 bits (so maximum of
* 65535), this define allows us to discover how big it is, but limited by the
* maximum for size_t. The value can be overriden in a library build (pngusr.h,
* maximum for size_t. The value can be overridden in a library build (pngusr.h,
* or set it in CPPFLAGS) and it works to set it to a considerably lower value
* (e.g. 255 works). A lower value may help memory usage (slightly) and may
* even improve performance on some systems (and degrade it on others.)