Imported from libpng-1.0.1.tar
This commit is contained in:
parent
d12aa50322
commit
f9f2fe0ce7
5
CHANGES
5
CHANGES
@ -281,3 +281,8 @@ version 1.0.0a [March 9, 1998]
|
|||||||
version 1.0.0b [March 13, 1998]
|
version 1.0.0b [March 13, 1998]
|
||||||
Quieted compiler complaints about two empty "for" loops in pngrutil.c
|
Quieted compiler complaints about two empty "for" loops in pngrutil.c
|
||||||
Minor changes to makefile.s2x
|
Minor changes to makefile.s2x
|
||||||
|
Removed #ifdef/#endif around a png_free() in pngread.c
|
||||||
|
version 1.0.1 [March 14, 1998]
|
||||||
|
Changes makefile.s2x to reduce security risk of using a relative pathname
|
||||||
|
Fixed some typos in the documentation (Greg).
|
||||||
|
Fixed a problem with value of "channels" returned by png_read_update_info()
|
||||||
|
4
INSTALL
4
INSTALL
@ -1,5 +1,5 @@
|
|||||||
|
|
||||||
Installing libpng version 1.0.0b March 13, 1998
|
Installing libpng version 1.0.1 March 15, 1998
|
||||||
|
|
||||||
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.0.0b or "lpng100" and "zlib-1.1.1"
|
might be called "libpng-1.0.1 or "lpng100" and "zlib-1.1.1"
|
||||||
or "zlib111") so that you have directories called "zlib" and "libpng".
|
or "zlib111") so that you have directories called "zlib" and "libpng".
|
||||||
|
|
||||||
Your directory structure should look like this:
|
Your directory structure should look like this:
|
||||||
|
2
README
2
README
@ -1,4 +1,4 @@
|
|||||||
README for libpng 1.0.0b (shared library 2.1)
|
README for libpng 1.0.1 (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.
|
||||||
|
1
TODO
1
TODO
@ -2,6 +2,7 @@ TODO - list of things to do for libpng
|
|||||||
|
|
||||||
fix problem with C++ and EXTERN "C"
|
fix problem with C++ and EXTERN "C"
|
||||||
add "grayscale->palette" transformation and "palette->grayscale" detection
|
add "grayscale->palette" transformation and "palette->grayscale" detection
|
||||||
|
add "grayscale" -> "grayscale+alpha" and "grayscale+FILLER" transformations
|
||||||
improved dithering
|
improved dithering
|
||||||
multi-lingual error and warning message support
|
multi-lingual error and warning message support
|
||||||
sPLT chunk handling
|
sPLT chunk handling
|
||||||
|
@ -1 +0,0 @@
|
|||||||
libpng-1.0.0b
|
|
14
libpng.3
14
libpng.3
@ -1,4 +1,4 @@
|
|||||||
.TH LIBPNG 3 "March 13, 1998"
|
.TH LIBPNG 3 "March 15, 1998"
|
||||||
.SH NAME
|
.SH NAME
|
||||||
libpng \- Portable Network Graphics (PNG) Reference Library
|
libpng \- Portable Network Graphics (PNG) Reference Library
|
||||||
.SH SYNOPSIS
|
.SH SYNOPSIS
|
||||||
@ -396,7 +396,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.0.0b March 13, 1998
|
libpng version 1.0.1 March 15, 1998
|
||||||
Updated and distributed by Glenn Randers-Pehrson
|
Updated and distributed by Glenn Randers-Pehrson
|
||||||
<randeg@alumni.rpi.edu>
|
<randeg@alumni.rpi.edu>
|
||||||
Copyright (c) 1998, Glenn Randers-Pehrson
|
Copyright (c) 1998, Glenn Randers-Pehrson
|
||||||
@ -2298,13 +2298,13 @@ the first widely used release:
|
|||||||
0.90 0.90 90 0.90 [should be 2.0.90]
|
0.90 0.90 90 0.90 [should be 2.0.90]
|
||||||
0.95 0.95 95 0.95 [should be 2.0.95]
|
0.95 0.95 95 0.95 [should be 2.0.95]
|
||||||
0.96 0.96 96 0.96 [should be 2.0.96]
|
0.96 0.96 96 0.96 [should be 2.0.96]
|
||||||
0.97b 7") 1.00.97 97 1.0.1 [should be 2.0.97]
|
0.97b 1.00.97 97 1.0.1 [should be 2.0.97]
|
||||||
0.97c 0.97 97 2.0.97
|
0.97c 0.97 97 2.0.97
|
||||||
0.98 0.98 98 2.0.98
|
0.98 0.98 98 2.0.98
|
||||||
0.99 0.99 98 2.0.99
|
0.99 0.99 98 2.0.99
|
||||||
0.99a-m 0.99 99 2.0.99
|
0.99a-m 0.99 99 2.0.99
|
||||||
1.00 1.00 100 2.1.0 [should be 10000]
|
1.00 1.00 100 2.1.0 [int should be 10000]
|
||||||
1.0.0 1.0.0 100 2.1.0 [should be 10000]
|
1.0.0 1.0.0 100 2.1.0 [int should be 10000]
|
||||||
1.0.1 1.0.1 10001 2.1.0
|
1.0.1 1.0.1 10001 2.1.0
|
||||||
|
|
||||||
Henceforth the source version will match the shared-library
|
Henceforth the source version will match the shared-library
|
||||||
@ -2312,7 +2312,7 @@ minor and patch numbers; the shared-library major version number will be
|
|||||||
used for changes in backward compatibility, as it is intended.
|
used for changes in backward compatibility, as it is intended.
|
||||||
The PNG_PNGLIB_VER macro, which is not used within libpng but
|
The PNG_PNGLIB_VER macro, which is not used within libpng but
|
||||||
is available for applications, is an unsigned integer of the form
|
is available for applications, is an unsigned integer of the form
|
||||||
xyyzz corresponding to the source version x.y.z (leading zeros in y and z)
|
xyyzz corresponding to the source version x.y.z (leading zeros in y and z).
|
||||||
|
|
||||||
.SH "SEE ALSO"
|
.SH "SEE ALSO"
|
||||||
libpngpf(3), png(5)
|
libpngpf(3), png(5)
|
||||||
@ -2366,7 +2366,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.0.0b March 13, 1998:
|
Libpng version 1.0.1 March 15, 1998:
|
||||||
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@alumni.rpi.edu).
|
Currently maintained by Glenn Randers-Pehrson (randeg@alumni.rpi.edu).
|
||||||
|
|
||||||
|
@ -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.0.0b March 13, 1998
|
libpng version 1.0.1 March 15, 1998
|
||||||
Updated and distributed by Glenn Randers-Pehrson
|
Updated and distributed by Glenn Randers-Pehrson
|
||||||
<randeg@alumni.rpi.edu>
|
<randeg@alumni.rpi.edu>
|
||||||
Copyright (c) 1998, Glenn Randers-Pehrson
|
Copyright (c) 1998, Glenn Randers-Pehrson
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
.TH LIBPNGPF 3 "March 13, 1998"
|
.TH LIBPNGPF 3 "March 15, 1998"
|
||||||
.SH NAME
|
.SH NAME
|
||||||
libpng \- Portable Network Graphics (PNG) Reference Library
|
libpng \- Portable Network Graphics (PNG) Reference Library
|
||||||
(private functions)
|
(private functions)
|
||||||
|
2
png.5
2
png.5
@ -1,4 +1,4 @@
|
|||||||
.TH PNG 5 "March 13, 1998"
|
.TH PNG 5 "March 15, 1998"
|
||||||
.SH NAME
|
.SH NAME
|
||||||
png \- Portable Network Graphics (PNG) format
|
png \- Portable Network Graphics (PNG) format
|
||||||
.SH DESCRIPTION
|
.SH DESCRIPTION
|
||||||
|
6
png.c
6
png.c
@ -1,12 +1,12 @@
|
|||||||
|
|
||||||
/* png.c - location for general purpose libpng functions
|
/* png.c - location for general purpose libpng functions
|
||||||
*
|
*
|
||||||
* libpng 1.0.0b
|
* libpng 1.0.1
|
||||||
* 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) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.
|
* Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.
|
||||||
* Copyright (c) 1996, 1997 Andreas Dilger
|
* Copyright (c) 1996, 1997 Andreas Dilger
|
||||||
* Copyright (c) 1998, Glenn Randers-Pehrson
|
* Copyright (c) 1998, Glenn Randers-Pehrson
|
||||||
* March 13, 1998
|
* March 15, 1998
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#define PNG_INTERNAL
|
#define PNG_INTERNAL
|
||||||
@ -16,7 +16,7 @@
|
|||||||
/* 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.
|
||||||
*/
|
*/
|
||||||
char png_libpng_ver[12] = "1.0.0b";
|
char png_libpng_ver[12] = "1.0.1";
|
||||||
|
|
||||||
/* Place to hold the signature string for a PNG file. */
|
/* Place to hold the signature string for a PNG file. */
|
||||||
png_byte FARDATA png_sig[8] = {137, 80, 78, 71, 13, 10, 26, 10};
|
png_byte FARDATA png_sig[8] = {137, 80, 78, 71, 13, 10, 26, 10};
|
||||||
|
14
png.h
14
png.h
@ -1,12 +1,12 @@
|
|||||||
|
|
||||||
/* png.h - header file for PNG reference library
|
/* png.h - header file for PNG reference library
|
||||||
*
|
*
|
||||||
* libpng 1.0.0b
|
* libpng 1.0.1
|
||||||
* For conditions of distribution and use, see the COPYRIGHT NOTICE below.
|
* For conditions of distribution and use, see the COPYRIGHT NOTICE below.
|
||||||
* Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.
|
* Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.
|
||||||
* Copyright (c) 1996, 1997 Andreas Dilger
|
* Copyright (c) 1996, 1997 Andreas Dilger
|
||||||
* Copyright (c) 1998 Glenn Randers-Pehrson
|
* Copyright (c) 1998 Glenn Randers-Pehrson
|
||||||
* March 13, 1998
|
* March 15, 1998
|
||||||
*
|
*
|
||||||
* Note about libpng version numbers:
|
* Note about libpng version numbers:
|
||||||
*
|
*
|
||||||
@ -37,7 +37,7 @@
|
|||||||
* used for changes in backward compatibility, as it is intended.
|
* used for changes in backward compatibility, as it is intended.
|
||||||
* The PNG_PNGLIB_VER macro, which is not used within libpng but
|
* The PNG_PNGLIB_VER macro, which is not used within libpng but
|
||||||
* is available for applications, is an unsigned integer of the form
|
* is available for applications, is an unsigned integer of the form
|
||||||
* xyyzz corresponding to the source version x.y.z (leading zeros in y and z)
|
* xyyzz corresponding to the source version x.y.z (leading zeros in y and z).
|
||||||
*
|
*
|
||||||
*
|
*
|
||||||
* See libpng.txt for more information. The PNG specification is available
|
* See libpng.txt for more information. The PNG specification is available
|
||||||
@ -118,13 +118,13 @@ extern "C" {
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
/* 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.0.0b"
|
#define PNG_LIBPNG_VER_STRING "1.0.1"
|
||||||
|
|
||||||
/* Gareful here. At one time, Guy wanted to use 082, but that would be octal.
|
/* Careful here. At one time, Guy wanted to use 082, but that would be octal.
|
||||||
* We must not include leading zeroes.
|
* We must not include leading zeros.
|
||||||
* Versions 0.7 through 1.0.0 were in the range 0 to 100 here (only
|
* 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.0 was mis-numbered 100 instead of 10000). From
|
||||||
* version 1.0.1 it's xxyyzz, where x=major, y=minor, z-bugfix*/
|
* version 1.0.1 it's xxyyzz, where x=major, y=minor, z=bugfix */
|
||||||
#define PNG_LIBPNG_VER 10001 /* 1.0.1 */
|
#define PNG_LIBPNG_VER 10001 /* 1.0.1 */
|
||||||
|
|
||||||
/* variables declared in png.c - only it needs to define PNG_NO_EXTERN */
|
/* variables declared in png.c - only it needs to define PNG_NO_EXTERN */
|
||||||
|
@ -1,12 +1,12 @@
|
|||||||
|
|
||||||
/* pngconf.h - machine configurable file for libpng
|
/* pngconf.h - machine configurable file for libpng
|
||||||
*
|
*
|
||||||
* libpng 1.0.0b
|
* libpng 1.0.1
|
||||||
* 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) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.
|
* Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.
|
||||||
* Copyright (c) 1996, 1997 Andreas Dilger
|
* Copyright (c) 1996, 1997 Andreas Dilger
|
||||||
* Copyright (c) 1998, Glenn Randers-Pehrson
|
* Copyright (c) 1998, Glenn Randers-Pehrson
|
||||||
* March 13, 1998
|
* March 15, 1998
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/* Any machine specific code is near the front of this file, so if you
|
/* Any machine specific code is near the front of this file, so if you
|
||||||
|
@ -1,12 +1,12 @@
|
|||||||
|
|
||||||
/* pngerror.c - stub functions for i/o and memory allocation
|
/* pngerror.c - stub functions for i/o and memory allocation
|
||||||
*
|
*
|
||||||
* libpng 1.0.0b
|
* libpng 1.0.1
|
||||||
* 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) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.
|
* Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.
|
||||||
* Copyright (c) 1996, 1997 Andreas Dilger
|
* Copyright (c) 1996, 1997 Andreas Dilger
|
||||||
* Copyright (c) 1998, Glenn Randers-Pehrson
|
* Copyright (c) 1998, Glenn Randers-Pehrson
|
||||||
* March 13, 1998
|
* March 15, 1998
|
||||||
*
|
*
|
||||||
* This file provides a location for all error handling. Users which
|
* This file provides a location for all error handling. Users which
|
||||||
* need special error handling are expected to write replacement functions
|
* need special error handling are expected to write replacement functions
|
||||||
|
4
pngget.c
4
pngget.c
@ -1,12 +1,12 @@
|
|||||||
|
|
||||||
/* pngget.c - retrieval of values from info struct
|
/* pngget.c - retrieval of values from info struct
|
||||||
*
|
*
|
||||||
* libpng 1.0.0b
|
* libpng 1.0.1
|
||||||
* 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) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.
|
* Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.
|
||||||
* Copyright (c) 1996, 1997 Andreas Dilger
|
* Copyright (c) 1996, 1997 Andreas Dilger
|
||||||
* Copyright (c) 1998, Glenn Randers-Pehrson
|
* Copyright (c) 1998, Glenn Randers-Pehrson
|
||||||
* March 13, 1998
|
* March 15, 1998
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#define PNG_INTERNAL
|
#define PNG_INTERNAL
|
||||||
|
4
pngmem.c
4
pngmem.c
@ -1,12 +1,12 @@
|
|||||||
|
|
||||||
/* pngmem.c - stub functions for memory allocation
|
/* pngmem.c - stub functions for memory allocation
|
||||||
*
|
*
|
||||||
* libpng 1.0.0b
|
* libpng 1.0.1
|
||||||
* 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) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.
|
* Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.
|
||||||
* Copyright (c) 1996, 1997 Andreas Dilger
|
* Copyright (c) 1996, 1997 Andreas Dilger
|
||||||
* Copyright (c) 1998, Glenn Randers-Pehrson
|
* Copyright (c) 1998, Glenn Randers-Pehrson
|
||||||
* March 13, 1998
|
* March 15, 1998
|
||||||
*
|
*
|
||||||
* This file provides a location for all memory allocation. Users which
|
* This file provides a location for all memory allocation. Users which
|
||||||
* need special memory handling are expected to modify the code in this file
|
* need special memory handling are expected to modify the code in this file
|
||||||
|
@ -1,12 +1,12 @@
|
|||||||
|
|
||||||
/* pngpread.c - read a png file in push mode
|
/* pngpread.c - read a png file in push mode
|
||||||
*
|
*
|
||||||
* libpng 1.0.0b
|
* libpng 1.0.1
|
||||||
* 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) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.
|
* Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.
|
||||||
* Copyright (c) 1996, 1997 Andreas Dilger
|
* Copyright (c) 1996, 1997 Andreas Dilger
|
||||||
* Copyright (c) 1998, Glenn Randers-Pehrson
|
* Copyright (c) 1998, Glenn Randers-Pehrson
|
||||||
* March 13, 1998
|
* March 15, 1998
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#define PNG_INTERNAL
|
#define PNG_INTERNAL
|
||||||
|
@ -1,12 +1,12 @@
|
|||||||
|
|
||||||
/* pngread.c - read a PNG file
|
/* pngread.c - read a PNG file
|
||||||
*
|
*
|
||||||
* libpng 1.0.0b
|
* libpng 1.0.1
|
||||||
* 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) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.
|
* Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.
|
||||||
* Copyright (c) 1996, 1997 Andreas Dilger
|
* Copyright (c) 1996, 1997 Andreas Dilger
|
||||||
* Copyright (c) 1998, Glenn Randers-Pehrson
|
* Copyright (c) 1998, Glenn Randers-Pehrson
|
||||||
* March 13, 1998
|
* March 15, 1998
|
||||||
*
|
*
|
||||||
* This file contains routines that an application calls directly to
|
* This file contains routines that an application calls directly to
|
||||||
* read a PNG file or stream.
|
* read a PNG file or stream.
|
||||||
@ -123,7 +123,7 @@ png_read_init(png_structp png_ptr)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* Read the information before the actual image data. This has been
|
/* Read the information before the actual image data. This has been
|
||||||
* changed in v0.90 to allow reading a file which already has the magic
|
* changed in v0.90 to allow reading a file that already has the magic
|
||||||
* bytes read from the stream. You can tell libpng how many bytes have
|
* bytes read from the stream. You can tell libpng how many bytes have
|
||||||
* been read from the beginning of the stream (up to the maxumum of 8)
|
* been read from the beginning of the stream (up to the maxumum of 8)
|
||||||
* via png_set_sig_bytes(), and we will only check the remaining bytes
|
* via png_set_sig_bytes(), and we will only check the remaining bytes
|
||||||
|
4
pngrio.c
4
pngrio.c
@ -1,12 +1,12 @@
|
|||||||
|
|
||||||
/* pngrio.c - functions for data input
|
/* pngrio.c - functions for data input
|
||||||
*
|
*
|
||||||
* libpng 1.0.0b
|
* libpng 1.0.1
|
||||||
* 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) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.
|
* Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.
|
||||||
* Copyright (c) 1996, 1997 Andreas Dilger
|
* Copyright (c) 1996, 1997 Andreas Dilger
|
||||||
* Copyright (c) 1998, Glenn Randers-Pehrson
|
* Copyright (c) 1998, Glenn Randers-Pehrson
|
||||||
* March 13, 1998
|
* March 15, 1998
|
||||||
*
|
*
|
||||||
* This file provides a location for all input. Users which need
|
* This file provides a location for all input. Users which need
|
||||||
* special handling are expected to write a function which has the same
|
* special handling are expected to write a function which has the same
|
||||||
|
31
pngrtran.c
31
pngrtran.c
@ -1,12 +1,12 @@
|
|||||||
|
|
||||||
/* pngrtran.c - transforms the data in a row for PNG readers
|
/* pngrtran.c - transforms the data in a row for PNG readers
|
||||||
*
|
*
|
||||||
* libpng 1.0.0b
|
* libpng 1.0.1
|
||||||
* 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) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.
|
* Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.
|
||||||
* Copyright (c) 1996, 1997 Andreas Dilger
|
* Copyright (c) 1996, 1997 Andreas Dilger
|
||||||
* Copyright (c) 1998, Glenn Randers-Pehrson
|
* Copyright (c) 1998, Glenn Randers-Pehrson
|
||||||
* March 13, 1998
|
* March 15, 1998
|
||||||
*
|
*
|
||||||
* This file contains functions optionally called by an application
|
* This file contains functions optionally called by an application
|
||||||
* in order to tell libpng how to handle data when reading a PNG.
|
* in order to tell libpng how to handle data when reading a PNG.
|
||||||
@ -665,7 +665,6 @@ png_init_read_transformations(png_structp png_ptr)
|
|||||||
if (png_ptr->transformations & PNG_INVERT_ALPHA)
|
if (png_ptr->transformations & PNG_INVERT_ALPHA)
|
||||||
{
|
{
|
||||||
#if defined(PNG_READ_EXPAND_SUPPORTED)
|
#if defined(PNG_READ_EXPAND_SUPPORTED)
|
||||||
/* GRR BUG #1: was (png_ptr->transformations & !PNG_EXPAND) */
|
|
||||||
if (!(png_ptr->transformations & PNG_EXPAND))
|
if (!(png_ptr->transformations & PNG_EXPAND))
|
||||||
#endif
|
#endif
|
||||||
{
|
{
|
||||||
@ -715,11 +714,6 @@ png_init_read_transformations(png_structp png_ptr)
|
|||||||
{
|
{
|
||||||
double g, gs;
|
double g, gs;
|
||||||
|
|
||||||
/*
|
|
||||||
GRR BUG #3: inconsistent with handling of full RGBA below
|
|
||||||
g = 1.0 / png_ptr->background_gamma;
|
|
||||||
gs = 1.0 / (png_ptr->background_gamma * png_ptr->screen_gamma);
|
|
||||||
*/
|
|
||||||
switch (png_ptr->background_gamma_type)
|
switch (png_ptr->background_gamma_type)
|
||||||
{
|
{
|
||||||
case PNG_BACKGROUND_GAMMA_SCREEN:
|
case PNG_BACKGROUND_GAMMA_SCREEN:
|
||||||
@ -740,17 +734,7 @@ png_init_read_transformations(png_structp png_ptr)
|
|||||||
gs = 1.0; /* back */
|
gs = 1.0; /* back */
|
||||||
}
|
}
|
||||||
|
|
||||||
if (
|
if ( fabs(gs - 1.0) < PNG_GAMMA_THRESHOLD)
|
||||||
/*
|
|
||||||
GRR BUG #2: This creates self-inconsistent images--fully
|
|
||||||
transparent and fully opaque look fine, but translucent
|
|
||||||
pixels are wrong (too bright if XV's code can be trusted).
|
|
||||||
Commenting it out makes an internally self-consistent
|
|
||||||
image, but still not consistent with RGBA version of same
|
|
||||||
thing (again, too bright in XV).
|
|
||||||
png_ptr->background_gamma_type==PNG_BACKGROUND_GAMMA_SCREEN||
|
|
||||||
*/
|
|
||||||
fabs(gs - 1.0) < PNG_GAMMA_THRESHOLD)
|
|
||||||
{
|
{
|
||||||
back.red = (png_byte)png_ptr->background.red;
|
back.red = (png_byte)png_ptr->background.red;
|
||||||
back.green = (png_byte)png_ptr->background.green;
|
back.green = (png_byte)png_ptr->background.green;
|
||||||
@ -1005,8 +989,7 @@ png_read_transform_info(png_structp png_ptr, png_infop info_ptr)
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(PNG_READ_GRAY_TO_RGB_SUPPORTED)
|
#if defined(PNG_READ_GRAY_TO_RGB_SUPPORTED)
|
||||||
if ((png_ptr->transformations & PNG_GRAY_TO_RGB) &&
|
if (png_ptr->transformations & PNG_GRAY_TO_RGB)
|
||||||
!(info_ptr->color_type & PNG_COLOR_MASK_COLOR))
|
|
||||||
info_ptr->color_type |= PNG_COLOR_MASK_COLOR;
|
info_ptr->color_type |= PNG_COLOR_MASK_COLOR;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@ -1018,12 +1001,8 @@ png_read_transform_info(png_structp png_ptr, png_infop info_ptr)
|
|||||||
info_ptr->channels = 1;
|
info_ptr->channels = 1;
|
||||||
|
|
||||||
#if defined(PNG_READ_STRIP_ALPHA_SUPPORTED)
|
#if defined(PNG_READ_STRIP_ALPHA_SUPPORTED)
|
||||||
if ((png_ptr->transformations & PNG_STRIP_ALPHA) &&
|
if (png_ptr->transformations & PNG_STRIP_ALPHA)
|
||||||
info_ptr->color_type & PNG_COLOR_MASK_ALPHA)
|
|
||||||
{
|
|
||||||
info_ptr->channels--;
|
|
||||||
info_ptr->color_type &= ~PNG_COLOR_MASK_ALPHA;
|
info_ptr->color_type &= ~PNG_COLOR_MASK_ALPHA;
|
||||||
}
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(PNG_READ_FILLER_SUPPORTED)
|
#if defined(PNG_READ_FILLER_SUPPORTED)
|
||||||
|
@ -1,12 +1,12 @@
|
|||||||
|
|
||||||
/* pngrutil.c - utilities to read a PNG file
|
/* pngrutil.c - utilities to read a PNG file
|
||||||
*
|
*
|
||||||
* libpng 1.0.0b
|
* libpng 1.0.1
|
||||||
* 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) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.
|
* Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.
|
||||||
* Copyright (c) 1996, 1997 Andreas Dilger
|
* Copyright (c) 1996, 1997 Andreas Dilger
|
||||||
* Copyright (c) 1998, Glenn Randers-Pehrson
|
* Copyright (c) 1998, Glenn Randers-Pehrson
|
||||||
* March 13, 1998
|
* March 15, 1998
|
||||||
*
|
*
|
||||||
* This file contains routines which are only called from within
|
* This file contains routines which are only called from within
|
||||||
* libpng itself during the course of reading an image.
|
* libpng itself during the course of reading an image.
|
||||||
|
4
pngset.c
4
pngset.c
@ -1,12 +1,12 @@
|
|||||||
|
|
||||||
/* pngset.c - storage of image information into info struct
|
/* pngset.c - storage of image information into info struct
|
||||||
*
|
*
|
||||||
* libpng 1.0.0b
|
* libpng 1.0.1
|
||||||
* 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) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.
|
* Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.
|
||||||
* Copyright (c) 1996, 1997 Andreas Dilger
|
* Copyright (c) 1996, 1997 Andreas Dilger
|
||||||
* Copyright (c) 1998, Glenn Randers-Pehrson
|
* Copyright (c) 1998, Glenn Randers-Pehrson
|
||||||
* March 13, 1998
|
* March 15, 1998
|
||||||
*
|
*
|
||||||
* The functions here are used during reads to store data from the file
|
* The functions here are used during reads to store data from the file
|
||||||
* into the info struct, and during writes to store application data
|
* into the info struct, and during writes to store application data
|
||||||
|
@ -1,12 +1,12 @@
|
|||||||
|
|
||||||
/* pngtest.c - a simple test program to test libpng
|
/* pngtest.c - a simple test program to test libpng
|
||||||
*
|
*
|
||||||
* libpng 1.0.0b
|
* libpng 1.0.1
|
||||||
* 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) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.
|
* Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.
|
||||||
* Copyright (c) 1996, 1997 Andreas Dilger
|
* Copyright (c) 1996, 1997 Andreas Dilger
|
||||||
* Copyright (c) 1998, Glenn Randers-Pehrson
|
* Copyright (c) 1998, Glenn Randers-Pehrson
|
||||||
* March 13, 1998
|
* March 15, 1998
|
||||||
*
|
*
|
||||||
* This program reads in a PNG image, writes it out again, and then
|
* This program reads in a PNG image, writes it out again, and then
|
||||||
* compares the two files. If the files are identical, this shows that
|
* compares the two files. If the files are identical, this shows that
|
||||||
|
@ -1,12 +1,12 @@
|
|||||||
|
|
||||||
/* 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.0.0b
|
* libpng 1.0.1
|
||||||
* 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) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.
|
* Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.
|
||||||
* Copyright (c) 1996, 1997 Andreas Dilger
|
* Copyright (c) 1996, 1997 Andreas Dilger
|
||||||
* Copyright (c) 1998, Glenn Randers-Pehrson
|
* Copyright (c) 1998, Glenn Randers-Pehrson
|
||||||
* March 13, 1998
|
* March 15, 1998
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#define PNG_INTERNAL
|
#define PNG_INTERNAL
|
||||||
|
4
pngwio.c
4
pngwio.c
@ -1,12 +1,12 @@
|
|||||||
|
|
||||||
/* pngwio.c - functions for data output
|
/* pngwio.c - functions for data output
|
||||||
*
|
*
|
||||||
* libpng 1.0.0b
|
* libpng 1.0.1
|
||||||
* 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) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.
|
* Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.
|
||||||
* Copyright (c) 1996, 1997 Andreas Dilger
|
* Copyright (c) 1996, 1997 Andreas Dilger
|
||||||
* Copyright (c) 1998, Glenn Randers-Pehrson
|
* Copyright (c) 1998, Glenn Randers-Pehrson
|
||||||
* March 13, 1998
|
* March 15, 1998
|
||||||
*
|
*
|
||||||
* This file provides a location for all output. Users which need
|
* This file provides a location for all output. Users which need
|
||||||
* special handling are expected to write functions which have the same
|
* special handling are expected to write functions which have the same
|
||||||
|
@ -1,12 +1,12 @@
|
|||||||
|
|
||||||
/* pngwrite.c - general routines to write a PNG file
|
/* pngwrite.c - general routines to write a PNG file
|
||||||
*
|
*
|
||||||
* libpng 1.0.0b
|
* libpng 1.0.1
|
||||||
* 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) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.
|
* Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.
|
||||||
* Copyright (c) 1996, 1997 Andreas Dilger
|
* Copyright (c) 1996, 1997 Andreas Dilger
|
||||||
* Copyright (c) 1998, Glenn Randers-Pehrson
|
* Copyright (c) 1998, Glenn Randers-Pehrson
|
||||||
* March 13, 1998
|
* March 15, 1998
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/* get internal access to png.h */
|
/* get internal access to png.h */
|
||||||
|
@ -1,12 +1,12 @@
|
|||||||
|
|
||||||
/* pngwtran.c - transforms the data in a row for PNG writers
|
/* pngwtran.c - transforms the data in a row for PNG writers
|
||||||
*
|
*
|
||||||
* libpng 1.0.0b
|
* libpng 1.0.1
|
||||||
* 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) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.
|
* Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.
|
||||||
* Copyright (c) 1996, 1997 Andreas Dilger
|
* Copyright (c) 1996, 1997 Andreas Dilger
|
||||||
* Copyright (c) 1998, Glenn Randers-Pehrson
|
* Copyright (c) 1998, Glenn Randers-Pehrson
|
||||||
* March 13, 1998
|
* March 15, 1998
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#define PNG_INTERNAL
|
#define PNG_INTERNAL
|
||||||
|
@ -1,12 +1,12 @@
|
|||||||
|
|
||||||
/* pngwutil.c - utilities to write a PNG file
|
/* pngwutil.c - utilities to write a PNG file
|
||||||
*
|
*
|
||||||
* libpng 1.0.0b
|
* libpng 1.0.1
|
||||||
* 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) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.
|
* Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.
|
||||||
* Copyright (c) 1996, 1997 Andreas Dilger
|
* Copyright (c) 1996, 1997 Andreas Dilger
|
||||||
* Copyright (c) 1998, Glenn Randers-Pehrson
|
* Copyright (c) 1998, Glenn Randers-Pehrson
|
||||||
* March 13, 1998
|
* March 15, 1998
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#define PNG_INTERNAL
|
#define PNG_INTERNAL
|
||||||
|
@ -7,10 +7,13 @@
|
|||||||
CC=gcc
|
CC=gcc
|
||||||
|
|
||||||
# Where the zlib library and include files are located
|
# Where the zlib library and include files are located
|
||||||
# ZLIBLIB=/usr/local/lib
|
# Changing these to ../zlib poses a security risk. If you want
|
||||||
# ZLIBINC=/usr/local/include
|
# to have zlib in an adjacent directory, specify the full path instead of "..".
|
||||||
ZLIBLIB=../zlib
|
#ZLIBLIB=../zlib
|
||||||
ZLIBINC=../zlib
|
#ZLIBINC=../zlib
|
||||||
|
|
||||||
|
ZLIBLIB=/usr/local/lib
|
||||||
|
ZLIBINC=/usr/local/include
|
||||||
|
|
||||||
|
|
||||||
WARNMORE=-Wwrite-strings -Wpointer-arith -Wshadow \
|
WARNMORE=-Wwrite-strings -Wpointer-arith -Wshadow \
|
||||||
|
Loading…
Reference in New Issue
Block a user