mirror of
https://git.code.sf.net/p/libpng/code.git
synced 2025-07-10 18:04:09 +02:00
[libpng15] Folded some long lines; updated manual about removed macros
This commit is contained in:
parent
cabfa7d6d9
commit
95ea04f925
@ -1,9 +1,9 @@
|
||||
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
|
||||
<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.
|
||||
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:
|
||||
|
||||
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
|
||||
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
|
||||
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()
|
||||
|
||||
We removed the obsolete png_check_sig(), png_memcpy_check(), and
|
||||
png_memset_check() functions. Instead use !png_sig_cmp(), memcpy(),
|
||||
and memset(), respectively.
|
||||
png_memset_check() functions. Instead use !png_sig_cmp(), png_memcpy(),
|
||||
and png_memset(), respectively.
|
||||
|
||||
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
|
||||
@ -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
|
||||
the '"#include png.h"' directive.
|
||||
|
||||
We moved the png_strcpy(), png_strncpy(), png_strlen(), png_memcpy(),
|
||||
png_memcmp(), png_sprintf, and png_memcpy() macros into a private
|
||||
header file (pngpriv.h) that is not accessible to applications.
|
||||
The png_sprintf(), png_strcpy(), and png_strncpy() macros are no longer used
|
||||
and were removed.
|
||||
|
||||
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
|
||||
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
|
||||
|
||||
August 8, 2012
|
||||
August 16, 2012
|
||||
|
||||
Since the PNG Development group is an ad-hoc body, we can't make
|
||||
an official declaration.
|
||||
|
14
libpngpf.3
14
libpngpf.3
@ -1,21 +1,11 @@
|
||||
.TH LIBPNGPF 3 "August 8, 2012"
|
||||
.TH LIBPNGPF 3 "August 16, 2012"
|
||||
.SH NAME
|
||||
libpng \- Portable Network Graphics (PNG) Reference Library 1.5.13beta02
|
||||
(private functions)
|
||||
.SH SYNOPSIS
|
||||
\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 \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
|
||||
\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.
|
||||
|
||||
.SH DESCRIPTION
|
||||
The functions previously listed here are used privately by libpng
|
||||
|
@ -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
|
||||
* calling it for PNG_FILTER_VALUE_NONE.
|
||||
*/
|
||||
PNG_EXTERN void png_read_filter_row PNGARG((png_structp pp, png_row_infop row_info,
|
||||
png_bytep row, png_const_bytep prev_row, int filter));
|
||||
PNG_EXTERN void png_read_filter_row PNGARG((png_structp pp, png_row_infop
|
||||
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_bytep row, png_const_bytep prev_row));
|
||||
@ -1582,7 +1582,7 @@ PNG_EXTERN void png_ascii_from_fixed PNGARG((png_structp png_ptr,
|
||||
#define PNG_FP_IS_ZERO(state) (((state) & PNG_FP_Z_MASK) == PNG_FP_SAW_DIGIT)
|
||||
#define PNG_FP_IS_POSITIVE(state) (((state) & PNG_FP_NZ_MASK) == PNG_FP_Z_MASK)
|
||||
#define PNG_FP_IS_NEGATIVE(state) (((state) & PNG_FP_NZ_MASK) == PNG_FP_NZ_MASK)
|
||||
|
||||
|
||||
/* The actual parser. This can be called repeatedly, it updates
|
||||
* the index into the string and the state variable (which must
|
||||
* be initialzed to 0). It returns a result code, as above. There
|
||||
|
63
pngrtran.c
63
pngrtran.c
@ -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)
|
||||
{
|
||||
/* Background is already in screen gamma */
|
||||
*sp = (png_byte)((png_ptr->background.gray >> 8) & 0xff);
|
||||
*(sp + 1) = (png_byte)(png_ptr->background.gray & 0xff);
|
||||
*sp = (png_byte)((png_ptr->background.gray >> 8)
|
||||
& 0xff);
|
||||
*(sp + 1) = (png_byte)(png_ptr->background.gray
|
||||
& 0xff);
|
||||
}
|
||||
|
||||
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)
|
||||
{
|
||||
*sp = (png_byte)((png_ptr->background.gray >> 8) & 0xff);
|
||||
*(sp + 1) = (png_byte)(png_ptr->background.gray & 0xff);
|
||||
*sp = (png_byte)((png_ptr->background.gray >> 8)
|
||||
& 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 */
|
||||
*sp = (png_byte)((png_ptr->background.red >> 8) & 0xff);
|
||||
*(sp + 1) = (png_byte)(png_ptr->background.red & 0xff);
|
||||
*(sp + 2) = (png_byte)((png_ptr->background.green >> 8) & 0xff);
|
||||
*(sp + 3) = (png_byte)(png_ptr->background.green & 0xff);
|
||||
*(sp + 4) = (png_byte)((png_ptr->background.blue >> 8) & 0xff);
|
||||
*(sp + 2) = (png_byte)((png_ptr->background.green >> 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);
|
||||
}
|
||||
|
||||
@ -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 + 1) = (png_byte)(png_ptr->background.red & 0xff);
|
||||
*(sp + 2) = (png_byte)((png_ptr->background.green >> 8) & 0xff);
|
||||
*(sp + 3) = (png_byte)(png_ptr->background.green & 0xff);
|
||||
*(sp + 4) = (png_byte)((png_ptr->background.blue >> 8) & 0xff);
|
||||
*(sp + 2) = (png_byte)((png_ptr->background.green >> 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);
|
||||
}
|
||||
}
|
||||
@ -3938,7 +3948,8 @@ png_do_compose(png_row_infop row_info, png_bytep row, png_structp png_ptr)
|
||||
else if (a == 0)
|
||||
{
|
||||
/* 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);
|
||||
}
|
||||
|
||||
@ -3968,7 +3979,8 @@ png_do_compose(png_row_infop row_info, png_bytep row, png_structp png_ptr)
|
||||
|
||||
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);
|
||||
}
|
||||
|
||||
@ -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 */
|
||||
*sp = (png_byte)((png_ptr->background.red >> 8) & 0xff);
|
||||
*(sp + 1) = (png_byte)(png_ptr->background.red & 0xff);
|
||||
*(sp + 2) = (png_byte)((png_ptr->background.green >> 8) & 0xff);
|
||||
*(sp + 3) = (png_byte)(png_ptr->background.green & 0xff);
|
||||
*(sp + 4) = (png_byte)((png_ptr->background.blue >> 8) & 0xff);
|
||||
*(sp + 2) = (png_byte)((png_ptr->background.green >> 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);
|
||||
}
|
||||
|
||||
@ -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];
|
||||
png_composite_16(w, v, a, png_ptr->background_1.red);
|
||||
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 + 1) = (png_byte)(w & 0xff);
|
||||
|
||||
v = gamma_16_to_1[*(sp + 3) >> gamma_shift][*(sp + 2)];
|
||||
png_composite_16(w, v, a, png_ptr->background_1.green);
|
||||
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 + 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)];
|
||||
png_composite_16(w, v, a, png_ptr->background_1.blue);
|
||||
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 + 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 + 1) = (png_byte)(png_ptr->background.red & 0xff);
|
||||
*(sp + 2) = (png_byte)((png_ptr->background.green >> 8) & 0xff);
|
||||
*(sp + 3) = (png_byte)(png_ptr->background.green & 0xff);
|
||||
*(sp + 4) = (png_byte)((png_ptr->background.blue >> 8) & 0xff);
|
||||
*(sp + 2) = (png_byte)((png_ptr->background.green >> 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);
|
||||
}
|
||||
|
||||
|
@ -1370,7 +1370,8 @@ png_write_tRNS(png_structp png_ptr, png_const_bytep trans_alpha,
|
||||
}
|
||||
|
||||
/* 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)
|
||||
|
Loading…
x
Reference in New Issue
Block a user