Imported from libpng-1.0.12beta1.tar
This commit is contained in:
parent
328353990f
commit
e68f5a361b
22
ANNOUNCE
22
ANNOUNCE
@ -1,18 +1,20 @@
|
||||
|
||||
Libpng 1.0.11 - April 27, 2001
|
||||
Libpng 1.0.12beta1 - May 14, 2001
|
||||
|
||||
This is a public release of libpng, intended for use in production codes.
|
||||
|
||||
Changes since the last public release (1.0.10):
|
||||
Changes since the last public release (1.0.11):
|
||||
|
||||
Added type casts on several png_malloc() calls (Dimitri Papadapoulos).
|
||||
Removed a no-longer needed AIX work-around from pngconf.h
|
||||
Changed several "//" single-line comments to C-style in pnggccrd.c
|
||||
Removed PNGAPI from private functions whose prototypes did not have PNGAPI.
|
||||
Updated scripts/pngos2.def
|
||||
Added a check for NULL return from user's malloc_fn().
|
||||
Removed some useless type casts of the NULL pointer.
|
||||
Added makefile.netbsd
|
||||
Test for Windows platform in pngconf.h when including malloc.h (Emmanuel Blot)
|
||||
Updated makefile.cygwin and handling of Cygwin's ALL_STATIC in pngconf.h
|
||||
Added some never-to-be-executed code in pnggccrd.c to quiet compiler warnings.
|
||||
Bumped DLLNUM to 2.
|
||||
Added a check for attempts to read or write PLTE in grayscale PNG datastreams.
|
||||
Eliminated the png_error about apps using png_read|write_init(). Instead,
|
||||
libpng will reallocate the png_struct and info_struct if they are too small.
|
||||
This achieves future binary compatibility for old applications written for
|
||||
libpng-0.88 and earlier.
|
||||
Modified png_create_struct so it passes user mem_ptr to user memory allocator.
|
||||
|
||||
Send comments/corrections/commendations to
|
||||
png-implement@ccrc.wustl.edu or to randeg@alum.rpi.edu
|
||||
|
11
CHANGES
11
CHANGES
@ -930,6 +930,17 @@ version 1.0.11beta4 [April 20, 2001]
|
||||
Added makefile.netbsd
|
||||
version 1.0.11 [April 27, 2001]
|
||||
Revised makefile.netbsd
|
||||
version 1.0.12beta1 [May 14, 2001]
|
||||
Test for Windows platform in pngconf.h when including malloc.h (Emmanuel Blot)
|
||||
Updated makefile.cygwin and handling of Cygwin's ALL_STATIC in pngconf.h
|
||||
Added some never-to-be-executed code in pnggccrd.c to quiet compiler warnings.
|
||||
Bumped DLLNUM to 2.
|
||||
Added a check for attempts to read or write PLTE in grayscale PNG datastreams.
|
||||
Eliminated the png_error about apps using png_read|write_init(). Instead,
|
||||
libpng will reallocate the png_struct and info_struct if they are too small.
|
||||
This achieves future binary compatibility for old applications written for
|
||||
libpng-0.88 and earlier.
|
||||
Modified png_create_struct so it passes user mem_ptr to user memory allocator.
|
||||
|
||||
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.11 - April 27, 2001
|
||||
Installing libpng version 1.0.12beta1 - May 14, 2001
|
||||
|
||||
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.11" or "lpng109" and "zlib-1.1.3"
|
||||
might be called "libpng-1.0.12beta1" or "lpng109" and "zlib-1.1.3"
|
||||
or "zlib113") so that you have directories called "zlib" and "libpng".
|
||||
|
||||
Your directory structure should look like this:
|
||||
@ -60,8 +60,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.11)
|
||||
makefile.gcmmx => Linux/ELF makefile (gcc, creates libpng.so.2.1.0.11,
|
||||
makefile.linux => Linux/ELF makefile (gcc, creates libpng.so.2.1.0.12beta1)
|
||||
makefile.gcmmx => Linux/ELF makefile (gcc, creates libpng.so.2.1.0.12beta1,
|
||||
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
|
||||
@ -78,9 +78,9 @@ include
|
||||
makefile.macosx => MACOS X Makefile
|
||||
makefile.netbsd => NetBSD/cc makefile, uses PNGGCCRD
|
||||
makefile.sgi => Silicon Graphics IRIX makefile (cc, creates static lib)
|
||||
makefile.sggcc => Silicon Graphics (gcc, creates libpng.so.2.1.0.11)
|
||||
makefile.sggcc => Silicon Graphics (gcc, creates libpng.so.2.1.0.12beta1)
|
||||
makefile.sunos => Sun makefile
|
||||
makefile.solaris => Solaris 2.X makefile (gcc, creates libpng.so.2.1.0.11)
|
||||
makefile.solaris => Solaris 2.X makefile (gcc, creates libpng.so.2.1.0.12beta1)
|
||||
makefile.sco => For SCO OSr5 ELF and Unixware 7 with Native cc
|
||||
makefile.mips => MIPS makefile
|
||||
makefile.acorn => Acorn makefile
|
||||
|
4
LICENSE
4
LICENSE
@ -8,7 +8,7 @@ COPYRIGHT NOTICE, DISCLAIMER, and LICENSE:
|
||||
If you modify libpng you may insert additional notices immediately following
|
||||
this sentence.
|
||||
|
||||
libpng versions 1.0.7, July 1, 2000, through 1.0.11, April 27, 2001, are
|
||||
libpng versions 1.0.7, July 1, 2000, through 1.0.12beta1, May 14, 2001, are
|
||||
Copyright (c) 2000, 2001 Glenn Randers-Pehrson
|
||||
and are distributed according to the same disclaimer and license as libpng-1.0.6
|
||||
with the following individuals added to the list of Contributing Authors
|
||||
@ -99,4 +99,4 @@ certification mark of the Open Source Initiative.
|
||||
|
||||
Glenn Randers-Pehrson
|
||||
randeg@alum.rpi.edu
|
||||
April 27, 2001
|
||||
May 14, 2001
|
||||
|
10
README
10
README
@ -1,4 +1,4 @@
|
||||
README for libpng 1.0.11 - April 27, 2001 (shared library 2.1)
|
||||
README for libpng 1.0.12beta1 - May 14, 2001 (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.
|
||||
@ -183,9 +183,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.11)
|
||||
(gcc, creates libpng.so.2.1.0.12beta1)
|
||||
makefile.gcmmx => Linux/ELF makefile (gcc, creates
|
||||
libpng.so.2.1.0.11, uses assembler code
|
||||
libpng.so.2.1.0.12beta1, 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
|
||||
@ -202,10 +202,10 @@ Files in this distribution:
|
||||
makefile.macosx => MACOS X Makefile
|
||||
makefile.netbsd => NetBSD/cc makefile, uses PNGGCCRD
|
||||
makefile.sgi => Silicon Graphics IRIX (cc, creates static lib)
|
||||
makefile.sggcc => Silicon Graphics (gcc, creates libpng.so.2.1.0.11)
|
||||
makefile.sggcc => Silicon Graphics (gcc, creates libpng.so.2.1.0.12beta1)
|
||||
makefile.sunos => Sun makefile
|
||||
makefile.solaris => Solaris 2.X makefile
|
||||
(gcc, creates libpng.so.2.1.0.11)
|
||||
(gcc, creates libpng.so.2.1.0.12beta1)
|
||||
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 27, 2001
|
||||
May 14, 2001
|
||||
|
||||
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.11 are Y2K compliant. It is my belief that earlier
|
||||
upward through 1.0.12beta1 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.11. Instead, please
|
||||
There is no \"configure\" script for Libpng-1.0.12beta1. Instead, please
|
||||
copy the appropriate makefile for your system from the \"scripts\"
|
||||
directory. Read the INSTALL file for more details.
|
||||
"
|
||||
|
@ -54,7 +54,7 @@ BSC32=bscmake.exe
|
||||
# ADD BSC32 /nologo
|
||||
LINK32=link.exe
|
||||
# ADD BASE LINK32 /nologo /subsystem:console /machine:I386
|
||||
# ADD LINK32 ..\..\projects\msvc\win32\libpng\dll\libpng1.lib /nologo /subsystem:console /machine:I386
|
||||
# ADD LINK32 ..\..\projects\msvc\win32\libpng\dll\libpng2.lib /nologo /subsystem:console /machine:I386
|
||||
# Begin Special Build Tool
|
||||
OutDir=.\dll
|
||||
SOURCE="$(InputPath)"
|
||||
@ -84,7 +84,7 @@ BSC32=bscmake.exe
|
||||
# ADD BSC32 /nologo
|
||||
LINK32=link.exe
|
||||
# ADD BASE LINK32 /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
|
||||
# ADD LINK32 ..\..\projects\msvc\win32\libpng\dll_dbg\libpng1d.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
|
||||
# ADD LINK32 ..\..\projects\msvc\win32\libpng\dll_dbg\libpng2d.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
|
||||
# Begin Special Build Tool
|
||||
OutDir=.\dll_dbg
|
||||
SOURCE="$(InputPath)"
|
||||
@ -114,7 +114,7 @@ BSC32=bscmake.exe
|
||||
# ADD BSC32 /nologo
|
||||
LINK32=link.exe
|
||||
# ADD BASE LINK32 /nologo /subsystem:console /machine:I386
|
||||
# ADD LINK32 ..\..\projects\msvc\win32\libpng\dll_asm\libpng1a.lib /nologo /subsystem:console /machine:I386
|
||||
# ADD LINK32 ..\..\projects\msvc\win32\libpng\dll_asm\libpng2a.lib /nologo /subsystem:console /machine:I386
|
||||
# Begin Special Build Tool
|
||||
OutDir=.\dll_asm
|
||||
SOURCE="$(InputPath)"
|
||||
@ -144,7 +144,7 @@ BSC32=bscmake.exe
|
||||
# ADD BSC32 /nologo
|
||||
LINK32=link.exe
|
||||
# ADD BASE LINK32 /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
|
||||
# ADD LINK32 ..\..\projects\msvc\win32\libpng\dll_dbga\libpng1b.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
|
||||
# ADD LINK32 ..\..\projects\msvc\win32\libpng\dll_dbga\libpng2b.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
|
||||
# Begin Special Build Tool
|
||||
OutDir=.\dll_dbga
|
||||
SOURCE="$(InputPath)"
|
||||
|
@ -59,8 +59,8 @@ BSC32=bscmake.exe
|
||||
# ADD BASE BSC32 /nologo
|
||||
# ADD BSC32 /nologo
|
||||
LINK32=link.exe
|
||||
# ADD BASE LINK32 libpng1.lib zlibd.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /machine:I386 /libpath:"libpng" /libpath:"zlib"
|
||||
# ADD LINK32 libpng1.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /machine:I386 /libpath:"..\..\projects\msvc\win32\libpng\dll"
|
||||
# ADD BASE LINK32 libpng2.lib zlibd.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /machine:I386 /libpath:"libpng" /libpath:"zlib"
|
||||
# ADD LINK32 libpng2.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /machine:I386 /libpath:"..\..\projects\msvc\win32\libpng\dll"
|
||||
# Begin Special Build Tool
|
||||
OutDir=.\dll
|
||||
SOURCE="$(InputPath)"
|
||||
@ -92,9 +92,9 @@ BSC32=bscmake.exe
|
||||
# ADD BASE BSC32 /nologo
|
||||
# ADD BSC32 /nologo
|
||||
LINK32=link.exe
|
||||
# ADD BASE LINK32 libpng1.lib zlibd.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /debug /machine:I386 /nodefaultlib:"libc" /pdbtype:sept /libpath:"libpng" /libpath:"zlib"
|
||||
# ADD BASE LINK32 libpng2.lib zlibd.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /debug /machine:I386 /nodefaultlib:"libc" /pdbtype:sept /libpath:"libpng" /libpath:"zlib"
|
||||
# SUBTRACT BASE LINK32 /nodefaultlib
|
||||
# ADD LINK32 libpng1d.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /debug /machine:I386 /nodefaultlib:"libc" /pdbtype:sept /libpath:"..\..\projects\msvc\win32\libpng\dll_dbg"
|
||||
# ADD LINK32 libpng2d.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /debug /machine:I386 /nodefaultlib:"libc" /pdbtype:sept /libpath:"..\..\projects\msvc\win32\libpng\dll_dbg"
|
||||
# SUBTRACT LINK32 /nodefaultlib
|
||||
# Begin Special Build Tool
|
||||
OutDir=.\dll_dbg
|
||||
@ -128,7 +128,7 @@ BSC32=bscmake.exe
|
||||
# ADD BASE BSC32 /nologo
|
||||
# ADD BSC32 /nologo
|
||||
LINK32=link.exe
|
||||
# ADD BASE LINK32 libpng1.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /machine:I386 /libpath:"..\..\projects\msvc\win32\libpng\dll"
|
||||
# ADD BASE LINK32 libpng2.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /machine:I386 /libpath:"..\..\projects\msvc\win32\libpng\dll"
|
||||
# ADD LINK32 libpng.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /machine:I386 /libpath:"..\..\projects\msvc\win32\libpng\lib"
|
||||
# Begin Special Build Tool
|
||||
OutDir=.\lib
|
||||
@ -161,7 +161,7 @@ BSC32=bscmake.exe
|
||||
# ADD BASE BSC32 /nologo
|
||||
# ADD BSC32 /nologo
|
||||
LINK32=link.exe
|
||||
# ADD BASE LINK32 libpng1d.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /debug /machine:I386 /nodefaultlib:"libc" /pdbtype:sept /libpath:"..\..\projects\msvc\win32\libpng\dll_dbg"
|
||||
# ADD BASE LINK32 libpng2d.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /debug /machine:I386 /nodefaultlib:"libc" /pdbtype:sept /libpath:"..\..\projects\msvc\win32\libpng\dll_dbg"
|
||||
# SUBTRACT BASE LINK32 /nodefaultlib
|
||||
# ADD LINK32 libpng.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /debug /machine:I386 /nodefaultlib:"libc" /pdbtype:sept /libpath:"..\..\projects\msvc\win32\libpng\lib_dbg"
|
||||
# SUBTRACT LINK32 /nodefaultlib
|
||||
|
26
libpng.3
26
libpng.3
@ -1,6 +1,6 @@
|
||||
.TH LIBPNG 3 "April 27, 2001"
|
||||
.TH LIBPNG 3 "May 14, 2001"
|
||||
.SH NAME
|
||||
libpng \- Portable Network Graphics (PNG) Reference Library 1.0.11
|
||||
libpng \- Portable Network Graphics (PNG) Reference Library 1.0.12beta1
|
||||
.SH SYNOPSIS
|
||||
\fI\fB
|
||||
|
||||
@ -747,10 +747,10 @@ 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.11 - April 27, 2001
|
||||
libpng version 1.0.12beta1 - May 14, 2001
|
||||
Updated and distributed by Glenn Randers-Pehrson
|
||||
<randeg@alum.rpi.edu>
|
||||
Copyright (c) 1998, 1999, 2000 Glenn Randers-Pehrson
|
||||
Copyright (c) 1998-2001 Glenn Randers-Pehrson
|
||||
For conditions of distribution and use, see copyright
|
||||
notice in png.h.
|
||||
|
||||
@ -1033,7 +1033,8 @@ called after each row has been read, which you can use to control
|
||||
a progress meter or the like. It's demonstrated in pngtest.c.
|
||||
You must supply a function
|
||||
|
||||
void read_row_callback(png_ptr ptr, png_uint_32 row, int pass);
|
||||
void read_row_callback(png_ptr ptr, png_uint_32 row,
|
||||
int pass);
|
||||
{
|
||||
/* put your code here */
|
||||
}
|
||||
@ -2145,7 +2146,7 @@ png_infop info_ptr;
|
||||
|
||||
void
|
||||
row_callback(png_structp png_ptr, png_bytep new_row,
|
||||
png_uint_32 row_num, int pass)
|
||||
png_uint_32 row_num, int pass)
|
||||
{
|
||||
/* If the image is interlaced, and you turned
|
||||
on the interlace handler, this function will
|
||||
@ -3427,7 +3428,7 @@ of the original PNG Group, Glenn Randers-Pehrson. Guy and Andreas are
|
||||
still alive and well, but they have moved on to other things.
|
||||
|
||||
The old libpng functions png_read_init(), png_write_init(),
|
||||
png_info_init(), png_read_destroy(), and png_write_destory() have been
|
||||
png_info_init(), png_read_destroy(), and png_write_destroy() have been
|
||||
moved to PNG_INTERNAL in version 0.95 to discourage their use. These
|
||||
functions will be removed from libpng version 2.0.0.
|
||||
|
||||
@ -3468,13 +3469,13 @@ application:
|
||||
|
||||
.SH VIII. Y2K Compliance in libpng
|
||||
|
||||
April 27, 2001
|
||||
May 14, 2001
|
||||
|
||||
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.11 are Y2K compliant. It is my belief that earlier
|
||||
upward through 1.0.12beta1 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
|
||||
@ -3586,6 +3587,7 @@ the first widely used release:
|
||||
1.0.11beta1-3 1 10011 2.1.0.11beta1-3
|
||||
1.0.11rc1 1 10011 2.1.0.11rc1
|
||||
1.0.11 1 10011 2.1.0.11
|
||||
1.0.12beta1 1 10012 2.1.0.12beta1
|
||||
|
||||
Henceforth the source version will match the shared-library minor
|
||||
and patch numbers; the shared-library major version number will be
|
||||
@ -3643,7 +3645,7 @@ possible without all of you.
|
||||
|
||||
Thanks to Frank J. T. Wojcik for helping with the documentation.
|
||||
|
||||
Libpng version 1.0.11 - April 27, 2001:
|
||||
Libpng version 1.0.12beta1 - May 14, 2001:
|
||||
Initially created in 1995 by Guy Eric Schalnat, then of Group 42, Inc.
|
||||
Currently maintained by Glenn Randers-Pehrson (randeg@alum.rpi.edu).
|
||||
|
||||
@ -3660,7 +3662,7 @@ included in the libpng distribution, the latter shall prevail.)
|
||||
If you modify libpng you may insert additional notices immediately following
|
||||
this sentence.
|
||||
|
||||
libpng versions 1.0.7, July 1, 2000, through 1.0.11, April 27, 2001, are
|
||||
libpng versions 1.0.7, July 1, 2000, through 1.0.12beta1, May 14, 2001, are
|
||||
Copyright (c) 2000-2001 Glenn Randers-Pehrson, and are
|
||||
distributed according to the same disclaimer and license as libpng-1.0.6
|
||||
with the following individuals added to the list of Contributing Authors
|
||||
@ -3752,7 +3754,7 @@ certification mark of the Open Source Initiative.
|
||||
|
||||
Glenn Randers-Pehrson
|
||||
randeg@alum.rpi.edu
|
||||
April 27, 2001
|
||||
May 14, 2001
|
||||
|
||||
.\" end of man page
|
||||
|
||||
|
15
libpng.txt
15
libpng.txt
@ -1,9 +1,9 @@
|
||||
libpng.txt - A description on how to use and modify libpng
|
||||
|
||||
libpng version 1.0.11 - April 27, 2001
|
||||
libpng version 1.0.12beta1 - May 14, 2001
|
||||
Updated and distributed by Glenn Randers-Pehrson
|
||||
<randeg@alum.rpi.edu>
|
||||
Copyright (c) 1998, 1999, 2000 Glenn Randers-Pehrson
|
||||
Copyright (c) 1998-2001 Glenn Randers-Pehrson
|
||||
For conditions of distribution and use, see copyright
|
||||
notice in png.h.
|
||||
|
||||
@ -286,7 +286,8 @@ called after each row has been read, which you can use to control
|
||||
a progress meter or the like. It's demonstrated in pngtest.c.
|
||||
You must supply a function
|
||||
|
||||
void read_row_callback(png_ptr ptr, png_uint_32 row, int pass);
|
||||
void read_row_callback(png_ptr ptr, png_uint_32 row,
|
||||
int pass);
|
||||
{
|
||||
/* put your code here */
|
||||
}
|
||||
@ -1398,7 +1399,7 @@ png_infop info_ptr;
|
||||
|
||||
void
|
||||
row_callback(png_structp png_ptr, png_bytep new_row,
|
||||
png_uint_32 row_num, int pass)
|
||||
png_uint_32 row_num, int pass)
|
||||
{
|
||||
/* If the image is interlaced, and you turned
|
||||
on the interlace handler, this function will
|
||||
@ -2680,7 +2681,7 @@ of the original PNG Group, Glenn Randers-Pehrson. Guy and Andreas are
|
||||
still alive and well, but they have moved on to other things.
|
||||
|
||||
The old libpng functions png_read_init(), png_write_init(),
|
||||
png_info_init(), png_read_destroy(), and png_write_destory() have been
|
||||
png_info_init(), png_read_destroy(), and png_write_destroy() have been
|
||||
moved to PNG_INTERNAL in version 0.95 to discourage their use. These
|
||||
functions will be removed from libpng version 2.0.0.
|
||||
|
||||
@ -2721,13 +2722,13 @@ application:
|
||||
|
||||
VIII. Y2K Compliance in libpng
|
||||
|
||||
April 27, 2001
|
||||
May 14, 2001
|
||||
|
||||
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.11 are Y2K compliant. It is my belief that earlier
|
||||
upward through 1.0.12beta1 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 27, 2001"
|
||||
.TH LIBPNGPF 3 "May 14, 2001"
|
||||
.SH NAME
|
||||
libpng \- Portable Network Graphics (PNG) Reference Library 1.0.11
|
||||
libpng \- Portable Network Graphics (PNG) Reference Library 1.0.12beta1
|
||||
(private functions)
|
||||
.SH SYNOPSIS
|
||||
\fB#include <png.h>\fP
|
||||
|
2
png.5
2
png.5
@ -1,4 +1,4 @@
|
||||
.TH PNG 5 "April 27, 2001"
|
||||
.TH PNG 5 "May 14, 2001"
|
||||
.SH NAME
|
||||
png \- Portable Network Graphics (PNG) format
|
||||
.SH DESCRIPTION
|
||||
|
53
png.c
53
png.c
@ -1,7 +1,7 @@
|
||||
|
||||
/* png.c - location for general purpose libpng functions
|
||||
*
|
||||
* libpng version 1.0.11 - April 27, 2001
|
||||
* libpng version 1.0.12beta1 - May 14, 2001
|
||||
* Copyright (c) 1998-2001 Glenn Randers-Pehrson
|
||||
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
|
||||
* (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
|
||||
@ -13,14 +13,14 @@
|
||||
#include "png.h"
|
||||
|
||||
/* Generate a compiler error if there is an old png.h in the search path. */
|
||||
typedef version_1_0_11 Your_png_h_is_not_version_1_0_11;
|
||||
typedef version_1_0_12beta1 Your_png_h_is_not_version_1_0_12beta1;
|
||||
|
||||
/* 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 */
|
||||
const char png_libpng_ver[18] = "1.0.11";
|
||||
const char png_libpng_ver[18] = "1.0.12beta1";
|
||||
|
||||
/* png_sig was changed to a function in version 1.0.5c */
|
||||
/* Place to hold the signature string for a PNG file. */
|
||||
@ -213,12 +213,12 @@ png_create_info_struct(png_structp png_ptr)
|
||||
if(png_ptr == NULL) return (NULL);
|
||||
#ifdef PNG_USER_MEM_SUPPORTED
|
||||
if ((info_ptr = (png_infop)png_create_struct_2(PNG_STRUCT_INFO,
|
||||
png_ptr->malloc_fn)) != NULL)
|
||||
png_ptr->malloc_fn, png_ptr->mem_ptr)) != NULL)
|
||||
#else
|
||||
if ((info_ptr = (png_infop)png_create_struct(PNG_STRUCT_INFO)) != NULL)
|
||||
#endif
|
||||
{
|
||||
png_info_init(info_ptr);
|
||||
png_info_init_3(&info_ptr, sizeof(png_info));
|
||||
}
|
||||
|
||||
return (info_ptr);
|
||||
@ -243,7 +243,8 @@ png_destroy_info_struct(png_structp png_ptr, png_infopp info_ptr_ptr)
|
||||
png_info_destroy(png_ptr, info_ptr);
|
||||
|
||||
#ifdef PNG_USER_MEM_SUPPORTED
|
||||
png_destroy_struct_2((png_voidp)info_ptr, png_ptr->free_fn);
|
||||
png_destroy_struct_2((png_voidp)info_ptr, png_ptr->free_fn,
|
||||
png_ptr->mem_ptr);
|
||||
#else
|
||||
png_destroy_struct((png_voidp)info_ptr);
|
||||
#endif
|
||||
@ -255,10 +256,28 @@ png_destroy_info_struct(png_structp png_ptr, png_infopp info_ptr_ptr)
|
||||
* and applications using it are urged to use png_create_info_struct()
|
||||
* instead.
|
||||
*/
|
||||
void /* PRIVATE */
|
||||
#undef png_info_init
|
||||
void PNGAPI
|
||||
png_info_init(png_infop info_ptr)
|
||||
{
|
||||
png_debug(1, "in png_info_init\n");
|
||||
/* We only come here via pre-1.0.12-compiled applications */
|
||||
png_info_init_3(&info_ptr, 0);
|
||||
}
|
||||
|
||||
void PNGAPI
|
||||
png_info_init_3(png_infopp ptr_ptr, png_size_t png_info_struct_size)
|
||||
{
|
||||
png_infop info_ptr = *ptr_ptr;
|
||||
|
||||
png_debug(1, "in png_info_init_3\n");
|
||||
|
||||
if(sizeof(png_info) > png_info_struct_size)
|
||||
{
|
||||
png_destroy_struct(info_ptr);
|
||||
info_ptr = (png_infop)png_create_struct(PNG_STRUCT_INFO);
|
||||
*ptr_ptr = info_ptr;
|
||||
}
|
||||
|
||||
/* set everything to 0 */
|
||||
png_memset(info_ptr, 0, sizeof (png_info));
|
||||
}
|
||||
@ -537,7 +556,7 @@ png_info_destroy(png_structp png_ptr, png_infop info_ptr)
|
||||
}
|
||||
#endif
|
||||
|
||||
png_info_init(info_ptr);
|
||||
png_info_init_3(&info_ptr, sizeof(png_info));
|
||||
}
|
||||
|
||||
/* This function returns a pointer to the io_ptr associated with the user
|
||||
@ -627,7 +646,7 @@ png_charp PNGAPI
|
||||
png_get_copyright(png_structp png_ptr)
|
||||
{
|
||||
if (png_ptr != NULL || png_ptr == NULL) /* silence compiler warning */
|
||||
return ((png_charp) "\n libpng version 1.0.11 - April 27, 2001\n\
|
||||
return ((png_charp) "\n libpng version 1.0.12beta1 - May 14, 2001\n\
|
||||
Copyright (c) 1998-2001 Glenn Randers-Pehrson\n\
|
||||
Copyright (c) 1996, 1997 Andreas Dilger\n\
|
||||
Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.\n");
|
||||
@ -645,8 +664,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((png_charp) "1.0.11");
|
||||
return((png_charp) "1.0.11");
|
||||
return((png_charp) "1.0.12beta1");
|
||||
return((png_charp) "1.0.12beta1");
|
||||
}
|
||||
|
||||
png_charp PNGAPI
|
||||
@ -696,17 +715,15 @@ png_uint_32 PNGAPI
|
||||
png_access_version_number(void)
|
||||
{
|
||||
/* Version of *.c files used when building libpng */
|
||||
return((png_uint_32) 10011L);
|
||||
return((png_uint_32) 10012L);
|
||||
}
|
||||
|
||||
|
||||
#if 0 /* delay this until version 1.2.0 */
|
||||
/* this function was added to libpng 1.0.9 (porting aid to libpng-1.2.0) */
|
||||
#ifndef PNG_ASSEMBLER_CODE_SUPPORTED
|
||||
/* this function was added to libpng 1.2.0 */
|
||||
#if !defined(PNG_USE_PNGGCCRD) && \
|
||||
!(defined(PNG_ASSEMBLER_CODE_SUPPORTED) && defined(PNG_USE_PNGVCRD))
|
||||
int PNGAPI
|
||||
png_mmx_support(void)
|
||||
{
|
||||
return -1;
|
||||
}
|
||||
#endif
|
||||
#endif /* 0 */
|
||||
|
99
png.h
99
png.h
@ -1,7 +1,7 @@
|
||||
|
||||
/* png.h - header file for PNG reference library
|
||||
*
|
||||
* libpng version 1.0.11 - April 27, 2001
|
||||
* libpng version 1.0.12beta1 - May 14, 2001
|
||||
* Copyright (c) 1998-2001 Glenn Randers-Pehrson
|
||||
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
|
||||
* (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
|
||||
@ -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.11 - April 27, 2001: Glenn
|
||||
* libpng versions 0.97, January 1998, through 1.0.12beta1 - May 14, 2001: Glenn
|
||||
* See also "Contributing Authors", below.
|
||||
*
|
||||
* Note about libpng version numbers:
|
||||
@ -70,6 +70,10 @@
|
||||
* 1.0.11beta1-3 1 10011 2.1.0.11beta1-3
|
||||
* 1.0.11rc1 1 10011 2.1.0.11rc1
|
||||
* 1.0.11 1 10011 2.1.0.11
|
||||
* 1.0.12beta1 2 10012 2.1.0.11beta1
|
||||
* 1.1.0a-f 1 10100 2.1.1.0a-f (branch abandoned)
|
||||
* 1.2.0beta1-2 2 10200 2.1.2.0beta1-2
|
||||
* 1.2.0beta3 3 10200 3.1.2.0beta3
|
||||
*
|
||||
* Henceforth the source version will match the shared-library major
|
||||
* and minor numbers; the shared-library major version number will be
|
||||
@ -99,7 +103,7 @@
|
||||
* If you modify libpng you may insert additional notices immediately following
|
||||
* this sentence.
|
||||
*
|
||||
* libpng versions 1.0.7, July 1, 2000, through 1.0.11, April 27, 2001, are
|
||||
* libpng versions 1.0.7, July 1, 2000, through 1.0.12beta1, May 14, 2001, are
|
||||
* Copyright (c) 2000, 2001 Glenn Randers-Pehrson, and are
|
||||
* distributed according to the same disclaimer and license as libpng-1.0.6
|
||||
* with the following individuals added to the list of Contributing Authors
|
||||
@ -204,13 +208,13 @@
|
||||
* Y2K compliance in libpng:
|
||||
* =========================
|
||||
*
|
||||
* April 27, 2001
|
||||
* May 14, 2001
|
||||
*
|
||||
* 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.11 are Y2K compliant. It is my belief that earlier
|
||||
* upward through 1.0.12beta1 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
|
||||
@ -266,7 +270,7 @@
|
||||
*/
|
||||
|
||||
/* Version information for png.h - this should match the version in png.c */
|
||||
#define PNG_LIBPNG_VER_STRING "1.0.11"
|
||||
#define PNG_LIBPNG_VER_STRING "1.0.12beta1"
|
||||
|
||||
#define PNG_LIBPNG_VER_SONUM 2
|
||||
#define PNG_LIBPNG_VER_DLLNUM %DLLNUM%
|
||||
@ -274,11 +278,11 @@
|
||||
/* 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 11
|
||||
#define PNG_LIBPNG_VER_RELEASE 12
|
||||
/* This should match the numeric part of the final component of
|
||||
* PNG_LIBPNG_VER_STRING, omitting any leading zero: */
|
||||
|
||||
#define PNG_LIBPNG_VER_BUILD 0
|
||||
#define PNG_LIBPNG_VER_BUILD 1
|
||||
|
||||
#define PNG_LIBPNG_BUILD_ALPHA 1
|
||||
#define PNG_LIBPNG_BUILD_BETA 2
|
||||
@ -286,14 +290,14 @@
|
||||
#define PNG_LIBPNG_BUILD_STABLE 4
|
||||
#define PNG_LIBPNG_BUILD_TYPEMASK 7
|
||||
#define PNG_LIBPNG_BUILD_PATCH 8 /* Can be OR'ed with STABLE only */
|
||||
#define PNG_LIBPNG_BUILD_TYPE 4
|
||||
#define PNG_LIBPNG_BUILD_TYPE 2
|
||||
|
||||
/* 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 10011 /* 1.0.11 */
|
||||
#define PNG_LIBPNG_VER 10012 /* 1.0.12 */
|
||||
|
||||
#ifndef PNG_VERSION_INFO_ONLY
|
||||
|
||||
@ -699,6 +703,7 @@ defined(PNG_READ_BACKGROUND_SUPPORTED)
|
||||
png_byte pcal_nparams; /* number of parameters given in pcal_params */
|
||||
#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
|
||||
@ -1139,12 +1144,6 @@ struct png_struct_def
|
||||
png_charp time_buffer; /* String to hold RFC 1123 time text */
|
||||
#endif
|
||||
|
||||
#ifdef PNG_USER_MEM_SUPPORTED
|
||||
png_voidp mem_ptr; /* user supplied struct for mem functions */
|
||||
png_malloc_ptr malloc_fn; /* function for allocating memory */
|
||||
png_free_ptr free_fn; /* function for freeing memory */
|
||||
#endif
|
||||
|
||||
/* New members added in libpng-1.0.6 */
|
||||
|
||||
#ifdef PNG_FREE_ME_SUPPORTED
|
||||
@ -1161,35 +1160,59 @@ struct png_struct_def
|
||||
png_bytep chunk_list;
|
||||
#endif
|
||||
|
||||
/* New members added in libpng-1.0.3 */
|
||||
#if defined(PNG_READ_RGB_TO_GRAY_SUPPORTED)
|
||||
png_byte rgb_to_gray_status;
|
||||
/* These were changed from png_byte in libpng-1.0.6 */
|
||||
png_uint_16 rgb_to_gray_red_coeff;
|
||||
png_uint_16 rgb_to_gray_green_coeff;
|
||||
png_uint_16 rgb_to_gray_blue_coeff;
|
||||
#endif
|
||||
|
||||
/* New member added in libpng-1.0.4 (renamed in 1.0.9) */
|
||||
#if defined(PNG_MNG_FEATURES_SUPPORTED) || \
|
||||
defined(PNG_READ_EMPTY_PLTE_SUPPORTED) || \
|
||||
defined(PNG_WRITE_EMPTY_PLTE_SUPPORTED)
|
||||
/* Note to maintainer: change this to png_uint_32 at next opportunity */
|
||||
/* changed from png_byte to png_uint_32 at version 1.2.0 */
|
||||
png_byte mng_features_permitted;
|
||||
#endif
|
||||
|
||||
/* New member added in libpng-1.0.7 */
|
||||
#if defined(PNG_READ_GAMMA_SUPPORTED) || defined(PNG_READ_BACKGROUND_SUPPORTED)
|
||||
png_fixed_point int_gamma;
|
||||
#endif
|
||||
|
||||
/* New member added in libpng-1.0.9, ifdef'ed out in 1.0.12, enabled in 1.2.0 */
|
||||
#if defined(PNG_MNG_FEATURES_SUPPORTED)
|
||||
png_byte filter_type;
|
||||
#endif
|
||||
|
||||
#if defined(PNG_DEBUG) && defined(PNG_USE_PNGGCCRD)
|
||||
/* New member added in libpng-1.0.10, ifdef'ed out in 1.2.0 */
|
||||
png_uint_32 row_buf_size;
|
||||
#endif
|
||||
|
||||
/* New members added in libpng-1.2.0 */
|
||||
#if defined(PNG_ASSEMBLER_CODE_SUPPORTED)
|
||||
png_byte mmx_bitdepth_threshold;
|
||||
png_uint_32 mmx_rowbytes_threshold;
|
||||
png_uint_32 asm_flags;
|
||||
#endif
|
||||
|
||||
/* New members added in libpng-1.0.2 but first enabled by default in 1.2.0 */
|
||||
#ifdef PNG_USER_MEM_SUPPORTED
|
||||
png_voidp mem_ptr; /* user supplied struct for mem functions */
|
||||
png_malloc_ptr malloc_fn; /* function for allocating memory */
|
||||
png_free_ptr free_fn; /* function for freeing memory */
|
||||
#endif
|
||||
|
||||
};
|
||||
|
||||
|
||||
/* This prevents a compiler error in png_get_copyright() in png.c if png.c
|
||||
and png.h are both at * version 1.0.11
|
||||
and png.h are both at version 1.0.12beta1
|
||||
*/
|
||||
typedef png_structp version_1_0_11;
|
||||
typedef png_structp version_1_0_12beta1;
|
||||
|
||||
typedef png_struct FAR * FAR * png_structpp;
|
||||
|
||||
@ -1240,6 +1263,7 @@ extern PNG_EXPORT(void,png_set_compression_buffer_size)
|
||||
/* Reset the compression stream */
|
||||
extern PNG_EXPORT(int,png_reset_zstream) PNGARG((png_structp png_ptr));
|
||||
|
||||
/* New functions added in libpng-1.0.2 (not enabled by default until 1.2.0) */
|
||||
#ifdef PNG_USER_MEM_SUPPORTED
|
||||
extern PNG_EXPORT(png_structp,png_create_read_struct_2)
|
||||
PNGARG((png_const_charp user_png_ver, png_voidp error_ptr,
|
||||
@ -1270,8 +1294,11 @@ extern PNG_EXPORT(void,png_write_chunk_end) PNGARG((png_structp png_ptr));
|
||||
extern PNG_EXPORT(png_infop,png_create_info_struct)
|
||||
PNGARG((png_structp png_ptr));
|
||||
|
||||
/* Initialize the info structure (old interface - NOT DLL EXPORTED) */
|
||||
extern void png_info_init PNGARG((png_infop info_ptr));
|
||||
/* Initialize the info structure (old interface - DEPRECATED) */
|
||||
extern PNG_EXPORT(void,png_info_init) PNGARG((png_infop info_ptr));
|
||||
#define png_info_init(info_ptr) png_info_init_3(&info_ptr, sizeof(png_info));
|
||||
extern PNG_EXPORT(void,png_info_init_3) PNGARG((png_infopp info_ptr,
|
||||
png_size_t png_info_struct_size));
|
||||
|
||||
/* Writes all the PNG information before the image. */
|
||||
extern PNG_EXPORT(void,png_write_info_before_PLTE) PNGARG((png_structp png_ptr,
|
||||
@ -2229,15 +2256,23 @@ extern PNG_EXPORT(png_uint_32,png_permit_mng_features) PNGARG((png_structp
|
||||
png_ptr, png_uint_32 mng_features_permitted));
|
||||
#endif
|
||||
|
||||
#if 0 /* delay these until version 1.2.0 */
|
||||
/* png_mmx_support will be included unconditionally starting in version 1.2.0 */
|
||||
#if defined(PNG_ASSEMBLER_CODE_SUPPORTED) || defined(PNG_USE_PNGGCCRD)
|
||||
/* png.c, pnggccrd.c, or pngvcrd.c */
|
||||
extern PNG_EXPORT(int,png_mmx_support) PNGARG((void));
|
||||
#endif /* PNG_ASSEMBLER_CODE_SUPPORTED */
|
||||
|
||||
/* Strip the prepended error numbers ("#nnn ") from error and warning
|
||||
* messages before passing them to the error or warning handler. */
|
||||
#ifdef PNG_ERROR_NUMBERS_SUPPORTED
|
||||
extern PNG_EXPORT(void,png_set_strip_error_numbers) PNGARG((png_structp
|
||||
png_ptr, png_uint_32 strip_mode));
|
||||
#endif
|
||||
|
||||
/* Maintainer: Put new public prototypes here ^, in libpng.3, and project defs */
|
||||
|
||||
#define PNG_HEADER_VERSION_STRING \
|
||||
" libpng version 1.0.11 - April 27, 2001 (header)\n"
|
||||
" libpng version 1.0.12beta1 - May 14, 2001 (header)\n"
|
||||
|
||||
#ifdef PNG_READ_COMPOSITE_NODIV_SUPPORTED
|
||||
/* With these routines we avoid an integer divide, which will be slower on
|
||||
@ -2360,6 +2395,8 @@ extern PNG_EXPORT(int,png_mmx_support) PNGARG((void));
|
||||
#define PNG_FLAG_KEEP_UNKNOWN_CHUNKS 0x8000L
|
||||
#define PNG_FLAG_KEEP_UNSAFE_CHUNKS 0x10000L
|
||||
#define PNG_FLAG_LIBRARY_MISMATCH 0x20000L
|
||||
#define PNG_FLAG_STRIP_ERROR_NUMBERS 0x40000L
|
||||
#define PNG_FLAG_STRIP_ERROR_TEXT 0x80000L
|
||||
|
||||
/* For use in png_set_keep_unknown, png_handle_as_unknown */
|
||||
#define HANDLE_CHUNK_AS_DEFAULT 0
|
||||
@ -2468,8 +2505,10 @@ PNG_EXTERN png_uint_16 png_get_uint_16 PNGARG((png_bytep buf));
|
||||
* (old interface - DEPRECATED - use png_create_read_struct instead).
|
||||
*/
|
||||
extern PNG_EXPORT(void,png_read_init) PNGARG((png_structp png_ptr));
|
||||
#define png_read_init(png_ptr) png_read_init_2(png_ptr, \
|
||||
PNG_LIBPNG_VER_STRING, sizeof(png_struct), sizeof(png_info));
|
||||
#define png_read_init(png_ptr) png_read_init_3(&png_ptr, \
|
||||
PNG_LIBPNG_VER_STRING, sizeof(png_struct));
|
||||
extern PNG_EXPORT(void,png_read_init_3) PNGARG((png_structpp ptr_ptr,
|
||||
png_const_charp user_png_ver, png_size_t png_struct_size));
|
||||
extern PNG_EXPORT(void,png_read_init_2) PNGARG((png_structp png_ptr,
|
||||
png_const_charp user_png_ver, png_size_t png_struct_size, png_size_t
|
||||
png_info_size));
|
||||
@ -2478,8 +2517,10 @@ extern PNG_EXPORT(void,png_read_init_2) PNGARG((png_structp png_ptr,
|
||||
* (old interface - DEPRECATED - use png_create_write_struct instead).
|
||||
*/
|
||||
extern PNG_EXPORT(void,png_write_init) PNGARG((png_structp png_ptr));
|
||||
#define png_write_init(png_ptr) png_write_init_2(png_ptr, \
|
||||
PNG_LIBPNG_VER_STRING, sizeof(png_struct), sizeof(png_info));
|
||||
#define png_write_init(png_ptr) png_write_init_3(&png_ptr, \
|
||||
PNG_LIBPNG_VER_STRING, sizeof(png_struct));
|
||||
extern PNG_EXPORT(void,png_write_init_3) PNGARG((png_structpp ptr_ptr,
|
||||
png_const_charp user_png_ver, png_size_t png_struct_size));
|
||||
extern PNG_EXPORT(void,png_write_init_2) PNGARG((png_structp png_ptr,
|
||||
png_const_charp user_png_ver, png_size_t png_struct_size, png_size_t
|
||||
png_info_size));
|
||||
@ -2491,9 +2532,9 @@ PNG_EXTERN png_voidp png_create_struct PNGARG((int type));
|
||||
PNG_EXTERN void png_destroy_struct PNGARG((png_voidp struct_ptr));
|
||||
|
||||
PNG_EXTERN png_voidp png_create_struct_2 PNGARG((int type, png_malloc_ptr
|
||||
malloc_fn));
|
||||
malloc_fn, png_voidp mem_ptr));
|
||||
PNG_EXTERN void png_destroy_struct_2 PNGARG((png_voidp struct_ptr,
|
||||
png_free_ptr free_fn));
|
||||
png_free_ptr free_fn, png_voidp mem_ptr));
|
||||
|
||||
/* Free any memory that info_ptr points to and reset struct. */
|
||||
PNG_EXTERN void png_info_destroy PNGARG((png_structp png_ptr,
|
||||
|
@ -1,6 +1,6 @@
|
||||
/* pngasmrd.h - assembler version of utilities to read a PNG file
|
||||
*
|
||||
* libpng 1.0.11 - April 27, 2001
|
||||
* libpng 1.0.12beta1 - May 14, 2001
|
||||
* For conditions of distribution and use, see copyright notice in png.h
|
||||
* Copyright (c) 2001 Glenn Randers-Pehrson
|
||||
*
|
||||
|
95
pngconf.h
95
pngconf.h
@ -1,6 +1,6 @@
|
||||
/* pngconf.h - machine configurable file for libpng
|
||||
*
|
||||
* libpng 1.0.11 - April 27, 2001
|
||||
* libpng 1.0.12beta1 - May 14, 2001
|
||||
* For conditions of distribution and use, see copyright notice in png.h
|
||||
* Copyright (c) 1998-2001 Glenn Randers-Pehrson
|
||||
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
|
||||
@ -45,8 +45,8 @@
|
||||
# define PNG_WRITE_SUPPORTED
|
||||
#endif
|
||||
|
||||
/* Enable if you need to support PNGs that are embedded in MNG
|
||||
datastreams */
|
||||
/* Enabled by default in 1.2.0. You can disable this if you don't need to
|
||||
support PNGs that are embedded in MNG datastreams */
|
||||
/*
|
||||
#ifndef PNG_NO_MNG_FEATURES
|
||||
# ifndef PNG_MNG_FEATURES_SUPPORTED
|
||||
@ -91,47 +91,58 @@
|
||||
* this bit of #ifdefs will define the 'correct' config variables based on
|
||||
* that. If a cygwin user *wants* to define 'PNG_USE_DLL' that's okay, but
|
||||
* unnecessary.
|
||||
*
|
||||
* Also, the precedence order is:
|
||||
* ALL_STATIC (since we can't #undef something outside our namespace)
|
||||
* PNG_BUILD_DLL
|
||||
* PNG_STATIC
|
||||
* (nothing) == PNG_USE_DLL
|
||||
*/
|
||||
#if defined(__CYGWIN__)
|
||||
# if defined(PNG_BUILD_DLL)
|
||||
# if defined(ALL_STATIC)
|
||||
# if defined(PNG_BUILD_DLL)
|
||||
# undef PNG_BUILD_DLL
|
||||
# endif
|
||||
# if defined(PNG_USE_DLL)
|
||||
# undef PNG_USE_DLL
|
||||
# endif
|
||||
# if !defined(PNG_DLL)
|
||||
# define PNG_DLL
|
||||
# if defined(PNG_DLL)
|
||||
# undef PNG_DLL
|
||||
# endif
|
||||
# if defined(PNG_STATIC)
|
||||
# undef PNG_STATIC
|
||||
# endif
|
||||
# else
|
||||
# if defined(ALL_STATIC)
|
||||
# if !defined(PNG_STATIC)
|
||||
# define PNG_STATIC
|
||||
# endif
|
||||
# if defined(PNG_STATIC)
|
||||
# else
|
||||
# if defined (PNG_BUILD_DLL)
|
||||
# if defined(PNG_STATIC)
|
||||
# undef PNG_STATIC
|
||||
# endif
|
||||
# if defined(PNG_USE_DLL)
|
||||
# undef PNG_USE_DLL
|
||||
# endif
|
||||
# if defined(PNG_DLL)
|
||||
# undef PNG_DLL
|
||||
# if !defined(PNG_DLL)
|
||||
# define PNG_DLL
|
||||
# endif
|
||||
# else
|
||||
# if defined(PNG_USE_DLL)
|
||||
# if defined(PNG_STATIC)
|
||||
# if defined(PNG_USE_DLL)
|
||||
# undef PNG_USE_DLL
|
||||
# endif
|
||||
# if defined(PNG_DLL)
|
||||
# undef PNG_DLL
|
||||
# endif
|
||||
# else
|
||||
# if !defined(PNG_USE_DLL)
|
||||
# define PNG_USE_DLL
|
||||
# endif
|
||||
# if !defined(PNG_DLL)
|
||||
# define PNG_DLL
|
||||
# endif
|
||||
# else
|
||||
# if defined(PNG_DLL)
|
||||
# define PNG_USE_DLL
|
||||
# else
|
||||
# define PNG_USE_DLL
|
||||
# define PNG_DLL
|
||||
# endif
|
||||
# endif
|
||||
# endif
|
||||
# endif
|
||||
# endif
|
||||
# endif
|
||||
#endif
|
||||
|
||||
|
||||
/* This protects us against compilers that run on a windowing system
|
||||
* and thus don't have or would rather us not use the stdio types:
|
||||
* stdin, stdout, and stderr. The only one currently used is stderr
|
||||
@ -306,7 +317,8 @@
|
||||
# include "alloc.h"
|
||||
#endif
|
||||
|
||||
#ifdef _MSC_VER
|
||||
#if defined(_MSC_VER) && (defined(WIN32) || defined(_Windows) || \
|
||||
defined(_WINDOWS) || defined(_WIN32) || defined(__WIN32__))
|
||||
# include <malloc.h>
|
||||
#endif
|
||||
|
||||
@ -578,6 +590,13 @@
|
||||
# define PNG_WRITE_WEIGHTED_FILTER_SUPPORTED
|
||||
#endif
|
||||
|
||||
/* Will be enabled in libpng-1.2.0 */
|
||||
/*
|
||||
#ifndef PNG_NO_ERROR_NUMBERS
|
||||
#define PNG_ERROR_NUMBERS_SUPPORTED
|
||||
#endif
|
||||
*/
|
||||
|
||||
#ifndef PNG_NO_WRITE_FLUSH
|
||||
# define PNG_WRITE_FLUSH_SUPPORTED
|
||||
#endif
|
||||
@ -609,12 +628,22 @@
|
||||
* png_get_x_offset_microns()
|
||||
* png_get_y_offset_microns()
|
||||
*/
|
||||
#ifndef PNG_NO_EASY_ACCESS
|
||||
#if !defined(PNG_NO_EASY_ACCESS) && !defined(PNG_EASY_ACCESS_SUPPORTED)
|
||||
# define PNG_EASY_ACCESS_SUPPORTED
|
||||
#endif
|
||||
|
||||
/* PNG_ASSEMBLER_CODE will be enabled by default in version 1.2.0
|
||||
/* PNG_ASSEMBLER_CODE was enabled by default in version 1.2.0
|
||||
even when PNG_USE_PNGVCRD or PNG_USE_PNGGCCRD is not defined */
|
||||
/*
|
||||
#if defined(PNG_READ_SUPPORTED) && !defined(PNG_NO_ASSEMBLER_CODE)
|
||||
# ifndef PNG_ASSEMBLER_CODE_SUPPORTED
|
||||
# define PNG_ASSEMBLER_CODE_SUPPORTED
|
||||
# endif
|
||||
# if !defined(PNG_MMX_CODE_SUPPORTED) && !defined(PNG_NO_MMX_CODE)
|
||||
# define PNG_MMX_CODE_SUPPORTED
|
||||
# endif
|
||||
#endif
|
||||
*/
|
||||
#if defined(PNG_READ_SUPPORTED) && !defined(PNG_NO_ASSEMBLER_CODE)
|
||||
# if defined(PNG_USE_PNGVCRD) || defined(PNG_USE_PNGGCCRD)
|
||||
# ifndef PNG_ASSEMBLER_CODE_SUPPORTED
|
||||
@ -626,6 +655,13 @@
|
||||
# endif
|
||||
#endif
|
||||
|
||||
/* This will be enabled by default in libpng-1.2.0 */
|
||||
/*
|
||||
#if !defined(PNG_NO_USER_MEM) && !defined(PNG_USER_MEM_SUPPORTED)
|
||||
# define PNG_USER_MEM_SUPPORTED
|
||||
#endif
|
||||
*/
|
||||
|
||||
/* These are currently experimental features, define them if you want */
|
||||
|
||||
/* very little testing */
|
||||
@ -635,9 +671,6 @@
|
||||
# define PNG_READ_16_TO_8_ACCURATE_SCALE_SUPPORTED
|
||||
# endif
|
||||
#endif
|
||||
#ifndef PNG_NO_USER_MEM
|
||||
# define PNG_USER_MEM_SUPPORTED
|
||||
#endif
|
||||
#ifndef PNG_NO_ZALLOC_ZERO
|
||||
# define PNG_ZALLOC_ZERO
|
||||
#endif
|
||||
|
106
pngerror.c
106
pngerror.c
@ -1,7 +1,7 @@
|
||||
|
||||
/* pngerror.c - stub functions for i/o and memory allocation
|
||||
*
|
||||
* libpng 1.0.11 - April 27, 2001
|
||||
* libpng 1.0.12beta1 - May 14, 2001
|
||||
* For conditions of distribution and use, see copyright notice in png.h
|
||||
* Copyright (c) 1998-2001 Glenn Randers-Pehrson
|
||||
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
|
||||
@ -31,6 +31,38 @@ png_default_warning PNGARG((png_structp png_ptr,
|
||||
void PNGAPI
|
||||
png_error(png_structp png_ptr, png_const_charp message)
|
||||
{
|
||||
#ifdef PNG_ERROR_NUMBERS_SUPPORTED
|
||||
char msg[16];
|
||||
if (png_ptr->flags&(PNG_FLAG_STRIP_ERROR_NUMBERS|PNG_FLAG_STRIP_ERROR_TEXT))
|
||||
{
|
||||
int offset = 0;
|
||||
if (*message == '#')
|
||||
{
|
||||
for (offset=1; offset<15; offset++)
|
||||
if (*(message+offset) == ' ')
|
||||
break;
|
||||
if (png_ptr->flags&PNG_FLAG_STRIP_ERROR_TEXT)
|
||||
{
|
||||
int i;
|
||||
for (i=0; i<offset-1; i++)
|
||||
msg[i]=message[i+1];
|
||||
msg[i]='\0';
|
||||
message=msg;
|
||||
}
|
||||
else
|
||||
message+=offset;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (png_ptr->flags&PNG_FLAG_STRIP_ERROR_TEXT)
|
||||
{
|
||||
msg[0]='0';
|
||||
msg[1]='\0';
|
||||
message=msg;
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
if (png_ptr->error_fn != NULL)
|
||||
(*(png_ptr->error_fn))(png_ptr, message);
|
||||
|
||||
@ -47,10 +79,22 @@ png_error(png_structp png_ptr, png_const_charp message)
|
||||
void PNGAPI
|
||||
png_warning(png_structp png_ptr, png_const_charp message)
|
||||
{
|
||||
int offset = 0;
|
||||
#ifdef PNG_ERROR_NUMBERS_SUPPORTED
|
||||
if (png_ptr->flags&(PNG_FLAG_STRIP_ERROR_NUMBERS|PNG_FLAG_STRIP_ERROR_TEXT))
|
||||
#endif
|
||||
{
|
||||
if (*message == '#')
|
||||
{
|
||||
for (offset=1; offset<15; offset++)
|
||||
if (*(message+offset) == ' ')
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (png_ptr->warning_fn != NULL)
|
||||
(*(png_ptr->warning_fn))(png_ptr, message);
|
||||
(*(png_ptr->warning_fn))(png_ptr, (png_const_charp)(message+offset));
|
||||
else
|
||||
png_default_warning(png_ptr, message);
|
||||
png_default_warning(png_ptr, (png_const_charp)(message+offset));
|
||||
}
|
||||
|
||||
/* These utilities are used internally to build an error message that relates
|
||||
@ -122,6 +166,27 @@ static void /* PRIVATE */
|
||||
png_default_error(png_structp png_ptr, png_const_charp message)
|
||||
{
|
||||
#ifndef PNG_NO_CONSOLE_IO
|
||||
#ifdef PNG_ERROR_NUMBERS_SUPPORTED
|
||||
if (*message == '#')
|
||||
{
|
||||
int offset;
|
||||
char error_number[16];
|
||||
for (offset=0; offset<15; offset++)
|
||||
{
|
||||
error_number[offset] = *(message+offset+1);
|
||||
if (*(message+offset) == ' ')
|
||||
break;
|
||||
}
|
||||
if((offset > 1) && (offset < 15))
|
||||
{
|
||||
error_number[offset-1]='\0';
|
||||
fprintf(stderr, "libpng error no. %s: %s\n", error_number, message+offset);
|
||||
}
|
||||
else
|
||||
fprintf(stderr, "libpng error: %s, offset=%d\n", message,offset);
|
||||
}
|
||||
else
|
||||
#endif
|
||||
fprintf(stderr, "libpng error: %s\n", message);
|
||||
#else
|
||||
if (message)
|
||||
@ -154,7 +219,29 @@ static void /* PRIVATE */
|
||||
png_default_warning(png_structp png_ptr, png_const_charp message)
|
||||
{
|
||||
#ifndef PNG_NO_CONSOLE_IO
|
||||
fprintf(stderr, "libpng warning: %s\n", message);
|
||||
# ifdef PNG_ERROR_NUMBERS_SUPPORTED
|
||||
if (*message == '#')
|
||||
{
|
||||
int offset;
|
||||
char warning_number[16];
|
||||
for (offset=0; offset<15; offset++)
|
||||
{
|
||||
warning_number[offset]=*(message+offset+1);
|
||||
if (*(message+offset) == ' ')
|
||||
break;
|
||||
}
|
||||
if((offset > 1) && (offset < 15))
|
||||
{
|
||||
warning_number[offset-1]='\0';
|
||||
fprintf(stderr, "libpng warning no. %s: %s\n", warning_number,
|
||||
message+offset);
|
||||
}
|
||||
else
|
||||
fprintf(stderr, "libpng warning: %s\n", message);
|
||||
}
|
||||
else
|
||||
# endif
|
||||
fprintf(stderr, "libpng warning: %s\n", message);
|
||||
#else
|
||||
if (message)
|
||||
/* appease compiler */ ;
|
||||
@ -189,4 +276,15 @@ png_get_error_ptr(png_structp png_ptr)
|
||||
}
|
||||
|
||||
|
||||
#ifdef PNG_ERROR_NUMBERS_SUPPORTED
|
||||
void
|
||||
png_set_strip_error_numbers(png_structp png_ptr, png_uint_32 strip_mode)
|
||||
{
|
||||
if(png_ptr != NULL)
|
||||
{
|
||||
png_ptr->flags &=
|
||||
((~(PNG_FLAG_STRIP_ERROR_NUMBERS|PNG_FLAG_STRIP_ERROR_TEXT))&strip_mode);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
|
@ -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 version 1.0.11 - April 27, 2001
|
||||
* libpng version 1.0.12beta1 - May 14, 2001
|
||||
* For conditions of distribution and use, see copyright notice in png.h
|
||||
* Copyright (c) 1998-2001 Glenn Randers-Pehrson
|
||||
* Copyright (c) 1998, Intel Corporation
|
||||
|
91
pngget.c
91
pngget.c
@ -1,7 +1,7 @@
|
||||
|
||||
/* pngget.c - retrieval of values from info struct
|
||||
*
|
||||
* libpng 1.0.11 - April 27, 2001
|
||||
* libpng 1.0.12beta1 - May 14, 2001
|
||||
* For conditions of distribution and use, see copyright notice in png.h
|
||||
* Copyright (c) 1998-2001 Glenn Randers-Pehrson
|
||||
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
|
||||
@ -826,3 +826,92 @@ png_get_compression_buffer_size(png_structp png_ptr)
|
||||
return (png_uint_32)(png_ptr? png_ptr->zbuf_size : 0L);
|
||||
}
|
||||
|
||||
|
||||
#ifdef PNG_ASSEMBLER_CODE_SUPPORTED
|
||||
/* this function was added to libpng 1.2.0 and should exist by default*/
|
||||
png_uint_32 PNGAPI
|
||||
png_get_asm_flags (png_structp png_ptr)
|
||||
{
|
||||
return (png_uint_32)(png_ptr? png_ptr->asm_flags : 0L);
|
||||
}
|
||||
|
||||
/* this function was added to libpng 1.2.0 and should exist by default */
|
||||
png_uint_32 PNGAPI
|
||||
png_get_asm_flagmask (int flag_select)
|
||||
{
|
||||
png_uint_32 settable_asm_flags = 0;
|
||||
|
||||
if (flag_select & PNG_SELECT_READ)
|
||||
settable_asm_flags |=
|
||||
PNG_ASM_FLAG_MMX_READ_COMBINE_ROW |
|
||||
PNG_ASM_FLAG_MMX_READ_INTERLACE |
|
||||
PNG_ASM_FLAG_MMX_READ_FILTER_SUB |
|
||||
PNG_ASM_FLAG_MMX_READ_FILTER_UP |
|
||||
PNG_ASM_FLAG_MMX_READ_FILTER_AVG |
|
||||
PNG_ASM_FLAG_MMX_READ_FILTER_PAETH ;
|
||||
/* no non-MMX flags yet */
|
||||
|
||||
#if 0
|
||||
/* GRR: no write-flags yet, either, but someday... */
|
||||
if (flag_select & PNG_SELECT_WRITE)
|
||||
settable_asm_flags |=
|
||||
PNG_ASM_FLAG_MMX_WRITE_ [whatever] ;
|
||||
#endif /* 0 */
|
||||
|
||||
return settable_asm_flags; /* _theoretically_ settable capabilities only */
|
||||
}
|
||||
#endif /* PNG_ASSEMBLER_CODE_SUPPORTED */
|
||||
|
||||
|
||||
#if defined(PNG_ASSEMBLER_CODE_SUPPORTED)
|
||||
/* GRR: could add this: && defined(PNG_MMX_CODE_SUPPORTED) */
|
||||
/* this function was added to libpng 1.2.0 */
|
||||
png_uint_32 PNGAPI
|
||||
png_get_mmx_flagmask (int flag_select, int *compilerID)
|
||||
{
|
||||
png_uint_32 settable_mmx_flags = 0;
|
||||
|
||||
if (flag_select & PNG_SELECT_READ)
|
||||
settable_mmx_flags |=
|
||||
PNG_ASM_FLAG_MMX_READ_COMBINE_ROW |
|
||||
PNG_ASM_FLAG_MMX_READ_INTERLACE |
|
||||
PNG_ASM_FLAG_MMX_READ_FILTER_SUB |
|
||||
PNG_ASM_FLAG_MMX_READ_FILTER_UP |
|
||||
PNG_ASM_FLAG_MMX_READ_FILTER_AVG |
|
||||
PNG_ASM_FLAG_MMX_READ_FILTER_PAETH ;
|
||||
#if 0
|
||||
/* GRR: no MMX write support yet, but someday... */
|
||||
if (flag_select & PNG_SELECT_WRITE)
|
||||
settable_mmx_flags |=
|
||||
PNG_ASM_FLAG_MMX_WRITE_ [whatever] ;
|
||||
#endif /* 0 */
|
||||
|
||||
if (compilerID != NULL) {
|
||||
#ifdef PNG_USE_PNGVCRD
|
||||
*compilerID = 1; /* MSVC */
|
||||
#else
|
||||
#ifdef PNG_USE_PNGGCCRD
|
||||
*compilerID = 2; /* gcc/gas */
|
||||
#else
|
||||
*compilerID = -1; /* unknown (i.e., no asm/MMX code compiled) */
|
||||
#endif
|
||||
#endif
|
||||
}
|
||||
|
||||
return settable_mmx_flags; /* _theoretically_ settable capabilities only */
|
||||
}
|
||||
|
||||
/* this function was added to libpng 1.2.0 */
|
||||
png_byte PNGAPI
|
||||
png_get_mmx_bitdepth_threshold (png_structp png_ptr)
|
||||
{
|
||||
return (png_byte)(png_ptr? png_ptr->mmx_bitdepth_threshold : 0);
|
||||
}
|
||||
|
||||
/* this function was added to libpng 1.2.0 */
|
||||
png_uint_32 PNGAPI
|
||||
png_get_mmx_rowbytes_threshold (png_structp png_ptr)
|
||||
{
|
||||
return (png_uint_32)(png_ptr? png_ptr->mmx_rowbytes_threshold : 0L);
|
||||
}
|
||||
#endif /* PNG_ASSEMBLER_CODE_SUPPORTED */
|
||||
|