Imported from libpng-1.2.0beta5.tar
This commit is contained in:
parent
b182893c04
commit
1ea0ff34fa
9
ANNOUNCE
9
ANNOUNCE
@ -1,5 +1,5 @@
|
|||||||
|
|
||||||
Libpng 1.2.0beta4 - June 23, 2001
|
Libpng 1.2.0beta5 - August 8, 2001
|
||||||
|
|
||||||
This is a public release of libpng, intended for use in production codes.
|
This is a public release of libpng, intended for use in production codes.
|
||||||
|
|
||||||
@ -18,6 +18,13 @@ Changes since the last public release (1.0.12):
|
|||||||
of png_write_oFFS width and height from png_uint_32 to png_int_32.
|
of png_write_oFFS width and height from png_uint_32 to png_int_32.
|
||||||
Updated example.c
|
Updated example.c
|
||||||
Revised prototypes for png_debug_malloc and png_debug_free in pngtest.c
|
Revised prototypes for png_debug_malloc and png_debug_free in pngtest.c
|
||||||
|
Revised makefile.gcmmx
|
||||||
|
Revised pnggccrd.c to conditionally compile some thread-unsafe code only
|
||||||
|
when PNG_THREAD_UNSAFE_OK is defined.
|
||||||
|
Added tests to prevent pngwutil.c from writing a bKGD or tRNS chunk with
|
||||||
|
value exceeding 2^bit_depth-1
|
||||||
|
Replaced calls to fprintf(stderr,...) with png_warning() in pnggccrd.c
|
||||||
|
Removed restriction that do_invert_mono only operate on 1-bit opaque files
|
||||||
|
|
||||||
Send comments/corrections/commendations to
|
Send comments/corrections/commendations to
|
||||||
png-implement@ccrc.wustl.edu or to randeg@alum.rpi.edu
|
png-implement@ccrc.wustl.edu or to randeg@alum.rpi.edu
|
||||||
|
10
CHANGES
10
CHANGES
@ -967,6 +967,16 @@ version 1.2.0beta4 [June 23, 2001]
|
|||||||
of png_write_oFFS width and height from png_uint_32 to png_int_32.
|
of png_write_oFFS width and height from png_uint_32 to png_int_32.
|
||||||
Updated example.c
|
Updated example.c
|
||||||
Revised prototypes for png_debug_malloc and png_debug_free in pngtest.c
|
Revised prototypes for png_debug_malloc and png_debug_free in pngtest.c
|
||||||
|
version 1.2.0beta5 [August 8, 2001]
|
||||||
|
Revised contrib/gregbook
|
||||||
|
Revised makefile.gcmmx
|
||||||
|
Revised pnggccrd.c to conditionally compile some thread-unsafe code only
|
||||||
|
when PNG_THREAD_UNSAFE_OK is defined.
|
||||||
|
Added tests to prevent pngwutil.c from writing a bKGD or tRNS chunk with
|
||||||
|
value exceeding 2^bit_depth-1
|
||||||
|
Revised makefile.sgi and makefile.sggcc
|
||||||
|
Replaced calls to fprintf(stderr,...) with png_warning() in pnggccrd.c
|
||||||
|
Removed restriction that do_invert_mono only operate on 1-bit opaque files
|
||||||
|
|
||||||
Send comments/corrections/commendations to
|
Send comments/corrections/commendations to
|
||||||
png-implement@ccrc.wustl.edu or to randeg@alum.rpi.edu
|
png-implement@ccrc.wustl.edu or to randeg@alum.rpi.edu
|
||||||
|
12
INSTALL
12
INSTALL
@ -1,5 +1,5 @@
|
|||||||
|
|
||||||
Installing libpng version 1.2.0beta4 - June 23, 2001
|
Installing libpng version 1.2.0beta5 - August 8, 2001
|
||||||
|
|
||||||
Before installing libpng, you must first install zlib. zlib
|
Before installing libpng, you must first install zlib. zlib
|
||||||
can usually be found wherever you got libpng. zlib can be
|
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.
|
version of zlib that's installed.
|
||||||
|
|
||||||
You can rename the directories that you downloaded (they
|
You can rename the directories that you downloaded (they
|
||||||
might be called "libpng-1.2.0beta4" or "lpng109" and "zlib-1.1.3"
|
might be called "libpng-1.2.0beta5" or "lpng109" and "zlib-1.1.3"
|
||||||
or "zlib113") so that you have directories called "zlib" and "libpng".
|
or "zlib113") so that you have directories called "zlib" and "libpng".
|
||||||
|
|
||||||
Your directory structure should look like this:
|
Your directory structure should look like this:
|
||||||
@ -64,8 +64,8 @@ The files that are presently available in the scripts directory
|
|||||||
include
|
include
|
||||||
|
|
||||||
makefile.std => Generic UNIX makefile (cc, creates static libpng.a)
|
makefile.std => Generic UNIX makefile (cc, creates static libpng.a)
|
||||||
makefile.linux => Linux/ELF makefile (gcc, creates libpng.so.2.1.2.0beta4)
|
makefile.linux => Linux/ELF makefile (gcc, creates libpng.so.2.1.2.0beta5)
|
||||||
makefile.gcmmx => Linux/ELF makefile (gcc, creates libpng.so.2.1.2.0beta4,
|
makefile.gcmmx => Linux/ELF makefile (gcc, creates libpng.so.2.1.2.0beta5,
|
||||||
uses assembler code tuned for Intel MMX platform)
|
uses assembler code tuned for Intel MMX platform)
|
||||||
makefile.gcc => Generic makefile (gcc, creates static libpng.a)
|
makefile.gcc => Generic makefile (gcc, creates static libpng.a)
|
||||||
makefile.knr => Archaic UNIX Makefile that converts files with
|
makefile.knr => Archaic UNIX Makefile that converts files with
|
||||||
@ -82,9 +82,9 @@ include
|
|||||||
makefile.macosx => MACOS X Makefile
|
makefile.macosx => MACOS X Makefile
|
||||||
makefile.netbsd => NetBSD/cc makefile, uses PNGGCCRD
|
makefile.netbsd => NetBSD/cc makefile, uses PNGGCCRD
|
||||||
makefile.sgi => Silicon Graphics IRIX makefile (cc, creates static lib)
|
makefile.sgi => Silicon Graphics IRIX makefile (cc, creates static lib)
|
||||||
makefile.sggcc => Silicon Graphics (gcc, creates libpng.so.2.1.2.0beta4)
|
makefile.sggcc => Silicon Graphics (gcc, creates libpng.so.2.1.2.0beta5)
|
||||||
makefile.sunos => Sun makefile
|
makefile.sunos => Sun makefile
|
||||||
makefile.solaris => Solaris 2.X makefile (gcc, creates libpng.so.2.1.2.0beta4)
|
makefile.solaris => Solaris 2.X makefile (gcc, creates libpng.so.2.1.2.0beta5)
|
||||||
makefile.sco => For SCO OSr5 ELF and Unixware 7 with Native cc
|
makefile.sco => For SCO OSr5 ELF and Unixware 7 with Native cc
|
||||||
makefile.mips => MIPS makefile
|
makefile.mips => MIPS makefile
|
||||||
makefile.acorn => Acorn 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
|
If you modify libpng you may insert additional notices immediately following
|
||||||
this sentence.
|
this sentence.
|
||||||
|
|
||||||
libpng versions 1.0.7, July 1, 2000, through 1.2.0beta4, June 23, 2001, are
|
libpng versions 1.0.7, July 1, 2000, through 1.2.0beta5, August 8, 2001, are
|
||||||
Copyright (c) 2000 Glenn Randers-Pehrson
|
Copyright (c) 2000 Glenn Randers-Pehrson
|
||||||
and are distributed according to the same disclaimer and license as libpng-1.0.6
|
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
|
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
|
Glenn Randers-Pehrson
|
||||||
randeg@alum.rpi.edu
|
randeg@alum.rpi.edu
|
||||||
June 23, 2001
|
August 8, 2001
|
||||||
|
10
README
10
README
@ -1,4 +1,4 @@
|
|||||||
README for libpng 1.2.0beta4 - June 23, 2001 (shared library 2.1)
|
README for libpng 1.2.0beta5 - August 8, 2001 (shared library 2.1)
|
||||||
See the note about version numbers near the top of png.h
|
See the note about version numbers near the top of png.h
|
||||||
|
|
||||||
See INSTALL for instructions on how to install libpng.
|
See INSTALL for instructions on how to install libpng.
|
||||||
@ -187,9 +187,9 @@ Files in this distribution:
|
|||||||
descrip.mms => VMS makefile for MMS or MMK
|
descrip.mms => VMS makefile for MMS or MMK
|
||||||
makefile.std => Generic UNIX makefile (cc, creates static libpng.a)
|
makefile.std => Generic UNIX makefile (cc, creates static libpng.a)
|
||||||
makefile.linux => Linux/ELF makefile
|
makefile.linux => Linux/ELF makefile
|
||||||
(gcc, creates libpng.so.2.1.2.0beta4)
|
(gcc, creates libpng.so.2.1.2.0beta5)
|
||||||
makefile.gcmmx => Linux/ELF makefile (gcc, creates
|
makefile.gcmmx => Linux/ELF makefile (gcc, creates
|
||||||
libpng.so.2.1.2.0beta4, uses assembler code
|
libpng.so.2.1.2.0beta5, uses assembler code
|
||||||
tuned for Intel MMX platform)
|
tuned for Intel MMX platform)
|
||||||
makefile.gcc => Generic makefile (gcc, creates static libpng.a)
|
makefile.gcc => Generic makefile (gcc, creates static libpng.a)
|
||||||
makefile.knr => Archaic UNIX Makefile that converts files with
|
makefile.knr => Archaic UNIX Makefile that converts files with
|
||||||
@ -206,10 +206,10 @@ Files in this distribution:
|
|||||||
makefile.macosx => MACOS X Makefile
|
makefile.macosx => MACOS X Makefile
|
||||||
makefile.netbsd => NetBSD/cc makefile, uses PNGGCCRD
|
makefile.netbsd => NetBSD/cc makefile, uses PNGGCCRD
|
||||||
makefile.sgi => Silicon Graphics IRIX (cc, creates static lib)
|
makefile.sgi => Silicon Graphics IRIX (cc, creates static lib)
|
||||||
makefile.sggcc => Silicon Graphics (gcc, creates libpng.so.2.1.2.0beta4)
|
makefile.sggcc => Silicon Graphics (gcc, creates libpng.so.2.1.2.0beta5)
|
||||||
makefile.sunos => Sun makefile
|
makefile.sunos => Sun makefile
|
||||||
makefile.solaris => Solaris 2.X makefile
|
makefile.solaris => Solaris 2.X makefile
|
||||||
(gcc, creates libpng.so.2.1.2.0beta4)
|
(gcc, creates libpng.so.2.1.2.0beta5)
|
||||||
makefile.sco => For SCO OSr5 ELF and Unixware 7 with Native cc
|
makefile.sco => For SCO OSr5 ELF and Unixware 7 with Native cc
|
||||||
makefile.mips => MIPS makefile
|
makefile.mips => MIPS makefile
|
||||||
makefile.acorn => Acorn makefile
|
makefile.acorn => Acorn makefile
|
||||||
|
4
Y2KINFO
4
Y2KINFO
@ -1,13 +1,13 @@
|
|||||||
Y2K compliance in libpng:
|
Y2K compliance in libpng:
|
||||||
=========================
|
=========================
|
||||||
|
|
||||||
June 23, 2001
|
August 8, 2001
|
||||||
|
|
||||||
Since the PNG Development group is an ad-hoc body, we can't make
|
Since the PNG Development group is an ad-hoc body, we can't make
|
||||||
an official declaration.
|
an official declaration.
|
||||||
|
|
||||||
This is your unofficial assurance that libpng from version 0.71 and
|
This is your unofficial assurance that libpng from version 0.71 and
|
||||||
upward through 1.2.0beta4 are Y2K compliant. It is my belief that earlier
|
upward through 1.2.0beta5 are Y2K compliant. It is my belief that earlier
|
||||||
versions were also Y2K compliant.
|
versions were also Y2K compliant.
|
||||||
|
|
||||||
Libpng only has three year fields. One is a 2-byte unsigned integer
|
Libpng only has three year fields. One is a 2-byte unsigned integer
|
||||||
|
2
configure
vendored
2
configure
vendored
@ -1,5 +1,5 @@
|
|||||||
echo "
|
echo "
|
||||||
There is no \"configure\" script for Libpng-1.2.0beta4. Instead, please
|
There is no \"configure\" script for Libpng-1.2.0beta5. Instead, please
|
||||||
copy the appropriate makefile for your system from the \"scripts\"
|
copy the appropriate makefile for your system from the \"scripts\"
|
||||||
directory. Read the INSTALL file for more details.
|
directory. Read the INSTALL file for more details.
|
||||||
"
|
"
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
---------------------------------------------------------------------------
|
---------------------------------------------------------------------------
|
||||||
|
|
||||||
Copyright (c) 1998-2000 Greg Roelofs. All rights reserved.
|
Copyright (c) 1998-2001 Greg Roelofs. All rights reserved.
|
||||||
|
|
||||||
This software is provided "as is," without warranty of any kind,
|
This software is provided "as is," without warranty of any kind,
|
||||||
express or implied. In no event shall the author or contributors
|
express or implied. In no event shall the author or contributors
|
||||||
|
@ -44,10 +44,10 @@ Files:
|
|||||||
|
|
||||||
toucan.png transparent PNG for testing (by Stefan Schneider)
|
toucan.png transparent PNG for testing (by Stefan Schneider)
|
||||||
|
|
||||||
Note that the programs are designed to be functional, but their primary
|
Note that, although the programs are designed to be functional, their
|
||||||
purpose is to illustrate how to use libpng to add PNG support to other
|
primary purpose is to illustrate how to use libpng to add PNG support to
|
||||||
programs. As such, their user interfaces are crude and definitely not
|
other programs. As such, their user interfaces are crude and definitely
|
||||||
intended for everyday use.
|
are not intended for everyday use.
|
||||||
|
|
||||||
Please see http://www.libpng.org/pub/png/pngbook.html for further infor-
|
Please see http://www.libpng.org/pub/png/pngbook.html for further infor-
|
||||||
mation and links to the latest version of the source code, and Chapters
|
mation and links to the latest version of the source code, and Chapters
|
||||||
@ -55,7 +55,7 @@ mation and links to the latest version of the source code, and Chapters
|
|||||||
|
|
||||||
Greg Roelofs
|
Greg Roelofs
|
||||||
newt@pobox.com
|
newt@pobox.com
|
||||||
30 May 2001
|
30 June 2001
|
||||||
|
|
||||||
|
|
||||||
BUILD INSTRUCTIONS
|
BUILD INSTRUCTIONS
|
||||||
@ -131,7 +131,7 @@ BUILD INSTRUCTIONS
|
|||||||
current folder. Like the Unix versions, the two windowed programs
|
current folder. Like the Unix versions, the two windowed programs
|
||||||
(rpng and rpng2) now display a usage screen in a console window when
|
(rpng and rpng2) now display a usage screen in a console window when
|
||||||
invoked without command-line arguments; this is new behavior as of
|
invoked without command-line arguments; this is new behavior as of
|
||||||
the May 2001 release. Note that the programs use the Unix-style "-"
|
the June 2001 release. Note that the programs use the Unix-style "-"
|
||||||
character to specify options, instead of the more common DOS/Windows
|
character to specify options, instead of the more common DOS/Windows
|
||||||
"/" character. (For example: "rpng2-win -bgpat 4 foo.png", not
|
"/" character. (For example: "rpng2-win -bgpat 4 foo.png", not
|
||||||
"rpng2-win /bgpat 4 foo.png")
|
"rpng2-win /bgpat 4 foo.png")
|
||||||
|
@ -1,53 +0,0 @@
|
|||||||
See the main README file for basic instructions on compiling and running
|
|
||||||
the programs. See http://www.libpng.org/pub/png/pngbook.html for further
|
|
||||||
information and links to the source code, and Chapters 13-15 of the book
|
|
||||||
for detailed discussion of the three programs.
|
|
||||||
|
|
||||||
Since the two viewers, rpng and rpng2, are both designed to write infor-
|
|
||||||
mation to the console (i.e., a DOS-window command line) while displaying
|
|
||||||
the image in a graphical window--and since I haven't yet figured out how
|
|
||||||
to do that under Windows--here are the usage screens for the two programs:
|
|
||||||
|
|
||||||
|
|
||||||
rpng-win 1.02 of 19 March 2000: Simple PNG Viewer for Windows
|
|
||||||
Compiled with libpng 1.0.5; using libpng 1.0.5.
|
|
||||||
Compiled with zlib 1.1.3; using zlib 1.1.3.
|
|
||||||
|
|
||||||
Usage: rpng-win [-gamma exp] [-bgcolor bg] file.png
|
|
||||||
exp transfer-function exponent (``gamma'') of the display
|
|
||||||
system in floating-point format (e.g., ``2.2''); equal
|
|
||||||
to the product of the lookup-table exponent (varies)
|
|
||||||
and the CRT exponent (usually 2.2); must be positive
|
|
||||||
bg desired background color in 7-character hex RGB format
|
|
||||||
(e.g., ``#ff7f00'' for orange: same as HTML colors);
|
|
||||||
used with transparent images
|
|
||||||
|
|
||||||
Press Q, Esc or mouse button 1 after image is displayed to quit.
|
|
||||||
|
|
||||||
|
|
||||||
rpng2-win 1.04 of 19 March 2000: Progressive PNG Viewer for Windows
|
|
||||||
Compiled with libpng 1.0.5; using libpng 1.0.5.
|
|
||||||
Compiled with zlib 1.1.3; using zlib 1.1.3.
|
|
||||||
|
|
||||||
Usage: rpng2-win [-gamma exp] [-bgcolor bg | -bgpat pat] [-timing] file.png
|
|
||||||
|
|
||||||
exp transfer-function exponent (``gamma'') of the display
|
|
||||||
system in floating-point format (e.g., ``2.2''); equal
|
|
||||||
to the product of the lookup-table exponent (varies)
|
|
||||||
and the CRT exponent (usually 2.2); must be positive
|
|
||||||
bg desired background color in 7-character hex RGB format
|
|
||||||
(e.g., ``#ff7f00'' for orange: same as HTML colors);
|
|
||||||
used with transparent images; overrides -bgpat
|
|
||||||
pat desired background pattern number (1-16); used with
|
|
||||||
transparent images; overrides -bgcolor
|
|
||||||
-timing enables delay for every block read, to simulate modem
|
|
||||||
download of image (~36 Kbps)
|
|
||||||
|
|
||||||
Press Q, Esc or mouse button 1 after image is displayed to quit.
|
|
||||||
|
|
||||||
|
|
||||||
The usage screen for the third (non-windowed) program, wpng, can be seen
|
|
||||||
simply by invoking it without any parameters (``wpng'').
|
|
||||||
|
|
||||||
Greg Roelofs
|
|
||||||
19 March 2000
|
|
@ -26,6 +26,7 @@
|
|||||||
fixed command-line parsing bug
|
fixed command-line parsing bug
|
||||||
- 1.10: enabled "message window"/console (thanks to David Geldreich)
|
- 1.10: enabled "message window"/console (thanks to David Geldreich)
|
||||||
- 1.20: added runtime MMX-enabling/disabling and new -mmx* options
|
- 1.20: added runtime MMX-enabling/disabling and new -mmx* options
|
||||||
|
- 1.21: made minor tweak to usage screen to fit within 25-line console
|
||||||
|
|
||||||
---------------------------------------------------------------------------
|
---------------------------------------------------------------------------
|
||||||
|
|
||||||
@ -56,7 +57,7 @@
|
|||||||
|
|
||||||
#define PROGNAME "rpng2-win"
|
#define PROGNAME "rpng2-win"
|
||||||
#define LONGNAME "Progressive PNG Viewer for Windows"
|
#define LONGNAME "Progressive PNG Viewer for Windows"
|
||||||
#define VERSION "1.20 of 28 May 2001"
|
#define VERSION "1.21 of 29 June 2001"
|
||||||
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
@ -451,12 +452,13 @@ int WINAPI WinMain(HINSTANCE hInst, HINSTANCE hPrevInst, PSTR cmd, int showmode)
|
|||||||
"\t\t combining rows, and expanding interlacing, respectively\n"
|
"\t\t combining rows, and expanding interlacing, respectively\n"
|
||||||
#endif
|
#endif
|
||||||
"\nPress Q, Esc or mouse button 1 after image is displayed to quit.\n"
|
"\nPress Q, Esc or mouse button 1 after image is displayed to quit.\n"
|
||||||
"Press Q or Esc to quit this usage screen.\n"
|
"Press Q or Esc to quit this usage screen. ",
|
||||||
"\n", PROGNAME,
|
PROGNAME,
|
||||||
#if (defined(__i386__) || defined(_M_IX86))
|
#if (defined(__i386__) || defined(_M_IX86))
|
||||||
strlen(PROGNAME), " ",
|
strlen(PROGNAME), " ",
|
||||||
#endif
|
#endif
|
||||||
strlen(PROGNAME), " ", default_display_exponent, num_bgpat);
|
strlen(PROGNAME), " ", default_display_exponent, num_bgpat);
|
||||||
|
fflush(stderr);
|
||||||
do
|
do
|
||||||
ch = _getch();
|
ch = _getch();
|
||||||
while (ch != 'q' && ch != 'Q' && ch != 0x1B);
|
while (ch != 'q' && ch != 'Q' && ch != 0x1B);
|
||||||
@ -466,6 +468,7 @@ int WINAPI WinMain(HINSTANCE hInst, HINSTANCE hPrevInst, PSTR cmd, int showmode)
|
|||||||
fprintf(stderr,
|
fprintf(stderr,
|
||||||
"\n [console window: closing this window will terminate %s]\n\n",
|
"\n [console window: closing this window will terminate %s]\n\n",
|
||||||
PROGNAME);
|
PROGNAME);
|
||||||
|
fflush(stderr);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
30
libpng.3
30
libpng.3
@ -1,6 +1,6 @@
|
|||||||
.TH LIBPNG 3 "June 23, 2001"
|
.TH LIBPNG 3 "August 8, 2001"
|
||||||
.SH NAME
|
.SH NAME
|
||||||
libpng \- Portable Network Graphics (PNG) Reference Library 1.2.0beta4
|
libpng \- Portable Network Graphics (PNG) Reference Library 1.2.0beta5
|
||||||
.SH SYNOPSIS
|
.SH SYNOPSIS
|
||||||
\fI\fB
|
\fI\fB
|
||||||
|
|
||||||
@ -787,7 +787,7 @@ Following is a copy of the libpng.txt file that accompanies libpng.
|
|||||||
.SH LIBPNG.TXT
|
.SH LIBPNG.TXT
|
||||||
libpng.txt - A description on how to use and modify libpng
|
libpng.txt - A description on how to use and modify libpng
|
||||||
|
|
||||||
libpng version 1.2.0beta4 - June 23, 2001
|
libpng version 1.2.0beta5 - August 8, 2001
|
||||||
Updated and distributed by Glenn Randers-Pehrson
|
Updated and distributed by Glenn Randers-Pehrson
|
||||||
<randeg@alum.rpi.edu>
|
<randeg@alum.rpi.edu>
|
||||||
Copyright (c) 1998-2001 Glenn Randers-Pehrson
|
Copyright (c) 1998-2001 Glenn Randers-Pehrson
|
||||||
@ -865,7 +865,9 @@ Libpng is thread safe, provided the threads are using different
|
|||||||
instances of the structures. Each thread should have its own
|
instances of the structures. Each thread should have its own
|
||||||
png_struct and png_info instances, and thus its own image.
|
png_struct and png_info instances, and thus its own image.
|
||||||
Libpng does not protect itself against two threads using the
|
Libpng does not protect itself against two threads using the
|
||||||
same instance of a structure.
|
same instance of a structure. Note: thread safety may be defeated
|
||||||
|
by use of some of the MMX assembler code in pnggccrd.c, which is only
|
||||||
|
compiled when the user defines PNG_THREAD_UNSAFE_OK.
|
||||||
|
|
||||||
|
|
||||||
.SH II. Structures
|
.SH II. Structures
|
||||||
@ -1577,7 +1579,7 @@ higher possible bit depth (e.g. from 5 bits/sample in the range [0,31] to
|
|||||||
convert the PNG pixel data back to the original bit depth of the image.
|
convert the PNG pixel data back to the original bit depth of the image.
|
||||||
This call reduces the pixels back down to the original bit depth:
|
This call reduces the pixels back down to the original bit depth:
|
||||||
|
|
||||||
png_color_16p sig_bit;
|
png_color_8p sig_bit;
|
||||||
|
|
||||||
if (png_get_sBIT(png_ptr, info_ptr, &sig_bit))
|
if (png_get_sBIT(png_ptr, info_ptr, &sig_bit))
|
||||||
png_set_shift(png_ptr, sig_bit);
|
png_set_shift(png_ptr, sig_bit);
|
||||||
@ -1789,7 +1791,13 @@ PNG files describe monochrome as black being zero and white being one.
|
|||||||
The following code will reverse this (make black be one and white be
|
The following code will reverse this (make black be one and white be
|
||||||
zero):
|
zero):
|
||||||
|
|
||||||
if (bit_depth == 1 && color_type == PNG_COLOR_GRAY)
|
if (bit_depth == 1 && color_type == PNG_COLOR_TYPE_GRAY)
|
||||||
|
png_set_invert_mono(png_ptr);
|
||||||
|
|
||||||
|
This function can also be used to invert grayscale and gray-alpha images:
|
||||||
|
|
||||||
|
if (color_type == PNG_COLOR_TYPE_GRAY ||
|
||||||
|
color_type == PNG_COLOR_TYPE_GRAY_ALPHA)
|
||||||
png_set_invert_mono(png_ptr);
|
png_set_invert_mono(png_ptr);
|
||||||
|
|
||||||
PNG files store 16 bit pixels in network byte order (big-endian,
|
PNG files store 16 bit pixels in network byte order (big-endian,
|
||||||
@ -3605,13 +3613,13 @@ application:
|
|||||||
|
|
||||||
.SH IX. Y2K Compliance in libpng
|
.SH IX. Y2K Compliance in libpng
|
||||||
|
|
||||||
June 23, 2001
|
August 8, 2001
|
||||||
|
|
||||||
Since the PNG Development group is an ad-hoc body, we can't make
|
Since the PNG Development group is an ad-hoc body, we can't make
|
||||||
an official declaration.
|
an official declaration.
|
||||||
|
|
||||||
This is your unofficial assurance that libpng from version 0.71 and
|
This is your unofficial assurance that libpng from version 0.71 and
|
||||||
upward through 1.2.0beta4 are Y2K compliant. It is my belief that earlier
|
upward through 1.2.0beta5 are Y2K compliant. It is my belief that earlier
|
||||||
versions were also Y2K compliant.
|
versions were also Y2K compliant.
|
||||||
|
|
||||||
Libpng only has three year fields. One is a 2-byte unsigned integer that
|
Libpng only has three year fields. One is a 2-byte unsigned integer that
|
||||||
@ -3786,7 +3794,7 @@ possible without all of you.
|
|||||||
|
|
||||||
Thanks to Frank J. T. Wojcik for helping with the documentation.
|
Thanks to Frank J. T. Wojcik for helping with the documentation.
|
||||||
|
|
||||||
Libpng version 1.2.0beta4 - June 23, 2001:
|
Libpng version 1.2.0beta5 - August 8, 2001:
|
||||||
Initially created in 1995 by Guy Eric Schalnat, then of Group 42, Inc.
|
Initially created in 1995 by Guy Eric Schalnat, then of Group 42, Inc.
|
||||||
Currently maintained by Glenn Randers-Pehrson (randeg@alum.rpi.edu).
|
Currently maintained by Glenn Randers-Pehrson (randeg@alum.rpi.edu).
|
||||||
|
|
||||||
@ -3803,7 +3811,7 @@ included in the libpng distribution, the latter shall prevail.)
|
|||||||
If you modify libpng you may insert additional notices immediately following
|
If you modify libpng you may insert additional notices immediately following
|
||||||
this sentence.
|
this sentence.
|
||||||
|
|
||||||
libpng versions 1.0.7, July 1, 2000, through 1.2.0beta4, June 23, 2001, are
|
libpng versions 1.0.7, July 1, 2000, through 1.2.0beta5, August 8, 2001, are
|
||||||
Copyright (c) 2000-2001 Glenn Randers-Pehrson, and are
|
Copyright (c) 2000-2001 Glenn Randers-Pehrson, and are
|
||||||
distributed according to the same disclaimer and license as libpng-1.0.6
|
distributed according to the same disclaimer and license as libpng-1.0.6
|
||||||
with the following individuals added to the list of Contributing Authors
|
with the following individuals added to the list of Contributing Authors
|
||||||
@ -3895,7 +3903,7 @@ certification mark of the Open Source Initiative.
|
|||||||
|
|
||||||
Glenn Randers-Pehrson
|
Glenn Randers-Pehrson
|
||||||
randeg@alum.rpi.edu
|
randeg@alum.rpi.edu
|
||||||
June 23, 2001
|
August 8, 2001
|
||||||
|
|
||||||
.\" end of man page
|
.\" end of man page
|
||||||
|
|
||||||
|
20
libpng.txt
20
libpng.txt
@ -1,6 +1,6 @@
|
|||||||
libpng.txt - A description on how to use and modify libpng
|
libpng.txt - A description on how to use and modify libpng
|
||||||
|
|
||||||
libpng version 1.2.0beta4 - June 23, 2001
|
libpng version 1.2.0beta5 - August 8, 2001
|
||||||
Updated and distributed by Glenn Randers-Pehrson
|
Updated and distributed by Glenn Randers-Pehrson
|
||||||
<randeg@alum.rpi.edu>
|
<randeg@alum.rpi.edu>
|
||||||
Copyright (c) 1998-2001 Glenn Randers-Pehrson
|
Copyright (c) 1998-2001 Glenn Randers-Pehrson
|
||||||
@ -78,7 +78,9 @@ Libpng is thread safe, provided the threads are using different
|
|||||||
instances of the structures. Each thread should have its own
|
instances of the structures. Each thread should have its own
|
||||||
png_struct and png_info instances, and thus its own image.
|
png_struct and png_info instances, and thus its own image.
|
||||||
Libpng does not protect itself against two threads using the
|
Libpng does not protect itself against two threads using the
|
||||||
same instance of a structure.
|
same instance of a structure. Note: thread safety may be defeated
|
||||||
|
by use of some of the MMX assembler code in pnggccrd.c, which is only
|
||||||
|
compiled when the user defines PNG_THREAD_UNSAFE_OK.
|
||||||
|
|
||||||
|
|
||||||
II. Structures
|
II. Structures
|
||||||
@ -790,7 +792,7 @@ higher possible bit depth (e.g. from 5 bits/sample in the range [0,31] to
|
|||||||
convert the PNG pixel data back to the original bit depth of the image.
|
convert the PNG pixel data back to the original bit depth of the image.
|
||||||
This call reduces the pixels back down to the original bit depth:
|
This call reduces the pixels back down to the original bit depth:
|
||||||
|
|
||||||
png_color_16p sig_bit;
|
png_color_8p sig_bit;
|
||||||
|
|
||||||
if (png_get_sBIT(png_ptr, info_ptr, &sig_bit))
|
if (png_get_sBIT(png_ptr, info_ptr, &sig_bit))
|
||||||
png_set_shift(png_ptr, sig_bit);
|
png_set_shift(png_ptr, sig_bit);
|
||||||
@ -1002,7 +1004,13 @@ PNG files describe monochrome as black being zero and white being one.
|
|||||||
The following code will reverse this (make black be one and white be
|
The following code will reverse this (make black be one and white be
|
||||||
zero):
|
zero):
|
||||||
|
|
||||||
if (bit_depth == 1 && color_type == PNG_COLOR_GRAY)
|
if (bit_depth == 1 && color_type == PNG_COLOR_TYPE_GRAY)
|
||||||
|
png_set_invert_mono(png_ptr);
|
||||||
|
|
||||||
|
This function can also be used to invert grayscale and gray-alpha images:
|
||||||
|
|
||||||
|
if (color_type == PNG_COLOR_TYPE_GRAY ||
|
||||||
|
color_type == PNG_COLOR_TYPE_GRAY_ALPHA)
|
||||||
png_set_invert_mono(png_ptr);
|
png_set_invert_mono(png_ptr);
|
||||||
|
|
||||||
PNG files store 16 bit pixels in network byte order (big-endian,
|
PNG files store 16 bit pixels in network byte order (big-endian,
|
||||||
@ -2818,13 +2826,13 @@ application:
|
|||||||
|
|
||||||
IX. Y2K Compliance in libpng
|
IX. Y2K Compliance in libpng
|
||||||
|
|
||||||
June 23, 2001
|
August 8, 2001
|
||||||
|
|
||||||
Since the PNG Development group is an ad-hoc body, we can't make
|
Since the PNG Development group is an ad-hoc body, we can't make
|
||||||
an official declaration.
|
an official declaration.
|
||||||
|
|
||||||
This is your unofficial assurance that libpng from version 0.71 and
|
This is your unofficial assurance that libpng from version 0.71 and
|
||||||
upward through 1.2.0beta4 are Y2K compliant. It is my belief that earlier
|
upward through 1.2.0beta5 are Y2K compliant. It is my belief that earlier
|
||||||
versions were also Y2K compliant.
|
versions were also Y2K compliant.
|
||||||
|
|
||||||
Libpng only has three year fields. One is a 2-byte unsigned integer that
|
Libpng only has three year fields. One is a 2-byte unsigned integer that
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
.TH LIBPNGPF 3 "June 23, 2001"
|
.TH LIBPNGPF 3 "August 8, 2001"
|
||||||
.SH NAME
|
.SH NAME
|
||||||
libpng \- Portable Network Graphics (PNG) Reference Library 1.2.0beta4
|
libpng \- Portable Network Graphics (PNG) Reference Library 1.2.0beta5
|
||||||
(private functions)
|
(private functions)
|
||||||
.SH SYNOPSIS
|
.SH SYNOPSIS
|
||||||
\fB#include <png.h>\fP
|
\fB#include <png.h>\fP
|
||||||
|
2
png.5
2
png.5
@ -1,4 +1,4 @@
|
|||||||
.TH PNG 5 "June 23, 2001"
|
.TH PNG 5 "August 8, 2001"
|
||||||
.SH NAME
|
.SH NAME
|
||||||
png \- Portable Network Graphics (PNG) format
|
png \- Portable Network Graphics (PNG) format
|
||||||
.SH DESCRIPTION
|
.SH DESCRIPTION
|
||||||
|
12
png.c
12
png.c
@ -1,7 +1,7 @@
|
|||||||
|
|
||||||
/* png.c - location for general purpose libpng functions
|
/* png.c - location for general purpose libpng functions
|
||||||
*
|
*
|
||||||
* libpng version 1.2.0beta4 - June 23, 2001
|
* libpng version 1.2.0beta5 - August 8, 2001
|
||||||
* Copyright (c) 1998-2001 Glenn Randers-Pehrson
|
* Copyright (c) 1998-2001 Glenn Randers-Pehrson
|
||||||
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
|
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
|
||||||
* (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
|
* (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
|
||||||
@ -13,14 +13,14 @@
|
|||||||
#include "png.h"
|
#include "png.h"
|
||||||
|
|
||||||
/* Generate a compiler error if there is an old png.h in the search path. */
|
/* Generate a compiler error if there is an old png.h in the search path. */
|
||||||
typedef version_1_2_0beta4 Your_png_h_is_not_version_1_2_0beta4;
|
typedef version_1_2_0beta5 Your_png_h_is_not_version_1_2_0beta5;
|
||||||
|
|
||||||
/* Version information for C files. This had better match the version
|
/* Version information for C files. This had better match the version
|
||||||
* string defined in png.h. */
|
* string defined in png.h. */
|
||||||
|
|
||||||
#ifdef PNG_USE_GLOBAL_ARRAYS
|
#ifdef PNG_USE_GLOBAL_ARRAYS
|
||||||
/* png_libpng_ver was changed to a function in version 1.0.5c */
|
/* png_libpng_ver was changed to a function in version 1.0.5c */
|
||||||
const char png_libpng_ver[18] = "1.2.0beta4";
|
const char png_libpng_ver[18] = "1.2.0beta5";
|
||||||
|
|
||||||
/* png_sig was changed to a function in version 1.0.5c */
|
/* png_sig was changed to a function in version 1.0.5c */
|
||||||
/* Place to hold the signature string for a PNG file. */
|
/* Place to hold the signature string for a PNG file. */
|
||||||
@ -646,7 +646,7 @@ png_charp PNGAPI
|
|||||||
png_get_copyright(png_structp png_ptr)
|
png_get_copyright(png_structp png_ptr)
|
||||||
{
|
{
|
||||||
if (png_ptr != NULL || png_ptr == NULL) /* silence compiler warning */
|
if (png_ptr != NULL || png_ptr == NULL) /* silence compiler warning */
|
||||||
return ((png_charp) "\n libpng version 1.2.0beta4 - June 23, 2001\n\
|
return ((png_charp) "\n libpng version 1.2.0beta5 - August 8, 2001\n\
|
||||||
Copyright (c) 1998-2001 Glenn Randers-Pehrson\n\
|
Copyright (c) 1998-2001 Glenn Randers-Pehrson\n\
|
||||||
Copyright (c) 1996, 1997 Andreas Dilger\n\
|
Copyright (c) 1996, 1997 Andreas Dilger\n\
|
||||||
Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.\n");
|
Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.\n");
|
||||||
@ -664,8 +664,8 @@ png_get_libpng_ver(png_structp png_ptr)
|
|||||||
{
|
{
|
||||||
/* Version of *.c files used when building libpng */
|
/* Version of *.c files used when building libpng */
|
||||||
if(png_ptr != NULL) /* silence compiler warning about unused png_ptr */
|
if(png_ptr != NULL) /* silence compiler warning about unused png_ptr */
|
||||||
return((png_charp) "1.2.0beta4");
|
return((png_charp) "1.2.0beta5");
|
||||||
return((png_charp) "1.2.0beta4");
|
return((png_charp) "1.2.0beta5");
|
||||||
}
|
}
|
||||||
|
|
||||||
png_charp PNGAPI
|
png_charp PNGAPI
|
||||||
|
20
png.h
20
png.h
@ -1,7 +1,7 @@
|
|||||||
|
|
||||||
/* png.h - header file for PNG reference library
|
/* png.h - header file for PNG reference library
|
||||||
*
|
*
|
||||||
* libpng version 1.2.0beta4 - June 23, 2001
|
* libpng version 1.2.0beta5 - August 8, 2001
|
||||||
* Copyright (c) 1998-2001 Glenn Randers-Pehrson
|
* Copyright (c) 1998-2001 Glenn Randers-Pehrson
|
||||||
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
|
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
|
||||||
* (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
|
* (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
|
||||||
@ -9,7 +9,7 @@
|
|||||||
* Authors and maintainers:
|
* Authors and maintainers:
|
||||||
* libpng versions 0.71, May 1995, through 0.88, January 1996: Guy Schalnat
|
* 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.89c, June 1996, through 0.96, May 1997: Andreas Dilger
|
||||||
* libpng versions 0.97, January 1998, through 1.2.0beta4 - June 23, 2001: Glenn
|
* libpng versions 0.97, January 1998, through 1.2.0beta5 - August 8, 2001: Glenn
|
||||||
* See also "Contributing Authors", below.
|
* See also "Contributing Authors", below.
|
||||||
*
|
*
|
||||||
* Note about libpng version numbers:
|
* Note about libpng version numbers:
|
||||||
@ -105,7 +105,7 @@
|
|||||||
* If you modify libpng you may insert additional notices immediately following
|
* If you modify libpng you may insert additional notices immediately following
|
||||||
* this sentence.
|
* this sentence.
|
||||||
*
|
*
|
||||||
* libpng versions 1.0.7, July 1, 2000, through 1.2.0beta4, June 23, 2001, are
|
* libpng versions 1.0.7, July 1, 2000, through 1.2.0beta5, August 8, 2001, are
|
||||||
* Copyright (c) 2000, 2001 Glenn Randers-Pehrson, and are
|
* Copyright (c) 2000, 2001 Glenn Randers-Pehrson, and are
|
||||||
* distributed according to the same disclaimer and license as libpng-1.0.6
|
* distributed according to the same disclaimer and license as libpng-1.0.6
|
||||||
* with the following individuals added to the list of Contributing Authors
|
* with the following individuals added to the list of Contributing Authors
|
||||||
@ -210,13 +210,13 @@
|
|||||||
* Y2K compliance in libpng:
|
* Y2K compliance in libpng:
|
||||||
* =========================
|
* =========================
|
||||||
*
|
*
|
||||||
* June 23, 2001
|
* August 8, 2001
|
||||||
*
|
*
|
||||||
* Since the PNG Development group is an ad-hoc body, we can't make
|
* Since the PNG Development group is an ad-hoc body, we can't make
|
||||||
* an official declaration.
|
* an official declaration.
|
||||||
*
|
*
|
||||||
* This is your unofficial assurance that libpng from version 0.71 and
|
* This is your unofficial assurance that libpng from version 0.71 and
|
||||||
* upward through 1.2.0beta4 are Y2K compliant. It is my belief that earlier
|
* upward through 1.2.0beta5 are Y2K compliant. It is my belief that earlier
|
||||||
* versions were also Y2K compliant.
|
* versions were also Y2K compliant.
|
||||||
*
|
*
|
||||||
* Libpng only has three year fields. One is a 2-byte unsigned integer
|
* Libpng only has three year fields. One is a 2-byte unsigned integer
|
||||||
@ -272,7 +272,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
/* Version information for png.h - this should match the version in png.c */
|
/* Version information for png.h - this should match the version in png.c */
|
||||||
#define PNG_LIBPNG_VER_STRING "1.2.0beta4"
|
#define PNG_LIBPNG_VER_STRING "1.2.0beta5"
|
||||||
|
|
||||||
#define PNG_LIBPNG_VER_SONUM 3
|
#define PNG_LIBPNG_VER_SONUM 3
|
||||||
#define PNG_LIBPNG_VER_DLLNUM %DLLNUM%
|
#define PNG_LIBPNG_VER_DLLNUM %DLLNUM%
|
||||||
@ -284,7 +284,7 @@
|
|||||||
/* This should match the numeric part of the final component of
|
/* This should match the numeric part of the final component of
|
||||||
* PNG_LIBPNG_VER_STRING, omitting any leading zero: */
|
* PNG_LIBPNG_VER_STRING, omitting any leading zero: */
|
||||||
|
|
||||||
#define PNG_LIBPNG_VER_BUILD 4
|
#define PNG_LIBPNG_VER_BUILD 5
|
||||||
|
|
||||||
#define PNG_LIBPNG_BUILD_ALPHA 1
|
#define PNG_LIBPNG_BUILD_ALPHA 1
|
||||||
#define PNG_LIBPNG_BUILD_BETA 2
|
#define PNG_LIBPNG_BUILD_BETA 2
|
||||||
@ -1212,9 +1212,9 @@ struct png_struct_def
|
|||||||
|
|
||||||
|
|
||||||
/* This prevents a compiler error in png_get_copyright() in png.c if png.c
|
/* This prevents a compiler error in png_get_copyright() in png.c if png.c
|
||||||
and png.h are both at version 1.2.0beta4
|
and png.h are both at version 1.2.0beta5
|
||||||
*/
|
*/
|
||||||
typedef png_structp version_1_2_0beta4;
|
typedef png_structp version_1_2_0beta5;
|
||||||
|
|
||||||
typedef png_struct FAR * FAR * png_structpp;
|
typedef png_struct FAR * FAR * png_structpp;
|
||||||
|
|
||||||
@ -2331,7 +2331,7 @@ extern PNG_EXPORT(void,png_set_strip_error_numbers) PNGARG((png_structp
|
|||||||
/* Maintainer: Put new public prototypes here ^, in libpng.3, and project defs */
|
/* Maintainer: Put new public prototypes here ^, in libpng.3, and project defs */
|
||||||
|
|
||||||
#define PNG_HEADER_VERSION_STRING \
|
#define PNG_HEADER_VERSION_STRING \
|
||||||
" libpng version 1.2.0beta4 - June 23, 2001 (header)\n"
|
" libpng version 1.2.0beta5 - August 8, 2001 (header)\n"
|
||||||
|
|
||||||
#ifdef PNG_READ_COMPOSITE_NODIV_SUPPORTED
|
#ifdef PNG_READ_COMPOSITE_NODIV_SUPPORTED
|
||||||
/* With these routines we avoid an integer divide, which will be slower on
|
/* With these routines we avoid an integer divide, which will be slower on
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
/* pngasmrd.h - assembler version of utilities to read a PNG file
|
/* pngasmrd.h - assembler version of utilities to read a PNG file
|
||||||
*
|
*
|
||||||
* libpng 1.2.0beta4 - June 23, 2001
|
* libpng 1.2.0beta5 - August 8, 2001
|
||||||
* For conditions of distribution and use, see copyright notice in png.h
|
* For conditions of distribution and use, see copyright notice in png.h
|
||||||
* Copyright (c) 2001 Glenn Randers-Pehrson
|
* Copyright (c) 2001 Glenn Randers-Pehrson
|
||||||
*
|
*
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
/* pngconf.h - machine configurable file for libpng
|
/* pngconf.h - machine configurable file for libpng
|
||||||
*
|
*
|
||||||
* libpng 1.2.0beta4 - June 23, 2001
|
* libpng 1.2.0beta5 - August 8, 2001
|
||||||
* For conditions of distribution and use, see copyright notice in png.h
|
* For conditions of distribution and use, see copyright notice in png.h
|
||||||
* Copyright (c) 1998-2001 Glenn Randers-Pehrson
|
* Copyright (c) 1998-2001 Glenn Randers-Pehrson
|
||||||
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
|
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
|
||||||
@ -638,6 +638,12 @@
|
|||||||
# endif
|
# endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
/* If you are sure that you don't need thread safety and you are compiling
|
||||||
|
with PNG_USE_PNGCCRD for an MMX application, you can define this for
|
||||||
|
faster execution. See pnggccrd.c.
|
||||||
|
#define PNG_THREAD_UNSAFE_OK
|
||||||
|
*/
|
||||||
|
|
||||||
#if !defined(PNG_NO_USER_MEM) && !defined(PNG_USER_MEM_SUPPORTED)
|
#if !defined(PNG_NO_USER_MEM) && !defined(PNG_USER_MEM_SUPPORTED)
|
||||||
# define PNG_USER_MEM_SUPPORTED
|
# define PNG_USER_MEM_SUPPORTED
|
||||||
#endif
|
#endif
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
|
|
||||||
/* pngerror.c - stub functions for i/o and memory allocation
|
/* pngerror.c - stub functions for i/o and memory allocation
|
||||||
*
|
*
|
||||||
* libpng 1.2.0beta4 - June 23, 2001
|
* libpng 1.2.0beta5 - August 8, 2001
|
||||||
* For conditions of distribution and use, see copyright notice in png.h
|
* For conditions of distribution and use, see copyright notice in png.h
|
||||||
* Copyright (c) 1998-2001 Glenn Randers-Pehrson
|
* Copyright (c) 1998-2001 Glenn Randers-Pehrson
|
||||||
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
|
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
|
||||||
|
61
pnggccrd.c
61
pnggccrd.c
@ -6,7 +6,7 @@
|
|||||||
* and http://www.intel.com/drg/pentiumII/appnotes/923/923.htm
|
* and http://www.intel.com/drg/pentiumII/appnotes/923/923.htm
|
||||||
* for Intel's performance analysis of the MMX vs. non-MMX code.
|
* for Intel's performance analysis of the MMX vs. non-MMX code.
|
||||||
*
|
*
|
||||||
* libpng version 1.2.0beta4 - June 23, 2001
|
* libpng version 1.2.0beta5 - August 8, 2001
|
||||||
* For conditions of distribution and use, see copyright notice in png.h
|
* For conditions of distribution and use, see copyright notice in png.h
|
||||||
* Copyright (c) 1998-2001 Glenn Randers-Pehrson
|
* Copyright (c) 1998-2001 Glenn Randers-Pehrson
|
||||||
* Copyright (c) 1998, Intel Corporation
|
* Copyright (c) 1998, Intel Corporation
|
||||||
@ -252,7 +252,6 @@ static const int FARDATA png_pass_width[7] = {8, 4, 4, 2, 2, 1, 1};
|
|||||||
* so define them without: */
|
* so define them without: */
|
||||||
#if defined(__DJGPP__) || defined(WIN32) || defined(__CYGWIN__)
|
#if defined(__DJGPP__) || defined(WIN32) || defined(__CYGWIN__)
|
||||||
# define _mmx_supported mmx_supported
|
# define _mmx_supported mmx_supported
|
||||||
# define _unmask unmask
|
|
||||||
# define _const4 const4
|
# define _const4 const4
|
||||||
# define _const6 const6
|
# define _const6 const6
|
||||||
# define _mask8_0 mask8_0
|
# define _mask8_0 mask8_0
|
||||||
@ -271,9 +270,6 @@ static const int FARDATA png_pass_width[7] = {8, 4, 4, 2, 2, 1, 1};
|
|||||||
# define _mask48_2 mask48_2
|
# define _mask48_2 mask48_2
|
||||||
# define _mask48_1 mask48_1
|
# define _mask48_1 mask48_1
|
||||||
# define _mask48_0 mask48_0
|
# define _mask48_0 mask48_0
|
||||||
# define _FullLength FullLength
|
|
||||||
# define _MMXLength MMXLength
|
|
||||||
# define _dif dif
|
|
||||||
# define _LBCarryMask LBCarryMask
|
# define _LBCarryMask LBCarryMask
|
||||||
# define _HBClearMask HBClearMask
|
# define _HBClearMask HBClearMask
|
||||||
# define _ActiveMask ActiveMask
|
# define _ActiveMask ActiveMask
|
||||||
@ -281,10 +277,16 @@ static const int FARDATA png_pass_width[7] = {8, 4, 4, 2, 2, 1, 1};
|
|||||||
# define _ActiveMaskEnd ActiveMaskEnd
|
# define _ActiveMaskEnd ActiveMaskEnd
|
||||||
# define _ShiftBpp ShiftBpp
|
# define _ShiftBpp ShiftBpp
|
||||||
# define _ShiftRem ShiftRem
|
# define _ShiftRem ShiftRem
|
||||||
|
#ifdef PNG_THREAD_UNSAFE_OK
|
||||||
|
# define _unmask unmask
|
||||||
|
# define _FullLength FullLength
|
||||||
|
# define _MMXLength MMXLength
|
||||||
|
# define _dif dif
|
||||||
# define _patemp patemp
|
# define _patemp patemp
|
||||||
# define _pbtemp pbtemp
|
# define _pbtemp pbtemp
|
||||||
# define _pctemp pctemp
|
# define _pctemp pctemp
|
||||||
#endif
|
#endif
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
/* These constants are used in the inlined MMX assembly code.
|
/* These constants are used in the inlined MMX assembly code.
|
||||||
@ -296,7 +298,9 @@ static const int FARDATA png_pass_width[7] = {8, 4, 4, 2, 2, 1, 1};
|
|||||||
* "more than 10 operands in `asm'" errors when %ebx is used to preload unmask
|
* "more than 10 operands in `asm'" errors when %ebx is used to preload unmask
|
||||||
* in the non-PIC case, so we'll just use the global unconditionally now.
|
* in the non-PIC case, so we'll just use the global unconditionally now.
|
||||||
*/
|
*/
|
||||||
|
#ifdef PNG_THREAD_UNSAFE_OK
|
||||||
static int _unmask;
|
static int _unmask;
|
||||||
|
#endif
|
||||||
|
|
||||||
static unsigned long long _mask8_0 = 0x0102040810204080LL;
|
static unsigned long long _mask8_0 = 0x0102040810204080LL;
|
||||||
|
|
||||||
@ -325,24 +329,29 @@ static unsigned long long _const6 = 0x00000000000000FFLL;
|
|||||||
|
|
||||||
// These are used in the row-filter routines and should/would be local
|
// These are used in the row-filter routines and should/would be local
|
||||||
// variables if not for gcc addressing limitations.
|
// variables if not for gcc addressing limitations.
|
||||||
|
// WARNING: Their presence probably defeats the thread safety of libpng.
|
||||||
|
|
||||||
|
#ifdef PNG_THREAD_UNSAFE_OK
|
||||||
static png_uint_32 _FullLength;
|
static png_uint_32 _FullLength;
|
||||||
static png_uint_32 _MMXLength;
|
static png_uint_32 _MMXLength;
|
||||||
static int _dif;
|
static int _dif;
|
||||||
static int _patemp; // temp variables for Paeth routine
|
static int _patemp; // temp variables for Paeth routine
|
||||||
static int _pbtemp;
|
static int _pbtemp;
|
||||||
static int _pctemp;
|
static int _pctemp;
|
||||||
|
#endif
|
||||||
|
|
||||||
static void /* PRIVATE */
|
void /* PRIVATE */
|
||||||
png_squelch_warnings(void)
|
png_squelch_warnings(void)
|
||||||
{
|
{
|
||||||
|
#ifdef PNG_THREAD_UNSAFE_OK
|
||||||
_dif = _dif;
|
_dif = _dif;
|
||||||
_patemp = _patemp;
|
_patemp = _patemp;
|
||||||
_pbtemp = _pbtemp;
|
_pbtemp = _pbtemp;
|
||||||
_pctemp = _pctemp;
|
_pctemp = _pctemp;
|
||||||
|
_MMXLength = _MMXLength;
|
||||||
|
#endif
|
||||||
_const4 = _const4;
|
_const4 = _const4;
|
||||||
_const6 = _const6;
|
_const6 = _const6;
|
||||||
_MMXLength = _MMXLength;
|
|
||||||
_mask8_0 = _mask8_0;
|
_mask8_0 = _mask8_0;
|
||||||
_mask16_1 = _mask16_1;
|
_mask16_1 = _mask16_1;
|
||||||
_mask16_0 = _mask16_0;
|
_mask16_0 = _mask16_0;
|
||||||
@ -587,7 +596,7 @@ png_combine_row(png_structp png_ptr, png_bytep row, int mask)
|
|||||||
png_bytep srcptr;
|
png_bytep srcptr;
|
||||||
png_bytep dstptr;
|
png_bytep dstptr;
|
||||||
|
|
||||||
#if defined(PNG_ASSEMBLER_CODE_SUPPORTED)
|
#if defined(PNG_ASSEMBLER_CODE_SUPPORTED) && defined(PNG_THREAD_UNSAFE_OK)
|
||||||
if ((png_ptr->asm_flags & PNG_ASM_FLAG_MMX_READ_COMBINE_ROW)
|
if ((png_ptr->asm_flags & PNG_ASM_FLAG_MMX_READ_COMBINE_ROW)
|
||||||
/* && _mmx_supported */ )
|
/* && _mmx_supported */ )
|
||||||
{
|
{
|
||||||
@ -721,7 +730,7 @@ png_combine_row(png_structp png_ptr, png_bytep row, int mask)
|
|||||||
png_bytep srcptr;
|
png_bytep srcptr;
|
||||||
png_bytep dstptr;
|
png_bytep dstptr;
|
||||||
|
|
||||||
#if defined(PNG_ASSEMBLER_CODE_SUPPORTED)
|
#if defined(PNG_ASSEMBLER_CODE_SUPPORTED) && defined(PNG_THREAD_UNSAFE_OK)
|
||||||
if ((png_ptr->asm_flags & PNG_ASM_FLAG_MMX_READ_COMBINE_ROW)
|
if ((png_ptr->asm_flags & PNG_ASM_FLAG_MMX_READ_COMBINE_ROW)
|
||||||
/* && _mmx_supported */ )
|
/* && _mmx_supported */ )
|
||||||
{
|
{
|
||||||
@ -870,7 +879,7 @@ png_combine_row(png_structp png_ptr, png_bytep row, int mask)
|
|||||||
png_bytep srcptr;
|
png_bytep srcptr;
|
||||||
png_bytep dstptr;
|
png_bytep dstptr;
|
||||||
|
|
||||||
#if defined(PNG_ASSEMBLER_CODE_SUPPORTED)
|
#if defined(PNG_ASSEMBLER_CODE_SUPPORTED) && defined(PNG_THREAD_UNSAFE_OK)
|
||||||
if ((png_ptr->asm_flags & PNG_ASM_FLAG_MMX_READ_COMBINE_ROW)
|
if ((png_ptr->asm_flags & PNG_ASM_FLAG_MMX_READ_COMBINE_ROW)
|
||||||
/* && _mmx_supported */ )
|
/* && _mmx_supported */ )
|
||||||
{
|
{
|
||||||
@ -1034,7 +1043,7 @@ png_combine_row(png_structp png_ptr, png_bytep row, int mask)
|
|||||||
png_bytep srcptr;
|
png_bytep srcptr;
|
||||||
png_bytep dstptr;
|
png_bytep dstptr;
|
||||||
|
|
||||||
#if defined(PNG_ASSEMBLER_CODE_SUPPORTED)
|
#if defined(PNG_ASSEMBLER_CODE_SUPPORTED) && defined(PNG_THREAD_UNSAFE_OK)
|
||||||
if ((png_ptr->asm_flags & PNG_ASM_FLAG_MMX_READ_COMBINE_ROW)
|
if ((png_ptr->asm_flags & PNG_ASM_FLAG_MMX_READ_COMBINE_ROW)
|
||||||
/* && _mmx_supported */ )
|
/* && _mmx_supported */ )
|
||||||
{
|
{
|
||||||
@ -1205,7 +1214,7 @@ png_combine_row(png_structp png_ptr, png_bytep row, int mask)
|
|||||||
png_bytep srcptr;
|
png_bytep srcptr;
|
||||||
png_bytep dstptr;
|
png_bytep dstptr;
|
||||||
|
|
||||||
#if defined(PNG_ASSEMBLER_CODE_SUPPORTED)
|
#if defined(PNG_ASSEMBLER_CODE_SUPPORTED) && defined(PNG_THREAD_UNSAFE_OK)
|
||||||
if ((png_ptr->asm_flags & PNG_ASM_FLAG_MMX_READ_COMBINE_ROW)
|
if ((png_ptr->asm_flags & PNG_ASM_FLAG_MMX_READ_COMBINE_ROW)
|
||||||
/* && _mmx_supported */ )
|
/* && _mmx_supported */ )
|
||||||
{
|
{
|
||||||
@ -1431,10 +1440,7 @@ png_combine_row(png_structp png_ptr, png_bytep row, int mask)
|
|||||||
default: /* png_ptr->row_info.pixel_depth != 1,2,4,8,16,24,32,48,64 */
|
default: /* png_ptr->row_info.pixel_depth != 1,2,4,8,16,24,32,48,64 */
|
||||||
{
|
{
|
||||||
/* this should never happen */
|
/* this should never happen */
|
||||||
fprintf(stderr,
|
png_warning(png_ptr, "Invalid row_info.pixel_depth in pnggccrd");
|
||||||
"libpng internal error: png_ptr->row_info.pixel_depth = %d\n",
|
|
||||||
png_ptr->row_info.pixel_depth);
|
|
||||||
fflush(stderr);
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
} /* end switch (png_ptr->row_info.pixel_depth) */
|
} /* end switch (png_ptr->row_info.pixel_depth) */
|
||||||
@ -2720,6 +2726,7 @@ union uAll {
|
|||||||
_HBClearMask = {0x7f7f7f7f7f7f7f7fLL},
|
_HBClearMask = {0x7f7f7f7f7f7f7f7fLL},
|
||||||
_ActiveMask, _ActiveMask2, _ActiveMaskEnd, _ShiftBpp, _ShiftRem;
|
_ActiveMask, _ActiveMask2, _ActiveMaskEnd, _ShiftBpp, _ShiftRem;
|
||||||
|
|
||||||
|
#ifdef PNG_THREAD_UNSAFE_OK
|
||||||
//===========================================================================//
|
//===========================================================================//
|
||||||
// //
|
// //
|
||||||
// P N G _ R E A D _ F I L T E R _ R O W _ M M X _ A V G //
|
// P N G _ R E A D _ F I L T E R _ R O W _ M M X _ A V G //
|
||||||
@ -3204,8 +3211,8 @@ png_read_filter_row_mmx_avg(png_row_infop row_info, png_bytep row,
|
|||||||
{
|
{
|
||||||
|
|
||||||
// GRR: PRINT ERROR HERE: SHOULD NEVER BE REACHED
|
// GRR: PRINT ERROR HERE: SHOULD NEVER BE REACHED
|
||||||
fprintf(stderr,
|
png_warning(png_ptr,
|
||||||
"libpng: internal logic error (png_read_filter_row_mmx_avg())\n");
|
"Internal logic error in pnggccrd (png_read_filter_row_mmx_avg())");
|
||||||
|
|
||||||
#if 0
|
#if 0
|
||||||
__asm__ __volatile__ (
|
__asm__ __volatile__ (
|
||||||
@ -3301,10 +3308,11 @@ png_read_filter_row_mmx_avg(png_row_infop row_info, png_bytep row,
|
|||||||
);
|
);
|
||||||
|
|
||||||
} /* end png_read_filter_row_mmx_avg() */
|
} /* end png_read_filter_row_mmx_avg() */
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
#ifdef PNG_THREAD_UNSAFE_OK
|
||||||
//===========================================================================//
|
//===========================================================================//
|
||||||
// //
|
// //
|
||||||
// P N G _ R E A D _ F I L T E R _ R O W _ M M X _ P A E T H //
|
// P N G _ R E A D _ F I L T E R _ R O W _ M M X _ P A E T H //
|
||||||
@ -4347,10 +4355,12 @@ png_read_filter_row_mmx_paeth(png_row_infop row_info, png_bytep row,
|
|||||||
);
|
);
|
||||||
|
|
||||||
} /* end png_read_filter_row_mmx_paeth() */
|
} /* end png_read_filter_row_mmx_paeth() */
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
#ifdef PNG_THREAD_UNSAFE_OK
|
||||||
//===========================================================================//
|
//===========================================================================//
|
||||||
// //
|
// //
|
||||||
// P N G _ R E A D _ F I L T E R _ R O W _ M M X _ S U B //
|
// P N G _ R E A D _ F I L T E R _ R O W _ M M X _ S U B //
|
||||||
@ -4769,6 +4779,7 @@ png_read_filter_row_mmx_sub(png_row_infop row_info, png_bytep row)
|
|||||||
);
|
);
|
||||||
|
|
||||||
} // end of png_read_filter_row_mmx_sub()
|
} // end of png_read_filter_row_mmx_sub()
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -4956,7 +4967,7 @@ png_read_filter_row(png_structp png_ptr, png_row_infop row_info, png_bytep
|
|||||||
case 0: sprintf(filnm, "none");
|
case 0: sprintf(filnm, "none");
|
||||||
break;
|
break;
|
||||||
case 1: sprintf(filnm, "sub-%s",
|
case 1: sprintf(filnm, "sub-%s",
|
||||||
#ifdef PNG_ASSEMBLER_CODE_SUPPORTED
|
#if defined(PNG_ASSEMBLER_CODE_SUPPORTED) && defined(PNG_THREAD_UNSAFE_OK)
|
||||||
(png_ptr->asm_flags & PNG_ASM_FLAG_MMX_READ_FILTER_SUB)? "MMX" :
|
(png_ptr->asm_flags & PNG_ASM_FLAG_MMX_READ_FILTER_SUB)? "MMX" :
|
||||||
#endif
|
#endif
|
||||||
"x86");
|
"x86");
|
||||||
@ -4968,13 +4979,13 @@ png_read_filter_row(png_structp png_ptr, png_row_infop row_info, png_bytep
|
|||||||
"x86");
|
"x86");
|
||||||
break;
|
break;
|
||||||
case 3: sprintf(filnm, "avg-%s",
|
case 3: sprintf(filnm, "avg-%s",
|
||||||
#ifdef PNG_ASSEMBLER_CODE_SUPPORTED
|
#if defined(PNG_ASSEMBLER_CODE_SUPPORTED) && defined(PNG_THREAD_UNSAFE_OK)
|
||||||
(png_ptr->asm_flags & PNG_ASM_FLAG_MMX_READ_FILTER_AVG)? "MMX" :
|
(png_ptr->asm_flags & PNG_ASM_FLAG_MMX_READ_FILTER_AVG)? "MMX" :
|
||||||
#endif
|
#endif
|
||||||
"x86");
|
"x86");
|
||||||
break;
|
break;
|
||||||
case 4: sprintf(filnm, "Paeth-%s",
|
case 4: sprintf(filnm, "Paeth-%s",
|
||||||
#ifdef PNG_ASSEMBLER_CODE_SUPPORTED
|
#if defined(PNG_ASSEMBLER_CODE_SUPPORTED) && defined(PNG_THREAD_UNSAFE_OK)
|
||||||
(png_ptr->asm_flags & PNG_ASM_FLAG_MMX_READ_FILTER_PAETH)? "MMX":
|
(png_ptr->asm_flags & PNG_ASM_FLAG_MMX_READ_FILTER_PAETH)? "MMX":
|
||||||
#endif
|
#endif
|
||||||
"x86");
|
"x86");
|
||||||
@ -4995,7 +5006,7 @@ png_read_filter_row(png_structp png_ptr, png_row_infop row_info, png_bytep
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case PNG_FILTER_VALUE_SUB:
|
case PNG_FILTER_VALUE_SUB:
|
||||||
#if defined(PNG_ASSEMBLER_CODE_SUPPORTED)
|
#if defined(PNG_ASSEMBLER_CODE_SUPPORTED) && defined(PNG_THREAD_UNSAFE_OK)
|
||||||
if ((png_ptr->asm_flags & PNG_ASM_FLAG_MMX_READ_FILTER_SUB) &&
|
if ((png_ptr->asm_flags & PNG_ASM_FLAG_MMX_READ_FILTER_SUB) &&
|
||||||
(row_info->pixel_depth >= png_ptr->mmx_bitdepth_threshold) &&
|
(row_info->pixel_depth >= png_ptr->mmx_bitdepth_threshold) &&
|
||||||
(row_info->rowbytes >= png_ptr->mmx_rowbytes_threshold))
|
(row_info->rowbytes >= png_ptr->mmx_rowbytes_threshold))
|
||||||
@ -5044,7 +5055,7 @@ png_read_filter_row(png_structp png_ptr, png_row_infop row_info, png_bytep
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case PNG_FILTER_VALUE_AVG:
|
case PNG_FILTER_VALUE_AVG:
|
||||||
#if defined(PNG_ASSEMBLER_CODE_SUPPORTED)
|
#if defined(PNG_ASSEMBLER_CODE_SUPPORTED) && defined(PNG_THREAD_UNSAFE_OK)
|
||||||
if ((png_ptr->asm_flags & PNG_ASM_FLAG_MMX_READ_FILTER_AVG) &&
|
if ((png_ptr->asm_flags & PNG_ASM_FLAG_MMX_READ_FILTER_AVG) &&
|
||||||
(row_info->pixel_depth >= png_ptr->mmx_bitdepth_threshold) &&
|
(row_info->pixel_depth >= png_ptr->mmx_bitdepth_threshold) &&
|
||||||
(row_info->rowbytes >= png_ptr->mmx_rowbytes_threshold))
|
(row_info->rowbytes >= png_ptr->mmx_rowbytes_threshold))
|
||||||
@ -5078,7 +5089,7 @@ png_read_filter_row(png_structp png_ptr, png_row_infop row_info, png_bytep
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case PNG_FILTER_VALUE_PAETH:
|
case PNG_FILTER_VALUE_PAETH:
|
||||||
#if defined(PNG_ASSEMBLER_CODE_SUPPORTED)
|
#if defined(PNG_ASSEMBLER_CODE_SUPPORTED) && defined(PNG_THREAD_UNSAFE_OK)
|
||||||
if ((png_ptr->asm_flags & PNG_ASM_FLAG_MMX_READ_FILTER_PAETH) &&
|
if ((png_ptr->asm_flags & PNG_ASM_FLAG_MMX_READ_FILTER_PAETH) &&
|
||||||
(row_info->pixel_depth >= png_ptr->mmx_bitdepth_threshold) &&
|
(row_info->pixel_depth >= png_ptr->mmx_bitdepth_threshold) &&
|
||||||
(row_info->rowbytes >= png_ptr->mmx_rowbytes_threshold))
|
(row_info->rowbytes >= png_ptr->mmx_rowbytes_threshold))
|
||||||
|
2
pngget.c
2
pngget.c
@ -1,7 +1,7 @@
|
|||||||
|
|
||||||
/* pngget.c - retrieval of values from info struct
|
/* pngget.c - retrieval of values from info struct
|
||||||
*
|
*
|
||||||
* libpng 1.2.0beta4 - June 23, 2001
|
* libpng 1.2.0beta5 - August 8, 2001
|
||||||
* For conditions of distribution and use, see copyright notice in png.h
|
* For conditions of distribution and use, see copyright notice in png.h
|
||||||
* Copyright (c) 1998-2001 Glenn Randers-Pehrson
|
* Copyright (c) 1998-2001 Glenn Randers-Pehrson
|
||||||
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
|
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
|
||||||
|
2
pngmem.c
2
pngmem.c
@ -1,7 +1,7 @@
|
|||||||
|
|
||||||
/* pngmem.c - stub functions for memory allocation
|
/* pngmem.c - stub functions for memory allocation
|
||||||
*
|
*
|
||||||
* libpng 1.2.0beta4 - June 23, 2001
|
* libpng 1.2.0beta5 - August 8, 2001
|
||||||
* For conditions of distribution and use, see copyright notice in png.h
|
* For conditions of distribution and use, see copyright notice in png.h
|
||||||
* Copyright (c) 1998-2001 Glenn Randers-Pehrson
|
* Copyright (c) 1998-2001 Glenn Randers-Pehrson
|
||||||
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
|
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
|
|
||||||
/* pngpread.c - read a png file in push mode
|
/* pngpread.c - read a png file in push mode
|
||||||
*
|
*
|
||||||
* libpng 1.2.0beta4 - June 23, 2001
|
* libpng 1.2.0beta5 - August 8, 2001
|
||||||
* For conditions of distribution and use, see copyright notice in png.h
|
* For conditions of distribution and use, see copyright notice in png.h
|
||||||
* Copyright (c) 1998-2001 Glenn Randers-Pehrson
|
* Copyright (c) 1998-2001 Glenn Randers-Pehrson
|
||||||
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
|
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
|
|
||||||
/* pngread.c - read a PNG file
|
/* pngread.c - read a PNG file
|
||||||
*
|
*
|
||||||
* libpng 1.2.0beta4 - June 23, 2001
|
* libpng 1.2.0beta5 - August 8, 2001
|
||||||
* For conditions of distribution and use, see copyright notice in png.h
|
* For conditions of distribution and use, see copyright notice in png.h
|
||||||
* Copyright (c) 1998-2001 Glenn Randers-Pehrson
|
* Copyright (c) 1998-2001 Glenn Randers-Pehrson
|
||||||
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
|
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
|
||||||
@ -769,7 +769,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
|
* not called png_set_interlace_handling(), the display_row buffer will
|
||||||
* be ignored, so pass NULL to it.
|
* be ignored, so pass NULL to it.
|
||||||
*
|
*
|
||||||
* [*] png_handle_alpha() does not exist yet, as of libpng version 1.2.0beta4
|
* [*] png_handle_alpha() does not exist yet, as of libpng version 1.2.0beta5
|
||||||
*/
|
*/
|
||||||
|
|
||||||
void PNGAPI
|
void PNGAPI
|
||||||
@ -818,7 +818,7 @@ png_read_rows(png_structp png_ptr, png_bytepp row,
|
|||||||
* only call this function once. If you desire to have an image for
|
* only call this function once. If you desire to have an image for
|
||||||
* each pass of a interlaced image, use png_read_rows() instead.
|
* each pass of a interlaced image, use png_read_rows() instead.
|
||||||
*
|
*
|
||||||
* [*] png_handle_alpha() does not exist yet, as of libpng version 1.2.0beta4
|
* [*] png_handle_alpha() does not exist yet, as of libpng version 1.2.0beta5
|
||||||
*/
|
*/
|
||||||
void PNGAPI
|
void PNGAPI
|
||||||
png_read_image(png_structp png_ptr, png_bytepp image)
|
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
|
/* pngrio.c - functions for data input
|
||||||
*
|
*
|
||||||
* libpng 1.2.0beta4 - June 23, 2001
|
* libpng 1.2.0beta5 - August 8, 2001
|
||||||
* For conditions of distribution and use, see copyright notice in png.h
|
* For conditions of distribution and use, see copyright notice in png.h
|
||||||
* Copyright (c) 1998-2001 Glenn Randers-Pehrson
|
* Copyright (c) 1998-2001 Glenn Randers-Pehrson
|
||||||
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
|
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
|
|
||||||
/* pngrtran.c - transforms the data in a row for PNG readers
|
/* pngrtran.c - transforms the data in a row for PNG readers
|
||||||
*
|
*
|
||||||
* libpng 1.2.0beta4 - June 23, 2001
|
* libpng 1.2.0beta5 - August 8, 2001
|
||||||
* For conditions of distribution and use, see copyright notice in png.h
|
* For conditions of distribution and use, see copyright notice in png.h
|
||||||
* Copyright (c) 1998-2001 Glenn Randers-Pehrson
|
* Copyright (c) 1998-2001 Glenn Randers-Pehrson
|
||||||
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
|
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
|
|
||||||
/* pngrutil.c - utilities to read a PNG file
|
/* pngrutil.c - utilities to read a PNG file
|
||||||
*
|
*
|
||||||
* libpng 1.2.0beta4 - June 23, 2001
|
* libpng 1.2.0beta5 - August 8, 2001
|
||||||
* For conditions of distribution and use, see copyright notice in png.h
|
* For conditions of distribution and use, see copyright notice in png.h
|
||||||
* Copyright (c) 1998-2001 Glenn Randers-Pehrson
|
* Copyright (c) 1998-2001 Glenn Randers-Pehrson
|
||||||
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
|
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
|
||||||
|
2
pngset.c
2
pngset.c
@ -1,7 +1,7 @@
|
|||||||
|
|
||||||
/* pngset.c - storage of image information into info struct
|
/* pngset.c - storage of image information into info struct
|
||||||
*
|
*
|
||||||
* libpng 1.2.0beta4 - June 23, 2001
|
* libpng 1.2.0beta5 - August 8, 2001
|
||||||
* For conditions of distribution and use, see copyright notice in png.h
|
* For conditions of distribution and use, see copyright notice in png.h
|
||||||
* Copyright (c) 1998-2001 Glenn Randers-Pehrson
|
* Copyright (c) 1998-2001 Glenn Randers-Pehrson
|
||||||
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
|
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
|
|
||||||
/* pngtest.c - a simple test program to test libpng
|
/* pngtest.c - a simple test program to test libpng
|
||||||
*
|
*
|
||||||
* libpng 1.2.0beta4 - June 23, 2001
|
* libpng 1.2.0beta5 - August 8, 2001
|
||||||
* For conditions of distribution and use, see copyright notice in png.h
|
* For conditions of distribution and use, see copyright notice in png.h
|
||||||
* Copyright (c) 1998-2001 Glenn Randers-Pehrson
|
* Copyright (c) 1998-2001 Glenn Randers-Pehrson
|
||||||
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
|
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
|
||||||
@ -487,7 +487,7 @@ png_debug_malloc(png_structp png_ptr, png_uint_32 size)
|
|||||||
buffer and once to get a new free list entry. */
|
buffer and once to get a new free list entry. */
|
||||||
{
|
{
|
||||||
memory_infop pinfo = (memory_infop)png_malloc_default(png_ptr,
|
memory_infop pinfo = (memory_infop)png_malloc_default(png_ptr,
|
||||||
sizeof *pinfo);
|
(png_uint_32)sizeof *pinfo);
|
||||||
pinfo->size = size;
|
pinfo->size = size;
|
||||||
current_allocation += size;
|
current_allocation += size;
|
||||||
total_allocation += size;
|
total_allocation += size;
|
||||||
@ -1279,7 +1279,7 @@ main(int argc, char *argv[])
|
|||||||
fprintf(STDERR," pngtest (%lu):%s", (unsigned long)PNG_LIBPNG_VER,
|
fprintf(STDERR," pngtest (%lu):%s", (unsigned long)PNG_LIBPNG_VER,
|
||||||
PNG_HEADER_VERSION_STRING);
|
PNG_HEADER_VERSION_STRING);
|
||||||
fprintf(STDERR," sizeof(png_struct)=%ld, sizeof(png_info)=%ld\n",
|
fprintf(STDERR," sizeof(png_struct)=%ld, sizeof(png_info)=%ld\n",
|
||||||
sizeof(png_struct), sizeof(png_info));
|
(long)sizeof(png_struct), (long)sizeof(png_info));
|
||||||
|
|
||||||
/* Do some consistency checking on the memory allocation settings, I'm
|
/* Do some consistency checking on the memory allocation settings, I'm
|
||||||
not sure this matters, but it is nice to know, the first of these
|
not sure this matters, but it is nice to know, the first of these
|
||||||
@ -1510,4 +1510,4 @@ main(int argc, char *argv[])
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* Generate a compiler error if there is an old png.h in the search path. */
|
/* Generate a compiler error if there is an old png.h in the search path. */
|
||||||
typedef version_1_2_0beta4 your_png_h_is_not_version_1_2_0beta4;
|
typedef version_1_2_0beta5 your_png_h_is_not_version_1_2_0beta5;
|
||||||
|
38
pngtrans.c
38
pngtrans.c
@ -1,7 +1,7 @@
|
|||||||
|
|
||||||
/* pngtrans.c - transforms the data in a row (used by both readers and writers)
|
/* pngtrans.c - transforms the data in a row (used by both readers and writers)
|
||||||
*
|
*
|
||||||
* libpng 1.2.0beta4 - June 23, 2001
|
* libpng 1.2.0beta5 - August 8, 2001
|
||||||
* For conditions of distribution and use, see copyright notice in png.h
|
* For conditions of distribution and use, see copyright notice in png.h
|
||||||
* Copyright (c) 1998-2001 Glenn Randers-Pehrson
|
* Copyright (c) 1998-2001 Glenn Randers-Pehrson
|
||||||
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
|
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
|
||||||
@ -153,11 +153,14 @@ void /* PRIVATE */
|
|||||||
png_do_invert(png_row_infop row_info, png_bytep row)
|
png_do_invert(png_row_infop row_info, png_bytep row)
|
||||||
{
|
{
|
||||||
png_debug(1, "in png_do_invert\n");
|
png_debug(1, "in png_do_invert\n");
|
||||||
if (row_info->bit_depth == 1 &&
|
/* This test removed from libpng version 1.0.13 and 1.2.0:
|
||||||
|
* if (row_info->bit_depth == 1 &&
|
||||||
|
*/
|
||||||
#if defined(PNG_USELESS_TESTS_SUPPORTED)
|
#if defined(PNG_USELESS_TESTS_SUPPORTED)
|
||||||
row != NULL && row_info != NULL &&
|
if (row == NULL || row_info == NULL)
|
||||||
|
return;
|
||||||
#endif
|
#endif
|
||||||
row_info->color_type == PNG_COLOR_TYPE_GRAY)
|
if (row_info->color_type == PNG_COLOR_TYPE_GRAY)
|
||||||
{
|
{
|
||||||
png_bytep rp = row;
|
png_bytep rp = row;
|
||||||
png_uint_32 i;
|
png_uint_32 i;
|
||||||
@ -169,6 +172,33 @@ png_do_invert(png_row_infop row_info, png_bytep row)
|
|||||||
rp++;
|
rp++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
else if (row_info->color_type == PNG_COLOR_TYPE_GRAY_ALPHA &&
|
||||||
|
row_info->bit_depth == 8)
|
||||||
|
{
|
||||||
|
png_bytep rp = row;
|
||||||
|
png_uint_32 i;
|
||||||
|
png_uint_32 istop = row_info->rowbytes;
|
||||||
|
|
||||||
|
for (i = 0; i < istop; i+=2)
|
||||||
|
{
|
||||||
|
*rp = (png_byte)(~(*rp));
|
||||||
|
rp+=2;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else if (row_info->color_type == PNG_COLOR_TYPE_GRAY_ALPHA &&
|
||||||
|
row_info->bit_depth == 16)
|
||||||
|
{
|
||||||
|
png_bytep rp = row;
|
||||||
|
png_uint_32 i;
|
||||||
|
png_uint_32 istop = row_info->rowbytes;
|
||||||
|
|
||||||
|
for (i = 0; i < istop; i+=4)
|
||||||
|
{
|
||||||
|
*rp = (png_byte)(~(*rp));
|
||||||
|
*(rp+1) = (png_byte)(~(*(rp+1)));
|
||||||
|
rp+=4;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
*
|
*
|
||||||
* For Intel x86 CPU and Microsoft Visual C++ compiler
|
* For Intel x86 CPU and Microsoft Visual C++ compiler
|
||||||
*
|
*
|
||||||
* libpng 1.2.0beta4 - June 23, 2001
|
* libpng 1.2.0beta5 - August 8, 2001
|
||||||
* For conditions of distribution and use, see copyright notice in png.h
|
* For conditions of distribution and use, see copyright notice in png.h
|
||||||
* Copyright (c) 1998-2001 Glenn Randers-Pehrson
|
* Copyright (c) 1998-2001 Glenn Randers-Pehrson
|
||||||
* Copyright (c) 1998, Intel Corporation
|
* Copyright (c) 1998, Intel Corporation
|
||||||
|
2
pngwio.c
2
pngwio.c
@ -1,7 +1,7 @@
|
|||||||
|
|
||||||
/* pngwio.c - functions for data output
|
/* pngwio.c - functions for data output
|
||||||
*
|
*
|
||||||
* libpng 1.2.0beta4 - June 23, 2001
|
* libpng 1.2.0beta5 - August 8, 2001
|
||||||
* For conditions of distribution and use, see copyright notice in png.h
|
* For conditions of distribution and use, see copyright notice in png.h
|
||||||
* Copyright (c) 1998-2001 Glenn Randers-Pehrson
|
* Copyright (c) 1998-2001 Glenn Randers-Pehrson
|
||||||
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
|
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
|
|
||||||
/* pngwrite.c - general routines to write a PNG file
|
/* pngwrite.c - general routines to write a PNG file
|
||||||
*
|
*
|
||||||
* libpng 1.2.0beta4 - June 23, 2001
|
* libpng 1.2.0beta5 - August 8, 2001
|
||||||
* For conditions of distribution and use, see copyright notice in png.h
|
* For conditions of distribution and use, see copyright notice in png.h
|
||||||
* Copyright (c) 1998-2001 Glenn Randers-Pehrson
|
* Copyright (c) 1998-2001 Glenn Randers-Pehrson
|
||||||
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
|
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
|
|
||||||
/* pngwtran.c - transforms the data in a row for PNG writers
|
/* pngwtran.c - transforms the data in a row for PNG writers
|
||||||
*
|
*
|
||||||
* libpng 1.2.0beta4 - June 23, 2001
|
* libpng 1.2.0beta5 - August 8, 2001
|
||||||
* For conditions of distribution and use, see copyright notice in png.h
|
* For conditions of distribution and use, see copyright notice in png.h
|
||||||
* Copyright (c) 1998-2001 Glenn Randers-Pehrson
|
* Copyright (c) 1998-2001 Glenn Randers-Pehrson
|
||||||
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
|
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
|
||||||
|
26
pngwutil.c
26
pngwutil.c
@ -1,7 +1,7 @@
|
|||||||
|
|
||||||
/* pngwutil.c - utilities to write a PNG file
|
/* pngwutil.c - utilities to write a PNG file
|
||||||
*
|
*
|
||||||
* libpng 1.2.0beta4 - June 23, 2001
|
* libpng 1.2.0beta5 - August 8, 2001
|
||||||
* For conditions of distribution and use, see copyright notice in png.h
|
* For conditions of distribution and use, see copyright notice in png.h
|
||||||
* Copyright (c) 1998-2001 Glenn Randers-Pehrson
|
* Copyright (c) 1998-2001 Glenn Randers-Pehrson
|
||||||
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
|
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
|
||||||
@ -996,6 +996,12 @@ png_write_tRNS(png_structp png_ptr, png_bytep trans, png_color_16p tran,
|
|||||||
else if (color_type == PNG_COLOR_TYPE_GRAY)
|
else if (color_type == PNG_COLOR_TYPE_GRAY)
|
||||||
{
|
{
|
||||||
/* one 16 bit value */
|
/* one 16 bit value */
|
||||||
|
if(tran->gray >= (1 << png_ptr->bit_depth))
|
||||||
|
{
|
||||||
|
png_warning(png_ptr,
|
||||||
|
"Ignoring attempt to write tRNS chunk out-of-range for bit_depth");
|
||||||
|
return;
|
||||||
|
}
|
||||||
png_save_uint_16(buf, tran->gray);
|
png_save_uint_16(buf, tran->gray);
|
||||||
png_write_chunk(png_ptr, (png_bytep)png_tRNS, buf, (png_size_t)2);
|
png_write_chunk(png_ptr, (png_bytep)png_tRNS, buf, (png_size_t)2);
|
||||||
}
|
}
|
||||||
@ -1005,6 +1011,12 @@ png_write_tRNS(png_structp png_ptr, png_bytep trans, png_color_16p tran,
|
|||||||
png_save_uint_16(buf, tran->red);
|
png_save_uint_16(buf, tran->red);
|
||||||
png_save_uint_16(buf + 2, tran->green);
|
png_save_uint_16(buf + 2, tran->green);
|
||||||
png_save_uint_16(buf + 4, tran->blue);
|
png_save_uint_16(buf + 4, tran->blue);
|
||||||
|
if(png_ptr->bit_depth == 8 && (buf[0] | buf[2] | buf[4]))
|
||||||
|
{
|
||||||
|
png_warning(png_ptr,
|
||||||
|
"Ignoring attempt to write 16-bit tRNS chunk when bit_depth is 8");
|
||||||
|
return;
|
||||||
|
}
|
||||||
png_write_chunk(png_ptr, (png_bytep)png_tRNS, buf, (png_size_t)6);
|
png_write_chunk(png_ptr, (png_bytep)png_tRNS, buf, (png_size_t)6);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@ -1045,10 +1057,22 @@ png_write_bKGD(png_structp png_ptr, png_color_16p back, int color_type)
|
|||||||
png_save_uint_16(buf, back->red);
|
png_save_uint_16(buf, back->red);
|
||||||
png_save_uint_16(buf + 2, back->green);
|
png_save_uint_16(buf + 2, back->green);
|
||||||
png_save_uint_16(buf + 4, back->blue);
|
png_save_uint_16(buf + 4, back->blue);
|
||||||
|
if(png_ptr->bit_depth == 8 && (buf[0] | buf[2] | buf[4]))
|
||||||
|
{
|
||||||
|
png_warning(png_ptr,
|
||||||
|
"Ignoring attempt to write 16-bit bKGD chunk when bit_depth is 8");
|
||||||
|
return;
|
||||||
|
}
|
||||||
png_write_chunk(png_ptr, (png_bytep)png_bKGD, buf, (png_size_t)6);
|
png_write_chunk(png_ptr, (png_bytep)png_bKGD, buf, (png_size_t)6);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
if(back->gray >= (1 << png_ptr->bit_depth))
|
||||||
|
{
|
||||||
|
png_warning(png_ptr,
|
||||||
|
"Ignoring attempt to write bKGD chunk out-of-range for bit_depth");
|
||||||
|
return;
|
||||||
|
}
|
||||||
png_save_uint_16(buf, back->gray);
|
png_save_uint_16(buf, back->gray);
|
||||||
png_write_chunk(png_ptr, (png_bytep)png_bKGD, buf, (png_size_t)2);
|
png_write_chunk(png_ptr, (png_bytep)png_bKGD, buf, (png_size_t)2);
|
||||||
}
|
}
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
Microsoft Developer Studio Build File, Format Version 6.00 for
|
Microsoft Developer Studio Build File, Format Version 6.00 for
|
||||||
libpng 1.2.0beta4 (June 23, 2001) and zlib
|
libpng 1.2.0beta5 (August 8, 2001) and zlib
|
||||||
|
|
||||||
Copyright (C) 2000 Simon-Pierre Cadieux
|
Copyright (C) 2000 Simon-Pierre Cadieux
|
||||||
For conditions of distribution and use, see copyright notice in png.h
|
For conditions of distribution and use, see copyright notice in png.h
|
||||||
|
@ -6,7 +6,7 @@ LIBRARY
|
|||||||
DESCRIPTION "PNG image compression library for Windows"
|
DESCRIPTION "PNG image compression library for Windows"
|
||||||
|
|
||||||
EXPORTS
|
EXPORTS
|
||||||
;Version 1.2.0beta4
|
;Version 1.2.0beta5
|
||||||
png_build_grayscale_palette @1
|
png_build_grayscale_palette @1
|
||||||
png_check_sig @2
|
png_check_sig @2
|
||||||
png_chunk_error @3
|
png_chunk_error @3
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
A set of project files is available for Netware. Get
|
A set of project files is available for Netware. Get
|
||||||
libpng-1.2.0beta4-project-netware.zip from a libpng distribution
|
libpng-1.2.0beta5-project-netware.zip from a libpng distribution
|
||||||
site such as http://libpng.sourceforge.net
|
site such as http://libpng.sourceforge.net
|
||||||
|
|
||||||
Put the zip file in this directory (projects) and then run
|
Put the zip file in this directory (projects) and then run
|
||||||
"unzip -a libpng-1.2.0beta4-project-netware.zip"
|
"unzip -a libpng-1.2.0beta5-project-netware.zip"
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
A set of project files is available for WinCE. Get
|
A set of project files is available for WinCE. Get
|
||||||
libpng-1.2.0beta4-project-wince.zip from a libpng distribution
|
libpng-1.2.0beta5-project-wince.zip from a libpng distribution
|
||||||
site such as http://libpng.sourceforge.net
|
site such as http://libpng.sourceforge.net
|
||||||
|
|
||||||
Put the zip file in this directory (projects) and then run
|
Put the zip file in this directory (projects) and then run
|
||||||
"unzip -a libpng-1.2.0beta4-project-wince.zip"
|
"unzip -a libpng-1.2.0beta5-project-wince.zip"
|
||||||
|
@ -18,7 +18,7 @@ RM = rm -f
|
|||||||
# read libpng.txt or png.h to see why PNGMAJ is 3. You should not
|
# read libpng.txt or png.h to see why PNGMAJ is 3. You should not
|
||||||
# have to change it.
|
# have to change it.
|
||||||
PNGMAJ = 3
|
PNGMAJ = 3
|
||||||
PNGMIN = 1.2.0beta4
|
PNGMIN = 1.2.0beta5
|
||||||
PNGVER = $(PNGMAJ).$(PNGMIN)
|
PNGVER = $(PNGMAJ).$(PNGMIN)
|
||||||
|
|
||||||
prefix=/usr/local
|
prefix=/usr/local
|
||||||
|
@ -13,7 +13,7 @@ ZLIBINC=/usr/local/include
|
|||||||
# read libpng.txt or png.h to see why PNGMAJ is 3. You should not
|
# read libpng.txt or png.h to see why PNGMAJ is 3. You should not
|
||||||
# have to change it.
|
# have to change it.
|
||||||
PNGMAJ = 3
|
PNGMAJ = 3
|
||||||
PNGMIN = 1.2.0beta4
|
PNGMIN = 1.2.0beta5
|
||||||
PNGVER = $(PNGMAJ).$(PNGMIN)
|
PNGVER = $(PNGMAJ).$(PNGMIN)
|
||||||
|
|
||||||
ALIGN=
|
ALIGN=
|
||||||
|
@ -39,7 +39,7 @@ CFLAGS=-I$(ZLIBINC) -Wall -O3 $(ALIGN) -funroll-loops \
|
|||||||
# have to change it.
|
# have to change it.
|
||||||
PNGMAJ = 3
|
PNGMAJ = 3
|
||||||
#PNGDLL = $3
|
#PNGDLL = $3
|
||||||
PNGMIN = 1.2.0beta4
|
PNGMIN = 1.2.0beta5
|
||||||
PNGMIN_BASE = 1.2.0
|
PNGMIN_BASE = 1.2.0
|
||||||
PNGVER = $(PNGMAJ).$(PNGMIN)
|
PNGVER = $(PNGMAJ).$(PNGMIN)
|
||||||
|
|
||||||
|
@ -17,7 +17,7 @@ ZLIBINC=../zlib
|
|||||||
# read libpng.txt or png.h to see why PNGMAJ is 3. You should not
|
# read libpng.txt or png.h to see why PNGMAJ is 3. You should not
|
||||||
# have to change it.
|
# have to change it.
|
||||||
PNGMAJ = 3
|
PNGMAJ = 3
|
||||||
PNGMIN = 1.2.0beta4
|
PNGMIN = 1.2.0beta5
|
||||||
PNGVER = $(PNGMAJ).$(PNGMIN)
|
PNGVER = $(PNGMAJ).$(PNGMIN)
|
||||||
|
|
||||||
CC=cc
|
CC=cc
|
||||||
|
@ -5,6 +5,8 @@
|
|||||||
|
|
||||||
# CAUTION: Do not use this makefile with gcc versions 2.7.2.2 and earlier.
|
# CAUTION: Do not use this makefile with gcc versions 2.7.2.2 and earlier.
|
||||||
|
|
||||||
|
# WARNING: The assembler code in pnggccrd.c may not be thread safe.
|
||||||
|
|
||||||
# NOTE: When testing MMX performance on a multitasking system, make sure
|
# NOTE: When testing MMX performance on a multitasking system, make sure
|
||||||
# there are no floating-point programs (e.g., SETI@Home) running in
|
# there are no floating-point programs (e.g., SETI@Home) running in
|
||||||
# the background! Context switches between MMX and FPU are expensive.
|
# the background! Context switches between MMX and FPU are expensive.
|
||||||
@ -30,15 +32,17 @@ WARNMORE=-Wwrite-strings -Wpointer-arith -Wshadow \
|
|||||||
|
|
||||||
# for pgcc version 2.95.1, -O3 is buggy; don't use it.
|
# for pgcc version 2.95.1, -O3 is buggy; don't use it.
|
||||||
|
|
||||||
|
# Remove -DPNG_THREAD_UNSAFE_OK if you need thread safety
|
||||||
### for generic gcc:
|
### for generic gcc:
|
||||||
CFLAGS=-DPNG_USE_PNGGCCRD -I$(ZLIBINC) -Wall -O3 $(ALIGN) -funroll-loops \
|
CFLAGS=-DPNG_THREAD_UNSAFE_OK -DPNG_USE_PNGGCCRD -I$(ZLIBINC) -Wall \
|
||||||
|
-O3 $(ALIGN) -funroll-loops \
|
||||||
-fomit-frame-pointer # $(WARNMORE) -g -DPNG_DEBUG=5
|
-fomit-frame-pointer # $(WARNMORE) -g -DPNG_DEBUG=5
|
||||||
### for gcc 2.95.2 on 686:
|
### for gcc 2.95.2 on 686:
|
||||||
#CFLAGS=-DPNG_USE_PNGGCCRD -I$(ZLIBINC) -Wall -O3 \
|
#CFLAGS=-DPNG_THREAD_UNSAFE_OK -DPNG_USE_PNGGCCRD -I$(ZLIBINC) -Wall -O3 \
|
||||||
# -mcpu=i686 -malign-double -ffast-math -fstrict-aliasing \
|
# -mcpu=i686 -malign-double -ffast-math -fstrict-aliasing \
|
||||||
# $(ALIGN) -funroll-loops -funroll-all-loops -fomit-frame-pointer
|
# $(ALIGN) -funroll-loops -funroll-all-loops -fomit-frame-pointer
|
||||||
### for gcc 2.7.2.3 on 486 and up:
|
### for gcc 2.7.2.3 on 486 and up:
|
||||||
#CFLAGS=-DPNG_USE_PNGGCCRD -I$(ZLIBINC) -Wall -O3 \
|
#CFLAGS=-DPNG_THREAD_UNSAFE_OK -DPNG_USE_PNGGCCRD -I$(ZLIBINC) -Wall -O3 \
|
||||||
# -m486 -malign-double -ffast-math \
|
# -m486 -malign-double -ffast-math \
|
||||||
# $(ALIGN) -funroll-loops -funroll-all-loops -fomit-frame-pointer
|
# $(ALIGN) -funroll-loops -funroll-all-loops -fomit-frame-pointer
|
||||||
|
|
||||||
@ -51,7 +55,7 @@ RANLIB=ranlib
|
|||||||
# read libpng.txt or png.h to see why PNGMAJ is 3. You should not
|
# read libpng.txt or png.h to see why PNGMAJ is 3. You should not
|
||||||
# have to change it.
|
# have to change it.
|
||||||
PNGMAJ = 3
|
PNGMAJ = 3
|
||||||
PNGMIN = 1.2.0beta4
|
PNGMIN = 1.2.0beta5
|
||||||
PNGVER = $(PNGMAJ).$(PNGMIN)
|
PNGVER = $(PNGMAJ).$(PNGMIN)
|
||||||
|
|
||||||
INCPATH=$(prefix)/include
|
INCPATH=$(prefix)/include
|
||||||
@ -71,20 +75,10 @@ OBJSDLL = $(OBJS:.o=.pic.o)
|
|||||||
all: libpng.a libpng.so pngtest pngtest-static
|
all: libpng.a libpng.so pngtest pngtest-static
|
||||||
|
|
||||||
pnggccrd.o: pnggccrd.c png.h pngconf.h
|
pnggccrd.o: pnggccrd.c png.h pngconf.h
|
||||||
@echo ""
|
|
||||||
@echo ' You can ignore the single "control reaches end of non-void function"'
|
|
||||||
@echo ' warning and multiple "<variable> defined but not used" warnings:'
|
|
||||||
@echo ""
|
|
||||||
$(CC) -c $(CFLAGS) -o $@ $*.c
|
$(CC) -c $(CFLAGS) -o $@ $*.c
|
||||||
@echo ""
|
|
||||||
|
|
||||||
pnggccrd.pic.o: pnggccrd.c png.h pngconf.h
|
pnggccrd.pic.o: pnggccrd.c png.h pngconf.h
|
||||||
@echo ""
|
|
||||||
@echo ' You can ignore the single "control reaches end of non-void function"'
|
|
||||||
@echo ' warning and multiple "<variable> defined but not used" warnings:'
|
|
||||||
@echo ""
|
|
||||||
$(CC) -c $(CFLAGS) -fPIC -o $@ pnggccrd.c
|
$(CC) -c $(CFLAGS) -fPIC -o $@ pnggccrd.c
|
||||||
@echo ""
|
|
||||||
|
|
||||||
libpng.a: $(OBJS)
|
libpng.a: $(OBJS)
|
||||||
ar rc $@ $(OBJS)
|
ar rc $@ $(OBJS)
|
||||||
|
@ -34,7 +34,7 @@ RANLIB=ranlib
|
|||||||
# read libpng.txt or png.h to see why PNGMAJ is 3. You should not
|
# read libpng.txt or png.h to see why PNGMAJ is 3. You should not
|
||||||
# have to change it.
|
# have to change it.
|
||||||
PNGMAJ = 3
|
PNGMAJ = 3
|
||||||
PNGMIN = 1.2.0beta4
|
PNGMIN = 1.2.0beta5
|
||||||
PNGVER = $(PNGMAJ).$(PNGMIN)
|
PNGVER = $(PNGMAJ).$(PNGMIN)
|
||||||
|
|
||||||
INCPATH=$(prefix)/include
|
INCPATH=$(prefix)/include
|
||||||
|
@ -19,7 +19,7 @@ RANLIB=ranlib
|
|||||||
# read libpng.txt or png.h to see why PNGMAJ is 3. You should not
|
# read libpng.txt or png.h to see why PNGMAJ is 3. You should not
|
||||||
# have to change it.
|
# have to change it.
|
||||||
PNGMAJ = 3
|
PNGMAJ = 3
|
||||||
PNGMIN = 1.2.0beta4
|
PNGMIN = 1.2.0beta5
|
||||||
PNGVER = $(PNGMAJ).$(PNGMIN)
|
PNGVER = $(PNGMAJ).$(PNGMIN)
|
||||||
|
|
||||||
# where make install puts libpng.a and png.h
|
# where make install puts libpng.a and png.h
|
||||||
|
@ -34,7 +34,7 @@ RANLIB=ranlib
|
|||||||
# read libpng.txt or png.h to see why PNGMAJ is 3. You should not
|
# read libpng.txt or png.h to see why PNGMAJ is 3. You should not
|
||||||
# have to change it.
|
# have to change it.
|
||||||
PNGMAJ = 3
|
PNGMAJ = 3
|
||||||
PNGMIN = 1.2.0beta4
|
PNGMIN = 1.2.0beta5
|
||||||
PNGVER = $(PNGMAJ).$(PNGMIN)
|
PNGVER = $(PNGMAJ).$(PNGMIN)
|
||||||
|
|
||||||
INCPATH=$(prefix)/include
|
INCPATH=$(prefix)/include
|
||||||
|
@ -11,7 +11,7 @@ INCSDIR=${LOCALBASE}/include
|
|||||||
|
|
||||||
LIB=png
|
LIB=png
|
||||||
SHLIB_MAJOR= 3
|
SHLIB_MAJOR= 3
|
||||||
SHLIB_MINOR= 1.2.0beta4
|
SHLIB_MINOR= 1.2.0beta5
|
||||||
SRCS= pnggccrd.c png.c pngset.c pngget.c pngrutil.c pngtrans.c pngwutil.c \
|
SRCS= pnggccrd.c png.c pngset.c pngget.c pngrutil.c pngtrans.c pngwutil.c \
|
||||||
pngread.c pngrio.c pngwio.c pngwrite.c pngrtran.c \
|
pngread.c pngrio.c pngwio.c pngwrite.c pngrtran.c \
|
||||||
pngwtran.c pngmem.c pngerror.c pngpread.c
|
pngwtran.c pngmem.c pngerror.c pngpread.c
|
||||||
|
@ -25,7 +25,7 @@ RANLIB=echo
|
|||||||
# read libpng.txt or png.h to see why PNGMAJ is 3. You should not
|
# read libpng.txt or png.h to see why PNGMAJ is 3. You should not
|
||||||
# have to change it.
|
# have to change it.
|
||||||
PNGMAJ = 3
|
PNGMAJ = 3
|
||||||
PNGMIN = 1.2.0beta4
|
PNGMIN = 1.2.0beta5
|
||||||
PNGVER = $(PNGMAJ).$(PNGMIN)
|
PNGVER = $(PNGMAJ).$(PNGMIN)
|
||||||
|
|
||||||
INCPATH=$(prefix)/include
|
INCPATH=$(prefix)/include
|
||||||
|
@ -22,7 +22,7 @@ CFLAGS=$(ABI) -I$(ZLIBINC) -O2 $(WARNMORE) -fPIC -mabi=n32
|
|||||||
LDFLAGS=$(ABI) -L. -L$(ZLIBLIB) -lpng -lz -lm
|
LDFLAGS=$(ABI) -L. -L$(ZLIBLIB) -lpng -lz -lm
|
||||||
LDSHARED=CC $(ABI) -shared
|
LDSHARED=CC $(ABI) -shared
|
||||||
|
|
||||||
VER=1.2.0beta4
|
VER=1.2.0beta5
|
||||||
# See "man dso" for info about shared objects
|
# See "man dso" for info about shared objects
|
||||||
SONUM=3
|
SONUM=3
|
||||||
LIBS=libpng.so.$(SONUM).$(VER)
|
LIBS=libpng.so.$(SONUM).$(VER)
|
||||||
@ -63,6 +63,8 @@ install: libpng.a
|
|||||||
chmod 644 $(prefix)/include/pngconf.h
|
chmod 644 $(prefix)/include/pngconf.h
|
||||||
cp libpng.a $(prefix)/lib
|
cp libpng.a $(prefix)/lib
|
||||||
chmod 644 $(prefix)/lib/libpng.a
|
chmod 644 $(prefix)/lib/libpng.a
|
||||||
|
|
||||||
|
install-shared: $(SHAREDLIB).$(VER)
|
||||||
cp $(SHAREDLIB).$(VER) $(libdir); chmod 755 $(SHAREDLIB).$(VER)
|
cp $(SHAREDLIB).$(VER) $(libdir); chmod 755 $(SHAREDLIB).$(VER)
|
||||||
(cd $(libdir); if test -f $(SHAREDLIB).$(VER); then \
|
(cd $(libdir); if test -f $(SHAREDLIB).$(VER); then \
|
||||||
rm -f $(SHAREDLIB) $(SHAREDLIB).$(SONUM); \
|
rm -f $(SHAREDLIB) $(SHAREDLIB).$(SONUM); \
|
||||||
|
@ -27,7 +27,7 @@ CFLAGS=$(ABI) -I$(ZLIBINC) -O $(WARNMORE) -DPNG_USE_PNGGCCRD -DPNG_NO_ASSEMBLER_
|
|||||||
LDFLAGS=$(ABI) -L. -L$(ZLIBLIB) -lpng -lz -lm
|
LDFLAGS=$(ABI) -L. -L$(ZLIBLIB) -lpng -lz -lm
|
||||||
LDSHARED=cc $(ABI) -shared
|
LDSHARED=cc $(ABI) -shared
|
||||||
|
|
||||||
VER=1.2.0beta4
|
VER=1.2.0beta5
|
||||||
# See "man dso" for info about shared objects
|
# See "man dso" for info about shared objects
|
||||||
SONUM=3
|
SONUM=3
|
||||||
SHAREDLIB=libpng.so
|
SHAREDLIB=libpng.so
|
||||||
@ -74,9 +74,9 @@ install: libpng.a
|
|||||||
install-shared: $(SHAREDLIB).$(SONUM).$(VER)
|
install-shared: $(SHAREDLIB).$(SONUM).$(VER)
|
||||||
cp $(SHAREDLIB).$(SONUM).$(VER) $(libdir)
|
cp $(SHAREDLIB).$(SONUM).$(VER) $(libdir)
|
||||||
chmod 755 $(SHAREDLIB).$(SONUM).$(VER)
|
chmod 755 $(SHAREDLIB).$(SONUM).$(VER)
|
||||||
(cd $(libdir)
|
(cd $(libdir); if test -f $(SHAREDLIB).$(SONUM).$(VER); then \
|
||||||
rm -f $(SHAREDLIB) $(SHAREDLIB).$(SONUM)
|
rm -f $(SHAREDLIB) $(SHAREDLIB).$(SONUM); \
|
||||||
ln -s $(SHAREDLIB).$(SONUM).$(VER) $(SHAREDLIB).$(SONUM)
|
ln -s $(SHAREDLIB).$(SONUM).$(VER) $(SHAREDLIB).$(SONUM); \
|
||||||
ln -s $(SHAREDLIB).$(SONUM) $(SHAREDLIB))
|
ln -s $(SHAREDLIB).$(SONUM) $(SHAREDLIB))
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
|
@ -31,7 +31,7 @@ RANLIB=echo
|
|||||||
# read libpng.txt or png.h to see why PNGMAJ is 3. You should not
|
# read libpng.txt or png.h to see why PNGMAJ is 3. You should not
|
||||||
# have to change it.
|
# have to change it.
|
||||||
PNGMAJ = 3
|
PNGMAJ = 3
|
||||||
PNGMIN = 1.2.0beta4
|
PNGMIN = 1.2.0beta5
|
||||||
PNGVER = $(PNGMAJ).$(PNGMIN)
|
PNGVER = $(PNGMAJ).$(PNGMIN)
|
||||||
|
|
||||||
INCPATH=$(prefix)/include
|
INCPATH=$(prefix)/include
|
||||||
|
@ -7,7 +7,7 @@ unit pngdef;
|
|||||||
interface
|
interface
|
||||||
|
|
||||||
const
|
const
|
||||||
PNG_LIBPNG_VER_STRING = '1.2.0beta4';
|
PNG_LIBPNG_VER_STRING = '1.2.0beta5';
|
||||||
PNG_LIBPNG_VER = 10200;
|
PNG_LIBPNG_VER = 10200;
|
||||||
|
|
||||||
type
|
type
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
; PNG.LIB module definition file for OS/2
|
; PNG.LIB module definition file for OS/2
|
||||||
;----------------------------------------
|
;----------------------------------------
|
||||||
|
|
||||||
; Version 1.2.0beta4
|
; Version 1.2.0beta5
|
||||||
|
|
||||||
LIBRARY PNG
|
LIBRARY PNG
|
||||||
DESCRIPTION "PNG image compression library for OS/2"
|
DESCRIPTION "PNG image compression library for OS/2"
|
||||||
|
Reference in New Issue
Block a user