mirror of
https://git.code.sf.net/p/libpng/code.git
synced 2025-07-10 18:04:09 +02:00
Compare commits
3 Commits
v1.0.7beta
...
v1.0.7beta
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
fc4a143ec6 | ||
|
|
ec61c23d56 | ||
|
|
1ef65b6742 |
21
ANNOUNCE
21
ANNOUNCE
@@ -1,5 +1,5 @@
|
||||
|
||||
Libpng 1.0.7beta11 - May 6, 2000
|
||||
Libpng 1.0.7beta14 - May 17, 2000
|
||||
|
||||
This is a public release of libpng, intended for use in production codes.
|
||||
|
||||
@@ -57,9 +57,24 @@ Changes since the last public release (1.0.6):
|
||||
Overloaded png_read_init() and png_write_init() with macros that convert
|
||||
calls to png_read_init_2() or png_write_init_2() that check the version
|
||||
and structure sizes.
|
||||
In png_set_text, check if old application had allocated the png_text structure;
|
||||
if so, only allow one text chunk to be processed to avoid memory overrun.
|
||||
Made PNG_NO_ITXT_SUPPORTED the default setting, to avoid memory overrun
|
||||
when old applications fill the info_ptr->text structure directly.
|
||||
Added PNGAPI macro, and added it to the definitions of all exported functions.
|
||||
Made PNG_NO_CONSOLE_IO the default condition when PNG_BUILD_DLL is defined.
|
||||
Use MSC _RPTn debugging instead of fprintf if _MSC_VER is defined.
|
||||
Added png_access_version_number() function.
|
||||
Check for mask&PNG_FREE_CHNK (for TEXT, SCAL, PCAL) in png_free_data().
|
||||
Expanded libpng.3/libpng.txt information about png_data_freer().
|
||||
Changed pnggccrd.c and pngvcrd.c to handle bad adaptive filter types as
|
||||
warnings instead of errors, as pngrutil.c does.
|
||||
Set the PNG_INFO_IDAT valid flag in png_set_rows() so png_write_png()
|
||||
will actually write IDATs.
|
||||
Made the default PNG_USE_LOCAL_ARRAYS depend on PNG_DLL instead of WIN32.
|
||||
Make png_free_data() ignore its final parameter when freeing data that can
|
||||
have multiple instances (text, sPLT, unknowns).
|
||||
Removed info_ptr->valid tests from png_free_data(), as in version 1.0.5.
|
||||
Added png_set_invalid() function.
|
||||
Fixed incorrect illustrations of png_destroy_write_struct() in example.c.
|
||||
|
||||
Send comments/corrections/commendations to
|
||||
png-implement@ccrc.wustl.edu or to randeg@alum.rpi.edu
|
||||
|
||||
27
CHANGES
27
CHANGES
@@ -729,14 +729,35 @@ version 1.0.6j [May 3, 2000]
|
||||
Overloaded png_read_init() and png_write_init() with macros that convert
|
||||
calls to png_read_init_2() or png_write_init_2() that check the version
|
||||
and structure sizes.
|
||||
version 1.0.7beta11 [May 6, 2000]
|
||||
version 1.0.7beta11 [May 7, 2000]
|
||||
Removed the new PNG_CREATED_READ_STRUCT and PNG_CREATED_WRITE_STRUCT modes
|
||||
which are no longer used.
|
||||
Eliminated the three new members of png_text when PNG_NO_iTXt_SUPPORTED
|
||||
or PNG_LEGACY_SUPPORTED is defined.
|
||||
In png_set_text, check if old application had allocated the png_text structure;
|
||||
if so, only allow one text chunk to be processed to avoid memory overrun.
|
||||
Made PNG_NO_ITXT_SUPPORTED the default setting, to avoid memory overrun
|
||||
when old applications fill the info_ptr->text structure directly.
|
||||
Added PNGAPI macro, and added it to the definitions of all exported functions.
|
||||
version 1.0.7beta12 [May 12, 2000]
|
||||
Revised pngset.c to avoid a problem with expanding the png_debug macro.
|
||||
Deleted some extraneous defines from pngconf.h
|
||||
Made PNG_NO_CONSOLE_IO the default condition when PNG_BUILD_DLL is defined.
|
||||
Use MSC _RPTn debugging instead of fprintf if _MSC_VER is defined.
|
||||
Added png_access_version_number() function.
|
||||
Check for mask&PNG_FREE_CHNK (for TEXT, SCAL, PCAL) in png_free_data().
|
||||
Expanded libpng.3/libpng.txt information about png_data_freer().
|
||||
version 1.0.7beta13 [May 16, 2000]
|
||||
Changed pnggccrd.c and pngvcrd.c to handle bad adaptive filter types as
|
||||
warnings instead of errors, as pngrutil.c does.
|
||||
Set the PNG_INFO_IDAT valid flag in png_set_rows() so png_write_png()
|
||||
will actually write IDATs.
|
||||
Made the default PNG_USE_LOCAL_ARRAYS depend on PNG_DLL instead of WIN32.
|
||||
Make png_free_data() ignore its final parameter when freeing data that can
|
||||
have multiple instances (text, sPLT, unknowns).
|
||||
version 1.0.7beta14 [May 17, 2000]
|
||||
Fixed a new bug in png_set_rows().
|
||||
Removed info_ptr->valid tests from png_free_data(), as in version 1.0.5.
|
||||
Added png_set_invalid() function.
|
||||
Fixed incorrect illustrations of png_destroy_write_struct() in example.c.
|
||||
|
||||
Send comments/corrections/commendations to
|
||||
png-implement@ccrc.wustl.edu or to randeg@alum.rpi.edu
|
||||
|
||||
13
INSTALL
13
INSTALL
@@ -1,5 +1,5 @@
|
||||
|
||||
Installing libpng version 1.0.7beta11 - May 6, 2000
|
||||
Installing libpng version 1.0.7beta14 - May 17, 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.7beta11" or "lpng106" and "zlib-1.1.3"
|
||||
might be called "libpng-1.0.7beta14" 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.7beta11)
|
||||
makefile.gcmmx => Linux/ELF makefile (gcc, creates libpng.so.2.1.0.7beta11,
|
||||
makefile.linux => Linux/ELF makefile (gcc, creates libpng.so.2.1.0.7beta14)
|
||||
makefile.gcmmx => Linux/ELF makefile (gcc, creates libpng.so.2.1.0.7beta14,
|
||||
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
|
||||
@@ -57,11 +57,12 @@ include
|
||||
makefile.dec => DEC Alpha UNIX makefile
|
||||
makefile.hpux => HPUX (10.20 and 11.00) makefile
|
||||
makefile.ibmc => IBM C/C++ version 3.x for Win32 and OS/2 (static)
|
||||
makefile.intel => Intel C/C++ version 4.0 and later
|
||||
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.7beta11)
|
||||
makefile.sggcc => Silicon Graphics (gcc, creates libpng.so.2.1.0.7beta14)
|
||||
makefile.sunos => Sun makefile
|
||||
makefile.solaris => Solaris 2.X makefile (gcc, creates libpng.so.2.1.0.7beta11)
|
||||
makefile.solaris => Solaris 2.X makefile (gcc, creates libpng.so.2.1.0.7beta14)
|
||||
makefile.sco => For SCO OSr5 ELF and Unixware 7 with Native cc
|
||||
makefile.mips => MIPS makefile
|
||||
makefile.acorn => Acorn makefile
|
||||
|
||||
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.7beta11, May 6, 2000)
|
||||
(libpng versions 0.97, January 1998, through 1.0.7beta14, May 17, 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
|
||||
May 6, 2000
|
||||
May 17, 2000
|
||||
|
||||
11
README
11
README
@@ -1,4 +1,4 @@
|
||||
README for libpng 1.0.7beta11 - May 6, 2000 (shared library 2.1)
|
||||
README for libpng 1.0.7beta14 - May 17, 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.7beta11)
|
||||
(gcc, creates libpng.so.2.1.0.7beta14)
|
||||
makefile.gcmmx => Linux/ELF makefile (gcc, creates
|
||||
libpng.so.2.1.0.7beta11, uses assembler code
|
||||
libpng.so.2.1.0.7beta14, 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
|
||||
@@ -183,12 +183,13 @@ Files in this distribution:
|
||||
makefile.dec => DEC Alpha UNIX makefile
|
||||
makefile.hpux => HPUX (10.20 and 11.00) makefile
|
||||
makefile.ibmc => IBM C/C++ version 3.x for Win32 and OS/2 (static)
|
||||
makefile.intel => Intel C/C++ version 4.0 and later
|
||||
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.7beta11)
|
||||
makefile.sggcc => Silicon Graphics (gcc, creates libpng.so.2.1.0.7beta14)
|
||||
makefile.sunos => Sun makefile
|
||||
makefile.solaris => Solaris 2.X makefile
|
||||
(gcc, creates libpng.so.2.1.0.7beta11)
|
||||
(gcc, creates libpng.so.2.1.0.7beta14)
|
||||
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:
|
||||
=========================
|
||||
|
||||
May 6, 2000
|
||||
May 17, 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.7beta11 are Y2K compliant. It is my belief that earlier
|
||||
upward through 1.0.7beta14 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.7beta11. Instead, please
|
||||
There is no \"configure\" script for Libpng-1.0.7beta14. Instead, please
|
||||
copy the appropriate makefile for your system from the \"scripts\"
|
||||
directory. Read the INSTALL file for more details.
|
||||
"
|
||||
|
||||
@@ -566,7 +566,7 @@ void write_png(char *file_name /* , ... other image information ... */)
|
||||
{
|
||||
/* If we get here, we had a problem reading the file */
|
||||
fclose(fp);
|
||||
png_destroy_write_struct(&png_ptr, (png_infopp)info_ptr);
|
||||
png_destroy_write_struct(&png_ptr, &info_ptr);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -762,7 +762,7 @@ void write_png(char *file_name /* , ... other image information ... */)
|
||||
png_free(png_ptr, trans);
|
||||
|
||||
/* clean up after the write, and free any memory allocated */
|
||||
png_destroy_write_struct(&png_ptr, (png_infopp)info_ptr);
|
||||
png_destroy_write_struct(&png_ptr, &info_ptr);
|
||||
|
||||
/* close the file */
|
||||
fclose(fp);
|
||||
|
||||
153
libpng.3
153
libpng.3
@@ -1,6 +1,6 @@
|
||||
.TH LIBPNG 3 "May 6, 2000"
|
||||
.TH LIBPNG 3 "May 17, 2000"
|
||||
.SH NAME
|
||||
libpng \- Portable Network Graphics (PNG) Reference Library 1.0.7beta11
|
||||
libpng \- Portable Network Graphics (PNG) Reference Library 1.0.7beta14
|
||||
.SH SYNOPSIS
|
||||
\fI\fB
|
||||
|
||||
@@ -8,6 +8,10 @@ libpng \- Portable Network Graphics (PNG) Reference Library 1.0.7beta11
|
||||
|
||||
\fI\fB
|
||||
|
||||
\fBpng_uint_32 png_access_version_number \fI(void\fP\fB);\fP
|
||||
|
||||
\fI\fB
|
||||
|
||||
\fBint png_check_sig (png_bytep \fP\fIsig\fP\fB, int \fInum\fP\fB);\fP
|
||||
|
||||
\fI\fB
|
||||
@@ -484,6 +488,10 @@ libpng \- Portable Network Graphics (PNG) Reference Library 1.0.7beta11
|
||||
|
||||
\fI\fB
|
||||
|
||||
\fBvoid png_set_invalid (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fP\fIinfo_ptr\fP\fB, int \fImask\fP\fB);\fP
|
||||
|
||||
\fI\fB
|
||||
|
||||
\fBvoid png_set_invert_alpha (png_structp \fIpng_ptr\fP\fB);\fP
|
||||
|
||||
\fI\fB
|
||||
@@ -739,7 +747,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.7beta11 - May 6, 2000
|
||||
libpng version 1.0.7beta14 - May 17, 2000
|
||||
Updated and distributed by Glenn Randers-Pehrson
|
||||
<randeg@alum.rpi.edu>
|
||||
Copyright (c) 1998, 1999, 2000 Glenn Randers-Pehrson
|
||||
@@ -1291,7 +1299,7 @@ into the info_ptr is returned for any complex types.
|
||||
text_ptr[i].key - keyword for comment. Must contain
|
||||
1-79 characters.
|
||||
text_ptr[i].text - text comments for current
|
||||
keyword. Can empty.
|
||||
keyword. Can be empty.
|
||||
text_ptr[i].text_length - length of text string,
|
||||
after decompression, 0 for iTXt
|
||||
text_ptr[i].itxt_length - length of itxt string,
|
||||
@@ -1918,20 +1926,22 @@ When you are done, you can free all memory allocated by libpng like this:
|
||||
&end_info);
|
||||
|
||||
It is also possible to individually free the info_ptr members that
|
||||
point to libpng-allocated storage with the following functions:
|
||||
point to libpng-allocated storage with the following function:
|
||||
|
||||
png_free_data(png_ptr, info_ptr, mask, n)
|
||||
mask - identifies data to be freed, a mask
|
||||
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,
|
||||
PNG_FREE_TEXT, PNG_FREE_UNKN,
|
||||
or simply PNG_FREE_ALL
|
||||
n - sequence number of item to be freed
|
||||
(-1 for all items)
|
||||
mask - identifies data to be freed, a mask
|
||||
containing the logical OR of one or
|
||||
more of
|
||||
PNG_FREE_PLTE, PNG_FREE_TRNS,
|
||||
PNG_FREE_HIST, PNG_FREE_ICCP,
|
||||
PNG_FREE_PCAL, PNG_FREE_ROWS,
|
||||
PNG_FREE_SCAL, PNG_FREE_SPLT,
|
||||
PNG_FREE_TEXT, PNG_FREE_UNKN,
|
||||
or simply PNG_FREE_ALL
|
||||
n - sequence number of item to be freed
|
||||
(-1 for all items)
|
||||
|
||||
These functions may be safely called when the relevant storage has
|
||||
This function may be safely called when the relevant storage has
|
||||
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
|
||||
@@ -1945,12 +1955,12 @@ 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
|
||||
same choices as in png_free_data()
|
||||
freer - one of
|
||||
PNG_DESTROY_WILL_FREE_DATA
|
||||
PNG_SET_WILL_FREE_DATA
|
||||
PNG_USER_WILL_FREE_DATA
|
||||
mask - which data elements are affected
|
||||
same choices as in png_free_data()
|
||||
freer - one of
|
||||
PNG_DESTROY_WILL_FREE_DATA
|
||||
PNG_SET_WILL_FREE_DATA
|
||||
PNG_USER_WILL_FREE_DATA
|
||||
|
||||
This function only affects data that has already been allocated.
|
||||
You can call this function after reading the PNG data but before calling
|
||||
@@ -1959,13 +1969,40 @@ 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. When the user assumes
|
||||
responsibility for libpng-allocated data, the application must use
|
||||
png_free() to free it.
|
||||
png_free() to free it, and when the user transfers responsibility to libpng
|
||||
for data that the user has allocated, the user must have used png_malloc()
|
||||
or png_zalloc() to allocate it (the png_zalloc() function is the same
|
||||
as png_malloc() except that it also zeroes the newly-allocated memory).
|
||||
|
||||
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].
|
||||
|
||||
If you allocated text_ptr.text, text_ptr.lang, and text_ptr.translated_keyword
|
||||
separately, do not transfer responsibility for freeing text_ptr to libpng,
|
||||
because when libpng fills a png_text structure it combines these members with
|
||||
the key member, and png_free_data() will free only text_ptr.key. Similarly,
|
||||
if you transfer responsibility for free'ing text_ptr from libpng to your
|
||||
application, your application must not separately free those members.
|
||||
|
||||
The png_free_data() function will turn off the "valid" flag for anything
|
||||
it frees. If you need to turn the flag off for a chunk that was freed by your
|
||||
application instead of by libpng, you can use
|
||||
|
||||
png_set_invalid(png_ptr, info_ptr, mask);
|
||||
mask - identifies the chunks to be made invalid,
|
||||
containing the logical OR of one or
|
||||
more of
|
||||
PNG_INFO_gAMA, PNG_INFO_sBIT,
|
||||
PNG_INFO_cHRM, PNG_INFO_PLTE,
|
||||
PNG_INFO_tRNS, PNG_INFO_bKGD,
|
||||
PNG_INFO_hIST, PNG_INFO_pHYs,
|
||||
PNG_INFO_oFFs, PNG_INFO_tIME,
|
||||
PNG_INFO_pCAL, PNG_INFO_sRGB,
|
||||
PNG_INFO_iCCP, PNG_INFO_sPLT,
|
||||
PNG_INFO_sCAL, PNG_INFO_IDAT
|
||||
|
||||
For a more compact example of reading a PNG image, see the file example.c.
|
||||
|
||||
.SS Reading PNG files progressively
|
||||
@@ -2606,7 +2643,8 @@ transformations are permitted, enabled by the following masks.
|
||||
PNG_TRANSFORM_SWAP_ENDIAN Byte-swap 16-bit samples
|
||||
PNG_TRANSFORM_STRIP_FILLER Strip out filler bytes.
|
||||
|
||||
If you have valid image data in the info structure, simply do this:
|
||||
If you have valid image data in the info structure (you can use
|
||||
png_set_rows() to put image data in the info structure), simply do this:
|
||||
|
||||
png_write_png(png_ptr, info_ptr, png_transforms, NULL)
|
||||
|
||||
@@ -2863,20 +2901,22 @@ When you are done, you can free all memory used by libpng like this:
|
||||
png_destroy_write_struct(&png_ptr, &info_ptr);
|
||||
|
||||
It is also possible to individually free the info_ptr members that
|
||||
point to libpng-allocated storage with the following functions:
|
||||
point to libpng-allocated storage with the following function:
|
||||
|
||||
png_free_data(png_ptr, info_ptr, mask, n)
|
||||
mask - identifies data to be freed, a mask
|
||||
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,
|
||||
PNG_FREE_TEXT, PNG_FREE_UNKN,
|
||||
or simply PNG_FREE_ALL
|
||||
n - sequence number of item to be freed
|
||||
(-1 for all items)
|
||||
mask - identifies data to be freed, a mask
|
||||
containing the logical OR of one or
|
||||
more of
|
||||
PNG_FREE_PLTE, PNG_FREE_TRNS,
|
||||
PNG_FREE_HIST, PNG_FREE_ICCP,
|
||||
PNG_FREE_PCAL, PNG_FREE_ROWS,
|
||||
PNG_FREE_SCAL, PNG_FREE_SPLT,
|
||||
PNG_FREE_TEXT, PNG_FREE_UNKN,
|
||||
or simply PNG_FREE_ALL
|
||||
n - sequence number of item to be freed
|
||||
(-1 for all items)
|
||||
|
||||
These functions may be safely called when the relevant storage has
|
||||
This function may be safely called when the relevant storage has
|
||||
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
|
||||
@@ -2894,12 +2934,12 @@ 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
|
||||
same choices as in png_free_data()
|
||||
freer - one of
|
||||
PNG_DESTROY_WILL_FREE_DATA
|
||||
PNG_SET_WILL_FREE_DATA
|
||||
PNG_USER_WILL_FREE_DATA
|
||||
mask - which data elements are affected
|
||||
same choices as in png_free_data()
|
||||
freer - one of
|
||||
PNG_DESTROY_WILL_FREE_DATA
|
||||
PNG_SET_WILL_FREE_DATA
|
||||
PNG_USER_WILL_FREE_DATA
|
||||
|
||||
For example, to transfer responsibility for some data from a read structure
|
||||
to a write structure, you could use
|
||||
@@ -2921,8 +2961,17 @@ 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.
|
||||
application must use
|
||||
png_free() to free it, and when the user transfers responsibility to libpng
|
||||
for data that the user has allocated, the user must have used png_malloc()
|
||||
or png_zalloc() to allocate it.
|
||||
|
||||
If you allocated text_ptr.text, text_ptr.lang, and text_ptr.translated_keyword
|
||||
separately, do not transfer responsibility for freeing text_ptr to libpng,
|
||||
because when libpng fills a png_text structure it combines these members with
|
||||
the key member, and png_free_data() will free only text_ptr.key. Similarly,
|
||||
if you transfer responsibility for free'ing text_ptr from libpng to your
|
||||
application, your application must not separately free those members.
|
||||
For a more compact example of writing a PNG image, see the file example.c.
|
||||
|
||||
.SH V. Modifying/Customizing libpng:
|
||||
@@ -3312,15 +3361,29 @@ png_set_error_fn(), which is essentially the same function, but with a new
|
||||
name to force compilation errors with applications that try to use the old
|
||||
method.
|
||||
|
||||
Starting with version 1.0.7, you can find out which version of the library
|
||||
you are using at run-time:
|
||||
|
||||
png_uint_32 libpng_vn = png_access_version_number();
|
||||
|
||||
The number libpng_vn is constructed from the major version, minor
|
||||
version with leading zero, and release number with leading zero,
|
||||
(e.g., libpng_vn for version 1.0.7 is 10007).
|
||||
|
||||
You can also check which version of png.h you used when compiling your
|
||||
application:
|
||||
|
||||
png_uint_32 application_vn = PNG_LIBPNG_VER;
|
||||
|
||||
.SH VII. Y2K Compliance in libpng
|
||||
|
||||
May 6, 2000
|
||||
May 17, 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.7beta11 are Y2K compliant. It is my belief that earlier
|
||||
upward through 1.0.7beta14 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
|
||||
@@ -3461,7 +3524,7 @@ possible without all of you.
|
||||
|
||||
Thanks to Frank J. T. Wojcik for helping with the documentation.
|
||||
|
||||
Libpng version 1.0.7beta11 - May 6, 2000:
|
||||
Libpng version 1.0.7beta14 - May 17, 2000:
|
||||
Initially created in 1995 by Guy Eric Schalnat, then of Group 42, Inc.
|
||||
Currently maintained by Glenn Randers-Pehrson (randeg@alum.rpi.edu).
|
||||
|
||||
@@ -3476,7 +3539,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.7beta11, May 6, 2000)
|
||||
(libpng versions 0.97, January 1998, through 1.0.7beta14, May 17, 2000)
|
||||
|
||||
For the purposes of this copyright and license, "Contributing Authors"
|
||||
is defined as the following set of individuals:
|
||||
|
||||
137
libpng.txt
137
libpng.txt
@@ -1,6 +1,6 @@
|
||||
libpng.txt - A description on how to use and modify libpng
|
||||
|
||||
libpng version 1.0.7beta11 - May 6, 2000
|
||||
libpng version 1.0.7beta14 - May 17, 2000
|
||||
Updated and distributed by Glenn Randers-Pehrson
|
||||
<randeg@alum.rpi.edu>
|
||||
Copyright (c) 1998, 1999, 2000 Glenn Randers-Pehrson
|
||||
@@ -552,7 +552,7 @@ into the info_ptr is returned for any complex types.
|
||||
text_ptr[i].key - keyword for comment. Must contain
|
||||
1-79 characters.
|
||||
text_ptr[i].text - text comments for current
|
||||
keyword. Can empty.
|
||||
keyword. Can be empty.
|
||||
text_ptr[i].text_length - length of text string,
|
||||
after decompression, 0 for iTXt
|
||||
text_ptr[i].itxt_length - length of itxt string,
|
||||
@@ -1179,20 +1179,22 @@ When you are done, you can free all memory allocated by libpng like this:
|
||||
&end_info);
|
||||
|
||||
It is also possible to individually free the info_ptr members that
|
||||
point to libpng-allocated storage with the following functions:
|
||||
point to libpng-allocated storage with the following function:
|
||||
|
||||
png_free_data(png_ptr, info_ptr, mask, n)
|
||||
mask - identifies data to be freed, a mask
|
||||
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,
|
||||
PNG_FREE_TEXT, PNG_FREE_UNKN,
|
||||
or simply PNG_FREE_ALL
|
||||
n - sequence number of item to be freed
|
||||
(-1 for all items)
|
||||
mask - identifies data to be freed, a mask
|
||||
containing the logical OR of one or
|
||||
more of
|
||||
PNG_FREE_PLTE, PNG_FREE_TRNS,
|
||||
PNG_FREE_HIST, PNG_FREE_ICCP,
|
||||
PNG_FREE_PCAL, PNG_FREE_ROWS,
|
||||
PNG_FREE_SCAL, PNG_FREE_SPLT,
|
||||
PNG_FREE_TEXT, PNG_FREE_UNKN,
|
||||
or simply PNG_FREE_ALL
|
||||
n - sequence number of item to be freed
|
||||
(-1 for all items)
|
||||
|
||||
These functions may be safely called when the relevant storage has
|
||||
This function may be safely called when the relevant storage has
|
||||
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
|
||||
@@ -1206,12 +1208,12 @@ 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
|
||||
same choices as in png_free_data()
|
||||
freer - one of
|
||||
PNG_DESTROY_WILL_FREE_DATA
|
||||
PNG_SET_WILL_FREE_DATA
|
||||
PNG_USER_WILL_FREE_DATA
|
||||
mask - which data elements are affected
|
||||
same choices as in png_free_data()
|
||||
freer - one of
|
||||
PNG_DESTROY_WILL_FREE_DATA
|
||||
PNG_SET_WILL_FREE_DATA
|
||||
PNG_USER_WILL_FREE_DATA
|
||||
|
||||
This function only affects data that has already been allocated.
|
||||
You can call this function after reading the PNG data but before calling
|
||||
@@ -1220,13 +1222,40 @@ 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. When the user assumes
|
||||
responsibility for libpng-allocated data, the application must use
|
||||
png_free() to free it.
|
||||
png_free() to free it, and when the user transfers responsibility to libpng
|
||||
for data that the user has allocated, the user must have used png_malloc()
|
||||
or png_zalloc() to allocate it (the png_zalloc() function is the same
|
||||
as png_malloc() except that it also zeroes the newly-allocated memory).
|
||||
|
||||
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].
|
||||
|
||||
If you allocated text_ptr.text, text_ptr.lang, and text_ptr.translated_keyword
|
||||
separately, do not transfer responsibility for freeing text_ptr to libpng,
|
||||
because when libpng fills a png_text structure it combines these members with
|
||||
the key member, and png_free_data() will free only text_ptr.key. Similarly,
|
||||
if you transfer responsibility for free'ing text_ptr from libpng to your
|
||||
application, your application must not separately free those members.
|
||||
|
||||
The png_free_data() function will turn off the "valid" flag for anything
|
||||
it frees. If you need to turn the flag off for a chunk that was freed by your
|
||||
application instead of by libpng, you can use
|
||||
|
||||
png_set_invalid(png_ptr, info_ptr, mask);
|
||||
mask - identifies the chunks to be made invalid,
|
||||
containing the logical OR of one or
|
||||
more of
|
||||
PNG_INFO_gAMA, PNG_INFO_sBIT,
|
||||
PNG_INFO_cHRM, PNG_INFO_PLTE,
|
||||
PNG_INFO_tRNS, PNG_INFO_bKGD,
|
||||
PNG_INFO_hIST, PNG_INFO_pHYs,
|
||||
PNG_INFO_oFFs, PNG_INFO_tIME,
|
||||
PNG_INFO_pCAL, PNG_INFO_sRGB,
|
||||
PNG_INFO_iCCP, PNG_INFO_sPLT,
|
||||
PNG_INFO_sCAL, PNG_INFO_IDAT
|
||||
|
||||
For a more compact example of reading a PNG image, see the file example.c.
|
||||
|
||||
Reading PNG files progressively
|
||||
@@ -1867,7 +1896,8 @@ transformations are permitted, enabled by the following masks.
|
||||
PNG_TRANSFORM_SWAP_ENDIAN Byte-swap 16-bit samples
|
||||
PNG_TRANSFORM_STRIP_FILLER Strip out filler bytes.
|
||||
|
||||
If you have valid image data in the info structure, simply do this:
|
||||
If you have valid image data in the info structure (you can use
|
||||
png_set_rows() to put image data in the info structure), simply do this:
|
||||
|
||||
png_write_png(png_ptr, info_ptr, png_transforms, NULL)
|
||||
|
||||
@@ -2124,20 +2154,22 @@ When you are done, you can free all memory used by libpng like this:
|
||||
png_destroy_write_struct(&png_ptr, &info_ptr);
|
||||
|
||||
It is also possible to individually free the info_ptr members that
|
||||
point to libpng-allocated storage with the following functions:
|
||||
point to libpng-allocated storage with the following function:
|
||||
|
||||
png_free_data(png_ptr, info_ptr, mask, n)
|
||||
mask - identifies data to be freed, a mask
|
||||
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,
|
||||
PNG_FREE_TEXT, PNG_FREE_UNKN,
|
||||
or simply PNG_FREE_ALL
|
||||
n - sequence number of item to be freed
|
||||
(-1 for all items)
|
||||
mask - identifies data to be freed, a mask
|
||||
containing the logical OR of one or
|
||||
more of
|
||||
PNG_FREE_PLTE, PNG_FREE_TRNS,
|
||||
PNG_FREE_HIST, PNG_FREE_ICCP,
|
||||
PNG_FREE_PCAL, PNG_FREE_ROWS,
|
||||
PNG_FREE_SCAL, PNG_FREE_SPLT,
|
||||
PNG_FREE_TEXT, PNG_FREE_UNKN,
|
||||
or simply PNG_FREE_ALL
|
||||
n - sequence number of item to be freed
|
||||
(-1 for all items)
|
||||
|
||||
These functions may be safely called when the relevant storage has
|
||||
This function may be safely called when the relevant storage has
|
||||
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
|
||||
@@ -2155,12 +2187,12 @@ 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
|
||||
same choices as in png_free_data()
|
||||
freer - one of
|
||||
PNG_DESTROY_WILL_FREE_DATA
|
||||
PNG_SET_WILL_FREE_DATA
|
||||
PNG_USER_WILL_FREE_DATA
|
||||
mask - which data elements are affected
|
||||
same choices as in png_free_data()
|
||||
freer - one of
|
||||
PNG_DESTROY_WILL_FREE_DATA
|
||||
PNG_SET_WILL_FREE_DATA
|
||||
PNG_USER_WILL_FREE_DATA
|
||||
|
||||
For example, to transfer responsibility for some data from a read structure
|
||||
to a write structure, you could use
|
||||
@@ -2182,8 +2214,17 @@ 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.
|
||||
application must use
|
||||
png_free() to free it, and when the user transfers responsibility to libpng
|
||||
for data that the user has allocated, the user must have used png_malloc()
|
||||
or png_zalloc() to allocate it.
|
||||
|
||||
If you allocated text_ptr.text, text_ptr.lang, and text_ptr.translated_keyword
|
||||
separately, do not transfer responsibility for freeing text_ptr to libpng,
|
||||
because when libpng fills a png_text structure it combines these members with
|
||||
the key member, and png_free_data() will free only text_ptr.key. Similarly,
|
||||
if you transfer responsibility for free'ing text_ptr from libpng to your
|
||||
application, your application must not separately free those members.
|
||||
For a more compact example of writing a PNG image, see the file example.c.
|
||||
|
||||
V. Modifying/Customizing libpng:
|
||||
@@ -2573,15 +2614,29 @@ png_set_error_fn(), which is essentially the same function, but with a new
|
||||
name to force compilation errors with applications that try to use the old
|
||||
method.
|
||||
|
||||
Starting with version 1.0.7, you can find out which version of the library
|
||||
you are using at run-time:
|
||||
|
||||
png_uint_32 libpng_vn = png_access_version_number();
|
||||
|
||||
The number libpng_vn is constructed from the major version, minor
|
||||
version with leading zero, and release number with leading zero,
|
||||
(e.g., libpng_vn for version 1.0.7 is 10007).
|
||||
|
||||
You can also check which version of png.h you used when compiling your
|
||||
application:
|
||||
|
||||
png_uint_32 application_vn = PNG_LIBPNG_VER;
|
||||
|
||||
VII. Y2K Compliance in libpng
|
||||
|
||||
May 6, 2000
|
||||
May 17, 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.7beta11 are Y2K compliant. It is my belief that earlier
|
||||
upward through 1.0.7beta14 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 "May 6, 2000"
|
||||
.TH LIBPNGPF 3 "May 17, 2000"
|
||||
.SH NAME
|
||||
libpng \- Portable Network Graphics (PNG) Reference Library 1.0.7beta11
|
||||
libpng \- Portable Network Graphics (PNG) Reference Library 1.0.7beta14
|
||||
(private functions)
|
||||
.SH SYNOPSIS
|
||||
\fB#include <png.h>\fP
|
||||
|
||||
2
png.5
2
png.5
@@ -1,4 +1,4 @@
|
||||
.TH PNG 5 "May 6, 2000"
|
||||
.TH PNG 5 "May 17, 2000"
|
||||
.SH NAME
|
||||
png \- Portable Network Graphics (PNG) format
|
||||
.SH DESCRIPTION
|
||||
|
||||
191
png.c
191
png.c
@@ -1,7 +1,7 @@
|
||||
|
||||
/* png.c - location for general purpose libpng functions
|
||||
*
|
||||
* libpng version 1.0.7beta11 - May 6, 2000
|
||||
* libpng version 1.0.7beta14 - May 17, 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_7beta11 Your_png_h_is_not_version_1_0_7beta11;
|
||||
typedef version_1_0_7beta14 Your_png_h_is_not_version_1_0_7beta14;
|
||||
|
||||
/* 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.7beta11";
|
||||
char png_libpng_ver[12] = "1.0.7beta14";
|
||||
|
||||
/* png_sig was changed to a function in version 1.0.5c */
|
||||
/* Place to hold the signature string for a PNG file. */
|
||||
@@ -289,108 +289,110 @@ 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)
|
||||
if ((mask & PNG_FREE_TEXT) & info_ptr->free_me)
|
||||
#else
|
||||
if (mask & PNG_FREE_TEXT)
|
||||
#endif
|
||||
{
|
||||
if (num != -1)
|
||||
{
|
||||
if (info_ptr->text[num].key)
|
||||
if (info_ptr->text && info_ptr->text[num].key)
|
||||
{
|
||||
png_free(png_ptr, info_ptr->text[num].key);
|
||||
info_ptr->text[num].key = NULL;
|
||||
}
|
||||
}
|
||||
else if (info_ptr->text != NULL)
|
||||
else
|
||||
{
|
||||
int i;
|
||||
for (i = 0; i < info_ptr->num_text; i++)
|
||||
png_free_data(png_ptr, info_ptr, PNG_FREE_TEXT, i);
|
||||
png_free(png_ptr, info_ptr->text);
|
||||
info_ptr->text = NULL;
|
||||
info_ptr->num_text=0;
|
||||
int i;
|
||||
for (i = 0; i < info_ptr->num_text; i++)
|
||||
png_free_data(png_ptr, info_ptr, PNG_FREE_TEXT, i);
|
||||
png_free(png_ptr, info_ptr->text);
|
||||
info_ptr->text = NULL;
|
||||
info_ptr->num_text=0;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
#if defined(PNG_tRNS_SUPPORTED)
|
||||
/* free any tRNS entry */
|
||||
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)
|
||||
if ((mask & PNG_FREE_TRNS) & info_ptr->free_me)
|
||||
#else
|
||||
if (png_ptr->flags & PNG_FLAG_FREE_TRNS)
|
||||
if ((mask & PNG_FREE_TRNS) && (png_ptr->flags & PNG_FLAG_FREE_TRNS))
|
||||
#endif
|
||||
png_free(png_ptr, info_ptr->trans);
|
||||
info_ptr->valid &= ~PNG_INFO_tRNS;
|
||||
}
|
||||
{
|
||||
png_free(png_ptr, info_ptr->trans);
|
||||
info_ptr->valid &= ~PNG_INFO_tRNS;
|
||||
}
|
||||
#endif
|
||||
|
||||
#if defined(PNG_sCAL_SUPPORTED)
|
||||
/* free any sCAL entry */
|
||||
{
|
||||
if (info_ptr->valid & PNG_INFO_sCAL)
|
||||
{
|
||||
#if defined(PNG_FIXED_POINT_SUPPORTED) && !defined(PNG_FLOATING_POINT_SUPPORTED)
|
||||
png_free(png_ptr, info_ptr->scal_s_width);
|
||||
png_free(png_ptr, info_ptr->scal_s_height);
|
||||
#ifdef PNG_FREE_ME_SUPPORTED
|
||||
if ((mask & PNG_FREE_SCAL) & info_ptr->free_me)
|
||||
#else
|
||||
if (mask & PNG_FREE_SCAL)
|
||||
#endif
|
||||
info_ptr->valid &= ~PNG_INFO_sCAL;
|
||||
}
|
||||
{
|
||||
#if defined(PNG_FIXED_POINT_SUPPORTED) && !defined(PNG_FLOATING_POINT_SUPPORTED)
|
||||
png_free(png_ptr, info_ptr->scal_s_width);
|
||||
png_free(png_ptr, info_ptr->scal_s_height);
|
||||
#endif
|
||||
info_ptr->valid &= ~PNG_INFO_sCAL;
|
||||
}
|
||||
#endif
|
||||
|
||||
#if defined(PNG_pCAL_SUPPORTED)
|
||||
/* free any pCAL entry */
|
||||
#ifdef PNG_FREE_ME_SUPPORTED
|
||||
if ((mask & PNG_FREE_PCAL) & info_ptr->free_me)
|
||||
#else
|
||||
if (mask & PNG_FREE_PCAL)
|
||||
#endif
|
||||
{
|
||||
if (info_ptr->valid & PNG_INFO_pCAL)
|
||||
{
|
||||
png_free(png_ptr, info_ptr->pcal_purpose);
|
||||
png_free(png_ptr, info_ptr->pcal_units);
|
||||
if (info_ptr->pcal_params != NULL)
|
||||
{
|
||||
int i;
|
||||
for (i = 0; i < (int)info_ptr->pcal_nparams; i++)
|
||||
{
|
||||
png_free(png_ptr, info_ptr->pcal_params[i]);
|
||||
}
|
||||
png_free(png_ptr, info_ptr->pcal_params);
|
||||
}
|
||||
info_ptr->valid &= ~PNG_INFO_pCAL;
|
||||
}
|
||||
png_free(png_ptr, info_ptr->pcal_purpose);
|
||||
png_free(png_ptr, info_ptr->pcal_units);
|
||||
if (info_ptr->pcal_params != NULL)
|
||||
{
|
||||
int i;
|
||||
for (i = 0; i < (int)info_ptr->pcal_nparams; i++)
|
||||
png_free(png_ptr, info_ptr->pcal_params[i]);
|
||||
png_free(png_ptr, info_ptr->pcal_params);
|
||||
}
|
||||
info_ptr->valid &= ~PNG_INFO_pCAL;
|
||||
}
|
||||
#endif
|
||||
|
||||
#if defined(PNG_iCCP_SUPPORTED)
|
||||
/* free any iCCP entry */
|
||||
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)
|
||||
if ((mask & PNG_FREE_ICCP) & info_ptr->free_me)
|
||||
#else
|
||||
if (mask & PNG_FREE_ICCP)
|
||||
#endif
|
||||
{
|
||||
png_free(png_ptr, info_ptr->iccp_name);
|
||||
png_free(png_ptr, info_ptr->iccp_profile);
|
||||
}
|
||||
info_ptr->valid &= ~PNG_INFO_iCCP;
|
||||
}
|
||||
{
|
||||
png_free(png_ptr, info_ptr->iccp_name);
|
||||
png_free(png_ptr, info_ptr->iccp_profile);
|
||||
info_ptr->valid &= ~PNG_INFO_iCCP;
|
||||
}
|
||||
#endif
|
||||
|
||||
#if defined(PNG_sPLT_SUPPORTED)
|
||||
/* free a given sPLT entry, or (if num == -1) all sPLT entries */
|
||||
#ifdef PNG_FREE_ME_SUPPORTED
|
||||
if ((mask & PNG_FREE_SPLT) & info_ptr->free_me)
|
||||
#else
|
||||
if (mask & PNG_FREE_SPLT)
|
||||
#endif
|
||||
{
|
||||
if (num != -1)
|
||||
{
|
||||
png_free(png_ptr, info_ptr->splt_palettes[num].name);
|
||||
png_free(png_ptr, info_ptr->splt_palettes[num].entries);
|
||||
info_ptr->valid &= ~PNG_INFO_sPLT;
|
||||
if(info_ptr->splt_palettes)
|
||||
{
|
||||
png_free(png_ptr, info_ptr->splt_palettes[num].name);
|
||||
png_free(png_ptr, info_ptr->splt_palettes[num].entries);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -403,17 +405,25 @@ if (mask & PNG_FREE_SPLT)
|
||||
png_free(png_ptr, info_ptr->splt_palettes);
|
||||
info_ptr->splt_palettes_num = 0;
|
||||
}
|
||||
info_ptr->valid &= ~PNG_INFO_sPLT;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
#if defined(PNG_UNKNOWN_CHUNKS_SUPPORTED)
|
||||
#ifdef PNG_FREE_ME_SUPPORTED
|
||||
if ((mask & PNG_FREE_UNKN) & info_ptr->free_me)
|
||||
#else
|
||||
if (mask & PNG_FREE_UNKN)
|
||||
#endif
|
||||
{
|
||||
if (num != -1)
|
||||
{
|
||||
png_free(png_ptr, info_ptr->unknown_chunks[num].data);
|
||||
info_ptr->unknown_chunks[num].data = NULL;
|
||||
if(info_ptr->unknown_chunks)
|
||||
{
|
||||
png_free(png_ptr, info_ptr->unknown_chunks[num].data);
|
||||
info_ptr->unknown_chunks[num].data = NULL;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -433,56 +443,54 @@ if (mask & PNG_FREE_UNKN)
|
||||
|
||||
#if defined(PNG_hIST_SUPPORTED)
|
||||
/* free any hIST entry */
|
||||
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)
|
||||
if ((mask & PNG_FREE_HIST) & info_ptr->free_me)
|
||||
#else
|
||||
if (png_ptr->flags & PNG_FLAG_FREE_HIST)
|
||||
if ((mask & PNG_FREE_HIST) && (png_ptr->flags & PNG_FLAG_FREE_HIST))
|
||||
#endif
|
||||
png_free(png_ptr, info_ptr->hist);
|
||||
info_ptr->valid &= ~PNG_INFO_hIST;
|
||||
}
|
||||
{
|
||||
png_free(png_ptr, info_ptr->hist);
|
||||
info_ptr->valid &= ~PNG_INFO_hIST;
|
||||
}
|
||||
#endif
|
||||
|
||||
/* free any PLTE entry that was internally allocated */
|
||||
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)
|
||||
if ((mask & PNG_FREE_PLTE) & info_ptr->free_me)
|
||||
#else
|
||||
if (png_ptr->flags & PNG_FLAG_FREE_PLTE)
|
||||
if ((mask & PNG_FREE_PLTE) && (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;
|
||||
}
|
||||
{
|
||||
png_zfree(png_ptr, info_ptr->palette);
|
||||
info_ptr->valid &= ~PNG_INFO_PLTE;
|
||||
info_ptr->num_palette = 0;
|
||||
}
|
||||
|
||||
#if defined(PNG_INFO_IMAGE_SUPPORTED)
|
||||
/* 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)
|
||||
if ((mask & PNG_FREE_ROWS) & info_ptr->free_me)
|
||||
#else
|
||||
if (mask & PNG_FREE_ROWS)
|
||||
#endif
|
||||
{
|
||||
{
|
||||
if(info_ptr->row_pointers)
|
||||
{
|
||||
int row;
|
||||
|
||||
for (row = 0; row < (int)info_ptr->height; row++)
|
||||
png_free(png_ptr, info_ptr->row_pointers[row]);
|
||||
png_free(png_ptr, info_ptr->row_pointers);
|
||||
}
|
||||
info_ptr->row_pointers=NULL;
|
||||
}
|
||||
info_ptr->valid &= ~PNG_INFO_IDAT;
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef PNG_FREE_ME_SUPPORTED
|
||||
if(num == -1)
|
||||
info_ptr->free_me &= ~mask;
|
||||
else
|
||||
info_ptr->free_me &= ~(mask & ~PNG_FREE_MUL);
|
||||
#endif
|
||||
}
|
||||
|
||||
@@ -583,7 +591,7 @@ png_charp PNGAPI
|
||||
png_get_copyright(png_structp png_ptr)
|
||||
{
|
||||
if (png_ptr != NULL || png_ptr == NULL) /* silence compiler warning */
|
||||
return ("\n libpng version 1.0.7beta11 - May 6, 2000\n\
|
||||
return ("\n libpng version 1.0.7beta14 - May 17, 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");
|
||||
@@ -601,8 +609,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.7beta11");
|
||||
return("1.0.7beta11");
|
||||
return("1.0.7beta14");
|
||||
return("1.0.7beta14");
|
||||
}
|
||||
|
||||
png_charp PNGAPI
|
||||
@@ -646,3 +654,10 @@ png_reset_zstream(png_structp png_ptr)
|
||||
{
|
||||
return (inflateReset(&png_ptr->zstream));
|
||||
}
|
||||
|
||||
png_uint_32 PNGAPI
|
||||
png_access_version_number(void)
|
||||
{
|
||||
/* Version of *.c files used when building libpng */
|
||||
return((png_uint_32) 10007L);
|
||||
}
|
||||
|
||||
106
png.h
106
png.h
@@ -1,7 +1,7 @@
|
||||
|
||||
/* png.h - header file for PNG reference library
|
||||
*
|
||||
* libpng version 1.0.7beta11 - May 6, 2000
|
||||
* libpng version 1.0.7beta14 - May 17, 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.7beta11 - May 6, 2000: Glenn
|
||||
* libpng versions 0.97, January 1998, through 1.0.7beta14 - May 17, 2000: Glenn
|
||||
* See also "Contributing Authors", below.
|
||||
*
|
||||
* Note about libpng version numbers:
|
||||
@@ -52,10 +52,10 @@
|
||||
* 1.0.6h 10007 10.6h (testing xy.z so-numbering)
|
||||
* 1.0.6i 10007 10.6i
|
||||
* 1.0.6j 10007 2.1.0.6j (incompatible with 1.0.0)
|
||||
* 1.0.7beta11 10007 2.1.0.7beta11 (still compatible)
|
||||
* 1.0.7beta11-12 10007 2.1.0.7beta11-12 (binary compatible)
|
||||
* 1.0.7rc1 10007 2.1.0.7rc1 (binary compatible)
|
||||
* planned:
|
||||
* 1.0.7prep00 10007 2.1.0.7prep00 (still compatible)
|
||||
* 1.0.6ptch04 (w/4 patches) 10006 2.1.0.6 (binary compatible)
|
||||
* 1.0.6patch4 (w/4 patches) 10006 2.1.0.6 (binary compatible)
|
||||
* 1.0.7 10007 (still compatible)
|
||||
*
|
||||
* Henceforth the source version will match the shared-library major
|
||||
@@ -66,7 +66,7 @@
|
||||
* to the source version x.y.z (leading zeros in y and z). Beta versions
|
||||
* were given the previous public release number plus a letter, until
|
||||
* version 1.0.6j; from then on they were given the upcoming public
|
||||
* release number plus "-beta-nn" or "-pre-nn".
|
||||
* release number plus "betaNN" or "rcN".
|
||||
*
|
||||
* Binary incompatibility exists only when applications make direct access
|
||||
* to the info_ptr or png_ptr members through png.h, and the compiled
|
||||
@@ -87,7 +87,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.7beta11, May 6, 2000)
|
||||
* (libpng versions 0.97, January 1998, through 1.0.7beta14, May 17, 2000)
|
||||
*
|
||||
* For the purposes of this copyright and license, "Contributing Authors"
|
||||
* is defined as the following set of individuals:
|
||||
@@ -162,13 +162,13 @@
|
||||
* Y2K compliance in libpng:
|
||||
* =========================
|
||||
*
|
||||
* May 6, 2000
|
||||
* May 17, 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.7beta11 are Y2K compliant. It is my belief that earlier
|
||||
* upward through 1.0.7beta14 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
|
||||
@@ -223,6 +223,30 @@
|
||||
* at the actual function definitions and structure components.
|
||||
*/
|
||||
|
||||
/* Version information for png.h - this should match the version in png.c */
|
||||
#define PNG_LIBPNG_VER_STRING "1.0.7beta14"
|
||||
|
||||
#define PNG_LIBPNG_VER_SONUM 2
|
||||
|
||||
/* These should match the first 3 components of PNG_LIBPNG_VER_STRING: */
|
||||
#define PNG_LIBPNG_VER_MAJOR 1
|
||||
#define PNG_LIBPNG_VER_MINOR 0
|
||||
#define PNG_LIBPNG_VER_RELEASE 7
|
||||
/* This should match the numeric part of the final component of
|
||||
* PNG_LIBPNG_VER_STRING, omitting any leading zero: */
|
||||
#define PNG_LIBPNG_VER_BUILD 14
|
||||
|
||||
/* Careful here. At one time, Guy wanted to use 082, but that would be octal.
|
||||
* We must not include leading zeros.
|
||||
* Versions 0.7 through 1.0.0 were in the range 0 to 100 here (only
|
||||
* version 1.0.0 was mis-numbered 100 instead of 10000). From
|
||||
* version 1.0.1 it's xxyyzz, where x=major, y=minor, z=release */
|
||||
#define PNG_LIBPNG_VER 10007 /* 1.0.7 */
|
||||
|
||||
/* Note to maintainer: update this number in scripts/pngdef.pas as well */
|
||||
|
||||
#ifndef PNG_VERSION_INFO_ONLY
|
||||
|
||||
/* include the compression library's header */
|
||||
#include "zlib.h"
|
||||
|
||||
@@ -245,18 +269,6 @@ extern "C" {
|
||||
* which applications aren't expected to use directly.
|
||||
*/
|
||||
|
||||
/* Version information for png.h - this should match the version in png.c */
|
||||
#define PNG_LIBPNG_VER_STRING "1.0.7beta11"
|
||||
|
||||
/* Careful here. At one time, Guy wanted to use 082, but that would be octal.
|
||||
* We must not include leading zeros.
|
||||
* Versions 0.7 through 1.0.0 were in the range 0 to 100 here (only
|
||||
* version 1.0.0 was mis-numbered 100 instead of 10000). From
|
||||
* version 1.0.1 it's xxyyzz, where x=major, y=minor, z=bugfix */
|
||||
#define PNG_LIBPNG_VER 10007 /* 1.0.7 */
|
||||
|
||||
/* Note to maintainer: update this number in scripts/pngdef.pas as well */
|
||||
|
||||
/* variables declared in png.c - only it needs to define PNG_NO_EXTERN */
|
||||
#if !defined(PNG_NO_EXTERN) || defined(PNG_ALWAYS_EXTERN)
|
||||
/* Version information for C files, stored in png.c. This had better match
|
||||
@@ -1111,9 +1123,9 @@ struct png_struct_def
|
||||
};
|
||||
|
||||
/* This prevents a compiler error in png_get_copyright() in png.c if png.c
|
||||
and png.h are both at * version 1.0.7beta11
|
||||
and png.h are both at * version 1.0.7beta14
|
||||
*/
|
||||
typedef png_structp version_1_0_7beta11;
|
||||
typedef png_structp version_1_0_7beta14;
|
||||
|
||||
typedef png_struct FAR * FAR * png_structpp;
|
||||
|
||||
@@ -1123,6 +1135,9 @@ typedef png_struct FAR * FAR * png_structpp;
|
||||
* a simple one line description of the use of each function.
|
||||
*/
|
||||
|
||||
/* Returns the version number of the library */
|
||||
extern PNG_EXPORT(png_uint_32,png_access_version_number) PNGARG((void));
|
||||
|
||||
/* Tell lib we have already handled the first <num_bytes> magic bytes.
|
||||
* Handling more than 8 bytes from the beginning of the file is an error.
|
||||
*/
|
||||
@@ -1675,14 +1690,15 @@ extern PNG_EXPORT(void,png_data_freer) PNGARG((png_structp png_ptr,
|
||||
#define PNG_FREE_ICCP 0x0010
|
||||
#define PNG_FREE_SPLT 0x0020
|
||||
#define PNG_FREE_ROWS 0x0040
|
||||
#define PNG_FREE_PCAL 0x0080 /* not used any more */
|
||||
#define PNG_FREE_SCAL 0x0100 /* not used any more */
|
||||
#define PNG_FREE_PCAL 0x0080
|
||||
#define PNG_FREE_SCAL 0x0100
|
||||
#define PNG_FREE_UNKN 0x0200
|
||||
#define PNG_FREE_LIST 0x0400
|
||||
#define PNG_FREE_PLTE 0x1000
|
||||
#define PNG_FREE_TRNS 0x2000
|
||||
#define PNG_FREE_TEXT 0x4000
|
||||
#define PNG_FREE_ALL 0x3fff
|
||||
#define PNG_FREE_ALL 0x7fff
|
||||
#define PNG_FREE_MUL 0x4220 /* PNG_FREE_SPLT|PNG_FREE_TEXT|PNG_FREE_UNKN */
|
||||
|
||||
#ifdef PNG_USER_MEM_SUPPORTED
|
||||
extern PNG_EXPORT(png_voidp,png_malloc_default) PNGARG((png_structp png_ptr,
|
||||
@@ -2061,6 +2077,12 @@ extern PNG_EXPORT(png_uint_32,png_get_unknown_chunks) PNGARG((png_structp
|
||||
png_ptr, png_infop info_ptr, png_unknown_chunkpp entries));
|
||||
#endif
|
||||
|
||||
/* Png_free_data() will turn off the "valid" flag for anything it frees.
|
||||
If you need to turn it off for a chunk that your application has freed,
|
||||
you can use png_set_invalid(png_ptr, info_ptr, PNG_INFO_CHNK); */
|
||||
extern PNG_EXPORT(void, png_set_invalid) PNGARG((png_structp png_ptr,
|
||||
png_infop info_ptr, int mask));
|
||||
|
||||
#if defined(PNG_INFO_IMAGE_SUPPORTED)
|
||||
/* The "params" pointer is currently not used and is for future expansion. */
|
||||
extern PNG_EXPORT(void, png_read_png) PNGARG((png_structp png_ptr,
|
||||
@@ -2080,19 +2102,28 @@ extern PNG_EXPORT(void, png_write_png) PNGARG((png_structp png_ptr,
|
||||
*/
|
||||
#ifdef PNG_DEBUG
|
||||
#if (PNG_DEBUG > 0)
|
||||
#if !defined(PNG_DEBUG_FILE) && defined(_MSC_VER)
|
||||
#include <crtdbg.h>
|
||||
#define png_debug(l,m) if (PNG_DEBUG > l) _RPT0(_CRT_WARN,m)
|
||||
#define png_debug1(l,m,p1) if (PNG_DEBUG > l) _RPT1(_CRT_WARN,m,p1)
|
||||
#define png_debug2(l,m,p1,p2) if (PNG_DEBUG > l) _RPT2(_CRT_WARN,m,p1,p2)
|
||||
#else /* PNG_DEBUG_FILE || !_MSC_VER */
|
||||
#ifndef PNG_DEBUG_FILE
|
||||
#define PNG_DEBUG_FILE stderr
|
||||
#endif /* PNG_DEBUG_FILE */
|
||||
|
||||
#define png_debug(l,m) if (PNG_DEBUG > l) \
|
||||
fprintf(PNG_DEBUG_FILE,"%s"m,(l==1 ? "\t" : \
|
||||
(l==2 ? "\t\t":(l>2 ? "\t\t\t":""))))
|
||||
#define png_debug1(l,m,p1) if (PNG_DEBUG > l) \
|
||||
fprintf(PNG_DEBUG_FILE,"%s"m,(l==1 ? "\t" : \
|
||||
(l==2 ? "\t\t":(l>2 ? "\t\t\t":""))),p1)
|
||||
#define png_debug2(l,m,p1,p2) if (PNG_DEBUG > l) \
|
||||
fprintf(PNG_DEBUG_FILE,"%s"m,(l==1 ? "\t" : \
|
||||
(l==2 ? "\t\t":(l>2 ? "\t\t\t":""))),p1,p2)
|
||||
#define png_debug(l,m) \
|
||||
if (PNG_DEBUG > l) \
|
||||
fprintf(PNG_DEBUG_FILE,"%s"m,(l==1 ? "\t" : \
|
||||
(l==2 ? "\t\t":(l>2 ? "\t\t\t":""))))
|
||||
#define png_debug1(l,m,p1) \
|
||||
if (PNG_DEBUG > l) \
|
||||
fprintf(PNG_DEBUG_FILE,"%s"m,(l==1 ? "\t" : \
|
||||
(l==2 ? "\t\t":(l>2 ? "\t\t\t":""))),p1)
|
||||
#define png_debug2(l,m,p1,p2) \
|
||||
if (PNG_DEBUG > l) \
|
||||
fprintf(PNG_DEBUG_FILE,"%s"m,(l==1 ? "\t" : \
|
||||
(l==2 ? "\t\t":(l>2 ? "\t\t\t":""))),p1,p2)
|
||||
#endif /* _MSC_VER */
|
||||
#endif /* (PNG_DEBUG > 0) */
|
||||
#endif /* PNG_DEBUG */
|
||||
#ifndef png_debug
|
||||
@@ -2113,7 +2144,7 @@ extern PNG_EXPORT(png_charp,png_get_header_version) PNGARG((png_structp png_ptr)
|
||||
extern PNG_EXPORT(png_charp,png_get_libpng_ver) PNGARG((png_structp png_ptr));
|
||||
|
||||
#define PNG_HEADER_VERSION_STRING \
|
||||
" libpng version 1.0.7beta11 - May 6, 2000 (header)\n"
|
||||
" libpng version 1.0.7beta14 - May 17, 2000 (header)\n"
|
||||
|
||||
#ifdef PNG_READ_COMPOSITE_NODIV_SUPPORTED
|
||||
/* With these routines we avoid an integer divide, which will be slower on
|
||||
@@ -2905,5 +2936,6 @@ PNG_EXTERN void png_push_read_iTXt PNGARG((png_structp png_ptr,
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* PNG_VERSION_INFO_ONLY */
|
||||
/* do not put anything past this line */
|
||||
#endif /* _PNG_H */
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/* pngasmrd.h - assembler version of utilities to read a PNG file
|
||||
*
|
||||
* libpng 1.0.7beta11 - May 6, 2000
|
||||
* libpng 1.0.7beta14 - May 17, 2000
|
||||
* For conditions of distribution and use, see copyright notice in png.h
|
||||
* Copyright (c) 1999, 2000 Glenn Randers-Pehrson
|
||||
*
|
||||
|
||||
64
pngconf.h
64
pngconf.h
@@ -1,6 +1,6 @@
|
||||
/* pngconf.h - machine configurable file for libpng
|
||||
*
|
||||
* libpng 1.0.7beta11 - May 6, 2000
|
||||
* libpng 1.0.7beta14 - May 17, 2000
|
||||
* For conditions of distribution and use, see copyright notice in png.h
|
||||
* Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.
|
||||
* Copyright (c) 1996, 1997 Andreas Dilger
|
||||
@@ -58,6 +58,14 @@
|
||||
* #define PNG_NO_STDIO
|
||||
*/
|
||||
|
||||
#ifdef PNG_BUILD_DLL
|
||||
# ifndef PNG_CONSOLE_IO_SUPPORTED
|
||||
# ifndef PNG_NO_CONSOLE_IO
|
||||
# define PNG_NO_CONSOLE_IO
|
||||
# endif
|
||||
# endif
|
||||
#endif
|
||||
|
||||
# ifdef PNG_NO_STDIO
|
||||
# ifndef PNG_NO_CONSOLE_IO
|
||||
# define PNG_NO_CONSOLE_IO
|
||||
@@ -494,21 +502,6 @@ defined(PNG_WRITE_USER_TRANSFORM_SUPPORTED)
|
||||
#define PNG_ASSEMBLER_CODE_SUPPORTED
|
||||
#endif
|
||||
|
||||
/* Do not use global arrays (helps with building DLL's)
|
||||
* They are no longer used in libpng itself, since version 1.0.5c,
|
||||
* but might be required for some pre-1.0.5c applications.
|
||||
*/
|
||||
#ifdef PNG_NO_GLOBAL_ARRAYS
|
||||
# define PNG_USE_LOCAL_ARRAYS
|
||||
#else
|
||||
# if defined(__GNUC__) && defined(WIN32)
|
||||
# define PNG_NO_GLOBAL_ARRAYS
|
||||
# define PNG_USE_LOCAL_ARRAYS
|
||||
# else
|
||||
# define PNG_USE_GLOBAL_ARRAYS
|
||||
# endif
|
||||
#endif
|
||||
|
||||
/* These are currently experimental features, define them if you want */
|
||||
|
||||
/* very little testing */
|
||||
@@ -928,6 +921,18 @@ typedef z_stream FAR * png_zstreamp;
|
||||
# define PNG_DLL
|
||||
#endif
|
||||
|
||||
/* Do not use global arrays (helps with building DLL's)
|
||||
* They are no longer used in libpng itself, since version 1.0.5c,
|
||||
* but might be required for some pre-1.0.5c applications.
|
||||
*/
|
||||
#if !defined(PNG_USE_LOCAL_ARRAYS) && !defined(PNG_USE_GLOBAL_ARRAYS)
|
||||
# if defined(PNG_NO_GLOBAL_ARRAYS) || (defined(__GNUC__) && defined(PNG_DLL))
|
||||
# define PNG_USE_LOCAL_ARRAYS
|
||||
# else
|
||||
# define PNG_USE_GLOBAL_ARRAYS
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#if defined(PNG_BUILD_DLL) && !defined(PNG_NO_MODULEDEF)
|
||||
# define PNG_IMPEXP
|
||||
#endif
|
||||
@@ -987,34 +992,9 @@ typedef z_stream FAR * png_zstreamp;
|
||||
# define PNG_ATTR_DLLIMP
|
||||
#endif
|
||||
|
||||
#ifndef PNG_EXPORT
|
||||
# define PNG_EXPORT(type,symbol) type symbol
|
||||
#endif
|
||||
|
||||
#if defined(__MINGW32__) || defined(__CYGWIN32__)
|
||||
# define PNG_ATTR_DLLIMP
|
||||
#endif
|
||||
|
||||
#ifdef PNG_USE_GLOBAL_ARRAYS
|
||||
#ifndef PNG_EXPORT_VAR
|
||||
# if defined(_MSC_VER) && defined(_DLL) /* GRR 20000206 */
|
||||
# define PNG_EXPORT_VAR(type) extern type __declspec(dllexport)
|
||||
# endif
|
||||
# ifdef PNG_DECL_DLLEXP
|
||||
# define PNG_EXPORT_VAR(type) extern __declspec(dllexport) type
|
||||
# endif
|
||||
# ifdef PNG_ATTR_DLLEXP
|
||||
# define PNG_EXPORT_VAR(type) extern type __attribute__((dllexport))
|
||||
# endif
|
||||
# ifdef PNG_DECL_DLLIMP
|
||||
# define PNG_EXPORT_VAR(type) extern __declspec(dllimport) type
|
||||
# endif
|
||||
# ifdef PNG_ATTR_DLLIMP
|
||||
# define PNG_EXPORT_VAR(type) extern type __attribute__((dllimport))
|
||||
# endif
|
||||
#endif
|
||||
#ifndef PNG_EXPORT_VAR
|
||||
# define PNG_EXPORT_VAR(type) extern type
|
||||
# define PNG_EXPORT_VAR(type) extern type
|
||||
#endif
|
||||
#endif
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
|
||||
/* pngerror.c - stub functions for i/o and memory allocation
|
||||
*
|
||||
* libpng 1.0.7beta11 - May 6, 2000
|
||||
* libpng 1.0.7beta14 - May 17, 2000
|
||||
* For conditions of distribution and use, see copyright notice in png.h
|
||||
* Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.
|
||||
* Copyright (c) 1996, 1997 Andreas Dilger
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
* and http://www.intel.com/drg/pentiumII/appnotes/923/923.htm
|
||||
* for Intel's performance analysis of the MMX vs. non-MMX code.
|
||||
*
|
||||
* libpng 1.0.7beta11 - May 6, 2000
|
||||
* libpng 1.0.7beta14 - May 17, 2000
|
||||
* For conditions of distribution and use, see copyright notice in png.h
|
||||
* Copyright (c) 1998, Intel Corporation
|
||||
* Copyright (c) 1998, 1999, 2000 Glenn Randers-Pehrson
|
||||
@@ -230,7 +230,7 @@ png_read_filter_row_c(png_structp png_ptr, png_row_infop row_info,
|
||||
/* Use this routine for the x86 platform - it uses a faster MMX routine
|
||||
if the machine supports MMX. */
|
||||
|
||||
void PNGAPI
|
||||
void /* PRIVATE */
|
||||
png_combine_row(png_structp png_ptr, png_bytep row, int mask)
|
||||
{
|
||||
png_debug(1,"in png_combine_row_asm\n");
|
||||
@@ -4310,7 +4310,7 @@ png_read_filter_row_mmx_up(png_row_infop row_info, png_bytep row,
|
||||
|
||||
// Optimized png_read_filter_row routines
|
||||
|
||||
void PNGAPI
|
||||
void /* PRIVATE */
|
||||
png_read_filter_row(png_structp png_ptr, png_row_infop row_info, png_bytep
|
||||
row, png_bytep prev_row, int filter)
|
||||
{
|
||||
@@ -4500,7 +4500,8 @@ png_read_filter_row(png_structp png_ptr, png_row_infop row_info, png_bytep
|
||||
break;
|
||||
|
||||
default:
|
||||
png_error(png_ptr, "#103 Bad adaptive filter type");
|
||||
png_warning(png_ptr, "Ignoring bad adaptive filter type");
|
||||
*row=0;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
2
pngget.c
2
pngget.c
@@ -1,7 +1,7 @@
|
||||
|
||||
/* pngget.c - retrieval of values from info struct
|
||||
*
|
||||
* libpng 1.0.7beta11 - May 6, 2000
|
||||
* libpng 1.0.7beta14 - May 17, 2000
|
||||
* For conditions of distribution and use, see copyright notice in png.h
|
||||
* Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.
|
||||
* Copyright (c) 1996, 1997 Andreas Dilger
|
||||
|
||||
2
pngmem.c
2
pngmem.c
@@ -1,7 +1,7 @@
|
||||
|
||||
/* pngmem.c - stub functions for memory allocation
|
||||
*
|
||||
* libpng 1.0.7beta11 - May 6, 2000
|
||||
* libpng 1.0.7beta14 - May 17, 2000
|
||||
* For conditions of distribution and use, see copyright notice in png.h
|
||||
* Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.
|
||||
* Copyright (c) 1996, 1997 Andreas Dilger
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
|
||||
/* pngpread.c - read a png file in push mode
|
||||
*
|
||||
* libpng 1.0.7beta11 - May 6, 2000
|
||||
* libpng 1.0.7beta14 - May 17, 2000
|
||||
* For conditions of distribution and use, see copyright notice in png.h
|
||||
* Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.
|
||||
* Copyright (c) 1996, 1997 Andreas Dilger
|
||||
|
||||
17
pngread.c
17
pngread.c
@@ -1,7 +1,7 @@
|
||||
|
||||
/* pngread.c - read a PNG file
|
||||
*
|
||||
* libpng 1.0.7beta11 - May 6, 2000
|
||||
* libpng 1.0.7beta14 - May 17, 2000
|
||||
* For conditions of distribution and use, see copyright notice in png.h
|
||||
* Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.
|
||||
* Copyright (c) 1996, 1997 Andreas Dilger
|
||||
@@ -697,7 +697,7 @@ png_read_row(png_structp png_ptr, png_bytep row, png_bytep dsp_row)
|
||||
* not called png_set_interlace_handling(), the display_row buffer will
|
||||
* be ignored, so pass NULL to it.
|
||||
*
|
||||
* [*] png_handle_alpha() does not exist yet, as of libpng version 1.0.7beta11
|
||||
* [*] png_handle_alpha() does not exist yet, as of libpng version 1.0.7beta14
|
||||
*/
|
||||
|
||||
void PNGAPI
|
||||
@@ -746,7 +746,7 @@ png_read_rows(png_structp png_ptr, png_bytepp row,
|
||||
* only call this function once. If you desire to have an image for
|
||||
* each pass of a interlaced image, use png_read_rows() instead.
|
||||
*
|
||||
* [*] png_handle_alpha() does not exist yet, as of libpng version 1.0.7beta11
|
||||
* [*] png_handle_alpha() does not exist yet, as of libpng version 1.0.7beta14
|
||||
*/
|
||||
void PNGAPI
|
||||
png_read_image(png_structp png_ptr, png_bytepp image)
|
||||
@@ -1293,18 +1293,9 @@ png_read_png(png_structp png_ptr, png_infop info_ptr,
|
||||
|
||||
/* -------------- image transformations end here ------------------- */
|
||||
|
||||
if(info_ptr->row_pointers)
|
||||
{
|
||||
#ifdef PNG_FREE_ME_SUPPORTED
|
||||
if(info_ptr->free_me & PNG_FREE_ROWS)
|
||||
{
|
||||
for (row = 0; row < (int)info_ptr->height; row++)
|
||||
png_free(png_ptr, info_ptr->row_pointers[row]);
|
||||
png_free(png_ptr, info_ptr->row_pointers);
|
||||
info_ptr->row_pointers = NULL;
|
||||
}
|
||||
png_free_data(png_ptr, info_ptr, PNG_FREE_ROWS, 0);
|
||||
#endif
|
||||
}
|
||||
if(info_ptr->row_pointers == NULL)
|
||||
{
|
||||
info_ptr->row_pointers = (png_bytepp)png_malloc(png_ptr,
|
||||
|
||||
2
pngrio.c
2
pngrio.c
@@ -1,7 +1,7 @@
|
||||
|
||||
/* pngrio.c - functions for data input
|
||||
*
|
||||
* libpng 1.0.7beta11 - May 6, 2000
|
||||
* libpng 1.0.7beta14 - May 17, 2000
|
||||
* For conditions of distribution and use, see copyright notice in png.h
|
||||
* Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.
|
||||
* Copyright (c) 1996, 1997 Andreas Dilger
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
|
||||
/* pngrtran.c - transforms the data in a row for PNG readers
|
||||
*
|
||||
* libpng 1.0.7beta11 - May 6, 2000
|
||||
* libpng 1.0.7beta14 - May 17, 2000
|
||||
* For conditions of distribution and use, see copyright notice in png.h
|
||||
* Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.
|
||||
* Copyright (c) 1996, 1997 Andreas Dilger
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
|
||||
/* pngrutil.c - utilities to read a PNG file
|
||||
*
|
||||
* libpng 1.0.7beta11 - May 6, 2000
|
||||
* libpng 1.0.7beta14 - May 17, 2000
|
||||
* For conditions of distribution and use, see copyright notice in png.h
|
||||
* Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.
|
||||
* Copyright (c) 1996, 1997 Andreas Dilger
|
||||
@@ -2043,9 +2043,9 @@ png_check_chunk_name(png_structp png_ptr, png_bytep chunk_name)
|
||||
you want all pixels to be combined, pass 0xff (255) in mask. */
|
||||
void /* PRIVATE */
|
||||
#ifdef PNG_HAVE_ASSEMBLER_COMBINE_ROW
|
||||
png_combine_row_c /* PRIVATE */
|
||||
png_combine_row_c
|
||||
#else
|
||||
png_combine_row /* PRIVATE */
|
||||
png_combine_row
|
||||
#endif /* PNG_HAVE_ASSEMBLER_COMBINE_ROW */
|
||||
(png_structp png_ptr, png_bytep row, int mask)
|
||||
{
|
||||
|
||||
57
pngset.c
57
pngset.c
@@ -1,7 +1,7 @@
|
||||
|
||||
/* pngset.c - storage of image information into info struct
|
||||
*
|
||||
* libpng 1.0.7beta11 - May 6, 2000
|
||||
* libpng 1.0.7beta14 - May 17, 2000
|
||||
* For conditions of distribution and use, see copyright notice in png.h
|
||||
* Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.
|
||||
* Copyright (c) 1996, 1997 Andreas Dilger
|
||||
@@ -240,6 +240,9 @@ png_set_pCAL(png_structp png_ptr, png_infop info_ptr,
|
||||
}
|
||||
|
||||
info_ptr->valid |= PNG_INFO_pCAL;
|
||||
#ifdef PNG_FREE_ME_SUPPORTED
|
||||
info_ptr->free_me |= PNG_FREE_PCAL;
|
||||
#endif
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -284,6 +287,9 @@ png_set_sCAL_s(png_structp png_ptr, png_infop info_ptr,
|
||||
png_memcpy(info_ptr->scal_s_height, sheight, (png_size_t)length);
|
||||
|
||||
info_ptr->valid |= PNG_INFO_sCAL;
|
||||
#ifdef PNG_FREE_ME_SUPPORTED
|
||||
info_ptr->free_me |= PNG_FREE_SCAL;
|
||||
#endif
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
@@ -488,6 +494,9 @@ png_set_text(png_structp png_ptr, png_infop info_ptr, png_textp text_ptr,
|
||||
info_ptr->num_text = 0;
|
||||
info_ptr->text = (png_textp)png_malloc(png_ptr,
|
||||
(png_uint_32)(info_ptr->max_text * sizeof (png_text)));
|
||||
#ifdef PNG_FREE_ME_SUPPORTED
|
||||
info_ptr->free_me |= PNG_FREE_TEXT;
|
||||
#endif
|
||||
}
|
||||
png_debug1(3, "allocated %d entries for info_ptr->text\n",
|
||||
info_ptr->max_text);
|
||||
@@ -495,9 +504,7 @@ png_set_text(png_structp png_ptr, png_infop info_ptr, png_textp text_ptr,
|
||||
for (i = 0; i < num_text; i++)
|
||||
{
|
||||
png_size_t text_length,key_len;
|
||||
#ifdef PNG_iTXt_SUPPORTED
|
||||
png_size_t lang_len,lang_key_len;
|
||||
#endif
|
||||
png_textp textp = &(info_ptr->text[info_ptr->num_text]);
|
||||
|
||||
if (text_ptr[i].key == (png_charp)NULL)
|
||||
@@ -505,7 +512,12 @@ png_set_text(png_structp png_ptr, png_infop info_ptr, png_textp text_ptr,
|
||||
|
||||
key_len = png_strlen(text_ptr[i].key);
|
||||
|
||||
if(text_ptr[i].compression > 0)
|
||||
if(text_ptr[i].compression <= 0)
|
||||
{
|
||||
lang_len = 0;
|
||||
lang_key_len = 0;
|
||||
}
|
||||
else
|
||||
#ifdef PNG_iTXt_SUPPORTED
|
||||
{
|
||||
/* set iTXt data */
|
||||
@@ -518,11 +530,6 @@ png_set_text(png_structp png_ptr, png_infop info_ptr, png_textp text_ptr,
|
||||
else
|
||||
lang_key_len = 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
lang_len = 0;
|
||||
lang_key_len = 0;
|
||||
}
|
||||
#else
|
||||
{
|
||||
png_warning(png_ptr, "iTXt chunk not supported.");
|
||||
@@ -547,17 +554,9 @@ png_set_text(png_structp png_ptr, png_infop info_ptr, png_textp text_ptr,
|
||||
}
|
||||
|
||||
textp->key = (png_charp)png_malloc(png_ptr,
|
||||
(png_uint_32)(key_len +
|
||||
#ifdef PNG_iTXt_SUPPORTED
|
||||
lang_len + lang_key_len +
|
||||
#endif
|
||||
text_length + 4));
|
||||
(png_uint_32)(key_len + text_length + lang_len + lang_key_len + 4));
|
||||
png_debug2(2, "Allocated %d bytes at %x in png_set_text\n",
|
||||
key_len +
|
||||
#ifdef PNG_iTXt_SUPPORTED
|
||||
lang_len + lang_key_len +
|
||||
#endif
|
||||
text_length + 4, textp->key);
|
||||
key_len + lang_len + lang_key_len + text_length + 4, textp->key);
|
||||
|
||||
png_memcpy(textp->key, text_ptr[i].key,
|
||||
(png_size_t)(key_len));
|
||||
@@ -603,9 +602,6 @@ png_set_text(png_structp png_ptr, png_infop info_ptr, png_textp text_ptr,
|
||||
}
|
||||
info_ptr->text[info_ptr->num_text]= *textp;
|
||||
info_ptr->num_text++;
|
||||
#ifdef PNG_FREE_ME_SUPPORTED
|
||||
info_ptr->free_me |= PNG_FREE_TEXT;
|
||||
#endif
|
||||
png_debug1(3, "transferred text chunk %d\n", info_ptr->num_text);
|
||||
}
|
||||
}
|
||||
@@ -806,14 +802,16 @@ void PNGAPI
|
||||
png_set_rows(png_structp png_ptr, png_infop info_ptr, png_bytepp row_pointers)
|
||||
{
|
||||
png_debug1(1, "in %s storage function\n", "rows");
|
||||
|
||||
if (png_ptr == NULL || info_ptr == NULL)
|
||||
return;
|
||||
|
||||
if(info_ptr->row_pointers != row_pointers)
|
||||
{
|
||||
if(info_ptr->row_pointers && (info_ptr->row_pointers != row_pointers))
|
||||
png_free_data(png_ptr, info_ptr, PNG_FREE_ROWS, 0);
|
||||
info_ptr->row_pointers = row_pointers;
|
||||
}
|
||||
info_ptr->row_pointers = row_pointers;
|
||||
if(row_pointers)
|
||||
info_ptr->valid |= PNG_INFO_IDAT;
|
||||
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -827,3 +825,10 @@ png_set_compression_buffer_size(png_structp png_ptr, png_uint_32 size)
|
||||
png_ptr->zstream.next_out = png_ptr->zbuf;
|
||||
png_ptr->zstream.avail_out = (uInt)png_ptr->zbuf_size;
|
||||
}
|
||||
|
||||
void PNGAPI
|
||||
png_set_invalid(png_structp png_ptr, png_infop info_ptr, int mask)
|
||||
{
|
||||
if (png_ptr && info_ptr)
|
||||
info_ptr->valid &= ~(mask);
|
||||
}
|
||||
|
||||
10
pngtest.c
10
pngtest.c
@@ -1,7 +1,7 @@
|
||||
|
||||
/* pngtest.c - a simple test program to test libpng
|
||||
*
|
||||
* libpng 1.0.7beta11 - May 6, 2000
|
||||
* libpng 1.0.7beta14 - May 17, 2000
|
||||
* For conditions of distribution and use, see copyright notice in png.h
|
||||
* Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.
|
||||
* Copyright (c) 1996, 1997 Andreas Dilger
|
||||
@@ -1152,9 +1152,11 @@ main(int argc, char *argv[])
|
||||
fprintf(STDERR, " with zlib version %s\n", ZLIB_VERSION);
|
||||
fprintf(STDERR,"%s",png_get_copyright(NULL));
|
||||
/* Show the version of libpng used in building the library */
|
||||
fprintf(STDERR," library:%s",png_get_header_version(NULL));
|
||||
fprintf(STDERR," library (%lu):%s", png_access_version_number(),
|
||||
png_get_header_version(NULL));
|
||||
/* Show the version of libpng used in building the application */
|
||||
fprintf(STDERR," pngtest:%s",PNG_HEADER_VERSION_STRING);
|
||||
fprintf(STDERR," pngtest (%lu):%s", PNG_LIBPNG_VER,
|
||||
PNG_HEADER_VERSION_STRING);
|
||||
fprintf(STDERR," sizeof(png_struct)=%d, sizeof(png_info)=%d\n",
|
||||
sizeof(png_struct), sizeof(png_info));
|
||||
|
||||
@@ -1378,4 +1380,4 @@ main(int argc, char *argv[])
|
||||
}
|
||||
|
||||
/* Generate a compiler error if there is an old png.h in the search path. */
|
||||
typedef version_1_0_7beta11 your_png_h_is_not_version_1_0_7beta11;
|
||||
typedef version_1_0_7beta14 your_png_h_is_not_version_1_0_7beta14;
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
|
||||
/* pngtrans.c - transforms the data in a row (used by both readers and writers)
|
||||
*
|
||||
* libpng 1.0.7beta11 - May 6, 2000
|
||||
* libpng 1.0.7beta14 - May 17, 2000
|
||||
* For conditions of distribution and use, see copyright notice in png.h
|
||||
* Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.
|
||||
* Copyright (c) 1996, 1997 Andreas Dilger
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
*
|
||||
* For Intel x86 CPU and Microsoft Visual C++ compiler
|
||||
*
|
||||
* libpng 1.0.7beta11 - May 6, 2000
|
||||
* libpng 1.0.7beta14 - May 17, 2000
|
||||
* For conditions of distribution and use, see copyright notice in png.h
|
||||
* Copyright (c) 1998, Intel Corporation
|
||||
* Copyright (c) 1998, 1999, 2000 Glenn Randers-Pehrson
|
||||
@@ -3846,7 +3846,8 @@ png_read_filter_row(png_structp png_ptr, png_row_infop row_info, png_bytep
|
||||
break;
|
||||
}
|
||||
default:
|
||||
png_error(png_ptr, "Bad adaptive filter type");
|
||||
png_warning(png_ptr, "Ignoring bad adaptive filter type");
|
||||
*row=0;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
2
pngwio.c
2
pngwio.c
@@ -1,7 +1,7 @@
|
||||
|
||||
/* pngwio.c - functions for data output
|
||||
*
|
||||
* libpng 1.0.7beta11 - May 6, 2000
|
||||
* libpng 1.0.7beta14 - May 17, 2000
|
||||
* For conditions of distribution and use, see copyright notice in png.h
|
||||
* Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.
|
||||
* Copyright (c) 1996, 1997 Andreas Dilger
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
|
||||
/* pngwrite.c - general routines to write a PNG file
|
||||
*
|
||||
* libpng 1.0.7beta11 - May 6, 2000
|
||||
* libpng 1.0.7beta14 - May 17, 2000
|
||||
* For conditions of distribution and use, see copyright notice in png.h
|
||||
* Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.
|
||||
* Copyright (c) 1996, 1997 Andreas Dilger
|
||||
@@ -1245,8 +1245,7 @@ png_set_write_user_transform_fn(png_structp png_ptr, png_user_transform_ptr
|
||||
#if defined(PNG_INFO_IMAGE_SUPPORTED)
|
||||
void PNGAPI
|
||||
png_write_png(png_structp png_ptr, png_infop info_ptr,
|
||||
int transforms,
|
||||
voidp params)
|
||||
int transforms, voidp params)
|
||||
{
|
||||
#if defined(PNG_WRITE_INVERT_ALPHA_SUPPORTED)
|
||||
/* invert the alpha channel from opacity to transparency */
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
|
||||
/* pngwtran.c - transforms the data in a row for PNG writers
|
||||
*
|
||||
* libpng 1.0.7beta11 - May 6, 2000
|
||||
* libpng 1.0.7beta14 - May 17, 2000
|
||||
* For conditions of distribution and use, see copyright notice in png.h
|
||||
* Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.
|
||||
* Copyright (c) 1996, 1997 Andreas Dilger
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
|
||||
/* pngwutil.c - utilities to write a PNG file
|
||||
*
|
||||
* libpng 1.0.7beta11 - May 6, 2000
|
||||
* libpng 1.0.7beta14 - May 17, 2000
|
||||
* For conditions of distribution and use, see copyright notice in png.h
|
||||
* Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.
|
||||
* Copyright (c) 1996, 1997 Andreas Dilger
|
||||
|
||||
@@ -31,7 +31,7 @@ RANLIB=ranlib
|
||||
# read libpng.txt or png.h to see why PNGMAJ is 2. You should not
|
||||
# have to change it.
|
||||
PNGMAJ = 2
|
||||
PNGMIN = 1.0.7beta11
|
||||
PNGMIN = 1.0.7beta14
|
||||
PNGVER = $(PNGMAJ).$(PNGMIN)
|
||||
|
||||
# where make install puts libpng.a, libpng.so*, and png.h
|
||||
|
||||
@@ -14,7 +14,7 @@ ZLIBINC=../zlib
|
||||
# read libpng.txt or png.h to see why PNGMAJ is 2. You should not
|
||||
# have to change it.
|
||||
PNGMAJ = 2
|
||||
PNGMIN = 1.0.7beta11
|
||||
PNGMIN = 1.0.7beta14
|
||||
PNGVER = $(PNGMAJ).$(PNGMIN)
|
||||
|
||||
CC=cc
|
||||
|
||||
@@ -34,7 +34,7 @@ RANLIB=ranlib
|
||||
# read libpng.txt or png.h to see why PNGMAJ is 2. You should not
|
||||
# have to change it.
|
||||
PNGMAJ = 2
|
||||
PNGMIN = 1.0.7beta11
|
||||
PNGMIN = 1.0.7beta14
|
||||
PNGVER = $(PNGMAJ).$(PNGMIN)
|
||||
|
||||
INCPATH=$(prefix)/include
|
||||
|
||||
@@ -34,7 +34,7 @@ RANLIB=ranlib
|
||||
# read libpng.txt or png.h to see why PNGMAJ is 2. You should not
|
||||
# have to change it.
|
||||
PNGMAJ = 2
|
||||
PNGMIN = 1.0.7beta11
|
||||
PNGMIN = 1.0.7beta14
|
||||
PNGVER = $(PNGMAJ).$(PNGMIN)
|
||||
|
||||
INCPATH=$(prefix)/include
|
||||
|
||||
@@ -25,7 +25,7 @@ RANLIB=echo
|
||||
# read libpng.txt or png.h to see why PNGMAJ is 2. You should not
|
||||
# have to change it.
|
||||
PNGMAJ = 2
|
||||
PNGMIN = 1.0.7beta11
|
||||
PNGMIN = 1.0.7beta14
|
||||
PNGVER = $(PNGMAJ).$(PNGMIN)
|
||||
|
||||
INCPATH=$(prefix)/include
|
||||
|
||||
@@ -19,8 +19,8 @@ CFLAGS=-I$(ZLIBINC) -O2 $(WARNMORE) -fPIC -mabi=n32 # -g -DPNG_DEBUG=5
|
||||
LDFLAGS=-L. -L$(ZLIBLIB) -lpng -lz -lm
|
||||
LDSHARED=gcc -shared
|
||||
|
||||
VER=1.0.7beta11
|
||||
LIBS=libpng.so.1.0.7beta11
|
||||
VER=1.0.7beta14
|
||||
LIBS=libpng.so.1.0.7beta14
|
||||
SHAREDLIB=libpng.so
|
||||
libdir=$(prefix)/lib32
|
||||
|
||||
|
||||
@@ -31,7 +31,7 @@ RANLIB=echo
|
||||
# read libpng.txt or png.h to see why PNGMAJ is 2. You should not
|
||||
# have to change it.
|
||||
PNGMAJ = 2
|
||||
PNGMIN = 1.0.7beta11
|
||||
PNGMIN = 1.0.7beta14
|
||||
PNGVER = $(PNGMAJ).$(PNGMIN)
|
||||
|
||||
INCPATH=$(prefix)/include
|
||||
|
||||
@@ -1,9 +1,11 @@
|
||||
unit pngdef;
|
||||
|
||||
// Caution: this file is probably out of date.
|
||||
|
||||
interface
|
||||
|
||||
const
|
||||
PNG_LIBPNG_VER_STRING = '1.0.7beta11';
|
||||
PNG_LIBPNG_VER_STRING = '1.0.7beta14';
|
||||
PNG_LIBPNG_VER = 10007;
|
||||
|
||||
type
|
||||
@@ -508,6 +510,9 @@ procedure png_set_hIST(png_ptr: png_structp; info_ptr: png_infop;
|
||||
stdcall;
|
||||
function png_set_interlace_handling(png_ptr: png_structp): int;
|
||||
stdcall;
|
||||
procedure png_set_invalid(png_ptr: png_structp; info_ptr:png_infop;
|
||||
mask: int);
|
||||
stdcall;
|
||||
procedure png_set_invert_alpha(png_ptr: png_structp);
|
||||
stdcall;
|
||||
procedure png_set_invert_mono(png_ptr: png_structp);
|
||||
|
||||
@@ -2,6 +2,8 @@
|
||||
; PNGLIB module definition file for OS/2
|
||||
;----------------------------------------
|
||||
|
||||
; Caution: This file is probably out of date.
|
||||
|
||||
LIBRARY PNG
|
||||
DESCRIPTION "PNG image compression library for OS/2"
|
||||
CODE PRELOAD MOVEABLE DISCARDABLE
|
||||
@@ -36,6 +38,7 @@ EXPORTS
|
||||
png_build_grayscale_palette
|
||||
png_set_strip_alpha
|
||||
png_set_swap_alpha
|
||||
png_set_invalid
|
||||
png_set_invert_alpha
|
||||
png_set_filler
|
||||
png_set_swap
|
||||
|
||||
Reference in New Issue
Block a user