Imported from libpng-1.0.6i.tar
This commit is contained in:
parent
326320e5a9
commit
6942d53c25
22
ANNOUNCE
22
ANNOUNCE
@ -1,5 +1,5 @@
|
||||
|
||||
Libpng 1.0.6h - April 24, 2000
|
||||
Libpng 1.0.6i - May 1, 2000
|
||||
|
||||
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.
|
||||
@ -33,13 +33,31 @@ version 1.0.6f [April 14, 2000]
|
||||
Removed superfluous prototype for png_set_itxt from png.h
|
||||
Removed "else" from pngread.c, after png_error(), and changed "0" to "length".
|
||||
Changed several png_errors about malformed ancillary chunks to png_warnings.
|
||||
version 1.0.6h [April 24, 2000]
|
||||
version 1.0.6g [April 24, 2000]
|
||||
Added png_pass-* arrays to pnggccrd.c when PNG_USE_LOCAL_ARRAYS is defined.
|
||||
Relocated paragraph about png_set_background() in libpng.3/libpng.txt
|
||||
and other revisions (Matthias Benckmann)
|
||||
Relocated info_ptr->free_me, png_ptr->free_me, and other info_ptr and
|
||||
png_ptr members to restore binary compatibility with libpng-1.0.5
|
||||
(breaks compatibility with libpng-1.0.6).
|
||||
version 1.0.6h [April 24, 2000]
|
||||
Changed shared library so-number pattern from 2.x.y.z to xy.z (this builds
|
||||
libpng.so.10 & libpng.so.10.6h instead of libpng.so.2 & libpng.so.2.1.0.6h)
|
||||
version 1.0.6i [May 1, 2000]
|
||||
Added documentation of user memory functions in libpng.txt/libpng.3
|
||||
Modified png_read_png so that it will use user_allocated row_pointers
|
||||
if present, unless free_me directs that it be freed, and added description
|
||||
of the use of png_set_rows() and png_get_rows() in libpng.txt/libpng.3.
|
||||
Added PNG_LEGACY_SUPPORTED macro, and #ifdef out all new (since version
|
||||
1.00) members of png_struct and png_info, to regain binary compatibility
|
||||
when you define this macro. Capabilities lost in this event
|
||||
are user transforms (new in version 1.0.0),the user transform pointer
|
||||
(new in version 1.0.2), rgb_to_gray (new in 1.0.5), iCCP, sCAL, sPLT,
|
||||
the high-level interface, and unknown chunks support (all new in 1.0.6).
|
||||
This was necessary because of old applications that allocate the structs
|
||||
directly instead of using png_create_*(), as authors were instructed to
|
||||
do in libpng-0.88 and earlier.
|
||||
Added makefile.intel and updated makefile.watcom (Pawel Mrochen)
|
||||
|
||||
Send comments/corrections/commendations to
|
||||
png-implement@ccrc.wustl.edu or to randeg@alum.rpi.edu
|
||||
|
25
CHANGES
25
CHANGES
@ -699,6 +699,31 @@ version 1.0.6g [April 24, 2000]
|
||||
version 1.0.6h [April 24, 2000]
|
||||
Changed shared library so-number pattern from 2.x.y.z to xy.z (this builds
|
||||
libpng.so.10 & libpng.so.10.6h instead of libpng.so.2 & libpng.so.2.1.0.6h)
|
||||
version 1.0.6i [May 1, 2000]
|
||||
Rearranged some members at the end of png_info and png_struct, to put
|
||||
unknown_chunks_num and free_me within the original size of the png_structs
|
||||
and free_me, png_read_user_fn, and png_free_fn within the original png_info,
|
||||
because some old applications allocate the structs directly instead of
|
||||
using png_create_*().
|
||||
Added documentation of user memory functions in libpng.txt/libpng.3
|
||||
Modified png_read_png so that it will use user_allocated row_pointers
|
||||
if present, unless free_me directs that it be freed, and added description
|
||||
of the use of png_set_rows() and png_get_rows() in libpng.txt/libpng.3.
|
||||
Added PNG_LEGACY_SUPPORTED macro, and #ifdef out all new (since version
|
||||
1.00) members of png_struct and png_info, to regain binary compatibility
|
||||
when you define this macro. Capabilities lost in this event
|
||||
are user transforms (new in version 1.0.0),the user transform pointer
|
||||
(new in version 1.0.2), rgb_to_gray (new in 1.0.5), iCCP, sCAL, sPLT,
|
||||
the high-level interface, and unknown chunks support (all new in 1.0.6).
|
||||
This was necessary because of old applications that allocate the structs
|
||||
directly instead of using png_create_*(), as authors were instructed to
|
||||
do in libpng-0.88 and earlier.
|
||||
Added modes PNG_CREATED_READ_STRUCT and PNG_CREATED_WRITE_STRUCT which
|
||||
can be used to detect codes that directly allocate the structs, and
|
||||
code to check these modes in png_read_init() and png_write_init() and
|
||||
generate a libpng error if the modes aren't set and PNG_LEGACY_SUPPORTED
|
||||
was not defined.
|
||||
Added makefile.intel and updated makefile.watcom (Pawel Mrochen)
|
||||
|
||||
Send comments/corrections/commendations to
|
||||
png-implement@ccrc.wustl.edu or to randeg@alum.rpi.edu
|
||||
|
12
INSTALL
12
INSTALL
@ -1,5 +1,5 @@
|
||||
|
||||
Installing libpng version 1.0.6h - April 24, 2000
|
||||
Installing libpng version 1.0.6i - May 1, 2000
|
||||
|
||||
Before installing libpng, you must first install zlib. zlib
|
||||
can usually be found wherever you got libpng. zlib can be
|
||||
@ -10,7 +10,7 @@ zlib.h and zconf.h include files that correspond to the
|
||||
version of zlib that's installed.
|
||||
|
||||
You can rename the directories that you downloaded (they
|
||||
might be called "libpng-1.0.6h" or "lpng106" and "zlib-1.1.3"
|
||||
might be called "libpng-1.0.6i" or "lpng106" and "zlib-1.1.3"
|
||||
or "zlib113") so that you have directories called "zlib" and "libpng".
|
||||
|
||||
Your directory structure should look like this:
|
||||
@ -47,8 +47,8 @@ The files that are presently available in the scripts directory
|
||||
include
|
||||
|
||||
makefile.std => Generic UNIX makefile (cc, creates static libpng.a)
|
||||
makefile.linux => Linux/ELF makefile (gcc, creates libpng.so.2.1.0.6h)
|
||||
makefile.gcmmx => Linux/ELF makefile (gcc, creates libpng.so.2.1.0.6h,
|
||||
makefile.linux => Linux/ELF makefile (gcc, creates libpng.so.2.1.0.6i)
|
||||
makefile.gcmmx => Linux/ELF makefile (gcc, creates libpng.so.2.1.0.6i,
|
||||
uses assembler code tuned for Intel MMX platform)
|
||||
makefile.gcc => Generic makefile (gcc, creates static libpng.a)
|
||||
makefile.knr => Archaic UNIX Makefile that converts files with
|
||||
@ -59,9 +59,9 @@ include
|
||||
makefile.ibmc => IBM C/C++ version 3.x for Win32 and OS/2 (static)
|
||||
libpng.icc => Project file for IBM VisualAge/C++ version 4.0 or later
|
||||
makefile.sgi => Silicon Graphics IRIX makefile (cc, creates static lib)
|
||||
makefile.sggcc => Silicon Graphics (gcc, creates libpng.so.2.1.0.6h)
|
||||
makefile.sggcc => Silicon Graphics (gcc, creates libpng.so.2.1.0.6i)
|
||||
makefile.sunos => Sun makefile
|
||||
makefile.solaris => Solaris 2.X makefile (gcc, creates libpng.so.2.1.0.6h)
|
||||
makefile.solaris => Solaris 2.X makefile (gcc, creates libpng.so.2.1.0.6i)
|
||||
makefile.sco => For SCO OSr5 ELF and Unixware 7 with Native cc
|
||||
makefile.mips => MIPS makefile
|
||||
makefile.acorn => Acorn makefile
|
||||
|
62
KNOWNBUG
62
KNOWNBUG
@ -1,21 +1,57 @@
|
||||
|
||||
Known bugs and suggested enhancements in libpng-1.0.6
|
||||
|
||||
1. April 23, 2000 -- BUG -- binary incompatibility
|
||||
1. April 24, 2000 -- BUG -- binary incompatibility
|
||||
|
||||
Libpng-1.0.6 is binary incompatible with old applications that
|
||||
allocate the png_struct and png_info structures themselves instead
|
||||
of using png_create_*(). They do not allocate enough space for
|
||||
the structures because they have an incorrect notion of
|
||||
sizeof(png_struct) and sizeof(png_info). Although such applications
|
||||
should be considered broken rather than considering libpng to be broken,
|
||||
they are numerous and include products of the PNG group, such
|
||||
as gif2png and pnmtopng-2.36 (pnmtopng-2.37 is OK), so libpng will
|
||||
be fixed in version 1.0.7 to work around this problem.
|
||||
|
||||
Applications that use png_create_*() instead of png_ptr=malloc(...)
|
||||
are immune to this problem.
|
||||
|
||||
STATUS: Fixed in libpng-1.0.6ad, libpng-1.0.6i, and patch-d
|
||||
which are currently being tested by the PNG group.
|
||||
The fix necessarily reintroduces a binary incompatibility with any
|
||||
application that makes direct access to the png_info and
|
||||
png_struct members that deal with the pCAL chunk, palette_lookup,
|
||||
dither_index, time_buffer, or weighted filtering, i.e., any members
|
||||
coming after the new "free_me" member of either structure. It
|
||||
is believed that applications affected by this reintroduced binary
|
||||
incompatibility are rare (none are known to the PNG group). An
|
||||
effective workaround for this and the next bug is to recompile the
|
||||
old applications with the installed version of libpng.
|
||||
|
||||
2. April 23, 2000 -- BUG -- binary incompatibility
|
||||
|
||||
Libpng-1.0.6 introduced binary incompatibility for applications that
|
||||
make direct access to the info_ptr and png_ptr, due to the insertion
|
||||
of the free_me member ahead of some previously existing members.
|
||||
make direct access to members of the png_struct and png_info structures,
|
||||
due to the insertion of the free_me member ahead of some previously
|
||||
existing members.
|
||||
|
||||
STATUS: Fixed in libpng-1.0.6g
|
||||
Applications that use png_set_*(), png_get_*() are immune to this
|
||||
problem, but people are still to this day writing applications that
|
||||
make ill-advised direct access to members of the png_struct and
|
||||
png_info structures, so libpng-1.0.6 will be patched to work around
|
||||
this problem.
|
||||
|
||||
2. April 15, 2000 -- BUG -- pnggccrd.c
|
||||
STATUS: Fixed in libpng-1.0.6g and patch-d, which are currently being
|
||||
tested by the PNG group. Users can work around the problem without
|
||||
patching libpng by recompiling their applications.
|
||||
|
||||
3. April 15, 2000 -- BUG -- pnggccrd.c
|
||||
|
||||
If PNG_NO_GLOBAL_ARRAYS is defined, pnggccrd.c will not compile.
|
||||
|
||||
STATUS: Fixed in libpng-1.0.6g
|
||||
|
||||
3. April 1, 2000 -- BUG
|
||||
4. April 1, 2000 -- BUG
|
||||
|
||||
Under some circumstances old applications that make direct access to
|
||||
the info_ptr->text and its members might free the same memory that
|
||||
@ -25,21 +61,21 @@ Known bugs and suggested enhancements in libpng-1.0.6
|
||||
bit in info_ptr->free_me is now checked to make sure libpng is responsible
|
||||
for freeing the memory.
|
||||
|
||||
4. April 1, 2000 -- BUG
|
||||
5. April 1, 2000 -- BUG
|
||||
|
||||
The non-ISO-C "strdup()" function is used in png.c
|
||||
|
||||
STATUS: The function has been simplified and no longer uses strdup()
|
||||
in libpng-1.0.6-patch-c and libpng-1.0.6d.
|
||||
|
||||
5. March 24, 2000 -- BUG
|
||||
6. March 24, 2000 -- BUG
|
||||
|
||||
The png_set_rgb_to_gray_fixed() function is setting incorrect weighting
|
||||
factors.
|
||||
|
||||
STATUS: Fixed in libpng-1.0.6-patch-b and libpng-1.0.6d.
|
||||
|
||||
6. March 22, 2000 -- BUG
|
||||
7. March 22, 2000 -- BUG
|
||||
|
||||
There are some printf() and fprintf() statements active in pngwutil.c
|
||||
when PNG_NO_STDIO and PNG_sCAL_SUPPORTED are both defined.
|
||||
@ -47,7 +83,7 @@ Known bugs and suggested enhancements in libpng-1.0.6
|
||||
STATUS: Fixed in libpng-1.0.6-patch-a and libpng-1.0.6d. The strcpy()
|
||||
function is used instead.
|
||||
|
||||
7. March 22, 2000 -- BUG
|
||||
8. March 22, 2000 -- BUG
|
||||
|
||||
The length of the iCCP chunk data is calculated incorrectly; because
|
||||
it can contain zeroes, strlen() doesn't work.
|
||||
@ -55,7 +91,7 @@ Known bugs and suggested enhancements in libpng-1.0.6
|
||||
STATUS: Fixed in libpng-1.0.6-patch-a and libpng-1.0.6d by adding a
|
||||
data_length parameter to the png_decompress_chunk() function.
|
||||
|
||||
8. March 15, 1998 -- OPTIMIZATION -- Kevin Bracey
|
||||
9. March 15, 1998 -- OPTIMIZATION -- Kevin Bracey
|
||||
|
||||
Loops need to be optimized everywhere
|
||||
|
||||
@ -70,7 +106,7 @@ Known bugs and suggested enhancements in libpng-1.0.6
|
||||
libpng-1.1.0. About 160 loops will be turned around
|
||||
in libpng-1.1.Nn, for testing.
|
||||
|
||||
9. July 4, 1998 -- ENHANCEMENT -- Glenn R-P
|
||||
10. July 4, 1998 -- ENHANCEMENT -- Glenn R-P
|
||||
|
||||
libpng-1.0.5 and earlier transform colors to gamma=1.0 space for
|
||||
merging with background, and then back to the image's gamma. The
|
||||
@ -82,7 +118,7 @@ Known bugs and suggested enhancements in libpng-1.0.6
|
||||
|
||||
STATUS: under development.
|
||||
|
||||
10. September 1999 -- ENHANCEMENT --
|
||||
11. September 1999 -- ENHANCEMENT --
|
||||
|
||||
It should be possible to use libpng without floating-point aritmetic.
|
||||
|
||||
|
4
LICENSE
4
LICENSE
@ -5,7 +5,7 @@ Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.
|
||||
Copyright (c) 1996, 1997 Andreas Dilger
|
||||
(libpng versions 0.90, December 1996, through 0.96, May 1997)
|
||||
Copyright (c) 1998, 1999, 2000 Glenn Randers-Pehrson
|
||||
(libpng versions 0.97, January 1998, through 1.0.6h, April 24, 2000)
|
||||
(libpng versions 0.97, January 1998, through 1.0.6i, May 1, 2000)
|
||||
|
||||
For the purposes of this copyright and license, "Contributing Authors"
|
||||
is defined as the following set of individuals:
|
||||
@ -68,4 +68,4 @@ certification mark of the Open Source Initiative.
|
||||
|
||||
Glenn Randers-Pehrson
|
||||
randeg@alum.rpi.edu
|
||||
April 24, 2000
|
||||
May 1, 2000
|
||||
|
10
README
10
README
@ -1,4 +1,4 @@
|
||||
README for libpng 1.0.6h - April 24, 2000 (shared library 2.1)
|
||||
README for libpng 1.0.6i - May 1, 2000 (shared library 2.1)
|
||||
See the note about version numbers near the top of png.h
|
||||
|
||||
See INSTALL for instructions on how to install libpng.
|
||||
@ -172,9 +172,9 @@ Files in this distribution:
|
||||
descrip.mms => VMS makefile for MMS or MMK
|
||||
makefile.std => Generic UNIX makefile (cc, creates static libpng.a)
|
||||
makefile.linux => Linux/ELF makefile
|
||||
(gcc, creates libpng.so.2.1.0.6h)
|
||||
(gcc, creates libpng.so.2.1.0.6i)
|
||||
makefile.gcmmx => Linux/ELF makefile (gcc, creates
|
||||
libpng.so.2.1.0.6h, uses assembler code
|
||||
libpng.so.2.1.0.6i, uses assembler code
|
||||
tuned for Intel MMX platform)
|
||||
makefile.gcc => Generic makefile (gcc, creates static libpng.a)
|
||||
makefile.knr => Archaic UNIX Makefile that converts files with
|
||||
@ -185,10 +185,10 @@ Files in this distribution:
|
||||
makefile.ibmc => IBM C/C++ version 3.x for Win32 and OS/2 (static)
|
||||
libpng.icc => Project file, IBM VisualAge/C++ 4.0 or later
|
||||
makefile.sgi => Silicon Graphics IRIX (cc, creates static lib)
|
||||
makefile.sggcc => Silicon Graphics (gcc, creates libpng.so.2.1.0.6h)
|
||||
makefile.sggcc => Silicon Graphics (gcc, creates libpng.so.2.1.0.6i)
|
||||
makefile.sunos => Sun makefile
|
||||
makefile.solaris => Solaris 2.X makefile
|
||||
(gcc, creates libpng.so.2.1.0.6h)
|
||||
(gcc, creates libpng.so.2.1.0.6i)
|
||||
makefile.sco => For SCO OSr5 ELF and Unixware 7 with Native cc
|
||||
makefile.mips => MIPS makefile
|
||||
makefile.acorn => Acorn makefile
|
||||
|
4
Y2KINFO
4
Y2KINFO
@ -1,13 +1,13 @@
|
||||
Y2K compliance in libpng:
|
||||
=========================
|
||||
|
||||
April 24, 2000
|
||||
May 1, 2000
|
||||
|
||||
Since the PNG Development group is an ad-hoc body, we can't make
|
||||
an official declaration.
|
||||
|
||||
This is your unofficial assurance that libpng from version 0.71 and
|
||||
upward through 1.0.6h are Y2K compliant. It is my belief that earlier
|
||||
upward through 1.0.6i are Y2K compliant. It is my belief that earlier
|
||||
versions were also Y2K compliant.
|
||||
|
||||
Libpng only has three year fields. One is a 2-byte unsigned integer
|
||||
|
2
configure
vendored
2
configure
vendored
@ -1,5 +1,5 @@
|
||||
echo "
|
||||
There is no \"configure\" script for Libpng-1.0.6h. Instead, please
|
||||
There is no \"configure\" script for Libpng-1.0.6i. Instead, please
|
||||
copy the appropriate makefile for your system from the \"scripts\"
|
||||
directory. Read the INSTALL file for more details.
|
||||
"
|
||||
|
@ -307,7 +307,8 @@ void read_png(FILE *fp, unsigned int sig_read) /* file is already open */
|
||||
}
|
||||
|
||||
/* flip the RGB pixels to BGR (or RGBA to BGRA) */
|
||||
png_set_bgr(png_ptr);
|
||||
if (color_type & PNG_COLOR_MASK_COLOR)
|
||||
png_set_bgr(png_ptr);
|
||||
|
||||
/* swap the RGBA or GA data to ARGB or AG (or BGRA to ABGR) */
|
||||
png_set_swap_alpha(png_ptr);
|
||||
|
138
libpng.3
138
libpng.3
@ -1,6 +1,6 @@
|
||||
.TH LIBPNG 3 "April 24, 2000"
|
||||
.TH LIBPNG 3 "May 1, 2000"
|
||||
.SH NAME
|
||||
libpng \- Portable Network Graphics (PNG) Reference Library 1.0.6h
|
||||
libpng \- Portable Network Graphics (PNG) Reference Library 1.0.6i
|
||||
.SH SYNOPSIS
|
||||
\fI\fB
|
||||
|
||||
@ -725,7 +725,7 @@ Following is a copy of the libpng.txt file that accompanies libpng.
|
||||
.SH LIBPNG.TXT
|
||||
libpng.txt - A description on how to use and modify libpng
|
||||
|
||||
libpng version 1.0.6h - April 24, 2000
|
||||
libpng version 1.0.6i - May 1, 2000
|
||||
Updated and distributed by Glenn Randers-Pehrson
|
||||
<randeg@alum.rpi.edu>
|
||||
Copyright (c) 1998, 1999, 2000 Glenn Randers-Pehrson
|
||||
@ -1062,14 +1062,39 @@ dithering, and setting filler.) If this is the case, simply do this:
|
||||
|
||||
png_read_png(png_ptr, info_ptr, png_transforms, NULL)
|
||||
|
||||
where png_transforms is an integer containing the logical-or of some set of
|
||||
transformation flags. This call is equivalent to png_read_info(),
|
||||
where png_transforms is an integer containing the logical OR of
|
||||
some set of transformation flags. This call is equivalent to png_read_info(),
|
||||
followed the set of transformations indicated by the transform mask,
|
||||
followed by png_update_info(), followed by a read of the image bytes
|
||||
to the info_ptr, followed by png_read_end().
|
||||
then png_read_image(), and finally png_read_end().
|
||||
|
||||
(The final parameter of this call is not yet used. Someday it
|
||||
will point to transformation parameters.)
|
||||
(The final parameter of this call is not yet used. Someday it might point
|
||||
to transformation parameters required by some future input transform.)
|
||||
|
||||
After you have called png_read_png(), you can retrieve the image data
|
||||
with
|
||||
|
||||
row_pointers = png_get_rows(png_ptr, info_ptr);
|
||||
|
||||
where row_pointers is an array of pointers to the pixel data for each row:
|
||||
|
||||
png_bytep row_pointers[height];
|
||||
|
||||
If you know your image size and pixel size ahead of time, you can allocate
|
||||
row_pointers prior to calling png_read_png() with
|
||||
|
||||
row_pointers = png_malloc(png_ptr, height*sizeof(png_bytep));
|
||||
for (int i=0; i<height, i++)
|
||||
row_pointers[i]=png_malloc(png_ptr, width*pixel_size);
|
||||
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.
|
||||
|
||||
If you use png_set_rows(), the application is responsible for freeing
|
||||
row_pointers (and row_pointers[i], if they were separately allocated).
|
||||
|
||||
If you don't allocate row_pointers ahead of time, png_read_png() will
|
||||
do it, and it'll be free'ed when you call png_destroy_*().
|
||||
|
||||
.SS The low-level read interface
|
||||
|
||||
@ -1124,8 +1149,8 @@ in until png_read_end() has read the chunk data following the image.
|
||||
interlace_type - (PNG_INTERLACE_NONE or
|
||||
PNG_INTERLACE_ADAM7)
|
||||
Any or all of interlace_type, compression_type, of
|
||||
filter_type can be
|
||||
NULL if you are not interested in their values.
|
||||
filter_type can be NULL if you are not
|
||||
interested in their values.
|
||||
|
||||
channels = png_get_channels(png_ptr, info_ptr);
|
||||
channels - number of channels of info for the
|
||||
@ -1872,7 +1897,7 @@ point to libpng-allocated storage with the following functions:
|
||||
|
||||
png_free_data(png_ptr, info_ptr, mask, n)
|
||||
mask - identifies data to be freed, a mask
|
||||
made up by the OR one or more of
|
||||
containing the logical OR of one or more of
|
||||
PNG_FREE_PLTE, PNG_FREE_TRNS,
|
||||
PNG_FREE_HIST, PNG_FREE_ICCP,
|
||||
PNG_FREE_SPLT, PNG_FREE_ROWS,
|
||||
@ -1887,12 +1912,12 @@ by the user and not by libpng, and will in those
|
||||
cases do nothing. The "n" parameter is ignored if only one item
|
||||
of the selected data type, such as PLTE, is allowed. If "n" is not
|
||||
-1, and multiple items are allowed for the data type identified in
|
||||
the mask, such as text or splt, only the n'th item is freed.
|
||||
the mask, such as text or sPLT, only the n'th item is freed.
|
||||
|
||||
The default behavior is only to free data that was allocated internally
|
||||
by libpng. This can be changed, so that libpng will not free the data,
|
||||
or so that it will also free data that was passed in via a png_set_*()
|
||||
function, with
|
||||
or so that it will free data that was allocated by the user with png_malloc()
|
||||
or png_zalloc() and passed in via a png_set_*() function, with
|
||||
|
||||
png_data_freer(png_ptr, info_ptr, freer, mask)
|
||||
mask - which data elements are affected
|
||||
@ -1907,7 +1932,14 @@ You can call this function after reading the PNG data but before calling
|
||||
any png_set_*() functions, to control whether the user or the png_set_*()
|
||||
function is responsible for freeing any existing data that might be present,
|
||||
and again after the png_set_*() functions to control whether the user
|
||||
or png_destroy_*() is supposed to free the data..
|
||||
or png_destroy_*() is supposed to free the data. When the user assumes
|
||||
responsibility for libpng-allocated data, the application must use
|
||||
png_free() to free it.
|
||||
|
||||
If you allocated your row_pointers in a single block, as suggested above in
|
||||
the description of the high level read interface, you must not transfer
|
||||
responsibility for freeing it to the png_set_rows or png_read_destroy function,
|
||||
because they would also try to free the individual row_pointers[i].
|
||||
|
||||
For a more compact example of reading a PNG image, see the file example.c.
|
||||
|
||||
@ -2200,7 +2232,7 @@ types.
|
||||
|
||||
/* turn on or off filtering, and/or choose
|
||||
specific filters. You can use either a single PNG_FILTER_VALUE_NAME
|
||||
or the "OR" of one or more PNG_FILTER_NAME masks. */
|
||||
or the logical OR of one or more PNG_FILTER_NAME masks. */
|
||||
png_set_filter(png_ptr, 0,
|
||||
PNG_FILTER_NONE | PNG_FILTER_VALUE_NONE |
|
||||
PNG_FILTER_SUB | PNG_FILTER_VALUE_SUB |
|
||||
@ -2497,7 +2529,7 @@ Compressed pairs must have a text string, as only the text string
|
||||
is compressed anyway, so the compression would be meaningless.
|
||||
|
||||
PNG supports modification time via the png_time structure. Two
|
||||
conversion routines are proved, png_convert_from_time_t() for
|
||||
conversion routines are provided, png_convert_from_time_t() for
|
||||
time_t and png_convert_from_struct_tm() for struct tm. The
|
||||
time_t routine uses gmtime(). You don't have to use either of
|
||||
these, but if you wish to fill in the png_time structure directly,
|
||||
@ -2553,14 +2585,13 @@ If you have valid image data in the info structure, simply do this:
|
||||
|
||||
png_write_png(png_ptr, info_ptr, png_transforms, NULL)
|
||||
|
||||
where png_transforms is an integer containing the logical-or of some set of
|
||||
where png_transforms is an integer containing the logical OR of some set of
|
||||
transformation flags. This call is equivalent to png_write_info(),
|
||||
followed by the set of transformations indicated by the transform
|
||||
mask, followed by followed by a write of the image bytes from the
|
||||
info_ptr, followed by png_write_end().
|
||||
followed the set of transformations indicated by the transform mask,
|
||||
then png_write_image(), and finally png_write_end().
|
||||
|
||||
(The final parameter of this call is not yet used. Someday it
|
||||
may point to output transformation parameters.)
|
||||
(The final parameter of this call is not yet used. Someday it might point
|
||||
to transformation parameters required by some future output transform.)
|
||||
|
||||
.SS The low-level write interface
|
||||
|
||||
@ -2811,7 +2842,7 @@ point to libpng-allocated storage with the following functions:
|
||||
|
||||
png_free_data(png_ptr, info_ptr, mask, n)
|
||||
mask - identifies data to be freed, a mask
|
||||
made up by the OR one or more of
|
||||
containing the logical OR of one or more of
|
||||
PNG_FREE_PLTE, PNG_FREE_TRNS,
|
||||
PNG_FREE_HIST, PNG_FREE_ICCP,
|
||||
PNG_FREE_SPLT, PNG_FREE_ROWS,
|
||||
@ -2821,20 +2852,21 @@ point to libpng-allocated storage with the following functions:
|
||||
(-1 for all items)
|
||||
|
||||
These functions may be safely called when the relevant storage has
|
||||
already been freed, or has not yet been allocated, and will in that
|
||||
case do nothing. The "n" parameter is ignored if only one item
|
||||
already been freed, or has not yet been allocated, or was allocated
|
||||
by the user and not by libpng, and will in those
|
||||
cases do nothing. The "n" parameter is ignored if only one item
|
||||
of the selected data type, such as PLTE, is allowed. If "n" is not
|
||||
-1, and multiple items are allowed for the data type identified in
|
||||
the mask, such as text or splt, only the n'th item is freed.
|
||||
the mask, such as text or sPLT, only the n'th item is freed.
|
||||
|
||||
If you allocated data such as a palette that you passed in to libpng with
|
||||
png_set_*, you must not free it until just before the call to
|
||||
If you allocated data such as a palette that you passed
|
||||
in to libpng with png_set_*, you must not free it until just before the call to
|
||||
png_destroy_write_struct().
|
||||
|
||||
The default behavior is only to free data that was allocated internally
|
||||
by libpng. This can be changed, so that libpng will not free the data,
|
||||
or so that it will free data that was passed in via a png_set_*() function,
|
||||
with
|
||||
or so that it will free data that was allocated by the user with png_malloc()
|
||||
or png_zalloc() and passed in via a png_set_*() function, with
|
||||
|
||||
png_data_freer(png_ptr, info_ptr, freer, mask)
|
||||
mask - which data elements are affected
|
||||
@ -2860,6 +2892,12 @@ function. Having done this, it would then be safe to destroy the read
|
||||
structure and continue to use the PLTE, tRNS, and hIST data in the write
|
||||
structure.
|
||||
|
||||
This function only affects data that has already been allocated.
|
||||
You can call this function before calling after the png_set_*() functions
|
||||
to control whether the user or png_destroy_*() is supposed to free the data.
|
||||
When the user assumes responsibility for libpng-allocated data, the
|
||||
application must use png_free() to free it.
|
||||
|
||||
For a more compact example of writing a PNG image, see the file example.c.
|
||||
|
||||
.SH V. Modifying/Customizing libpng:
|
||||
@ -2874,20 +2912,32 @@ goes through callbacks that are user settable. The default routines are
|
||||
in pngmem.c, pngrio.c, pngwio.c, and pngerror.c, respectively. To change
|
||||
these functions, call the appropriate png_set_*_fn() function.
|
||||
|
||||
Memory allocation is done through the functions png_malloc() and png_free().
|
||||
These currently just call the standard C functions. If
|
||||
Memory allocation is done through the functions png_malloc(), png_zalloc(),
|
||||
and png_free(). These currently just call the standard C functions. If
|
||||
your pointers can't access more then 64K at a time, you will want to set
|
||||
MAXSEG_64K in zlib.h. Since it is unlikely that the method of handling
|
||||
memory allocation on a platform will change between applications, these
|
||||
functions must be modified in the library at compile time.
|
||||
functions must be modified in the library at compile time. If you prefer
|
||||
to use a different method of allocating and freeing data, you can use
|
||||
|
||||
png_set_mem_fn(png_structp png_ptr, png_voidp mem_ptr, png_malloc_ptr
|
||||
malloc_fn, png_free_ptr free_fn)
|
||||
|
||||
This function also provides a void pointer that can be retrieved via
|
||||
|
||||
mem_ptr=png_get_mem_ptr(png_ptr);
|
||||
|
||||
Your replacement memory functions must have prototypes as follows:
|
||||
|
||||
png_voidp malloc_fn(png_structp png_ptr, png_uint_32 size);
|
||||
void free_fn(png_structp png_ptr, png_voidp ptr);
|
||||
|
||||
Input/Output in libpng is done through png_read() and png_write(),
|
||||
which currently just call fread() and fwrite(). The FILE * is stored in
|
||||
png_struct and is initialized via png_init_io(). If you wish to change
|
||||
the method of I/O, the library supplies callbacks that you can set
|
||||
through the function png_set_read_fn() and png_set_write_fn() at run
|
||||
time, instead of calling the png_init_io() function.
|
||||
These functions
|
||||
time, instead of calling the png_init_io() function. These functions
|
||||
also provide a void pointer that can be retrieved via the function
|
||||
png_get_io_ptr(). For example:
|
||||
|
||||
@ -2901,7 +2951,7 @@ png_get_io_ptr(). For example:
|
||||
voidp read_io_ptr = png_get_io_ptr(read_ptr);
|
||||
voidp write_io_ptr = png_get_io_ptr(write_ptr);
|
||||
|
||||
The replacement I/O functions should have prototypes as follows:
|
||||
The replacement I/O functions must have prototypes as follows:
|
||||
|
||||
void user_read_data(png_structp png_ptr,
|
||||
png_bytep data, png_uint_32 length);
|
||||
@ -3074,8 +3124,8 @@ to turn filtering on and off, respectively.
|
||||
|
||||
Individual filter types are PNG_FILTER_NONE, PNG_FILTER_SUB,
|
||||
PNG_FILTER_UP, PNG_FILTER_AVG, PNG_FILTER_PAETH, which can be bitwise
|
||||
ORed together '|' to specify one or more filters to use. These
|
||||
filters are described in more detail in the PNG specification. If
|
||||
ORed together with '|' to specify one or more filters to use.
|
||||
These filters are described in more detail in the PNG specification. If
|
||||
you intend to change the filter type during the course of writing
|
||||
the image, you should start with flags set for all of the filters
|
||||
you intend to use so that libpng can initialize its internal
|
||||
@ -3237,13 +3287,13 @@ the old method.
|
||||
|
||||
.SH VII. Y2K Compliance in libpng
|
||||
|
||||
April 24, 2000
|
||||
May 1, 2000
|
||||
|
||||
Since the PNG Development group is an ad-hoc body, we can't make
|
||||
an official declaration.
|
||||
|
||||
This is your unofficial assurance that libpng from version 0.71 and
|
||||
upward through 1.0.6h are Y2K compliant. It is my belief that earlier
|
||||
upward through 1.0.6i are Y2K compliant. It is my belief that earlier
|
||||
versions were also Y2K compliant.
|
||||
|
||||
Libpng only has three year fields. One is a 2-byte unsigned integer that
|
||||
@ -3384,7 +3434,7 @@ possible without all of you.
|
||||
|
||||
Thanks to Frank J. T. Wojcik for helping with the documentation.
|
||||
|
||||
Libpng version 1.0.6h - April 24, 2000:
|
||||
Libpng version 1.0.6i - May 1, 2000:
|
||||
Initially created in 1995 by Guy Eric Schalnat, then of Group 42, Inc.
|
||||
Currently maintained by Glenn Randers-Pehrson (randeg@alum.rpi.edu).
|
||||
|
||||
@ -3399,7 +3449,7 @@ Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.
|
||||
Copyright (c) 1996, 1997 Andreas Dilger
|
||||
(libpng versions 0.89c, May 1996, through 0.96, May 1997)
|
||||
Copyright (c) 1998, 1999, 2000 Glenn Randers-Pehrson
|
||||
(libpng versions 0.97, January 1998, through 1.0.6h, April 24, 2000)
|
||||
(libpng versions 0.97, January 1998, through 1.0.6i, May 1, 2000)
|
||||
|
||||
For the purposes of this copyright and license, "Contributing Authors"
|
||||
is defined as the following set of individuals:
|
||||
|
130
libpng.txt
130
libpng.txt
@ -1,6 +1,6 @@
|
||||
libpng.txt - A description on how to use and modify libpng
|
||||
|
||||
libpng version 1.0.6h - April 24, 2000
|
||||
libpng version 1.0.6i - May 1, 2000
|
||||
Updated and distributed by Glenn Randers-Pehrson
|
||||
<randeg@alum.rpi.edu>
|
||||
Copyright (c) 1998, 1999, 2000 Glenn Randers-Pehrson
|
||||
@ -337,14 +337,39 @@ dithering, and setting filler.) If this is the case, simply do this:
|
||||
|
||||
png_read_png(png_ptr, info_ptr, png_transforms, NULL)
|
||||
|
||||
where png_transforms is an integer containing the logical-or of some set of
|
||||
transformation flags. This call is equivalent to png_read_info(),
|
||||
where png_transforms is an integer containing the logical OR of
|
||||
some set of transformation flags. This call is equivalent to png_read_info(),
|
||||
followed the set of transformations indicated by the transform mask,
|
||||
followed by png_update_info(), followed by a read of the image bytes
|
||||
to the info_ptr, followed by png_read_end().
|
||||
then png_read_image(), and finally png_read_end().
|
||||
|
||||
(The final parameter of this call is not yet used. Someday it
|
||||
will point to transformation parameters.)
|
||||
(The final parameter of this call is not yet used. Someday it might point
|
||||
to transformation parameters required by some future input transform.)
|
||||
|
||||
After you have called png_read_png(), you can retrieve the image data
|
||||
with
|
||||
|
||||
row_pointers = png_get_rows(png_ptr, info_ptr);
|
||||
|
||||
where row_pointers is an array of pointers to the pixel data for each row:
|
||||
|
||||
png_bytep row_pointers[height];
|
||||
|
||||
If you know your image size and pixel size ahead of time, you can allocate
|
||||
row_pointers prior to calling png_read_png() with
|
||||
|
||||
row_pointers = png_malloc(png_ptr, height*sizeof(png_bytep));
|
||||
for (int i=0; i<height, i++)
|
||||
row_pointers[i]=png_malloc(png_ptr, width*pixel_size);
|
||||
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.
|
||||
|
||||
If you use png_set_rows(), the application is responsible for freeing
|
||||
row_pointers (and row_pointers[i], if they were separately allocated).
|
||||
|
||||
If you don't allocate row_pointers ahead of time, png_read_png() will
|
||||
do it, and it'll be free'ed when you call png_destroy_*().
|
||||
|
||||
The low-level read interface
|
||||
|
||||
@ -399,8 +424,8 @@ in until png_read_end() has read the chunk data following the image.
|
||||
interlace_type - (PNG_INTERLACE_NONE or
|
||||
PNG_INTERLACE_ADAM7)
|
||||
Any or all of interlace_type, compression_type, of
|
||||
filter_type can be
|
||||
NULL if you are not interested in their values.
|
||||
filter_type can be NULL if you are not
|
||||
interested in their values.
|
||||
|
||||
channels = png_get_channels(png_ptr, info_ptr);
|
||||
channels - number of channels of info for the
|
||||
@ -1147,7 +1172,7 @@ point to libpng-allocated storage with the following functions:
|
||||
|
||||
png_free_data(png_ptr, info_ptr, mask, n)
|
||||
mask - identifies data to be freed, a mask
|
||||
made up by the OR one or more of
|
||||
containing the logical OR of one or more of
|
||||
PNG_FREE_PLTE, PNG_FREE_TRNS,
|
||||
PNG_FREE_HIST, PNG_FREE_ICCP,
|
||||
PNG_FREE_SPLT, PNG_FREE_ROWS,
|
||||
@ -1162,12 +1187,12 @@ by the user and not by libpng, and will in those
|
||||
cases do nothing. The "n" parameter is ignored if only one item
|
||||
of the selected data type, such as PLTE, is allowed. If "n" is not
|
||||
-1, and multiple items are allowed for the data type identified in
|
||||
the mask, such as text or splt, only the n'th item is freed.
|
||||
the mask, such as text or sPLT, only the n'th item is freed.
|
||||
|
||||
The default behavior is only to free data that was allocated internally
|
||||
by libpng. This can be changed, so that libpng will not free the data,
|
||||
or so that it will also free data that was passed in via a png_set_*()
|
||||
function, with
|
||||
or so that it will free data that was allocated by the user with png_malloc()
|
||||
or png_zalloc() and passed in via a png_set_*() function, with
|
||||
|
||||
png_data_freer(png_ptr, info_ptr, freer, mask)
|
||||
mask - which data elements are affected
|
||||
@ -1182,7 +1207,14 @@ You can call this function after reading the PNG data but before calling
|
||||
any png_set_*() functions, to control whether the user or the png_set_*()
|
||||
function is responsible for freeing any existing data that might be present,
|
||||
and again after the png_set_*() functions to control whether the user
|
||||
or png_destroy_*() is supposed to free the data..
|
||||
or png_destroy_*() is supposed to free the data. When the user assumes
|
||||
responsibility for libpng-allocated data, the application must use
|
||||
png_free() to free it.
|
||||
|
||||
If you allocated your row_pointers in a single block, as suggested above in
|
||||
the description of the high level read interface, you must not transfer
|
||||
responsibility for freeing it to the png_set_rows or png_read_destroy function,
|
||||
because they would also try to free the individual row_pointers[i].
|
||||
|
||||
For a more compact example of reading a PNG image, see the file example.c.
|
||||
|
||||
@ -1475,7 +1507,7 @@ types.
|
||||
|
||||
/* turn on or off filtering, and/or choose
|
||||
specific filters. You can use either a single PNG_FILTER_VALUE_NAME
|
||||
or the "OR" of one or more PNG_FILTER_NAME masks. */
|
||||
or the logical OR of one or more PNG_FILTER_NAME masks. */
|
||||
png_set_filter(png_ptr, 0,
|
||||
PNG_FILTER_NONE | PNG_FILTER_VALUE_NONE |
|
||||
PNG_FILTER_SUB | PNG_FILTER_VALUE_SUB |
|
||||
@ -1772,7 +1804,7 @@ Compressed pairs must have a text string, as only the text string
|
||||
is compressed anyway, so the compression would be meaningless.
|
||||
|
||||
PNG supports modification time via the png_time structure. Two
|
||||
conversion routines are proved, png_convert_from_time_t() for
|
||||
conversion routines are provided, png_convert_from_time_t() for
|
||||
time_t and png_convert_from_struct_tm() for struct tm. The
|
||||
time_t routine uses gmtime(). You don't have to use either of
|
||||
these, but if you wish to fill in the png_time structure directly,
|
||||
@ -1828,14 +1860,13 @@ If you have valid image data in the info structure, simply do this:
|
||||
|
||||
png_write_png(png_ptr, info_ptr, png_transforms, NULL)
|
||||
|
||||
where png_transforms is an integer containing the logical-or of some set of
|
||||
where png_transforms is an integer containing the logical OR of some set of
|
||||
transformation flags. This call is equivalent to png_write_info(),
|
||||
followed by the set of transformations indicated by the transform
|
||||
mask, followed by followed by a write of the image bytes from the
|
||||
info_ptr, followed by png_write_end().
|
||||
followed the set of transformations indicated by the transform mask,
|
||||
then png_write_image(), and finally png_write_end().
|
||||
|
||||
(The final parameter of this call is not yet used. Someday it
|
||||
may point to output transformation parameters.)
|
||||
(The final parameter of this call is not yet used. Someday it might point
|
||||
to transformation parameters required by some future output transform.)
|
||||
|
||||
The low-level write interface
|
||||
|
||||
@ -2086,7 +2117,7 @@ point to libpng-allocated storage with the following functions:
|
||||
|
||||
png_free_data(png_ptr, info_ptr, mask, n)
|
||||
mask - identifies data to be freed, a mask
|
||||
made up by the OR one or more of
|
||||
containing the logical OR of one or more of
|
||||
PNG_FREE_PLTE, PNG_FREE_TRNS,
|
||||
PNG_FREE_HIST, PNG_FREE_ICCP,
|
||||
PNG_FREE_SPLT, PNG_FREE_ROWS,
|
||||
@ -2096,20 +2127,21 @@ point to libpng-allocated storage with the following functions:
|
||||
(-1 for all items)
|
||||
|
||||
These functions may be safely called when the relevant storage has
|
||||
already been freed, or has not yet been allocated, and will in that
|
||||
case do nothing. The "n" parameter is ignored if only one item
|
||||
already been freed, or has not yet been allocated, or was allocated
|
||||
by the user and not by libpng, and will in those
|
||||
cases do nothing. The "n" parameter is ignored if only one item
|
||||
of the selected data type, such as PLTE, is allowed. If "n" is not
|
||||
-1, and multiple items are allowed for the data type identified in
|
||||
the mask, such as text or splt, only the n'th item is freed.
|
||||
the mask, such as text or sPLT, only the n'th item is freed.
|
||||
|
||||
If you allocated data such as a palette that you passed in to libpng with
|
||||
png_set_*, you must not free it until just before the call to
|
||||
If you allocated data such as a palette that you passed
|
||||
in to libpng with png_set_*, you must not free it until just before the call to
|
||||
png_destroy_write_struct().
|
||||
|
||||
The default behavior is only to free data that was allocated internally
|
||||
by libpng. This can be changed, so that libpng will not free the data,
|
||||
or so that it will free data that was passed in via a png_set_*() function,
|
||||
with
|
||||
or so that it will free data that was allocated by the user with png_malloc()
|
||||
or png_zalloc() and passed in via a png_set_*() function, with
|
||||
|
||||
png_data_freer(png_ptr, info_ptr, freer, mask)
|
||||
mask - which data elements are affected
|
||||
@ -2135,6 +2167,12 @@ function. Having done this, it would then be safe to destroy the read
|
||||
structure and continue to use the PLTE, tRNS, and hIST data in the write
|
||||
structure.
|
||||
|
||||
This function only affects data that has already been allocated.
|
||||
You can call this function before calling after the png_set_*() functions
|
||||
to control whether the user or png_destroy_*() is supposed to free the data.
|
||||
When the user assumes responsibility for libpng-allocated data, the
|
||||
application must use png_free() to free it.
|
||||
|
||||
For a more compact example of writing a PNG image, see the file example.c.
|
||||
|
||||
V. Modifying/Customizing libpng:
|
||||
@ -2149,20 +2187,32 @@ goes through callbacks that are user settable. The default routines are
|
||||
in pngmem.c, pngrio.c, pngwio.c, and pngerror.c, respectively. To change
|
||||
these functions, call the appropriate png_set_*_fn() function.
|
||||
|
||||
Memory allocation is done through the functions png_malloc() and png_free().
|
||||
These currently just call the standard C functions. If
|
||||
Memory allocation is done through the functions png_malloc(), png_zalloc(),
|
||||
and png_free(). These currently just call the standard C functions. If
|
||||
your pointers can't access more then 64K at a time, you will want to set
|
||||
MAXSEG_64K in zlib.h. Since it is unlikely that the method of handling
|
||||
memory allocation on a platform will change between applications, these
|
||||
functions must be modified in the library at compile time.
|
||||
functions must be modified in the library at compile time. If you prefer
|
||||
to use a different method of allocating and freeing data, you can use
|
||||
|
||||
png_set_mem_fn(png_structp png_ptr, png_voidp mem_ptr, png_malloc_ptr
|
||||
malloc_fn, png_free_ptr free_fn)
|
||||
|
||||
This function also provides a void pointer that can be retrieved via
|
||||
|
||||
mem_ptr=png_get_mem_ptr(png_ptr);
|
||||
|
||||
Your replacement memory functions must have prototypes as follows:
|
||||
|
||||
png_voidp malloc_fn(png_structp png_ptr, png_uint_32 size);
|
||||
void free_fn(png_structp png_ptr, png_voidp ptr);
|
||||
|
||||
Input/Output in libpng is done through png_read() and png_write(),
|
||||
which currently just call fread() and fwrite(). The FILE * is stored in
|
||||
png_struct and is initialized via png_init_io(). If you wish to change
|
||||
the method of I/O, the library supplies callbacks that you can set
|
||||
through the function png_set_read_fn() and png_set_write_fn() at run
|
||||
time, instead of calling the png_init_io() function.
|
||||
These functions
|
||||
time, instead of calling the png_init_io() function. These functions
|
||||
also provide a void pointer that can be retrieved via the function
|
||||
png_get_io_ptr(). For example:
|
||||
|
||||
@ -2176,7 +2226,7 @@ png_get_io_ptr(). For example:
|
||||
voidp read_io_ptr = png_get_io_ptr(read_ptr);
|
||||
voidp write_io_ptr = png_get_io_ptr(write_ptr);
|
||||
|
||||
The replacement I/O functions should have prototypes as follows:
|
||||
The replacement I/O functions must have prototypes as follows:
|
||||
|
||||
void user_read_data(png_structp png_ptr,
|
||||
png_bytep data, png_uint_32 length);
|
||||
@ -2349,8 +2399,8 @@ to turn filtering on and off, respectively.
|
||||
|
||||
Individual filter types are PNG_FILTER_NONE, PNG_FILTER_SUB,
|
||||
PNG_FILTER_UP, PNG_FILTER_AVG, PNG_FILTER_PAETH, which can be bitwise
|
||||
ORed together '|' to specify one or more filters to use. These
|
||||
filters are described in more detail in the PNG specification. If
|
||||
ORed together with '|' to specify one or more filters to use.
|
||||
These filters are described in more detail in the PNG specification. If
|
||||
you intend to change the filter type during the course of writing
|
||||
the image, you should start with flags set for all of the filters
|
||||
you intend to use so that libpng can initialize its internal
|
||||
@ -2512,13 +2562,13 @@ the old method.
|
||||
|
||||
VII. Y2K Compliance in libpng
|
||||
|
||||
April 24, 2000
|
||||
May 1, 2000
|
||||
|
||||
Since the PNG Development group is an ad-hoc body, we can't make
|
||||
an official declaration.
|
||||
|
||||
This is your unofficial assurance that libpng from version 0.71 and
|
||||
upward through 1.0.6h are Y2K compliant. It is my belief that earlier
|
||||
upward through 1.0.6i are Y2K compliant. It is my belief that earlier
|
||||
versions were also Y2K compliant.
|
||||
|
||||
Libpng only has three year fields. One is a 2-byte unsigned integer that
|
||||
|
@ -1,6 +1,6 @@
|
||||
.TH LIBPNGPF 3 "April 24, 2000"
|
||||
.TH LIBPNGPF 3 "May 1, 2000"
|
||||
.SH NAME
|
||||
libpng \- Portable Network Graphics (PNG) Reference Library 1.0.6h
|
||||
libpng \- Portable Network Graphics (PNG) Reference Library 1.0.6i
|
||||
(private functions)
|
||||
.SH SYNOPSIS
|
||||
\fB#include <png.h>\fP
|
||||
|
2
png.5
2
png.5
@ -1,4 +1,4 @@
|
||||
.TH PNG 5 "April 24, 2000"
|
||||
.TH PNG 5 "May 1, 2000"
|
||||
.SH NAME
|
||||
png \- Portable Network Graphics (PNG) format
|
||||
.SH DESCRIPTION
|
||||
|
38
png.c
38
png.c
@ -1,7 +1,7 @@
|
||||
|
||||
/* png.c - location for general purpose libpng functions
|
||||
*
|
||||
* libpng version 1.0.6h - April 24, 2000
|
||||
* libpng version 1.0.6i - May 1, 2000
|
||||
* Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.
|
||||
* Copyright (c) 1996, 1997 Andreas Dilger
|
||||
* Copyright (c) 1998, 1999, 2000 Glenn Randers-Pehrson
|
||||
@ -14,14 +14,14 @@
|
||||
#include "png.h"
|
||||
|
||||
/* Generate a compiler error if there is an old png.h in the search path. */
|
||||
typedef version_1_0_6h Your_png_h_is_not_version_1_0_6h;
|
||||
typedef version_1_0_6i Your_png_h_is_not_version_1_0_6i;
|
||||
|
||||
/* Version information for C files. This had better match the version
|
||||
* string defined in png.h. */
|
||||
|
||||
#ifdef PNG_USE_GLOBAL_ARRAYS
|
||||
/* png_libpng_ver was changed to a function in version 1.0.5c */
|
||||
char png_libpng_ver[12] = "1.0.6h";
|
||||
char png_libpng_ver[12] = "1.0.6i";
|
||||
|
||||
/* png_sig was changed to a function in version 1.0.5c */
|
||||
/* Place to hold the signature string for a PNG file. */
|
||||
@ -134,7 +134,7 @@ png_check_sig(png_bytep sig, int num)
|
||||
return ((int)!png_sig_cmp(sig, (png_size_t)0, (png_size_t)num));
|
||||
}
|
||||
|
||||
/* Function to allocate memory for zlib. */
|
||||
/* Function to allocate memory for zlib and clear it to 0. */
|
||||
voidpf
|
||||
png_zalloc(voidpf png_ptr, uInt items, uInt size)
|
||||
{
|
||||
@ -261,6 +261,7 @@ png_info_init(png_infop info_ptr)
|
||||
png_memset(info_ptr, 0, sizeof (png_info));
|
||||
}
|
||||
|
||||
#ifdef PNG_FREE_ME_SUPPORTED
|
||||
void
|
||||
png_data_freer(png_structp png_ptr, png_infop info_ptr,
|
||||
int freer, png_uint_32 mask)
|
||||
@ -276,6 +277,7 @@ png_data_freer(png_structp png_ptr, png_infop info_ptr,
|
||||
png_warning(png_ptr,
|
||||
"Unknown freer parameter in png_data_freer.");
|
||||
}
|
||||
#endif
|
||||
|
||||
void
|
||||
png_free_data(png_structp png_ptr, png_infop info_ptr, png_uint_32 mask, int num)
|
||||
@ -286,7 +288,9 @@ png_free_data(png_structp png_ptr, png_infop info_ptr, png_uint_32 mask, int num
|
||||
|
||||
#if defined(PNG_TEXT_SUPPORTED)
|
||||
/* free text item num or (if num == -1) all text items */
|
||||
#ifdef PNG_FREE_ME_SUPPORTED
|
||||
if (mask & info_ptr->free_me & PNG_FREE_TEXT)
|
||||
#endif
|
||||
{
|
||||
if (num != -1)
|
||||
{
|
||||
@ -314,7 +318,11 @@ if (mask & PNG_FREE_TRNS)
|
||||
{
|
||||
if (info_ptr->valid & PNG_INFO_tRNS)
|
||||
{
|
||||
#ifdef PNG_FREE_ME_SUPPORTED
|
||||
if (info_ptr->free_me & PNG_FREE_TRNS)
|
||||
#else
|
||||
if (png_ptr->flags & PNG_FLAG_FREE_TRNS)
|
||||
#endif
|
||||
png_free(png_ptr, info_ptr->trans);
|
||||
info_ptr->valid &= ~PNG_INFO_tRNS;
|
||||
}
|
||||
@ -362,7 +370,9 @@ if (mask & PNG_FREE_ICCP)
|
||||
{
|
||||
if (info_ptr->valid & PNG_INFO_iCCP)
|
||||
{
|
||||
#ifdef PNG_FREE_ME_SUPPORTED
|
||||
if (info_ptr->free_me & PNG_FREE_ICCP)
|
||||
#endif
|
||||
{
|
||||
png_free(png_ptr, info_ptr->iccp_name);
|
||||
png_free(png_ptr, info_ptr->iccp_profile);
|
||||
@ -427,7 +437,11 @@ if (mask & PNG_FREE_HIST)
|
||||
{
|
||||
if (info_ptr->valid & PNG_INFO_hIST)
|
||||
{
|
||||
#ifdef PNG_FREE_ME_SUPPORTED
|
||||
if (info_ptr->free_me & PNG_FREE_HIST)
|
||||
#else
|
||||
if (png_ptr->flags & PNG_FLAG_FREE_HIST)
|
||||
#endif
|
||||
png_free(png_ptr, info_ptr->hist);
|
||||
info_ptr->valid &= ~PNG_INFO_hIST;
|
||||
}
|
||||
@ -439,7 +453,11 @@ if (mask & PNG_FREE_PLTE)
|
||||
{
|
||||
if (info_ptr->valid & PNG_INFO_PLTE)
|
||||
{
|
||||
#ifdef PNG_FREE_ME_SUPPORTED
|
||||
if (info_ptr->free_me & PNG_FREE_PLTE)
|
||||
#else
|
||||
if (png_ptr->flags & PNG_FLAG_FREE_PLTE)
|
||||
#endif
|
||||
png_zfree(png_ptr, info_ptr->palette);
|
||||
info_ptr->valid &= ~(PNG_INFO_PLTE);
|
||||
info_ptr->num_palette = 0;
|
||||
@ -450,7 +468,9 @@ if (mask & PNG_FREE_PLTE)
|
||||
/* free any image bits attached to the info structure */
|
||||
if (mask & PNG_FREE_ROWS)
|
||||
{
|
||||
#ifdef PNG_FREE_ME_SUPPORTED
|
||||
if (info_ptr->free_me & PNG_FREE_ROWS)
|
||||
#endif
|
||||
{
|
||||
int row;
|
||||
|
||||
@ -460,8 +480,10 @@ if (mask & PNG_FREE_ROWS)
|
||||
}
|
||||
}
|
||||
#endif
|
||||
#ifdef PNG_FREE_ME_SUPPORTED
|
||||
if(num == -1)
|
||||
info_ptr->free_me &= ~mask;
|
||||
#endif
|
||||
}
|
||||
|
||||
/* This is an internal routine to free any memory that the info struct is
|
||||
@ -475,7 +497,7 @@ png_info_destroy(png_structp png_ptr, png_infop info_ptr)
|
||||
|
||||
png_free_data(png_ptr, info_ptr, PNG_FREE_ALL, -1);
|
||||
|
||||
#if defined(PNG_READ_UNKNOWN_CHUNKS_SUPPORTED)
|
||||
#if defined(PNG_UNKNOWN_CHUNKS_SUPPORTED)
|
||||
if (png_ptr->num_chunk_list)
|
||||
{
|
||||
png_free(png_ptr, png_ptr->chunk_list);
|
||||
@ -561,7 +583,7 @@ png_charp
|
||||
png_get_copyright(png_structp png_ptr)
|
||||
{
|
||||
if (png_ptr != NULL || png_ptr == NULL) /* silence compiler warning */
|
||||
return ("\n libpng version 1.0.6h - April 24, 2000\n\
|
||||
return ("\n libpng version 1.0.6i - May 1, 2000\n\
|
||||
Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.\n\
|
||||
Copyright (c) 1996, 1997 Andreas Dilger\n\
|
||||
Copyright (c) 1998, 1999, 2000 Glenn Randers-Pehrson\n");
|
||||
@ -579,8 +601,8 @@ png_get_libpng_ver(png_structp png_ptr)
|
||||
{
|
||||
/* Version of *.c files used when building libpng */
|
||||
if(png_ptr != NULL) /* silence compiler warning about unused png_ptr */
|
||||
return("1.0.6h");
|
||||
return("1.0.6h");
|
||||
return("1.0.6i");
|
||||
return("1.0.6i");
|
||||
}
|
||||
|
||||
png_charp
|
||||
|
127
png.h
127
png.h
@ -1,7 +1,7 @@
|
||||
|
||||
/* png.h - header file for PNG reference library
|
||||
*
|
||||
* libpng version 1.0.6h - April 24, 2000
|
||||
* libpng version 1.0.6i - May 1, 2000
|
||||
* Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.
|
||||
* Copyright (c) 1996, 1997 Andreas Dilger
|
||||
* Copyright (c) 1998, 1999, 2000 Glenn Randers-Pehrson
|
||||
@ -9,7 +9,7 @@
|
||||
* Authors and maintainers:
|
||||
* libpng versions 0.71, May 1995, through 0.88, January 1996: Guy Schalnat
|
||||
* libpng versions 0.89c, June 1996, through 0.96, May 1997: Andreas Dilger
|
||||
* libpng versions 0.97, January 1998, through 1.0.6h - April 24, 2000: Glenn
|
||||
* libpng versions 0.97, January 1998, through 1.0.6i - May 1, 2000: Glenn
|
||||
* See also "Contributing Authors", below.
|
||||
*
|
||||
* Note about libpng version numbers:
|
||||
@ -48,9 +48,11 @@
|
||||
* 1.0.5s-v 1.0.5s-v 10006 2.1.0.5s-v (not binary compatible)
|
||||
* 1.0.6 (+ 3 patches) 1.0.6 10006 2.1.0.6 (still binary incompat)
|
||||
* 1.0.6d-f 1.0.6d-f 10007 2.1.0.6d-f (still binary incompat)
|
||||
* 1.0.6g 1.0.6g 10007 2.1.0.6g (compatible with 1.0.5)
|
||||
* 1.0.6h 1.0.6h 10007 10.6h (compatible with 1.0.5)
|
||||
* 1.0.7 1.0.7 10007 10.7 (still compatible)
|
||||
* 1.0.6g 1.0.6g 10007 2.1.0.6g
|
||||
* 1.0.6h 1.0.6h 10007 10.6h
|
||||
* 1.0.6 (+ 4 patches) 1.0.6 10006 2.1.0.6ad (compatible with 1.0.0)
|
||||
* 1.0.6i 1.0.6i 10007 10.6i (can be compatible w/ 1.0.0)
|
||||
* 1.0.7 1.0.7 10007 10.7 (still can be compatible)
|
||||
*
|
||||
* Henceforth the source version will match the shared-library major
|
||||
* and minor numbers; the shared-library major version number will be
|
||||
@ -79,7 +81,7 @@
|
||||
* Copyright (c) 1996, 1997 Andreas Dilger
|
||||
* (libpng versions 0.89c, June 1996, through 0.96, May 1997)
|
||||
* Copyright (c) 1998, 1999, 2000 Glenn Randers-Pehrson
|
||||
* (libpng versions 0.97, January 1998, through 1.0.6h, April 24, 2000)
|
||||
* (libpng versions 0.97, January 1998, through 1.0.6i, May 1, 2000)
|
||||
*
|
||||
* For the purposes of this copyright and license, "Contributing Authors"
|
||||
* is defined as the following set of individuals:
|
||||
@ -154,13 +156,13 @@
|
||||
* Y2K compliance in libpng:
|
||||
* =========================
|
||||
*
|
||||
* April 24, 2000
|
||||
* May 1, 2000
|
||||
*
|
||||
* Since the PNG Development group is an ad-hoc body, we can't make
|
||||
* an official declaration.
|
||||
*
|
||||
* This is your unofficial assurance that libpng from version 0.71 and
|
||||
* upward through 1.0.6h are Y2K compliant. It is my belief that earlier
|
||||
* upward through 1.0.6i are Y2K compliant. It is my belief that earlier
|
||||
* versions were also Y2K compliant.
|
||||
*
|
||||
* Libpng only has three year fields. One is a 2-byte unsigned integer
|
||||
@ -238,7 +240,7 @@ extern "C" {
|
||||
*/
|
||||
|
||||
/* Version information for png.h - this should match the version in png.c */
|
||||
#define PNG_LIBPNG_VER_STRING "1.0.6h"
|
||||
#define PNG_LIBPNG_VER_STRING "1.0.6i"
|
||||
|
||||
/* Careful here. At one time, Guy wanted to use 082, but that would be octal.
|
||||
* We must not include leading zeros.
|
||||
@ -489,15 +491,13 @@ typedef struct png_info_struct
|
||||
* and initialize the appropriate fields below.
|
||||
*/
|
||||
|
||||
#if defined(PNG_gAMA_SUPPORTED) || defined(PNG_READ_GAMMA_SUPPORTED)
|
||||
#if defined(PNG_gAMA_SUPPORTED) && defined(PNG_FLOATING_POINT_SUPPORTED)
|
||||
/* The gAMA chunk describes the gamma characteristics of the system
|
||||
* on which the image was created, normally in the range [1.0, 2.5].
|
||||
* Data is valid if (valid & PNG_INFO_gAMA) is non-zero.
|
||||
*/
|
||||
#ifdef PNG_FLOATING_POINT_SUPPORTED
|
||||
float gamma; /* gamma value of image, if (valid & PNG_INFO_gAMA) */
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if defined(PNG_sRGB_SUPPORTED)
|
||||
/* GR-P, 0.96a */
|
||||
@ -517,9 +517,6 @@ typedef struct png_info_struct
|
||||
int num_text; /* number of comments read/to write */
|
||||
int max_text; /* current size of text array */
|
||||
png_textp text; /* array of comments read/to write */
|
||||
int num_text_old; /* number of comments read/to write */
|
||||
png_textp text_old; /* array of comments read/to write, backward
|
||||
compatible with libpng-1.0.5 and earlier */
|
||||
#endif /* PNG_TEXT_SUPPORTED */
|
||||
|
||||
#if defined(PNG_tIME_SUPPORTED)
|
||||
@ -595,7 +592,7 @@ defined(PNG_READ_BACKGROUND_SUPPORTED)
|
||||
png_uint_16p hist;
|
||||
#endif
|
||||
|
||||
#if defined(PNG_cHRM_SUPPORTED)
|
||||
#ifdef PNG_cHRM_SUPPORTED
|
||||
/* The cHRM chunk describes the CIE color characteristics of the monitor
|
||||
* on which the PNG was created. This data allows the viewer to do gamut
|
||||
* mapping of the input image to ensure that the viewer sees the same
|
||||
@ -636,6 +633,16 @@ defined(PNG_READ_BACKGROUND_SUPPORTED)
|
||||
png_byte pcal_nparams; /* number of parameters given in pcal_params */
|
||||
#endif
|
||||
|
||||
#ifdef PNG_FREE_ME_SUPPORTED
|
||||
png_uint_32 free_me; /* flags items libpng is responsible for freeing */
|
||||
#endif
|
||||
|
||||
#if defined(PNG_UNKNOWN_CHUNKS_SUPPORTED)
|
||||
/* storage for unknown chunks that the library doesn't recognize. */
|
||||
png_unknown_chunkp unknown_chunks;
|
||||
png_size_t unknown_chunks_num;
|
||||
#endif
|
||||
|
||||
#if defined(PNG_iCCP_SUPPORTED)
|
||||
/* iCCP chunk data. */
|
||||
png_charp iccp_name; /* profile name */
|
||||
@ -669,19 +676,13 @@ defined(PNG_READ_BACKGROUND_SUPPORTED)
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if defined(PNG_UNKNOWN_CHUNKS_SUPPORTED)
|
||||
/* storage for unknown chunks that the library doesn't recognize. */
|
||||
png_unknown_chunkp unknown_chunks;
|
||||
png_size_t unknown_chunks_num;
|
||||
#endif
|
||||
|
||||
#if defined(PNG_INFO_IMAGE_SUPPORTED)
|
||||
/* Memory has been allocated if (valid & PNG_ALLOCATED_INFO_ROWS) non-zero */
|
||||
/* Data valid if (valid & PNG_INFO_IDAT) non-zero */
|
||||
png_bytepp row_pointers; /* the image bits */
|
||||
#endif
|
||||
|
||||
#if defined(PNG_gAMA_SUPPORTED) || defined(PNG_READ_GAMMA_SUPPORTED)
|
||||
#if defined(PNG_FIXED_POINT_SUPPORTED) && defined(PNG_gAMA_SUPPORTED)
|
||||
png_fixed_point int_gamma; /* gamma of image, if (valid & PNG_INFO_gAMA) */
|
||||
#endif
|
||||
|
||||
@ -696,8 +697,6 @@ defined(PNG_READ_BACKGROUND_SUPPORTED)
|
||||
png_fixed_point int_y_blue;
|
||||
#endif
|
||||
|
||||
png_uint_32 free_me; /* flags items libpng is responsible for freeing */
|
||||
|
||||
} png_info;
|
||||
|
||||
typedef png_info FAR * png_infop;
|
||||
@ -828,7 +827,8 @@ typedef void (*png_progressive_row_ptr) PNGARG((png_structp, png_bytep,
|
||||
#endif
|
||||
|
||||
#if defined(PNG_READ_USER_TRANSFORM_SUPPORTED) || \
|
||||
defined(PNG_WRITE_USER_TRANSFORM_SUPPORTED)
|
||||
defined(PNG_WRITE_USER_TRANSFORM_SUPPORTED) || \
|
||||
defined(PNG_LEGACY_SUPPORTED)
|
||||
typedef void (*png_user_transform_ptr) PNGARG((png_structp,
|
||||
png_row_infop, png_bytep));
|
||||
#endif
|
||||
@ -885,11 +885,14 @@ struct png_struct_def
|
||||
png_user_transform_ptr write_user_transform_fn; /* user write transform */
|
||||
#endif
|
||||
|
||||
/* These were added in libpng-1.0.2 */
|
||||
#if defined(PNG_USER_TRANSFORM_PTR_SUPPORTED)
|
||||
#if defined(PNG_READ_USER_TRANSFORM_SUPPORTED) || \
|
||||
defined(PNG_WRITE_USER_TRANSFORM_SUPPORTED)
|
||||
png_voidp user_transform_ptr; /* user supplied struct for user transform */
|
||||
png_byte user_transform_depth; /* bit depth of user transformed pixels */
|
||||
png_byte user_transform_channels; /* channels in user transformed pixels */
|
||||
#endif
|
||||
#endif
|
||||
|
||||
png_uint_32 mode; /* tells us where we are in the PNG file */
|
||||
@ -941,14 +944,18 @@ struct png_struct_def
|
||||
png_byte sig_bytes; /* magic bytes read/written from start of file */
|
||||
|
||||
#if defined(PNG_READ_FILLER_SUPPORTED) || defined(PNG_WRITE_FILLER_SUPPORTED)
|
||||
#ifdef PNG_LEGACY_SUPPORTED
|
||||
png_byte filler; /* filler byte for pixel expansion */
|
||||
#else
|
||||
png_uint_16 filler; /* filler bytes for pixel expansion */
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if defined(PNG_READ_bKGD_SUPPORTED)
|
||||
png_byte background_gamma_type;
|
||||
#ifdef PNG_FLOATING_POINT_SUPPORTED
|
||||
# ifdef PNG_FLOATING_POINT_SUPPORTED
|
||||
float background_gamma;
|
||||
#endif
|
||||
# endif
|
||||
png_color_16 background; /* background color in screen gamma space */
|
||||
# if defined(PNG_READ_GAMMA_SUPPORTED)
|
||||
png_color_16 background_1; /* background normalized to gamma 1.0 */
|
||||
@ -978,7 +985,7 @@ struct png_struct_def
|
||||
png_uint_16pp gamma_16_to_1; /* converts from file to 1.0 */
|
||||
#endif
|
||||
|
||||
#if defined(PNG_READ_GAMMA_SUPPORTED) || defined (PNG_READ_sBIT_SUPPORTED)
|
||||
#if defined(PNG_READ_GAMMA_SUPPORTED) || defined(PNG_READ_sBIT_SUPPORTED)
|
||||
png_color_8 sig_bit; /* significant bits in each available channel */
|
||||
#endif
|
||||
|
||||
@ -1058,6 +1065,22 @@ struct png_struct_def
|
||||
png_free_ptr free_fn; /* function for freeing memory */
|
||||
#endif
|
||||
|
||||
/* New members added in libpng-1.0.6 */
|
||||
|
||||
#ifdef PNG_FREE_ME_SUPPORTED
|
||||
png_uint_32 free_me; /* flags items libpng is responsible for freeing */
|
||||
#endif
|
||||
|
||||
#if defined(PNG_READ_USER_CHUNKS_SUPPORTED)
|
||||
png_voidp user_chunk_ptr;
|
||||
png_user_chunk_ptr read_user_chunk_fn; /* user read chunk handler */
|
||||
#endif
|
||||
|
||||
#if defined(PNG_UNKNOWN_CHUNKS_SUPPORTED)
|
||||
int num_chunk_list;
|
||||
png_bytep chunk_list;
|
||||
#endif
|
||||
|
||||
#if defined(PNG_READ_RGB_TO_GRAY_SUPPORTED)
|
||||
png_byte rgb_to_gray_status;
|
||||
png_uint_16 rgb_to_gray_red_coeff;
|
||||
@ -1070,27 +1093,16 @@ struct png_struct_def
|
||||
png_byte empty_plte_permitted;
|
||||
#endif
|
||||
|
||||
#if defined(PNG_UNKNOWN_CHUNKS_SUPPORTED)
|
||||
int num_chunk_list;
|
||||
png_bytep chunk_list;
|
||||
#endif
|
||||
|
||||
#if defined(PNG_READ_GAMMA_SUPPORTED) || defined(PNG_READ_BACKGROUND_SUPPORTED)
|
||||
png_fixed_point int_gamma;
|
||||
#endif
|
||||
|
||||
#if defined(PNG_READ_USER_CHUNKS_SUPPORTED)
|
||||
png_voidp user_chunk_ptr;
|
||||
png_user_chunk_ptr read_user_chunk_fn; /* user read chunk handler */
|
||||
#endif
|
||||
|
||||
png_uint_32 free_me; /* flags items libpng is responsible for freeing */
|
||||
};
|
||||
|
||||
/* This prevents a compiler error in png_get_copyright() in png.c if png.c
|
||||
and png.h are both at * version 1.0.6h
|
||||
and png.h are both at * version 1.0.6i
|
||||
*/
|
||||
typedef png_structp version_1_0_6h;
|
||||
typedef png_structp version_1_0_6i;
|
||||
|
||||
typedef png_struct FAR * FAR * png_structpp;
|
||||
|
||||
@ -1574,18 +1586,21 @@ extern PNG_EXPORT(void,png_set_mem_fn) PNGARG((png_structp png_ptr,
|
||||
extern PNG_EXPORT(png_voidp,png_get_mem_ptr) PNGARG((png_structp png_ptr));
|
||||
#endif
|
||||
|
||||
#ifdef PNG_READ_USER_TRANSFORM_SUPPORTED
|
||||
#if defined(PNG_READ_USER_TRANSFORM_SUPPORTED) || \
|
||||
defined(PNG_LEGACY_SUPPORTED)
|
||||
extern PNG_EXPORT(void,png_set_read_user_transform_fn) PNGARG((png_structp
|
||||
png_ptr, png_user_transform_ptr read_user_transform_fn));
|
||||
#endif
|
||||
|
||||
#ifdef PNG_WRITE_USER_TRANSFORM_SUPPORTED
|
||||
#if defined(PNG_WRITE_USER_TRANSFORM_SUPPORTED) || \
|
||||
defined(PNG_LEGACY_SUPPORTED)
|
||||
extern PNG_EXPORT(void,png_set_write_user_transform_fn) PNGARG((png_structp
|
||||
png_ptr, png_user_transform_ptr write_user_transform_fn));
|
||||
#endif
|
||||
|
||||
#if defined(PNG_READ_USER_TRANSFORM_SUPPORTED) || \
|
||||
defined(PNG_WRITE_USER_TRANSFORM_SUPPORTED)
|
||||
defined(PNG_WRITE_USER_TRANSFORM_SUPPORTED) || \
|
||||
defined(PNG_LEGACY_SUPPORTED)
|
||||
extern PNG_EXPORT(void,png_set_user_transform_info) PNGARG((png_structp
|
||||
png_ptr, png_voidp user_transform_ptr, int user_transform_depth,
|
||||
int user_transform_channels)< |