Imported from libpng-1.0.4c.tar
This commit is contained in:
parent
54a066a8a9
commit
bcfd15d9f2
35
ANNOUNCE
35
ANNOUNCE
@ -1,10 +1,12 @@
|
||||
|
||||
Libpng 1.0.4 - September 19, 1999
|
||||
Libpng 1.0.4c - October 1, 1999
|
||||
|
||||
This is a public release of libpng, intended for use in production codes.
|
||||
This is not intended to be a public release. It will be replaced
|
||||
within a few weeks by a public version or by another test version.
|
||||
|
||||
Changes since the last public release (1.0.3):
|
||||
|
||||
version 1.0.3a [August 12, 1999]
|
||||
Added check for PNG_READ_INTERLACE_SUPPORTED in pngread.c; issue a warning
|
||||
if an attempt is made to read an interlaced image when it's not supported.
|
||||
Added check if png_ptr->trans is defined before free'ing it in pngread.c
|
||||
@ -32,25 +34,50 @@ Changes since the last public release (1.0.3):
|
||||
consistent with PNG-1.2, and allow variance of 500 before complaining.
|
||||
Added assembler code contributed by Intel in file pngvcrd.c and modified
|
||||
makefile.w32 to use it (Nirav Chhatrapati, INTEL Corporation, Gilles Vollant)
|
||||
Define PNG_USE_PNGVCRD in makefile.w32, to get MMX assembler code.
|
||||
Changed "ln -s -f" to "ln -f -s" in the makefiles to make Solaris happy.
|
||||
Added some aliases for png_set_expand() in pngrtran.c, namely
|
||||
png_set_expand_PLTE(), png_set_expand_depth(), and png_set_expand_tRNS()
|
||||
(Greg Roelofs, in "PNG: The Definitive Guide").
|
||||
Added makefile.beo for BEOS on X86, contributed by Sander Stok.
|
||||
version 1.0.3b [August 26, 1999]
|
||||
Replaced 2147483647L several places with PNG_MAX_UINT macro, defined in png.h
|
||||
Changed leading blanks to tabs in all makefiles.
|
||||
Define PNG_USE_PNGVCRD in makefile.w32, to get MMX assembler code.
|
||||
Made alternate versions of png_set_expand() in pngrtran.c, namely
|
||||
png_set_gray_1_2_4_to_8, png_set_palette_to_rgb, and png_set_tRNS_to_alpha
|
||||
(Greg Roelofs, in "PNG: The Definitive Guide").
|
||||
(Greg Roelofs, in "PNG: The Definitive Guide"). Deleted the 1.0.3a aliases.
|
||||
Relocated start of 'extern "C"' block in png.h so it doesn't include pngconf.h
|
||||
Revised calculation of num_blocks in pngmem.c to avoid a potentially
|
||||
negative shift distance, whose results are undefined in the C language.
|
||||
Added a check in pngset.c to prevent writing multiple tIME chunks.
|
||||
Added a check in pngwrite.c to detect invalid small window_bits sizes.
|
||||
version 1.0.3d [September 4, 1999]
|
||||
Fixed type casting of igamma in pngrutil.c
|
||||
Added new png_expand functions to scripts/pngdef.pas and pngos2.def
|
||||
Added a demo read_user_transform_fn that examines the row filters in pngtest.c
|
||||
version 1.0.4 [September 24, 1999]
|
||||
Define PNG_ALWAYS_EXTERN in pngconf.h if __STDC__ is defined
|
||||
Delete #define PNG_INTERNAL and include "png.h" from pngasmrd.h
|
||||
Made several minor corrections to pngtest.c
|
||||
Changed "hptr += 16L" to "hptr = hptr + 16L" in pngmem.c for Turbo 3.0
|
||||
Renamed the makefiles with longer but more user friendly extensions.
|
||||
Copied the PNG copyright and license to a separate LICENSE file.
|
||||
Revised documentation, png.h, and example.c to remove reference to
|
||||
"viewing_gamma" which no longer appears in the PNG specification.
|
||||
Revised pngvcrd.c to use MMX code for interlacing only on the final pass.
|
||||
Updated pngvcrd.c to use the faster C filter algorithms from libpng-1.0.1a
|
||||
Split makefile.win32vc into two versions, makefile.vcawin32 (uses MMX
|
||||
assembler code) and makefile.vcwin32 (doesn't).
|
||||
Added a CPU timing report to pngtest.c (enabled by defining PNGTEST_TIMING)
|
||||
version 1.0.4a September 25, 1999
|
||||
Increase max_pixel_depth in pngrutil.c if a user transform needs it.
|
||||
Changed several division operations to right-shifts in pngvcrd.c
|
||||
version 1.0.4b September 30, 1999
|
||||
Added parentheses in line 3732 of pngvcrd.c
|
||||
Added a comment in makefile.linux warning about buggy -O3 in pgcc 2.95.1
|
||||
version 1.0.4c [October 1, 1999]
|
||||
Added a "png_check_version" function in png.c and pngtest.c that will generate
|
||||
a helpful compiler error if an old png.h is found in the search path.
|
||||
|
||||
Send comments/corrections/commendations to
|
||||
png-implement@ccrc.wustl.edu or to randeg@alum.rpi.edu
|
||||
|
18
CHANGES
18
CHANGES
@ -436,9 +436,25 @@ version 1.0.3d [September 4, 1999]
|
||||
Fixed type casting of igamma in pngrutil.c
|
||||
Added new png_expand functions to scripts/pngdef.pas and pngos2.def
|
||||
Added a demo read_user_transform_fn that examines the row filters in pngtest.c
|
||||
version 1.0.4 [September 19, 1999]
|
||||
version 1.0.4 [September 24, 1999]
|
||||
Define PNG_ALWAYS_EXTERN in pngconf.h if __STDC__ is defined
|
||||
Delete #define PNG_INTERNAL and include "png.h" from pngasmrd.h
|
||||
Made several minor corrections to pngtest.c
|
||||
Renamed the makefiles with longer but more user friendly extensions.
|
||||
Copied the PNG copyright and license to a separate LICENSE file.
|
||||
Revised documentation, png.h, and example.c to remove reference to
|
||||
"viewing_gamma" which no longer appears in the PNG specification.
|
||||
Revised pngvcrd.c to use MMX code for interlacing only on the final pass.
|
||||
Updated pngvcrd.c to use the faster C filter algorithms from libpng-1.0.1a
|
||||
Split makefile.win32vc into two versions, makefile.vcawin32 (uses MMX
|
||||
assembler code) and makefile.vcwin32 (doesn't).
|
||||
Added a CPU timing report to pngtest.c (enabled by defining PNGTEST_TIMING)
|
||||
version 1.0.4a [September 25, 1999]
|
||||
Increase max_pixel_depth in pngrutil.c if a user transform needs it.
|
||||
Changed several division operations to right-shifts in pngvcrd.c
|
||||
version 1.0.4b [September 30, 1999]
|
||||
Added parentheses in line 3732 of pngvcrd.c
|
||||
Added a comment in makefile.linux warning about buggy -O3 in pgcc 2.95.1
|
||||
version 1.0.4c [October 1, 1999]
|
||||
Added a "png_check_version" function in png.c and pngtest.c that will generate
|
||||
a helpful compiler error if an old png.h is found in the search path.
|
||||
|
13
INSTALL
13
INSTALL
@ -1,5 +1,5 @@
|
||||
|
||||
Installing libpng version 1.0.4 - September 19, 1999
|
||||
Installing libpng version 1.0.4c - October 1, 1999
|
||||
|
||||
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.4" or "lpng103" and "zlib-1.1.3"
|
||||
might be called "libpng-1.0.4c" or "lpng103" 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 @@ include
|
||||
makefile.hpux => HPUX (10.20 and 11.00) makefile
|
||||
makefile.sgi => Silicon Graphics IRIX makefile
|
||||
makefile.sunos => Sun makefile
|
||||
makefile.solaris => Solaris 2.X makefile (gcc, creates libpng.so.2.1.0.4)
|
||||
makefile.linux => Linux/ELF makefile (gcc, creates libpng.so.2.1.0.4)
|
||||
makefile.solaris => Solaris 2.X makefile (gcc, creates libpng.so.2.1.0.4c)
|
||||
makefile.linux => Linux/ELF makefile (gcc, creates libpng.so.2.1.0.4c)
|
||||
makefile.sco => For SCO OSr5 ELF and Unixware 7 with Native cc
|
||||
makefile.mips => MIPS makefile
|
||||
makefile.acorn => Acorn makefile
|
||||
@ -61,7 +61,10 @@ include
|
||||
build.bat => MS-DOS batch file for Borland compiler
|
||||
makefile.dj2 => DJGPP 2 makefile
|
||||
makefile.msc => Microsoft C makefile
|
||||
makefile.win32vc => makefile for Microsoft Visual C++ 4.0 and later
|
||||
makefile.vcawin32 => makefile for Microsoft Visual C++ 5.0 and later (uses
|
||||
assembler code)
|
||||
makefile.vcwin32 => makefile for Microsoft Visual C++ 4.0 and later (does not
|
||||
use assembler code)
|
||||
makefile.turboc3 => Turbo C 3.0 makefile
|
||||
makefile.os2 => OS/2 Makefile (gcc and emx, requires pngos2.def)
|
||||
pngos2.def => OS/2 module definition file used by makefile.os2
|
||||
|
6
KNOWNBUG
6
KNOWNBUG
@ -14,12 +14,12 @@ Known bugs and suggested enhancements in libpng-1.0.4
|
||||
Question whether i-- or --i is better.
|
||||
|
||||
STATUS: Under investigation, postponed until after
|
||||
libpng-1.0.4. About 160 loops will be turned around
|
||||
libpng-1.0.5. About 160 loops will be turned around
|
||||
in libpng-1.0.Nn, for testing.
|
||||
|
||||
2. July 4, 1998 -- ENHANCEMENT -- Glenn R-P
|
||||
|
||||
libpng-1.0.4 and earlier transform colors to gamma=1.0 space for
|
||||
libpng-1.0.5 and earlier transform colors to gamma=1.0 space for
|
||||
merging with background, and then back to the image's gamma. The
|
||||
bit_depth of the intermediate (gamma=1.0) representation is probably
|
||||
not sufficient. In the typical gamma=1/2.2 situation, the linear
|
||||
@ -34,7 +34,7 @@ Known bugs and suggested enhancements in libpng-1.0.4
|
||||
It should be possible to use libpng without floating-point aritmetic.
|
||||
|
||||
STATUS: Under investigation, implementation postponed until after
|
||||
libpng-1.0.4. The application interface will change because replacements
|
||||
libpng-1.0.5. The application interface will change because replacements
|
||||
for the png_set_gAMA(), png_set_cHRM(), and corresponding png_get_()
|
||||
functions will be needed.
|
||||
|
||||
|
24
LICENSE
24
LICENSE
@ -5,7 +5,25 @@ 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 Glenn Randers-Pehrson
|
||||
(libpng versions 0.97, January 1998, through 1.0.4, September 19, 1999)
|
||||
(libpng versions 0.97, January 1998, through 1.0.4c, October 1, 1999)
|
||||
|
||||
For the purposes of this copyright and license, "Contributing Authors"
|
||||
is defined as the following set of individuals:
|
||||
|
||||
John Bowler
|
||||
Kevin Bracey
|
||||
Sam Bushell
|
||||
Andreas Dilger
|
||||
Magnus Holmgren
|
||||
Tom Lane
|
||||
Dave Martindale
|
||||
Glenn Randers-Pehrson
|
||||
Greg Roelofs
|
||||
Guy Eric Schalnat
|
||||
Paul Schmidt
|
||||
Tom Tanner
|
||||
Willem van Schaik
|
||||
Tim Wegner
|
||||
|
||||
The PNG Reference Library is supplied "AS IS". The Contributing Authors
|
||||
and Group 42, Inc. disclaim all warranties, expressed or implied,
|
||||
@ -37,5 +55,5 @@ source code in a product, acknowledgment is not required but would be
|
||||
appreciated.
|
||||
|
||||
Glenn Randers-Pehrson
|
||||
randeg at alum.rpi.edu
|
||||
September 19, 1999
|
||||
randeg@alum.rpi.edu
|
||||
October 1, 1999
|
||||
|
11
README
11
README
@ -1,4 +1,4 @@
|
||||
README for libpng 1.0.4 - September 19, 1999 (shared library 2.1)
|
||||
README for libpng 1.0.4c - October 1, 1999 (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.
|
||||
@ -163,9 +163,9 @@ Files in this distribution:
|
||||
makefile.sgi => Silicon Graphics IRIX makefile
|
||||
makefile.sunos => Sun makefile
|
||||
makefile.solaris => Solaris 2.X makefile
|
||||
(gcc, creates libpng.so.2.1.0.4)
|
||||
(gcc, creates libpng.so.2.1.0.4c)
|
||||
makefile.linux => Linux/ELF makefile
|
||||
(gcc, creates libpng.so.2.1.0.4)
|
||||
(gcc, creates libpng.so.2.1.0.4c)
|
||||
makefile.sco => For SCO OSr5 ELF and Unixware 7 with Native cc
|
||||
makefile.mips => MIPS makefile
|
||||
makefile.acorn => Acorn makefile
|
||||
@ -179,7 +179,10 @@ Files in this distribution:
|
||||
build.bat => MS-DOS batch file for Borland compiler
|
||||
makefile.dj2 => DJGPP 2 makefile
|
||||
makefile.msc => Microsoft C makefile
|
||||
makefile.win32vc => makefile for Microsoft Visual C++ 4.0 and later
|
||||
makefile.vcawin32 => makefile for Microsoft Visual C++ 5.0 and
|
||||
later (uses assembler code)
|
||||
makefile.vcwin32 => makefile for Microsoft Visual C++ 4.0 and
|
||||
later (does not use assembler code)
|
||||
makefile.turboc3 => Turbo C 3.0 makefile
|
||||
makefile.os2 => OS/2 Makefile (gcc and emx, requires pngos2.def)
|
||||
pngos2.def => OS/2 module definition file used by makefile.os2
|
||||
|
4
Y2KINFO
4
Y2KINFO
@ -1,13 +1,13 @@
|
||||
Y2K compliance in libpng:
|
||||
=========================
|
||||
|
||||
September 19, 1999
|
||||
October 1, 1999
|
||||
|
||||
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.4 are Y2K compliant. It is my belief that earlier
|
||||
upward through 1.0.4c 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
|
||||
|
@ -197,7 +197,8 @@ void read_png(FILE *fp, unsigned int sig_read) /* file is already open */
|
||||
|
||||
/* Some suggestions as to how to get a screen gamma value */
|
||||
|
||||
/* Note that screen gamma is (display_gamma/viewing_gamma) */
|
||||
/* Note that screen gamma is the display_exponent, which includes
|
||||
* the CRT_exponent and any correction for viewing conditions */
|
||||
if (/* We have a user-defined screen gamma value */)
|
||||
{
|
||||
screen_gamma = user-defined screen_gamma;
|
||||
|
59
libpng.3
59
libpng.3
@ -1,6 +1,6 @@
|
||||
.TH LIBPNG 3 "September 19, 1999"
|
||||
.TH LIBPNG 3 "October 1, 1999"
|
||||
.SH NAME
|
||||
libpng \- Portable Network Graphics (PNG) Reference Library 1.0.4 - September 19, 1999
|
||||
libpng \- Portable Network Graphics (PNG) Reference Library 1.0.4c - October 1, 1999
|
||||
.SH SYNOPSIS
|
||||
\fI\fB
|
||||
|
||||
@ -617,7 +617,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.4 - September 19, 1999
|
||||
libpng version 1.0.4c - October 1, 1999
|
||||
Updated and distributed by Glenn Randers-Pehrson
|
||||
<randeg@alum.rpi.edu>
|
||||
Copyright (c) 1998, 1999 Glenn Randers-Pehrson
|
||||
@ -1314,17 +1314,15 @@ or as an RGB triplet that may or may not be in the palette (need_expand = 0).
|
||||
To properly display PNG images on any kind of system, the application needs
|
||||
to know what the display gamma is. Ideally, the user will know this, and
|
||||
the application will allow them to set it. One method of allowing the user
|
||||
to set the display gamma separately for each system is to check for the
|
||||
DISPLAY_GAMMA and VIEWING_GAMMA environment variables or for a SCREEN_GAMMA
|
||||
environment variable, which will hopefully be correctly set.
|
||||
to set the display gamma separately for each system is to check for a
|
||||
SCREEN_GAMMA or DISPLAY_GAMMA environment variable, which will hopefully be
|
||||
correctly set.
|
||||
|
||||
Note that display_gamma is the gamma of your display, while screen_gamma is
|
||||
the overall gamma correction required to produce pleasing results,
|
||||
which depends on the lighting conditions in the surrounding environment.
|
||||
Screen_gamma is display_gamma/viewing_gamma, where viewing_gamma is
|
||||
the amount of additional gamma correction needed to compensate for
|
||||
a (viewing_gamma=1.25) environment. In a dim or brightly lit room, no
|
||||
compensation other than the display_gamma is needed (viewing_gamma=1.0).
|
||||
Note that display_gamma is the overall gamma correction required to produce
|
||||
pleasing results, which depends on the lighting conditions in the surrounding
|
||||
environment. In a dim or brightly lit room, no compensation other than
|
||||
the physical gamma exponent of the monitor is needed, while in a dark room
|
||||
a slightly smaller exponent is better.
|
||||
|
||||
double gamma, screen_gamma;
|
||||
|
||||
@ -2677,13 +2675,13 @@ the old method.
|
||||
|
||||
.SH VII. Y2K Compliance in libpng
|
||||
|
||||
January 13, 1999
|
||||
October 1, 1999
|
||||
|
||||
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.4 are Y2K compliant. It is my belief that earlier
|
||||
upward through 1.0.4c 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
|
||||
@ -2803,19 +2801,13 @@ and this library, the specification takes precedence.
|
||||
This man page: Glenn Randers-Pehrson
|
||||
<randeg@alum.rpi.edu>
|
||||
|
||||
Contributing Authors: John Bowler, Kevin Bracey, Sam Bushell, Andreas Dilger,
|
||||
Magnus Holmgren, Tom Lane, Dave Martindale, Glenn Randers-Pehrson,
|
||||
Greg Roelofs, Guy Eric Schalnat, Paul Schmidt, Tom Tanner, Willem van
|
||||
Schaik, Tim Wegner.
|
||||
<png-implement@ccrc.wustl.edu>
|
||||
|
||||
The contributing authors would like to thank all those who helped
|
||||
with testing, bug fixes, and patience. This wouldn't have been
|
||||
possible without all of you.
|
||||
|
||||
Thanks to Frank J. T. Wojcik for helping with the documentation.
|
||||
|
||||
Libpng version 1.0.4 - September 19, 1999:
|
||||
Libpng version 1.0.4c - October 1, 1999:
|
||||
Initially created in 1995 by Guy Eric Schalnat, then of Group 42, Inc.
|
||||
Currently maintained by Glenn Randers-Pehrson (randeg@alum.rpi.edu).
|
||||
|
||||
@ -2830,7 +2822,25 @@ 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 Glenn Randers-Pehrson
|
||||
(libpng versions 0.97, January 1998, through 1.0.4, September 19, 1999)
|
||||
(libpng versions 0.97, January 1998, through 1.0.4c, October 1, 1999)
|
||||
|
||||
For the purposes of this copyright and license, "Contributing Authors"
|
||||
is defined as the following set of individuals:
|
||||
|
||||
John Bowler
|
||||
Kevin Bracey
|
||||
Sam Bushell
|
||||
Andreas Dilger
|
||||
Magnus Holmgren
|
||||
Tom Lane
|
||||
Dave Martindale
|
||||
Glenn Randers-Pehrson
|
||||
Greg Roelofs
|
||||
Guy Eric Schalnat
|
||||
Paul Schmidt
|
||||
Tom Tanner
|
||||
Willem van Schaik
|
||||
Tim Wegner
|
||||
|
||||
The PNG Reference Library (libpng) is supplied "AS IS". The Contributing
|
||||
Authors and Group 42, Inc. disclaim all warranties, expressed or implied,
|
||||
@ -2869,5 +2879,8 @@ boxes and the like:
|
||||
Also, the PNG logo (in PNG format, of course) is supplied in the
|
||||
file "pngnow.png".
|
||||
|
||||
Libpng is OSI Certified Open Source Software. OSI Certified is a
|
||||
certification mark of the Open Source Initiative.
|
||||
|
||||
.\" end of man page
|
||||
|
||||
|
24
libpng.txt
24
libpng.txt
@ -1,6 +1,6 @@
|
||||
libpng.txt - A description on how to use and modify libpng
|
||||
|
||||
libpng version 1.0.4 - September 19, 1999
|
||||
libpng version 1.0.4c - October 1, 1999
|
||||
Updated and distributed by Glenn Randers-Pehrson
|
||||
<randeg@alum.rpi.edu>
|
||||
Copyright (c) 1998, 1999 Glenn Randers-Pehrson
|
||||
@ -697,17 +697,15 @@ or as an RGB triplet that may or may not be in the palette (need_expand = 0).
|
||||
To properly display PNG images on any kind of system, the application needs
|
||||
to know what the display gamma is. Ideally, the user will know this, and
|
||||
the application will allow them to set it. One method of allowing the user
|
||||
to set the display gamma separately for each system is to check for the
|
||||
DISPLAY_GAMMA and VIEWING_GAMMA environment variables or for a SCREEN_GAMMA
|
||||
environment variable, which will hopefully be correctly set.
|
||||
to set the display gamma separately for each system is to check for a
|
||||
SCREEN_GAMMA or DISPLAY_GAMMA environment variable, which will hopefully be
|
||||
correctly set.
|
||||
|
||||
Note that display_gamma is the gamma of your display, while screen_gamma is
|
||||
the overall gamma correction required to produce pleasing results,
|
||||
which depends on the lighting conditions in the surrounding environment.
|
||||
Screen_gamma is display_gamma/viewing_gamma, where viewing_gamma is
|
||||
the amount of additional gamma correction needed to compensate for
|
||||
a (viewing_gamma=1.25) environment. In a dim or brightly lit room, no
|
||||
compensation other than the display_gamma is needed (viewing_gamma=1.0).
|
||||
Note that display_gamma is the overall gamma correction required to produce
|
||||
pleasing results, which depends on the lighting conditions in the surrounding
|
||||
environment. In a dim or brightly lit room, no compensation other than
|
||||
the physical gamma exponent of the monitor is needed, while in a dark room
|
||||
a slightly smaller exponent is better.
|
||||
|
||||
double gamma, screen_gamma;
|
||||
|
||||
@ -2060,13 +2058,13 @@ the old method.
|
||||
|
||||
VII. Y2K Compliance in libpng
|
||||
|
||||
January 13, 1999
|
||||
October 1, 1999
|
||||
|
||||
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.4 are Y2K compliant. It is my belief that earlier
|
||||
upward through 1.0.4c 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 September 19, 1999
|
||||
.TH LIBPNGPF 3 October 1, 1999
|
||||
.SH NAME
|
||||
libpng \- Portable Network Graphics (PNG) Reference Library 1.0.4 - September 19, 1999
|
||||
libpng \- Portable Network Graphics (PNG) Reference Library 1.0.4c - October 1, 1999
|
||||
(private functions)
|
||||
.SH SYNOPSIS
|
||||
\fB#include <png.h>\fP
|
||||
|
2
png.5
2
png.5
@ -1,4 +1,4 @@
|
||||
.TH PNG 5 "September 19, 1999"
|
||||
.TH PNG 5 "October 1, 1999"
|
||||
.SH NAME
|
||||
png \- Portable Network Graphics (PNG) format
|
||||
.SH DESCRIPTION
|
||||
|
17
png.c
17
png.c
@ -1,7 +1,7 @@
|
||||
|
||||
/* png.c - location for general purpose libpng functions
|
||||
*
|
||||
* libpng version 1.0.4 - September 19, 1999
|
||||
* libpng version 1.0.4c - October 1, 1999
|
||||
* Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.
|
||||
* Copyright (c) 1996, 1997 Andreas Dilger
|
||||
* Copyright (c) 1998, 1999 Glenn Randers-Pehrson
|
||||
@ -16,7 +16,7 @@
|
||||
* string defined in png.h.
|
||||
*/
|
||||
|
||||
char png_libpng_ver[12] = "1.0.4";
|
||||
char png_libpng_ver[12] = "1.0.4c";
|
||||
|
||||
/* Place to hold the signature string for a PNG file. */
|
||||
png_byte FARDATA png_sig[8] = {137, 80, 78, 71, 13, 10, 26, 10};
|
||||
@ -73,12 +73,12 @@ int FARDATA png_pass_mask[] = {0x80, 0x08, 0x88, 0x22, 0xaa, 0x55, 0xff};
|
||||
/* Mask to determine which pixels to overwrite while displaying */
|
||||
int FARDATA png_pass_dsp_mask[] = {0xff, 0x0f, 0xff, 0x33, 0xff, 0x55, 0xff};
|
||||
|
||||
|
||||
/* Tells libpng that we have already handled the first "num_bytes" bytes
|
||||
* of the PNG file signature. If the PNG data is embedded into another
|
||||
* stream we can set num_bytes = 8 so that libpng will not attempt to read
|
||||
* or write any of the magic bytes before it starts on the IHDR.
|
||||
*/
|
||||
|
||||
void
|
||||
png_set_sig_bytes(png_structp png_ptr, int num_bytes)
|
||||
{
|
||||
@ -352,8 +352,17 @@ png_get_copyright(png_structp png_ptr)
|
||||
{
|
||||
if(png_ptr == NULL)
|
||||
/* silence compiler warning about unused png_ptr */ ;
|
||||
return("\n libpng version 1.0.4 - September 19, 1999\n\
|
||||
return("\n libpng version 1.0.4c - October 1, 1999\n\
|
||||
Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.\n\
|
||||
Copyright (c) 1996, 1997 Andreas Dilger\n\
|
||||
Copyright (c) 1998, 1999 Glenn Randers-Pehrson\n");
|
||||
}
|
||||
|
||||
/* Generate a compiler error if there is an old png.h in the search path. */
|
||||
void
|
||||
png_check_version
|
||||
(version_1_0_4c png_h_is_not_version_1_0_4c)
|
||||
{
|
||||
if(png_h_is_not_version_1_0_4c == NULL)
|
||||
/* silence compiler warning about unused parameter */ ;
|
||||
}
|
||||
|
73
png.h
73
png.h
@ -1,7 +1,7 @@
|
||||
|
||||
/* png.h - header file for PNG reference library
|
||||
*
|
||||
* libpng version 1.0.4 - September 19, 1999
|
||||
* libpng version 1.0.4c - October 1, 1999
|
||||
* Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.
|
||||
* Copyright (c) 1996, 1997 Andreas Dilger
|
||||
* Copyright (c) 1998, 1999 Glenn Randers-Pehrson
|
||||
@ -9,19 +9,19 @@
|
||||
* Authors and maintainers:
|
||||
* libpng versions 0.71, May 1995, through 0.89c, May 1996: Guy Schalnat
|
||||
* libpng versions 0.90, December 1996, through 0.96, May 1997: Andreas Dilger
|
||||
* libpng versions 0.97, January 1998, through 1.0.4 - September 19, 1999: Glenn R-P
|
||||
* libpng versions 0.97, January 1998, through 1.0.4c - October 1, 1999: Glenn
|
||||
* See also "Contributing Authors", below.
|
||||
*
|
||||
* Y2K compliance in libpng:
|
||||
* =========================
|
||||
*
|
||||
* January 13, 1999
|
||||
* October 1, 1999
|
||||
*
|
||||
* 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.4 are Y2K compliant. It is my belief that earlier
|
||||
* upward through 1.0.4c 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
|
||||
@ -86,8 +86,8 @@
|
||||
* 0.98 0.98 98 2.0.98
|
||||
* 0.99 0.99 98 2.0.99
|
||||
* 0.99a-m 0.99 99 2.0.99
|
||||
* 1.00 1.00 100 2.1.0 [int should be 10000]
|
||||
* 1.0.0 1.0.0 100 2.1.0 [int should be 10000]
|
||||
* 1.00 1.00 100 2.1.0 [100 should be 10000]
|
||||
* 1.0.0 1.0.0 100 2.1.0 [100 should be 10000]
|
||||
* 1.0.1 1.0.1 10001 2.1.0
|
||||
* 1.0.1a-e 1.0.1a-e 10002 2.1.0.1a-e
|
||||
* 1.0.2 1.0.2 10002 2.1.0.2
|
||||
@ -95,6 +95,8 @@
|
||||
* 1.0.3 1.0.3 10003 2.1.0.3
|
||||
* 1.0.3a-d 1.0.3a-d 10004 2.1.0.3a-d
|
||||
* 1.0.4 1.0.4 10004 2.1.0.4
|
||||
* 1.0.4a-c 1.0.4a-c 10005 2.1.0.4a-c
|
||||
* 1.0.5 1.0.5 10005 2.1.0.5
|
||||
*
|
||||
* Henceforth the source version will match the shared-library minor
|
||||
* and patch numbers; the shared-library major version number will be
|
||||
@ -108,7 +110,18 @@
|
||||
* is available as RFC 2083 <ftp://ftp.uu.net/graphics/png/documents/>
|
||||
* and as a W3C Recommendation <http://www.w3.org/TR/REC.png.html>
|
||||
*
|
||||
* Contributing Authors:
|
||||
* COPYRIGHT NOTICE:
|
||||
*
|
||||
* Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.
|
||||
* (libpng versions 0.5, May 1995, through 0.89c, May 1996)
|
||||
* Copyright (c) 1996, 1997 Andreas Dilger
|
||||
* (libpng versions 0.90, December 1996, through 0.96, May 1997)
|
||||
* Copyright (c) 1998, 1999 Glenn Randers-Pehrson
|
||||
* (libpng versions 0.97, January 1998, through 1.0.4c, October 1, 1999)
|
||||
*
|
||||
* For the purposes of this copyright and license, "Contributing Authors"
|
||||
* is defined as the following set of individuals:
|
||||
*
|
||||
* John Bowler
|
||||
* Kevin Bracey
|
||||
* Sam Bushell
|
||||
@ -124,21 +137,6 @@
|
||||
* Willem van Schaik
|
||||
* Tim Wegner
|
||||
*
|
||||
* The contributing authors would like to thank all those who helped
|
||||
* with testing, bug fixes, and patience. This wouldn't have been
|
||||
* possible without all of you.
|
||||
*
|
||||
* Thanks to Frank J. T. Wojcik for helping with the documentation.
|
||||
*
|
||||
* COPYRIGHT NOTICE:
|
||||
*
|
||||
* Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.
|
||||
* (libpng versions 0.5, May 1995, through 0.89c, May 1996)
|
||||
* Copyright (c) 1996, 1997 Andreas Dilger
|
||||
* (libpng versions 0.90, December 1996, through 0.96, May 1997)
|
||||
* Copyright (c) 1998, 1999 Glenn Randers-Pehrson
|
||||
* (libpng versions 0.97, January 1998, through 1.0.4, September 19, 1999)
|
||||
*
|
||||
* The PNG Reference Library is supplied "AS IS". The Contributing Authors
|
||||
* and Group 42, Inc. disclaim all warranties, expressed or implied,
|
||||
* including, without limitation, the warranties of merchantability and of
|
||||
@ -169,6 +167,20 @@
|
||||
* appreciated.
|
||||
*/
|
||||
|
||||
/*
|
||||
*
|
||||
* Libpng is OSI Certified Open Source Software. OSI Certified is a
|
||||
* certification mark of the Open Source Initiative.
|
||||
*/
|
||||
|
||||
/*
|
||||
* The contributing authors would like to thank all those who helped
|
||||
* with testing, bug fixes, and patience. This wouldn't have been
|
||||
* possible without all of you.
|
||||
*
|
||||
* Thanks to Frank J. T. Wojcik for helping with the documentation.
|
||||
*/
|
||||
|
||||
#ifndef _PNG_H
|
||||
#define _PNG_H
|
||||
|
||||
@ -196,14 +208,16 @@ extern "C" {
|
||||
*/
|
||||
|
||||
/* Version information for png.h - this should match the version in png.c */
|
||||
#define PNG_LIBPNG_VER_STRING "1.0.4"
|
||||
#define PNG_LIBPNG_VER_STRING "1.0.4c"
|
||||
|
||||
/* 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 10004 /* 1.0.4 */
|
||||
#define PNG_LIBPNG_VER 10005 /* 1.0.5 */
|
||||
|
||||
/* 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)
|
||||
@ -701,7 +715,7 @@ struct png_struct_def
|
||||
#if defined(PNG_READ_GAMMA_SUPPORTED) || defined(PNG_READ_BACKGROUND_SUPPORTED)
|
||||
int gamma_shift; /* number of "insignificant" bits 16-bit gamma */
|
||||
float gamma; /* file gamma value */
|
||||
float screen_gamma; /* screen gamma value (display_gamma/viewing_gamma */
|
||||
float screen_gamma; /* screen gamma value (display_exponent) */
|
||||
#endif /* PNG_READ_GAMMA_SUPPORTED */
|
||||
#if defined(PNG_READ_GAMMA_SUPPORTED) || defined(PNG_READ_BACKGROUND_SUPPORTED)
|
||||
png_bytep gamma_table; /* gamma table for 8-bit depth files */
|
||||
@ -791,6 +805,11 @@ struct png_struct_def
|
||||
#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.4c
|
||||
*/
|
||||
typedef png_structp version_1_0_4c;
|
||||
|
||||
typedef png_struct FAR * FAR * png_structpp;
|
||||
|
||||
/* Here are the function definitions most commonly used. This is not
|
||||
@ -993,7 +1012,7 @@ extern PNG_EXPORT(void,png_set_dither) PNGARG((png_structp png_ptr,
|
||||
#endif /* PNG_READ_DITHER_SUPPORTED */
|
||||
|
||||
#if defined(PNG_READ_GAMMA_SUPPORTED)
|
||||
/* Handle gamma correction. Screen_gamma=(display_gamma/viewing_gamma) */
|
||||
/* Handle gamma correction. Screen_gamma=(display_exponent) */
|
||||
extern PNG_EXPORT(void,png_set_gamma) PNGARG((png_structp png_ptr,
|
||||
double screen_gamma, double default_file_gamma));
|
||||
#endif /* PNG_READ_GAMMA_SUPPORTED */
|
||||
@ -1610,7 +1629,7 @@ png_get_header_version(png_structp png_ptr)
|
||||
{
|
||||
if(png_ptr == NULL)
|
||||
/* silence compiler warning about unused png_ptr */ ;
|
||||
return("\n libpng version 1.0.4 - September 19, 1999 (header)\n");
|
||||
return("\n libpng version 1.0.4c - October 1, 1999 (header)\n");
|
||||
}
|
||||
#endif
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
/* pngasmrd.h - assembler version of utilities to read a PNG file
|
||||
*
|
||||
* libpng 1.0.4 - September 19, 1999
|
||||
* libpng 1.0.4c - October 1, 1999
|
||||
* For conditions of distribution and use, see copyright notice in png.h
|
||||
* Copyright (c) 1999 Glenn Randers-Pehrson
|
||||
*
|
||||
@ -21,7 +21,7 @@
|
||||
/* Set this in the makefile for gcc on Pentium, not in pngconf.h */
|
||||
#ifdef PNG_USE_PNGGCCRD
|
||||
/* Platform must be Pentium. Makefile must assemble and load pnggccrd.c
|
||||
* (not available in libpng 1.0.4).
|
||||
* (not available in libpng 1.0.4c).
|
||||
* MMX will be detected at run time and used if present.
|
||||
*/
|
||||
#define PNG_HAVE_ASSEMBLER_COMBINE_ROW
|
||||
|
@ -1,7 +1,7 @@
|
||||
|
||||
/* pngconf.h - machine configurable file for libpng
|
||||
*
|
||||
* libpng 1.0.4 - September 19, 1999
|
||||
* libpng 1.0.4c - October 1, 1999
|
||||
* 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 @@
|
||||
|
||||
/* pngerror.c - stub functions for i/o and memory allocation
|
||||
*
|
||||
* libpng 1.0.4 - September 19, 1999
|
||||
* libpng 1.0.4c - October 1, 1999
|
||||
* 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
pngget.c
2
pngget.c
@ -1,7 +1,7 @@
|
||||
|
||||
/* pngget.c - retrieval of values from info struct
|
||||
*
|
||||
* libpng 1.0.4 - September 19, 1999
|
||||
* libpng 1.0.4c - October 1, 1999
|
||||
* 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.4 - September 19, 1999
|
||||
* libpng 1.0.4c - October 1, 1999
|
||||
* 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
|
||||
|
BIN
pngnow.png
Normal file
BIN
pngnow.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 2.1 KiB |
@ -1,7 +1,7 @@
|
||||
|
||||
/* pngpread.c - read a png file in push mode
|
||||
*
|
||||
* libpng 1.0.4 - September 19, 1999
|
||||
* libpng 1.0.4c - October 1, 1999
|
||||
* 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 @@
|
||||
|
||||
/* pngread.c - read a PNG file
|
||||
*
|
||||
* libpng 1.0.4 - September 19, 1999
|
||||
* libpng 1.0.4c - October 1, 1999
|
||||
* 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
|
||||
@ -531,7 +531,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.4.
|
||||
* [*] png_handle_alpha() does not exist yet, as of libpng version 1.0.4c.
|
||||
*/
|
||||
|
||||
void
|
||||
@ -580,7 +580,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.4.
|
||||
* [*] png_handle_alpha() does not exist yet, as of libpng version 1.0.4c.
|
||||
*/
|
||||
void
|
||||
png_read_image(png_structp png_ptr, png_bytepp image)
|
||||
|
2
pngrio.c
2
pngrio.c
@ -1,7 +1,7 @@
|
||||
|
||||
/* pngrio.c - functions for data input
|
||||
*
|
||||
* libpng 1.0.4 - September 19, 1999
|
||||
* libpng 1.0.4c - October 1, 1999
|
||||
* 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.4 - September 19, 1999
|
||||
* libpng 1.0.4c - October 1, 1999
|
||||
* 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
|
||||
@ -1069,6 +1069,7 @@ png_read_transform_info(png_structp png_ptr, png_infop info_ptr)
|
||||
info_ptr->pixel_depth = (png_byte)(info_ptr->channels *
|
||||
info_ptr->bit_depth);
|
||||
info_ptr->rowbytes = ((info_ptr->width * info_ptr->pixel_depth + 7) >> 3);
|
||||
|
||||
}
|
||||
|
||||
/* Transform the row. The order of transformations is significant,
|
||||
|
19
pngrutil.c
19
pngrutil.c
@ -1,7 +1,7 @@
|
||||
|
||||
/* pngrutil.c - utilities to read a PNG file
|
||||
*
|
||||
* libpng 1.0.4 - September 19, 1999
|
||||
* libpng 1.0.4c - October 1, 1999
|
||||
* 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
|
||||
@ -1892,6 +1892,7 @@ png_do_read_interlace
|
||||
png_size_t pixel_bytes = (row_info->pixel_depth >> 3);
|
||||
png_bytep sp = row + (png_size_t)(row_info->width - 1) * pixel_bytes;
|
||||
png_bytep dp = row + (png_size_t)(final_width - 1) * pixel_bytes;
|
||||
|
||||
int jstop = png_pass_inc[pass];
|
||||
png_uint_32 i;
|
||||
|
||||
@ -1937,7 +1938,7 @@ png_read_filter_row
|
||||
{
|
||||
png_uint_32 i;
|
||||
png_uint_32 istop = row_info->rowbytes;
|
||||
png_uint_32 bpp = (row_info->pixel_depth + 7) / 8;
|
||||
png_uint_32 bpp = (row_info->pixel_depth + 7) >> 3;
|
||||
png_bytep rp = row + bpp;
|
||||
png_bytep lp = row;
|
||||
|
||||
@ -1968,7 +1969,7 @@ png_read_filter_row
|
||||
png_bytep rp = row;
|
||||
png_bytep pp = prev_row;
|
||||
png_bytep lp = row;
|
||||
png_uint_32 bpp = (row_info->pixel_depth + 7) / 8;
|
||||
png_uint_32 bpp = (row_info->pixel_depth + 7) >> 3;
|
||||
png_uint_32 istop = row_info->rowbytes - bpp;
|
||||
|
||||
for (i = 0; i < bpp; i++)
|
||||
@ -1993,7 +1994,7 @@ png_read_filter_row
|
||||
png_bytep pp = prev_row;
|
||||
png_bytep lp = row;
|
||||
png_bytep cp = prev_row;
|
||||
png_uint_32 bpp = (row_info->pixel_depth + 7) / 8;
|
||||
png_uint_32 bpp = (row_info->pixel_depth + 7) >> 3;
|
||||
png_uint_32 istop=row_info->rowbytes - bpp;
|
||||
|
||||
for (i = 0; i < bpp; i++)
|
||||
@ -2267,6 +2268,16 @@ png_read_start_row(png_structp png_ptr)
|
||||
}
|
||||
#endif
|
||||
|
||||
#if defined(PNG_READ_USER_TRANSFORM_SUPPORTED)
|
||||
if(png_ptr->transformations & PNG_USER_TRANSFORM)
|
||||
{
|
||||
int user_pixel_depth=png_ptr->user_transform_depth*
|
||||
png_ptr->user_transform_channels;
|
||||
if(user_pixel_depth > max_pixel_depth)
|
||||
max_pixel_depth=user_pixel_depth;
|
||||
}
|
||||
#endif
|
||||
|
||||
/* align the width on the next larger 8 pixels. Mainly used
|
||||
for interlacing */
|
||||
row_bytes = ((png_ptr->width + 7) & ~((png_uint_32)7));
|
||||
|
2
pngset.c
2
pngset.c
@ -1,7 +1,7 @@
|
||||
|
||||
/* pngset.c - storage of image information into info struct
|
||||
*
|
||||
* libpng 1.0.4 - September 19, 1999
|
||||
* libpng 1.0.4c - October 1, 1999
|
||||
* 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
|
||||
|
63
pngtest.c
63
pngtest.c
@ -1,7 +1,7 @@
|
||||
|
||||
/* pngtest.c - a simple test program to test libpng
|
||||
*
|
||||
* libpng 1.0.4 - September 19, 1999
|
||||
* libpng 1.0.4c - October 1, 1999
|
||||
* 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
|
||||
@ -35,8 +35,24 @@
|
||||
#define PNG_DEBUG 0
|
||||
#endif
|
||||
|
||||
/* Turn on CPU timing
|
||||
#define PNGTEST_TIMING
|
||||
*/
|
||||
|
||||
#ifdef PNGTEST_TIMING
|
||||
static float t_start, t_stop, t_decode, t_encode, t_misc;
|
||||
#include <time.h>
|
||||
#endif
|
||||
|
||||
#include "png.h"
|
||||
|
||||
#ifdef PNGTEST_TIMING
|
||||
static float t_start, t_stop, t_decode, t_encode, t_misc;
|
||||
#if !defined(PNG_READ_tIME_SUPPORTED) && !defined(PNG_WRITE_tIME_SUPPORTED)
|
||||
#include <time.h>
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if defined(PNG_TIME_RFC1123_SUPPORTED)
|
||||
static int tIME_chunk_present=0;
|
||||
static char tIME_string[30] = "no tIME chunk present in file";
|
||||
@ -800,16 +816,36 @@ test_one_file(PNG_CONST char *inname, PNG_CONST char *outname)
|
||||
}
|
||||
png_debug(0, "Writing row data\n");
|
||||
|
||||
#if defined(PNG_READ_INTERLACING_SUPPORTED) || \
|
||||
defined(PNG_WRITE_INTERLACING_SUPPORTED)
|
||||
num_pass = png_set_interlace_handling(read_ptr);
|
||||
png_set_interlace_handling(write_ptr);
|
||||
#else
|
||||
num_pass=1;
|
||||
#endif
|
||||
|
||||
#ifdef PNGTEST_TIMING
|
||||
t_stop = (float)clock();
|
||||
t_misc += (t_stop - t_start);
|
||||
t_start = t_stop;
|
||||
#endif
|
||||
for (pass = 0; pass < num_pass; pass++)
|
||||
{
|
||||
png_debug1(0, "Writing row data for pass %d\n",pass);
|
||||
for (y = 0; y < height; y++)
|
||||
{
|
||||
png_read_rows(read_ptr, (png_bytepp)&row_buf, (png_bytepp)NULL, 1);
|
||||
#ifdef PNGTEST_TIMING
|
||||
t_stop = (float)clock();
|
||||
t_decode += (t_stop - t_start);
|
||||
t_start = t_stop;
|
||||
#endif
|
||||
png_write_rows(write_ptr, (png_bytepp)&row_buf, 1);
|
||||
#ifdef PNGTEST_TIMING
|
||||
t_stop = (float)clock();
|
||||
t_encode += (t_stop - t_start);
|
||||
t_start = t_stop;
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
@ -1040,6 +1076,8 @@ main(int argc, char *argv[])
|
||||
#endif
|
||||
}
|
||||
#ifdef PNG_USER_MEM_SUPPORTED
|
||||
fprintf(STDERR, " Current memory allocation: %d bytes\n",
|
||||
current_allocation);
|
||||
fprintf(STDERR, " Maximum memory allocation: %d bytes\n",
|
||||
maximum_allocation);
|
||||
#endif
|
||||
@ -1103,11 +1141,27 @@ main(int argc, char *argv[])
|
||||
#endif
|
||||
}
|
||||
#ifdef PNG_USER_MEM_SUPPORTED
|
||||
fprintf(STDERR, " Current memory allocation: %d bytes\n",
|
||||
current_allocation);
|
||||
fprintf(STDERR, " Maximum memory allocation: %d bytes\n",
|
||||
maximum_allocation);
|
||||
#endif
|
||||
}
|
||||
|
||||
#ifdef PNGTEST_TIMING
|
||||
t_stop = (float)clock();
|
||||
t_misc += (t_stop - t_start);
|
||||
t_start = t_stop;
|
||||
fprintf(STDERR," CPU time used = %.3f seconds",
|
||||
(t_misc+t_decode+t_encode)/(float)CLOCKS_PER_SEC);
|
||||
fprintf(STDERR," (decoding %.3f,\n",
|
||||
t_decode/(float)CLOCKS_PER_SEC);
|
||||
fprintf(STDERR," encoding %.3f ,",
|
||||
t_encode/(float)CLOCKS_PER_SEC);
|
||||
fprintf(STDERR," other %.3f seconds)\n\n",
|
||||
t_misc/(float)CLOCKS_PER_SEC);
|
||||
#endif
|
||||
|
||||
if (ierror == 0)
|
||||
fprintf(STDERR, "libpng passes test\n");
|
||||
else
|
||||
@ -1115,3 +1169,10 @@ main(int argc, char *argv[])
|
||||
return (int)(ierror != 0);
|
||||
}
|
||||
|
||||
/* Generate a compiler error if there is an old png.h in the search path. */
|
||||
void
|
||||
png_check_pngtest_version
|
||||
(version_1_0_4c png_h_is_not_version_1_0_4c)
|
||||
{
|
||||
if(png_h_is_not_version_1_0_4c == NULL) return;
|
||||
}
|
||||
|
@ -1,7 +1,7 @@
|
||||
|
||||
/* pngtrans.c - transforms the data in a row (used by both readers and writers)
|
||||
*
|
||||
* libpng 1.0.4 - September 19, 1999
|
||||
* libpng 1.0.4c - October 1, 1999
|
||||
* 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
pngwio.c
2
pngwio.c
@ -1,7 +1,7 @@
|
||||
|
||||
/* pngwio.c - functions for data output
|
||||
*
|
||||
* libpng 1.0.4 - September 19, 1999
|
||||
* libpng 1.0.4c - October 1, 1999
|
||||
* 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.4 - September 19, 1999
|
||||
* libpng 1.0.4c - October 1, 1999
|
||||
* 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 @@
|
||||
|
||||
/* pngwtran.c - transforms the data in a row for PNG writers
|
||||
*
|
||||
* libpng 1.0.4 - September 19, 1999
|
||||
* libpng 1.0.4c - October 1, 1999
|
||||
* 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.4 - September 19, 1999
|
||||
* libpng 1.0.4c - October 1, 1999
|
||||
* 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,5 +1,5 @@
|
||||
# makefile for libpng on BeOS x86 ELF with gcc
|
||||
# modified from makefile.lnx by Sander Stoks
|
||||
# modified from makefile.linux by Sander Stoks
|
||||
# Copyright (C) 1996, 1997 Andreas Dilger
|
||||
# Copyright (C) 1999 Greg Roelofs
|
||||
# For conditions of distribution and use, see copyright notice in png.h
|
||||
@ -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.4
|
||||
PNGMIN = 1.0.4c
|
||||
PNGVER = $(PNGMAJ).$(PNGMIN)
|
||||
|
||||
# where make install puts libpng.a, libpng.so*, and png.h
|
||||
|
@ -2,8 +2,8 @@
|
||||
# Borland C++ 4.5 (Note: All modules are compiled in C mode)
|
||||
# Will work with C++ 4.02 also
|
||||
# To build the library, do:
|
||||
# "make -fmakefile.bor -DMODEL=m"
|
||||
# or: "make -fmakefile.bor -DMODEL=l"
|
||||
# "make -fmakefile.borland -DMODEL=m"
|
||||
# or: "make -fmakefile.borland -DMODEL=l"
|
||||
#
|
||||
# ------------- Borland C++ 4.5 -------------
|
||||
|
||||
|
@ -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.4
|
||||
PNGMIN = 1.0.4c
|
||||
PNGVER = $(PNGMAJ).$(PNGMIN)
|
||||
|
||||
CC=cc
|
||||
|
@ -22,6 +22,8 @@ WARNMORE=-Wwrite-strings -Wpointer-arith -Wshadow \
|
||||
-Wmissing-declarations -Wtraditional -Wcast-align \
|
||||
-Wstrict-prototypes -Wmissing-prototypes #-Wconversion
|
||||
|
||||
# for pgcc version 2.95.1, -O3 is buggy; don't us it.
|
||||
|
||||
CFLAGS=-I$(ZLIBINC) -Wall -O3 -funroll-loops \
|
||||
$(ALIGN) # $(WARNMORE) -g -DPNG_DEBUG=5
|
||||
LDFLAGS=-L. -Wl,-rpath,. -L$(ZLIBLIB) -Wl,-rpath,$(ZLIBLIB) -lpng -lz -lm
|
||||
@ -32,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.4
|
||||
PNGMIN = 1.0.4c
|
||||
PNGVER = $(PNGMAJ).$(PNGMIN)
|
||||
|
||||
INCPATH=$(prefix)/include
|
||||
|
@ -3,7 +3,7 @@
|
||||
# For conditions of distribution and use, see copyright notice in png.h
|
||||
# Assumes that zlib.lib, zconf.h, and zlib.h have been copied to ..\zlib
|
||||
|
||||
# ------------- Microsoft C 5.1 and later -------------
|
||||
# -------- Microsoft C 5.1 and later, does not use assembler code -----
|
||||
MODEL=-AL
|
||||
CFLAGS=-Oait -Gs -nologo -W3 $(MODEL) -I..\zlib
|
||||
#-Ox generates bad code with MSC 5.1
|
||||
|
@ -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.4
|
||||
PNGMIN = 1.0.4c
|
||||
PNGVER = $(PNGMAJ).$(PNGMIN)
|
||||
|
||||
INCPATH=$(prefix)/include
|
||||
|
@ -1,5 +1,5 @@
|
||||
# makefile for libpng on Solaris 2.x with gcc
|
||||
# Contributed by William L. Sebok, based on makefile.lnx
|
||||
# Contributed by William L. Sebok, based on makefile.linux
|
||||
# Copyright (C) 1996, 1997 Andreas Dilger
|
||||
# Copyright (C) 1998 Greg Roelofs
|
||||
# For conditions of distribution and use, see copyright notice in png.h
|
||||
@ -36,7 +36,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.4
|
||||
PNGMIN = 1.0.4c
|
||||
PNGVER = $(PNGMAJ).$(PNGMIN)
|
||||
|
||||
INCPATH=$(prefix)/include
|
||||
|
@ -1,7 +1,7 @@
|
||||
# Makefile for libpng
|
||||
# TurboC++ 3.0 (Note: All modules are compiled in C mode)
|
||||
|
||||
# To use, do "make -fmakefile.tc3"
|
||||
# To use, do "make -fmakefile.turboc3"
|
||||
|
||||
# ------------- Turbo C++ 3.0 -------------
|
||||
MODEL=-ml
|
||||
|
@ -2,9 +2,15 @@
|
||||
# Copyright (C) 1998 Tim Wegner
|
||||
# For conditions of distribution and use, see copyright notice in png.h
|
||||
# Assumes that zlib.lib, zconf.h, and zlib.h have been copied to ..\zlib
|
||||
# To use, do "nmake /f scripts\makefile.w32"
|
||||
# To use, do "nmake /f scripts\makefile.vcawin32"
|
||||
|
||||
# ---------- Microsoft Visual C++ 5.0 and later, uses assembler code------
|
||||
|
||||
# Caution: the assembler code was introduced at libpng version 1.0.4 and has
|
||||
# not yet been thoroughly tested.
|
||||
|
||||
# If you don't want to use assembler code, use makefile.vcwin32 instead.
|
||||
|
||||
# ------------- Microsoft Visual C++ 4.0 and later -------------
|
||||
MODEL=-
|
||||
CFLAGS=-DPNG_USE_PNGVCRD -Ox -GA3s -nologo -W3 -I..\zlib
|
||||
|
87
scripts/makefile.vcwin32
Normal file
87
scripts/makefile.vcwin32
Normal file
@ -0,0 +1,87 @@
|
||||
# makefile for libpng
|
||||
# Copyright (C) 1998 Tim Wegner
|
||||
# For conditions of distribution and use, see copyright notice in png.h
|
||||
# Assumes that zlib.lib, zconf.h, and zlib.h have been copied to ..\zlib
|
||||
# To use, do "nmake /f scripts\makefile.vcwin32"
|
||||
|
||||
# ---------- Microsoft Visual C++ 4.0 and later, no assembler code------
|
||||
# If you want to use assembler code, use makefile.vcawin32 instead.
|
||||
|
||||
MODEL=-
|
||||
CFLAGS= -Ox -GA3s -nologo -W3 -I..\zlib
|
||||
|
||||
CC=cl
|
||||
LD=link
|
||||
LDFLAGS=
|
||||
O=.obj
|
||||
|
||||
#uncomment next to put error messages in a file
|
||||
#ERRFILE= >> pngerrs
|
||||
|
||||
# variables
|
||||
OBJS1 = png$(O) pngset$(O) pngget$(O) pngrutil$(O) pngtrans$(O) pngwutil$(O)
|
||||
OBJS2 = pngmem$(O) pngpread$(O) pngread$(O) pngerror$(O) pngwrite$(O)
|
||||
OBJS3 = pngrtran$(O) pngwtran$(O) pngrio$(O) pngwio$(O)
|
||||
|
||||
all: libpng.lib
|
||||
|
||||
png$(O): png.h pngconf.h
|
||||
$(CC) -c $(CFLAGS) $*.c $(ERRFILE)
|
||||
|
||||
pngset$(O): png.h pngconf.h
|
||||
$(CC) -c $(CFLAGS) $*.c $(ERRFILE)
|
||||
|
||||
pngget$(O): png.h pngconf.h
|
||||
$(CC) -c $(CFLAGS) $*.c $(ERRFILE)
|
||||
|
||||
pngread$(O): png.h pngconf.h
|
||||
$(CC) -c $(CFLAGS) $*.c $(ERRFILE)
|
||||
|
||||
pngpread$(O): png.h pngconf.h
|
||||
$(CC) -c $(CFLAGS) $*.c $(ERRFILE)
|
||||
|
||||
pngrtran$(O): png.h pngconf.h
|
||||
$(CC) -c $(CFLAGS) $*.c $(ERRFILE)
|
||||
|
||||
pngrutil$(O): png.h pngconf.h pngasmrd.h
|
||||
$(CC) -c $(CFLAGS) $*.c $(ERRFILE)
|
||||
|
||||
pngerror$(O): png.h pngconf.h
|
||||
$(CC) -c $(CFLAGS) $*.c $(ERRFILE)
|
||||
|
||||
pngmem$(O): png.h pngconf.h
|
||||
$(CC) -c $(CFLAGS) $*.c $(ERRFILE)
|
||||
|
||||
pngrio$(O): png.h pngconf.h
|
||||
$(CC) -c $(CFLAGS) $*.c $(ERRFILE)
|
||||
|
||||
pngwio$(O): png.h pngconf.h
|
||||
$(CC) -c $(CFLAGS) $*.c $(ERRFILE)
|
||||
|
||||
pngtest$(O): png.h pngconf.h
|
||||
$(CC) -c $(CFLAGS) $*.c $(ERRFILE)
|
||||
|
||||
pngtrans$(O): png.h pngconf.h
|
||||
$(CC) -c $(CFLAGS) $*.c $(ERRFILE)
|
||||
|
||||
pngwrite$(O): png.h pngconf.h
|
||||
$(CC) -c $(CFLAGS) $*.c $(ERRFILE)
|
||||
|
||||
pngwtran$(O): png.h pngconf.h
|
||||
$(CC) -c $(CFLAGS) $*.c $(ERRFILE)
|
||||
|
||||
pngwutil$(O): png.h pngconf.h
|
||||
$(CC) -c $(CFLAGS) $*.c $(ERRFILE)
|
||||
|
||||
libpng.lib: $(OBJS1) $(OBJS2) $(OBJS3)
|
||||
del libpng.lib
|
||||
lib /OUT:libpng.lib $(OBJS1) $(OBJS2) $(OBJS3)
|
||||
|
||||
pngtest.exe: pngtest.obj libpng.lib
|
||||
$(LD) $(LDFLAGS) pngtest.obj libpng.lib ..\zlib\zlib.lib /OUT:pngtest.exe /SUBSYSTEM:CONSOLE
|
||||
|
||||
test: pngtest.exe
|
||||
pngtest
|
||||
|
||||
# End of makefile for libpng
|
||||
|
@ -5,7 +5,7 @@
|
||||
# For conditions of distribution and use, see copyright notice in png.h
|
||||
# Assumes that zlib.lib, zconf.h, and zlib.h have been copied to ..\zlib
|
||||
|
||||
# To use, do "wmake /f scripts\makefile.wat"
|
||||
# To use, do "wmake /f scripts\makefile.watcom"
|
||||
|
||||
# ------------- Watcom 10.0 and later -------------
|
||||
MODEL=-mf
|
||||
|
@ -3,8 +3,8 @@ unit pngdef;
|
||||
interface
|
||||
|
||||
const
|
||||
PNG_LIBPNG_VER_STRING = '1.0.4';
|
||||
PNG_LIBPNG_VER = 10004;
|
||||
PNG_LIBPNG_VER_STRING = '1.0.4c';
|
||||
PNG_LIBPNG_VER = 10005;
|
||||
|
||||
type
|
||||
png_uint_32 = Cardinal;
|
||||
|
Reference in New Issue
Block a user