[libpng15] Folded some long lines; updated manual about removed macros

This commit is contained in:
Glenn Randers-Pehrson 2012-08-16 00:56:45 -05:00
parent cabfa7d6d9
commit 95ea04f925
6 changed files with 89 additions and 566 deletions

View File

@ -1,9 +1,9 @@
Libpng-manual.txt - A description on how to use and modify libpng Libpng-manual.txt - A description on how to use and modify libpng
libpng version 1.5.13beta02 - August 8, 2012 libpng version 1.5.13beta02 - August 16, 2012
Updated and distributed by Glenn Randers-Pehrson Updated and distributed by Glenn Randers-Pehrson
<glennrp at users.sourceforge.net> <glennrp at users.sourceforge.net>
Copyright (c) 1998-2011 Glenn Randers-Pehrson Copyright (c) 1998-2012 Glenn Randers-Pehrson
This document is released under the libpng license. This document is released under the libpng license.
For conditions of distribution and use, see the disclaimer For conditions of distribution and use, see the disclaimer
@ -11,9 +11,9 @@ Libpng-manual.txt - A description on how to use and modify libpng
Based on: Based on:
libpng versions 0.97, January 1998, through 1.5.13beta02 - August 8, 2012 libpng versions 0.97, January 1998, through 1.5.13beta02 - August 16, 2012
Updated and distributed by Glenn Randers-Pehrson Updated and distributed by Glenn Randers-Pehrson
Copyright (c) 1998-2011 Glenn Randers-Pehrson Copyright (c) 1998-2012 Glenn Randers-Pehrson
libpng 1.0 beta 6 version 0.96 May 28, 1997 libpng 1.0 beta 6 version 0.96 May 28, 1997
Updated and distributed by Andreas Dilger Updated and distributed by Andreas Dilger
@ -4090,8 +4090,8 @@ png_get_mmx_bitdepth_threshold(), png_get_mmx_rowbytes_threshold(),
png_set_asm_flags(), and png_mmx_supported() png_set_asm_flags(), and png_mmx_supported()
We removed the obsolete png_check_sig(), png_memcpy_check(), and We removed the obsolete png_check_sig(), png_memcpy_check(), and
png_memset_check() functions. Instead use !png_sig_cmp(), memcpy(), png_memset_check() functions. Instead use !png_sig_cmp(), png_memcpy(),
and memset(), respectively. and png_memset(), respectively.
The function png_set_gray_1_2_4_to_8() was removed. It has been The function png_set_gray_1_2_4_to_8() was removed. It has been
deprecated since libpng-1.0.18 and 1.2.9, when it was replaced with deprecated since libpng-1.0.18 and 1.2.9, when it was replaced with
@ -4173,9 +4173,12 @@ to information in zlib.h will need to add the '#include "zlib.h"'
directive. It does not matter whether it is placed prior to or after directive. It does not matter whether it is placed prior to or after
the '"#include png.h"' directive. the '"#include png.h"' directive.
We moved the png_strcpy(), png_strncpy(), png_strlen(), png_memcpy(), The png_sprintf(), png_strcpy(), and png_strncpy() macros are no longer used
png_memcmp(), png_sprintf, and png_memcpy() macros into a private and were removed.
header file (pngpriv.h) that is not accessible to applications.
We moved the png_strlen(), png_memcpy(), png_memset(), and png_memcmp()
macros into a private header file (pngpriv.h) that is not accessible to
applications.
In png_get_iCCP, the type of "profile" was changed from png_charpp In png_get_iCCP, the type of "profile" was changed from png_charpp
to png_bytepp, and in png_set_iCCP, from png_charp to png_const_bytep. to png_bytepp, and in png_set_iCCP, from png_charp to png_const_bytep.
@ -4605,7 +4608,7 @@ Other rules can be inferred by inspecting the libpng source.
XIV. Y2K Compliance in libpng XIV. Y2K Compliance in libpng
August 8, 2012 August 16, 2012
Since the PNG Development group is an ad-hoc body, we can't make Since the PNG Development group is an ad-hoc body, we can't make
an official declaration. an official declaration.

546
libpng.3

File diff suppressed because it is too large Load Diff

View File

@ -1,21 +1,11 @@
.TH LIBPNGPF 3 "August 8, 2012" .TH LIBPNGPF 3 "August 16, 2012"
.SH NAME .SH NAME
libpng \- Portable Network Graphics (PNG) Reference Library 1.5.13beta02 libpng \- Portable Network Graphics (PNG) Reference Library 1.5.13beta02
(private functions) (private functions)
.SH SYNOPSIS .SH SYNOPSIS
\fB#include \fI"pngpriv.h" \fB#include \fI"pngpriv.h"
\fI\fB \fBAs of libpng version \fP\fI1.5.1\fP\fB, this section is no longer \fP\fImaintained\fP\fB, now that the private function prototypes are hidden in pngpriv.h and not accessible to applications. Look in pngpriv.h for the prototypes and a short description of each \fIfunction.
\fBAs of libpng version \fP\fI1.5.1\fP\fB, this section is no longer \fP\fImaintained\fP\fB, now \fIthat
\fBthe private function prototypes are hidden in pngpriv.h and not \fIaccessible
\fBto applications. Look in pngpriv.h for the prototypes and a short \fIdescription
\fBof each \fIfunction.
\fI\fB
.SH DESCRIPTION .SH DESCRIPTION
The functions previously listed here are used privately by libpng The functions previously listed here are used privately by libpng

View File

@ -993,8 +993,8 @@ PNG_EXTERN void png_do_write_interlace PNGARG((png_row_infop row_info,
/* Unfilter a row: check the filter value before calling this, there is no point /* Unfilter a row: check the filter value before calling this, there is no point
* calling it for PNG_FILTER_VALUE_NONE. * calling it for PNG_FILTER_VALUE_NONE.
*/ */
PNG_EXTERN void png_read_filter_row PNGARG((png_structp pp, png_row_infop row_info, PNG_EXTERN void png_read_filter_row PNGARG((png_structp pp, png_row_infop
png_bytep row, png_const_bytep prev_row, int filter)); row_info, png_bytep row, png_const_bytep prev_row, int filter));
PNG_EXTERN void png_read_filter_row_up_neon PNGARG((png_row_infop row_info, PNG_EXTERN void png_read_filter_row_up_neon PNGARG((png_row_infop row_info,
png_bytep row, png_const_bytep prev_row)); png_bytep row, png_const_bytep prev_row));

View File

@ -3705,8 +3705,10 @@ png_do_compose(png_row_infop row_info, png_bytep row, png_structp png_ptr)
if (v == png_ptr->trans_color.gray) if (v == png_ptr->trans_color.gray)
{ {
/* Background is already in screen gamma */ /* Background is already in screen gamma */
*sp = (png_byte)((png_ptr->background.gray >> 8) & 0xff); *sp = (png_byte)((png_ptr->background.gray >> 8)
*(sp + 1) = (png_byte)(png_ptr->background.gray & 0xff); & 0xff);
*(sp + 1) = (png_byte)(png_ptr->background.gray
& 0xff);
} }
else else
@ -3729,8 +3731,10 @@ png_do_compose(png_row_infop row_info, png_bytep row, png_structp png_ptr)
if (v == png_ptr->trans_color.gray) if (v == png_ptr->trans_color.gray)
{ {
*sp = (png_byte)((png_ptr->background.gray >> 8) & 0xff); *sp = (png_byte)((png_ptr->background.gray >> 8)
*(sp + 1) = (png_byte)(png_ptr->background.gray & 0xff); & 0xff);
*(sp + 1) = (png_byte)(png_ptr->background.gray
& 0xff);
} }
} }
} }
@ -3810,9 +3814,12 @@ png_do_compose(png_row_infop row_info, png_bytep row, png_structp png_ptr)
/* Background is already in screen gamma */ /* Background is already in screen gamma */
*sp = (png_byte)((png_ptr->background.red >> 8) & 0xff); *sp = (png_byte)((png_ptr->background.red >> 8) & 0xff);
*(sp + 1) = (png_byte)(png_ptr->background.red & 0xff); *(sp + 1) = (png_byte)(png_ptr->background.red & 0xff);
*(sp + 2) = (png_byte)((png_ptr->background.green >> 8) & 0xff); *(sp + 2) = (png_byte)((png_ptr->background.green >> 8)
*(sp + 3) = (png_byte)(png_ptr->background.green & 0xff); & 0xff);
*(sp + 4) = (png_byte)((png_ptr->background.blue >> 8) & 0xff); *(sp + 3) = (png_byte)(png_ptr->background.green
& 0xff);
*(sp + 4) = (png_byte)((png_ptr->background.blue >> 8)
& 0xff);
*(sp + 5) = (png_byte)(png_ptr->background.blue & 0xff); *(sp + 5) = (png_byte)(png_ptr->background.blue & 0xff);
} }
@ -3853,9 +3860,12 @@ png_do_compose(png_row_infop row_info, png_bytep row, png_structp png_ptr)
{ {
*sp = (png_byte)((png_ptr->background.red >> 8) & 0xff); *sp = (png_byte)((png_ptr->background.red >> 8) & 0xff);
*(sp + 1) = (png_byte)(png_ptr->background.red & 0xff); *(sp + 1) = (png_byte)(png_ptr->background.red & 0xff);
*(sp + 2) = (png_byte)((png_ptr->background.green >> 8) & 0xff); *(sp + 2) = (png_byte)((png_ptr->background.green >> 8)
*(sp + 3) = (png_byte)(png_ptr->background.green & 0xff); & 0xff);
*(sp + 4) = (png_byte)((png_ptr->background.blue >> 8) & 0xff); *(sp + 3) = (png_byte)(png_ptr->background.green
& 0xff);
*(sp + 4) = (png_byte)((png_ptr->background.blue >> 8)
& 0xff);
*(sp + 5) = (png_byte)(png_ptr->background.blue & 0xff); *(sp + 5) = (png_byte)(png_ptr->background.blue & 0xff);
} }
} }
@ -3938,7 +3948,8 @@ png_do_compose(png_row_infop row_info, png_bytep row, png_structp png_ptr)
else if (a == 0) else if (a == 0)
{ {
/* Background is already in screen gamma */ /* Background is already in screen gamma */
*sp = (png_byte)((png_ptr->background.gray >> 8) & 0xff); *sp = (png_byte)((png_ptr->background.gray >> 8)
& 0xff);
*(sp + 1) = (png_byte)(png_ptr->background.gray & 0xff); *(sp + 1) = (png_byte)(png_ptr->background.gray & 0xff);
} }
@ -3968,7 +3979,8 @@ png_do_compose(png_row_infop row_info, png_bytep row, png_structp png_ptr)
if (a == 0) if (a == 0)
{ {
*sp = (png_byte)((png_ptr->background.gray >> 8) & 0xff); *sp = (png_byte)((png_ptr->background.gray >> 8)
& 0xff);
*(sp + 1) = (png_byte)(png_ptr->background.gray & 0xff); *(sp + 1) = (png_byte)(png_ptr->background.gray & 0xff);
} }
@ -4098,9 +4110,12 @@ png_do_compose(png_row_infop row_info, png_bytep row, png_structp png_ptr)
/* Background is already in screen gamma */ /* Background is already in screen gamma */
*sp = (png_byte)((png_ptr->background.red >> 8) & 0xff); *sp = (png_byte)((png_ptr->background.red >> 8) & 0xff);
*(sp + 1) = (png_byte)(png_ptr->background.red & 0xff); *(sp + 1) = (png_byte)(png_ptr->background.red & 0xff);
*(sp + 2) = (png_byte)((png_ptr->background.green >> 8) & 0xff); *(sp + 2) = (png_byte)((png_ptr->background.green >> 8)
*(sp + 3) = (png_byte)(png_ptr->background.green & 0xff); & 0xff);
*(sp + 4) = (png_byte)((png_ptr->background.blue >> 8) & 0xff); *(sp + 3) = (png_byte)(png_ptr->background.green
& 0xff);
*(sp + 4) = (png_byte)((png_ptr->background.blue >> 8)
& 0xff);
*(sp + 5) = (png_byte)(png_ptr->background.blue & 0xff); *(sp + 5) = (png_byte)(png_ptr->background.blue & 0xff);
} }
@ -4111,14 +4126,16 @@ png_do_compose(png_row_infop row_info, png_bytep row, png_structp png_ptr)
v = gamma_16_to_1[*(sp + 1) >> gamma_shift][*sp]; v = gamma_16_to_1[*(sp + 1) >> gamma_shift][*sp];
png_composite_16(w, v, a, png_ptr->background_1.red); png_composite_16(w, v, a, png_ptr->background_1.red);
if (!optimize) if (!optimize)
w = gamma_16_from_1[((w&0xff) >> gamma_shift)][w >> 8]; w = gamma_16_from_1[((w&0xff) >> gamma_shift)]
[w >> 8];
*sp = (png_byte)((w >> 8) & 0xff); *sp = (png_byte)((w >> 8) & 0xff);
*(sp + 1) = (png_byte)(w & 0xff); *(sp + 1) = (png_byte)(w & 0xff);
v = gamma_16_to_1[*(sp + 3) >> gamma_shift][*(sp + 2)]; v = gamma_16_to_1[*(sp + 3) >> gamma_shift][*(sp + 2)];
png_composite_16(w, v, a, png_ptr->background_1.green); png_composite_16(w, v, a, png_ptr->background_1.green);
if (!optimize) if (!optimize)
w = gamma_16_from_1[((w&0xff) >> gamma_shift)][w >> 8]; w = gamma_16_from_1[((w&0xff) >> gamma_shift)]
[w >> 8];
*(sp + 2) = (png_byte)((w >> 8) & 0xff); *(sp + 2) = (png_byte)((w >> 8) & 0xff);
*(sp + 3) = (png_byte)(w & 0xff); *(sp + 3) = (png_byte)(w & 0xff);
@ -4126,7 +4143,8 @@ png_do_compose(png_row_infop row_info, png_bytep row, png_structp png_ptr)
v = gamma_16_to_1[*(sp + 5) >> gamma_shift][*(sp + 4)]; v = gamma_16_to_1[*(sp + 5) >> gamma_shift][*(sp + 4)];
png_composite_16(w, v, a, png_ptr->background_1.blue); png_composite_16(w, v, a, png_ptr->background_1.blue);
if (!optimize) if (!optimize)
w = gamma_16_from_1[((w&0xff) >> gamma_shift)][w >> 8]; w = gamma_16_from_1[((w&0xff) >> gamma_shift)]
[w >> 8];
*(sp + 4) = (png_byte)((w >> 8) & 0xff); *(sp + 4) = (png_byte)((w >> 8) & 0xff);
*(sp + 5) = (png_byte)(w & 0xff); *(sp + 5) = (png_byte)(w & 0xff);
@ -4147,9 +4165,12 @@ png_do_compose(png_row_infop row_info, png_bytep row, png_structp png_ptr)
{ {
*sp = (png_byte)((png_ptr->background.red >> 8) & 0xff); *sp = (png_byte)((png_ptr->background.red >> 8) & 0xff);
*(sp + 1) = (png_byte)(png_ptr->background.red & 0xff); *(sp + 1) = (png_byte)(png_ptr->background.red & 0xff);
*(sp + 2) = (png_byte)((png_ptr->background.green >> 8) & 0xff); *(sp + 2) = (png_byte)((png_ptr->background.green >> 8)
*(sp + 3) = (png_byte)(png_ptr->background.green & 0xff); & 0xff);
*(sp + 4) = (png_byte)((png_ptr->background.blue >> 8) & 0xff); *(sp + 3) = (png_byte)(png_ptr->background.green
& 0xff);
*(sp + 4) = (png_byte)((png_ptr->background.blue >> 8)
& 0xff);
*(sp + 5) = (png_byte)(png_ptr->background.blue & 0xff); *(sp + 5) = (png_byte)(png_ptr->background.blue & 0xff);
} }

View File

@ -1370,7 +1370,8 @@ png_write_tRNS(png_structp png_ptr, png_const_bytep trans_alpha,
} }
/* Write the chunk out as it is */ /* Write the chunk out as it is */
png_write_complete_chunk(png_ptr, png_tRNS, trans_alpha, (png_size_t)num_trans); png_write_complete_chunk(png_ptr, png_tRNS, trans_alpha,
(png_size_t)num_trans);
} }
else if (color_type == PNG_COLOR_TYPE_GRAY) else if (color_type == PNG_COLOR_TYPE_GRAY)