Compare commits

...

5 Commits

Author SHA1 Message Date
Glenn Randers-Pehrson
f9f2fe0ce7 Imported from libpng-1.0.1.tar 2009-04-06 16:04:23 -05:00
Glenn Randers-Pehrson
d12aa50322 Imported from libpng-1.0.0b.tar 2009-04-06 16:04:22 -05:00
Glenn Randers-Pehrson
8f8fb6ae7a Imported from libpng-1.0.0a.tar 2009-04-06 16:04:21 -05:00
Glenn Randers-Pehrson
0f7202f074 Imported from libpng-1.0.0.tar 2009-04-06 16:04:20 -05:00
Glenn Randers-Pehrson
397100eb8a Imported from libpng-1.00.tar 2009-04-06 16:04:20 -05:00
26 changed files with 134 additions and 132 deletions

16
CHANGES
View File

@@ -271,8 +271,18 @@ version 1.00 [March 7, 1998]
version 1.0.0 [March 8, 1998] version 1.0.0 [March 8, 1998]
Changed name from 1.00 to 1.0.0 (Adam Costello) Changed name from 1.00 to 1.0.0 (Adam Costello)
Added smakefile.ppc (with SCOPTIONS.ppc) for Amiga PPC (Andreas Kleinert) Added smakefile.ppc (with SCOPTIONS.ppc) for Amiga PPC (Andreas Kleinert)
version 1.0.1 [March 9, 1998] version 1.0.0a [March 9, 1998]
Fixed three bugs in pngrtran.c to make gamma+background handling consistent Fixed three bugs in pngrtran.c to make gamma+background handling consistent
(Greg Roelofs) (Greg Roelofs)
Changed format of the PNG_LIBPNG_VER integer to xyyyzzzz instead of xyz Changed format of the PNG_LIBPNG_VER integer to xyyzz instead of xyz
for major, minor, and bugfix releases. This is 10000001L. (Adam Costello) for major, minor, and bugfix releases. This is 10001. (Adam Costello,
Tom Lane)
Make months range from 1-12 in png_convert_to_rfc1123
version 1.0.0b [March 13, 1998]
Quieted compiler complaints about two empty "for" loops in pngrutil.c
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()

View File

@@ -1,5 +1,5 @@
Installing libpng version 1.0.1 March 9, 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

1
TODO
View File

@@ -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

View File

@@ -1,4 +1,4 @@
.TH LIBPNG 3 "March 9, 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.1 March 9, 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
@@ -2291,27 +2291,28 @@ on the library has not always been consistent and straightforward.
The following table summarizes matters since version 0.89c, which was The following table summarizes matters since version 0.89c, which was
the first widely used release: the first widely used release:
source png.h shared-lib source png.h png.h shared-lib
version string version version string int version
------- ------ ---------- ------- ------ ------ ----------
0.89c ("1.0 beta 3") 0.89 1.0.89 0.89c 0.89 89 1.0.89
0.90 ("1.0 beta 4") 0.90 0.90 0.90 0.90 90 0.90 [should be 2.0.90]
[should have been 2.0.90] 0.95 0.95 95 0.95 [should be 2.0.95]
0.95 ("1.0 beta 5") 0.95 0.95 0.96 0.96 96 0.96 [should be 2.0.96]
[should have been 2.0.95] 0.97b 1.00.97 97 1.0.1 [should be 2.0.97]
0.96 ("1.0 beta 6") 0.96 0.96 0.97c 0.97 97 2.0.97
[should have been 2.0.96] 0.98 0.98 98 2.0.98
0.97b ("1.00.97 beta 7") 1.00.97 1.0.1 0.99 0.99 98 2.0.99
[should have been 2.0.97] 0.99a-m 0.99 99 2.0.99
0.97c 0.97 2.0.97 1.00 1.00 100 2.1.0 [int should be 10000]
0.98 0.98 2.0.98 1.0.0 1.0.0 100 2.1.0 [int should be 10000]
0.99 0.99 2.0.99 1.0.1 1.0.1 10001 2.1.0
0.99a-m 0.99 2.0.99
1.0.1 1.00 2.1.0
Henceforth the source version will match the shared-library minor Henceforth the source version will match the shared-library
and patch numbers; the shared-library major version number will be 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
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).
.SH "SEE ALSO" .SH "SEE ALSO"
libpngpf(3), png(5) libpngpf(3), png(5)
@@ -2365,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.1 (March 9, 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).

View File

@@ -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.1 March 9, 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

View File

@@ -1,4 +1,4 @@
.TH LIBPNGPF 3 "March 9, 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
View File

@@ -1,4 +1,4 @@
.TH PNG 5 "March 9, 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

4
png.c
View File

@@ -6,7 +6,7 @@
* 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 9, 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[6] = "1.0.1"; 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};

55
png.h
View File

@@ -6,7 +6,7 @@
* 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 9, 1998 * March 15, 1998
* *
* Note about libpng version numbers: * Note about libpng version numbers:
* *
@@ -16,23 +16,29 @@
* The following table summarizes matters since version 0.89c, which was * The following table summarizes matters since version 0.89c, which was
* the first widely used release: * the first widely used release:
* *
* source png.h shared-lib * source png.h png.h shared-lib
* version string version * version string int version
* ------- ------ ---------- * ------- ------ ------ ----------
* 0.89c ("1.0 beta 3") 0.89 1.0.89 * 0.89c ("1.0 beta 3") 0.89 89 1.0.89
* 0.90 ("1.0 beta 4") 0.90 0.90 [should have been 2.0.90] * 0.90 ("1.0 beta 4") 0.90 90 0.90 [should have been 2.0.90]
* 0.95 ("1.0 beta 5") 0.95 0.95 [should have been 2.0.95] * 0.95 ("1.0 beta 5") 0.95 95 0.95 [should have been 2.0.95]
* 0.96 ("1.0 beta 6") 0.96 0.96 [should have been 2.0.96] * 0.96 ("1.0 beta 6") 0.96 96 0.96 [should have been 2.0.96]
* 0.97b ("1.00.97 beta 7") 1.00.97 1.0.1 [should have been 2.0.97] * 0.97b ("1.00.97 beta 7") 1.00.97 97 1.0.1 [should have been 2.0.97]
* 0.97c 0.97 2.0.97 * 0.97c 0.97 97 2.0.97
* 0.98 0.98 2.0.98 * 0.98 0.98 98 2.0.98
* 0.99 0.99 2.0.99 * 0.99 0.99 98 2.0.99
* 0.99a-m 0.99 2.0.99 * 0.99a-m 0.99 99 2.0.99
* 1.0.1 1.00 2.1.0 * 1.00 1.00 100 2.1.0 [int should be 10000]
* 1.0.0 1.0.0 100 2.1.0 [int should be 10000]
* 1.0.1 1.0.1 10001 2.1.0
* *
* Henceforth the source version will match the shared-library minor * Henceforth the source version will match the shared-library minor
* and patch numbers; the shared-library major version number will be * 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
* 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).
*
* *
* See libpng.txt for more information. The PNG specification is available * See libpng.txt for more information. The PNG specification is available
* as RFC 2083 <ftp://ftp.uu.net/graphics/png/documents/> * as RFC 2083 <ftp://ftp.uu.net/graphics/png/documents/>
@@ -114,18 +120,19 @@ 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.1" #define PNG_LIBPNG_VER_STRING "1.0.1"
/* careful here. At one time, I 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 blanks. * We must not include leading zeros.
* Versions 0.7 through 1.0.0 were in the range 0 to 100 here. From * Versions 0.7 through 1.0.0 were in the range 0 to 100 here (only
* version 1.0.1 it's xxxyyyzzzzL, where x=major, y=minor, z-bugfix*/ * version 1.0.0 was mis-numbered 100 instead of 10000). From
#define PNG_LIBPNG_VER 10000001L * version 1.0.1 it's xxyyzz, where x=major, y=minor, z=bugfix */
#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 */
#if !defined(PNG_NO_EXTERN) || defined(PNG_ALWAYS_EXTERN) #if !defined(PNG_NO_EXTERN) || defined(PNG_ALWAYS_EXTERN)
/* Version information for C files, stored in png.c. This had better match /* Version information for C files, stored in png.c. This had better match
* the version above. * the version above.
*/ */
extern char png_libpng_ver[6]; extern char png_libpng_ver[12]; /* need room for 99.99.99aa */
/* Structures to facilitate easy interlacing. See png.c for more details */ /* Structures to facilitate easy interlacing. See png.c for more details */
extern int FARDATA png_pass_start[7]; extern int FARDATA png_pass_start[7];
@@ -1484,11 +1491,11 @@ extern PNG_EXPORT(void,png_set_tRNS) PNGARG((png_structp png_ptr,
#define PNG_GAMMA 0x2000 #define PNG_GAMMA 0x2000
#define PNG_GRAY_TO_RGB 0x4000 #define PNG_GRAY_TO_RGB 0x4000
#define PNG_FILLER 0x8000 #define PNG_FILLER 0x8000
#define PNG_PACKSWAP 0x1.0.1L #define PNG_PACKSWAP 0x10000L
#define PNG_SWAP_ALPHA 0x20000L #define PNG_SWAP_ALPHA 0x20000L
#define PNG_STRIP_ALPHA 0x40000L #define PNG_STRIP_ALPHA 0x40000L
#define PNG_INVERT_ALPHA 0x80000L #define PNG_INVERT_ALPHA 0x80000L
#define PNG_USER_TRANSFORM 0x1.0.10L #define PNG_USER_TRANSFORM 0x100000L
/* flags for png_create_struct */ /* flags for png_create_struct */
#define PNG_STRUCT_PNG 0x0001 #define PNG_STRUCT_PNG 0x0001
@@ -1517,7 +1524,7 @@ extern PNG_EXPORT(void,png_set_tRNS) PNGARG((png_structp png_ptr,
#define PNG_FLAG_FREE_TRANS 0x2000 #define PNG_FLAG_FREE_TRANS 0x2000
#define PNG_FLAG_FREE_HIST 0x4000 #define PNG_FLAG_FREE_HIST 0x4000
#define PNG_FLAG_HAVE_CHUNK_HEADER 0x8000L #define PNG_FLAG_HAVE_CHUNK_HEADER 0x8000L
#define PNG_FLAG_WROTE_tIME 0x1.0.1L #define PNG_FLAG_WROTE_tIME 0x10000L
#define PNG_FLAG_CRC_ANCILLARY_MASK (PNG_FLAG_CRC_ANCILLARY_USE | \ #define PNG_FLAG_CRC_ANCILLARY_MASK (PNG_FLAG_CRC_ANCILLARY_USE | \
PNG_FLAG_CRC_ANCILLARY_NOWARN) PNG_FLAG_CRC_ANCILLARY_NOWARN)
@@ -1835,7 +1842,7 @@ PNG_EXTERN void png_do_strip_filler PNGARG((png_row_infop row_info,
PNG_EXTERN void png_do_swap PNGARG((png_row_infop row_info, png_bytep row)); PNG_EXTERN void png_do_swap PNGARG((png_row_infop row_info, png_bytep row));
#endif #endif
#if defined(PNG_READ_PACKSWAP_SUPPORTED) || defined(PNG_WRITE_PACKSWAP_SUPPOR) #if defined(PNG_READ_PACKSWAP_SUPPORTED) || defined(PNG_WRITE_PACKSWAP_SUPPORTED)
PNG_EXTERN void png_do_packswap PNGARG((png_row_infop row_info, png_bytep row)); PNG_EXTERN void png_do_packswap PNGARG((png_row_infop row_info, png_bytep row));
#endif #endif

View File

@@ -6,7 +6,7 @@
* 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 9, 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

View File

@@ -6,7 +6,7 @@
* 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 9, 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

View File

@@ -6,7 +6,7 @@
* 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 9, 1998 * March 15, 1998
*/ */
#define PNG_INTERNAL #define PNG_INTERNAL
@@ -259,14 +259,14 @@ float
png_get_x_offset_inches(png_structp png_ptr, png_infop info_ptr) png_get_x_offset_inches(png_structp png_ptr, png_infop info_ptr)
{ {
return ((float)png_get_x_offset_microns(png_ptr, info_ptr) return ((float)png_get_x_offset_microns(png_ptr, info_ptr)
*.03937/1.0.100. +.5) *.03937/1000000. +.5)
} }
float float
png_get_y_offset_inches(png_structp png_ptr, png_infop info_ptr) png_get_y_offset_inches(png_structp png_ptr, png_infop info_ptr)
{ {
return ((float)png_get_y_offset_microns(png_ptr, info_ptr) return ((float)png_get_y_offset_microns(png_ptr, info_ptr)
*.03937/1.0.100. +.5) *.03937/1000000. +.5)
} }
#if defined(PNG_READ_pHYs_SUPPORTED) #if defined(PNG_READ_pHYs_SUPPORTED)

View File

@@ -6,7 +6,7 @@
* 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 9, 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

View File

@@ -6,7 +6,7 @@
* 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 9, 1998 * March 15, 1998
*/ */
#define PNG_INTERNAL #define PNG_INTERNAL

View File

@@ -6,7 +6,7 @@
* 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 9, 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
@@ -719,10 +719,8 @@ png_read_destroy(png_structp png_ptr, png_infop info_ptr, png_infop end_info_ptr
#endif #endif
if (png_ptr->flags & PNG_FLAG_FREE_PALETTE) if (png_ptr->flags & PNG_FLAG_FREE_PALETTE)
png_zfree(png_ptr, png_ptr->palette); png_zfree(png_ptr, png_ptr->palette);
#if defined(PNG_READ_BACKGROUND_SUPPORTED) && defined(PNG_READ_bKGD_SUPPORTED)
if (png_ptr->flags & PNG_FLAG_FREE_TRANS) if (png_ptr->flags & PNG_FLAG_FREE_TRANS)
png_free(png_ptr, png_ptr->trans); png_free(png_ptr, png_ptr->trans);
#endif
#if defined(PNG_READ_hIST_SUPPORTED) #if defined(PNG_READ_hIST_SUPPORTED)
if (png_ptr->flags & PNG_FLAG_FREE_HIST) if (png_ptr->flags & PNG_FLAG_FREE_HIST)
png_free(png_ptr, png_ptr->hist); png_free(png_ptr, png_ptr->hist);

View File

@@ -6,7 +6,7 @@
* 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 9, 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

View File

@@ -6,7 +6,7 @@
* 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 9, 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)

View File

@@ -6,7 +6,7 @@
* 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 9, 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.
@@ -436,7 +436,7 @@ png_handle_gAMA(png_structp png_ptr, png_infop info_ptr, png_uint_32 length)
} }
#endif /* PNG_READ_sRGB_SUPPORTED */ #endif /* PNG_READ_sRGB_SUPPORTED */
file_gamma = (float)igamma / (float)1.0.10.0; file_gamma = (float)igamma / (float)100000.0;
#ifdef PNG_READ_GAMMA_SUPPORTED #ifdef PNG_READ_GAMMA_SUPPORTED
png_ptr->gamma = file_gamma; png_ptr->gamma = file_gamma;
#endif #endif
@@ -549,11 +549,11 @@ png_handle_cHRM(png_structp png_ptr, png_infop info_ptr, png_uint_32 length)
png_crc_read(png_ptr, buf, 4); png_crc_read(png_ptr, buf, 4);
val = png_get_uint_32(buf); val = png_get_uint_32(buf);
white_x = (float)val / (float)1.0.10.0; white_x = (float)val / (float)100000.0;
png_crc_read(png_ptr, buf, 4); png_crc_read(png_ptr, buf, 4);
val = png_get_uint_32(buf); val = png_get_uint_32(buf);
white_y = (float)val / (float)1.0.10.0; white_y = (float)val / (float)100000.0;
if (white_x < 0 || white_x > 0.8 || white_y < 0 || white_y > 0.8 || if (white_x < 0 || white_x > 0.8 || white_y < 0 || white_y > 0.8 ||
white_x + white_y > 1.0) white_x + white_y > 1.0)
@@ -565,11 +565,11 @@ png_handle_cHRM(png_structp png_ptr, png_infop info_ptr, png_uint_32 length)
png_crc_read(png_ptr, buf, 4); png_crc_read(png_ptr, buf, 4);
val = png_get_uint_32(buf); val = png_get_uint_32(buf);
red_x = (float)val / (float)1.0.10.0; red_x = (float)val / (float)100000.0;
png_crc_read(png_ptr, buf, 4); png_crc_read(png_ptr, buf, 4);
val = png_get_uint_32(buf); val = png_get_uint_32(buf);
red_y = (float)val / (float)1.0.10.0; red_y = (float)val / (float)100000.0;
if (red_x < 0 || red_x > 0.8 || red_y < 0 || red_y > 0.8 || if (red_x < 0 || red_x > 0.8 || red_y < 0 || red_y > 0.8 ||
red_x + red_y > 1.0) red_x + red_y > 1.0)
@@ -581,11 +581,11 @@ png_handle_cHRM(png_structp png_ptr, png_infop info_ptr, png_uint_32 length)
png_crc_read(png_ptr, buf, 4); png_crc_read(png_ptr, buf, 4);
val = png_get_uint_32(buf); val = png_get_uint_32(buf);
green_x = (float)val / (float)1.0.10.0; green_x = (float)val / (float)100000.0;
png_crc_read(png_ptr, buf, 4); png_crc_read(png_ptr, buf, 4);
val = png_get_uint_32(buf); val = png_get_uint_32(buf);
green_y = (float)val / (float)1.0.10.0; green_y = (float)val / (float)100000.0;
if (green_x < 0 || green_x > 0.8 || green_y < 0 || green_y > 0.8 || if (green_x < 0 || green_x > 0.8 || green_y < 0 || green_y > 0.8 ||
green_x + green_y > 1.0) green_x + green_y > 1.0)
@@ -597,11 +597,11 @@ png_handle_cHRM(png_structp png_ptr, png_infop info_ptr, png_uint_32 length)
png_crc_read(png_ptr, buf, 4); png_crc_read(png_ptr, buf, 4);
val = png_get_uint_32(buf); val = png_get_uint_32(buf);
blue_x = (float)val / (float)1.0.10.0; blue_x = (float)val / (float)100000.0;
png_crc_read(png_ptr, buf, 4); png_crc_read(png_ptr, buf, 4);
val = png_get_uint_32(buf); val = png_get_uint_32(buf);
blue_y = (float)val / (float)1.0.10.0; blue_y = (float)val / (float)100000.0;
if (blue_x < (float)0 || blue_x > (float)0.8 || blue_y < (float)0 || if (blue_x < (float)0 || blue_x > (float)0.8 || blue_y < (float)0 ||
blue_y > (float)0.8 || blue_x + blue_y > (float)1.0) blue_y > (float)0.8 || blue_x + blue_y > (float)1.0)
@@ -694,7 +694,7 @@ png_handle_sRGB(png_structp png_ptr, png_infop info_ptr, png_uint_32 length)
#if defined(PNG_READ_gAMA_SUPPORTED) && defined(PNG_READ_GAMMA_SUPPORTED) #if defined(PNG_READ_gAMA_SUPPORTED) && defined(PNG_READ_GAMMA_SUPPORTED)
if ((info_ptr->valid & PNG_INFO_gAMA)) if ((info_ptr->valid & PNG_INFO_gAMA))
if((png_uint_32)(png_ptr->gamma*(float)1.0.10.+.5) != (png_uint_32)45000L) if((png_uint_32)(png_ptr->gamma*(float)100000.+.5) != (png_uint_32)45000L)
{ {
png_warning(png_ptr, png_warning(png_ptr,
"Ignoring incorrect gAMA value when sRGB is also present"); "Ignoring incorrect gAMA value when sRGB is also present");
@@ -1076,7 +1076,7 @@ png_handle_pCAL(png_structp png_ptr, png_infop info_ptr, png_uint_32 length)
png_debug(3, "Finding end of pCAL purpose string\n"); png_debug(3, "Finding end of pCAL purpose string\n");
for (buf = purpose; *buf != '\0'; buf++) for (buf = purpose; *buf != '\0'; buf++)
/* empty loop */; /* empty loop */ ;
endptr = purpose + slength; endptr = purpose + slength;
@@ -1113,8 +1113,8 @@ png_handle_pCAL(png_structp png_ptr, png_infop info_ptr, png_uint_32 length)
png_warning(png_ptr, "Unrecognized equation type for pCAL chunk"); png_warning(png_ptr, "Unrecognized equation type for pCAL chunk");
} }
/* Empty loop to move past the units string. */ for (buf = units; *buf != 0x00; buf++)
for (buf = units; *buf != 0x00; buf++); /* Empty loop to move past the units string. */ ;
png_debug(3, "Allocating pCAL parameters array\n"); png_debug(3, "Allocating pCAL parameters array\n");
params = (png_charpp)png_malloc(png_ptr, (png_uint_32)(nparams params = (png_charpp)png_malloc(png_ptr, (png_uint_32)(nparams
@@ -1126,8 +1126,8 @@ png_handle_pCAL(png_structp png_ptr, png_infop info_ptr, png_uint_32 length)
buf++; /* Skip the null string terminator from previous parameter. */ buf++; /* Skip the null string terminator from previous parameter. */
png_debug1(3, "Reading pCAL parameter %d\n", i); png_debug1(3, "Reading pCAL parameter %d\n", i);
/* Empty loop to move past each paramter string */ for (params[i] = buf; *buf != 0x00 && buf <= endptr; buf++)
for (params[i] = buf; *buf != 0x00 && buf <= endptr; buf++); /* Empty loop to move past each parameter string */ ;
/* Make sure we haven't run out of data yet */ /* Make sure we haven't run out of data yet */
if (buf > endptr) if (buf > endptr)

View File

@@ -6,7 +6,7 @@
* 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 9, 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

View File

@@ -6,7 +6,7 @@
* 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 9, 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

View File

@@ -6,7 +6,7 @@
* 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 9, 1998 * March 15, 1998
*/ */
#define PNG_INTERNAL #define PNG_INTERNAL

View File

@@ -6,7 +6,7 @@
* 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 9, 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

View File

@@ -6,7 +6,7 @@
* 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 9, 1998 * March 15, 1998
*/ */
/* get internal access to png.h */ /* get internal access to png.h */
@@ -239,7 +239,7 @@ png_convert_to_rfc1123(png_structp png_ptr, png_timep ptime)
{ {
char near_time_buf[29]; char near_time_buf[29];
sprintf(near_time_buf, "%d %s %d %02d:%02d:%02d +0000", sprintf(near_time_buf, "%d %s %d %02d:%02d:%02d +0000",
ptime->day % 31, short_months[ptime->month], ptime->day % 31, short_months[ptime->month - 1],
ptime->year, ptime->hour % 24, ptime->minute % 60, ptime->year, ptime->hour % 24, ptime->minute % 60,
ptime->second % 61); ptime->second % 61);
png_memcpy(png_ptr->time_buffer, near_time_buf, png_memcpy(png_ptr->time_buffer, near_time_buf,
@@ -247,7 +247,7 @@ png_convert_to_rfc1123(png_structp png_ptr, png_timep ptime)
} }
#else #else
sprintf(png_ptr->time_buffer, "%d %s %d %02d:%02d:%02d +0000", sprintf(png_ptr->time_buffer, "%d %s %d %02d:%02d:%02d +0000",
ptime->day % 31, short_months[ptime->month], ptime->day % 31, short_months[ptime->month - 1],
ptime->year, ptime->hour % 24, ptime->minute % 60, ptime->year, ptime->hour % 24, ptime->minute % 60,
ptime->second % 61); ptime->second % 61);
#endif #endif

View File

@@ -6,7 +6,7 @@
* 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 9, 1998 * March 15, 1998
*/ */
#define PNG_INTERNAL #define PNG_INTERNAL

View File

@@ -6,7 +6,7 @@
* 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 9, 1998 * March 15, 1998
*/ */
#define PNG_INTERNAL #define PNG_INTERNAL
@@ -340,8 +340,8 @@ png_write_gAMA(png_structp png_ptr, double file_gamma)
png_byte buf[4]; png_byte buf[4];
png_debug(1, "in png_write_gAMA\n"); png_debug(1, "in png_write_gAMA\n");
/* file_gamma is saved in 1/1.0.100ths */ /* file_gamma is saved in 1/1000000ths */
igamma = (png_uint_32)(file_gamma * 1.0.10.0 + 0.5); igamma = (png_uint_32)(file_gamma * 100000.0 + 0.5);
png_save_uint_32(buf, igamma); png_save_uint_32(buf, igamma);
png_write_chunk(png_ptr, png_gAMA, buf, (png_size_t)4); png_write_chunk(png_ptr, png_gAMA, buf, (png_size_t)4);
} }
@@ -426,16 +426,16 @@ png_write_cHRM(png_structp png_ptr, double white_x, double white_y,
png_byte buf[32]; png_byte buf[32];
png_debug(1, "in png_write_cHRM\n"); png_debug(1, "in png_write_cHRM\n");
/* each value is saved int 1/1.0.100ths */ /* each value is saved int 1/1000000ths */
if (white_x < 0 || white_x > 0.8 || white_y < 0 || white_y > 0.8 || if (white_x < 0 || white_x > 0.8 || white_y < 0 || white_y > 0.8 ||
white_x + white_y > 1.0) white_x + white_y > 1.0)
{ {
png_warning(png_ptr, "Invalid cHRM white point specified"); png_warning(png_ptr, "Invalid cHRM white point specified");
return; return;
} }
itemp = (png_uint_32)(white_x * 1.0.10.0 + 0.5); itemp = (png_uint_32)(white_x * 100000.0 + 0.5);
png_save_uint_32(buf, itemp); png_save_uint_32(buf, itemp);
itemp = (png_uint_32)(white_y * 1.0.10.0 + 0.5); itemp = (png_uint_32)(white_y * 100000.0 + 0.5);
png_save_uint_32(buf + 4, itemp); png_save_uint_32(buf + 4, itemp);
if (red_x < 0 || red_x > 0.8 || red_y < 0 || red_y > 0.8 || if (red_x < 0 || red_x > 0.8 || red_y < 0 || red_y > 0.8 ||
@@ -444,9 +444,9 @@ png_write_cHRM(png_structp png_ptr, double white_x, double white_y,
png_warning(png_ptr, "Invalid cHRM red point specified"); png_warning(png_ptr, "Invalid cHRM red point specified");
return; return;
} }
itemp = (png_uint_32)(red_x * 1.0.10.0 + 0.5); itemp = (png_uint_32)(red_x * 100000.0 + 0.5);
png_save_uint_32(buf + 8, itemp); png_save_uint_32(buf + 8, itemp);
itemp = (png_uint_32)(red_y * 1.0.10.0 + 0.5); itemp = (png_uint_32)(red_y * 100000.0 + 0.5);
png_save_uint_32(buf + 12, itemp); png_save_uint_32(buf + 12, itemp);
if (green_x < 0 || green_x > 0.8 || green_y < 0 || green_y > 0.8 || if (green_x < 0 || green_x > 0.8 || green_y < 0 || green_y > 0.8 ||
@@ -455,9 +455,9 @@ png_write_cHRM(png_structp png_ptr, double white_x, double white_y,
png_warning(png_ptr, "Invalid cHRM green point specified"); png_warning(png_ptr, "Invalid cHRM green point specified");
return; return;
} }
itemp = (png_uint_32)(green_x * 1.0.10.0 + 0.5); itemp = (png_uint_32)(green_x * 100000.0 + 0.5);
png_save_uint_32(buf + 16, itemp); png_save_uint_32(buf + 16, itemp);
itemp = (png_uint_32)(green_y * 1.0.10.0 + 0.5); itemp = (png_uint_32)(green_y * 100000.0 + 0.5);
png_save_uint_32(buf + 20, itemp); png_save_uint_32(buf + 20, itemp);
if (blue_x < 0 || blue_x > 0.8 || blue_y < 0 || blue_y > 0.8 || if (blue_x < 0 || blue_x > 0.8 || blue_y < 0 || blue_y > 0.8 ||
@@ -466,9 +466,9 @@ png_write_cHRM(png_structp png_ptr, double white_x, double white_y,
png_warning(png_ptr, "Invalid cHRM blue point specified"); png_warning(png_ptr, "Invalid cHRM blue point specified");
return; return;
} }
itemp = (png_uint_32)(blue_x * 1.0.10.0 + 0.5); itemp = (png_uint_32)(blue_x * 100000.0 + 0.5);
png_save_uint_32(buf + 24, itemp); png_save_uint_32(buf + 24, itemp);
itemp = (png_uint_32)(blue_y * 1.0.10.0 + 0.5); itemp = (png_uint_32)(blue_y * 100000.0 + 0.5);
png_save_uint_32(buf + 28, itemp); png_save_uint_32(buf + 28, itemp);
png_write_chunk(png_ptr, png_cHRM, buf, (png_size_t)32); png_write_chunk(png_ptr, png_cHRM, buf, (png_size_t)32);

View File

@@ -1,4 +1,4 @@
makefile for libpng on Solaris 2.x with gcc # makefile for libpng on Solaris 2.x with gcc
# Contributed by William L. Sebok, based on makefile.lnx # Contributed by William L. Sebok, based on makefile.lnx
# Copyright (C) 1996, 1997 Andreas Dilger # Copyright (C) 1996, 1997 Andreas Dilger
# Copyright (C) 1998 Greg Roelofs # Copyright (C) 1998 Greg Roelofs
@@ -7,9 +7,15 @@
CC=gcc CC=gcc
# Where the zlib library and include files are located # Where the zlib library and include files are located
# Changing these to ../zlib poses a security risk. If you want
# to have zlib in an adjacent directory, specify the full path instead of "..".
#ZLIBLIB=../zlib
#ZLIBINC=../zlib
ZLIBLIB=/usr/local/lib ZLIBLIB=/usr/local/lib
ZLIBINC=/usr/local/include ZLIBINC=/usr/local/include
WARNMORE=-Wwrite-strings -Wpointer-arith -Wshadow \ WARNMORE=-Wwrite-strings -Wpointer-arith -Wshadow \
-Wmissing-declarations -Wtraditional -Wcast-align \ -Wmissing-declarations -Wtraditional -Wcast-align \
-Wstrict-prototypes -Wmissing-prototypes #-Wconversion -Wstrict-prototypes -Wmissing-prototypes #-Wconversion
@@ -27,7 +33,7 @@ PNGMIN = 1.0
PNGVER = $(PNGMAJ).$(PNGMIN) PNGVER = $(PNGMAJ).$(PNGMIN)
# where make install puts libpng.a, libpng.so*, and png.h # where make install puts libpng.a, libpng.so*, and png.h
prefix=/local prefix=/usr/local
INCPATH=$(prefix)/include INCPATH=$(prefix)/include
LIBPATH=$(prefix)/lib LIBPATH=$(prefix)/lib
@@ -55,7 +61,7 @@ libpng.so.$(PNGMAJ): libpng.so.$(PNGVER)
ln -sf libpng.so.$(PNGVER) libpng.so.$(PNGMAJ) ln -sf libpng.so.$(PNGVER) libpng.so.$(PNGMAJ)
libpng.so.$(PNGVER): $(OBJSDLL) libpng.so.$(PNGVER): $(OBJSDLL)
$(LD) -G -L$(LIBPATH) -R$(LIBPATH) -h libpng.so.$(PNGMAJ) \ $(LD) -G -L$(ZLIBLIB) -R$(ZLIBLIB) -h libpng.so.$(PNGMAJ) \
-o libpng.so.$(PNGVER) $(OBJSDLL) -lz -o libpng.so.$(PNGVER) $(OBJSDLL) -lz
pngtest: pngtest.o libpng.so pngtest: pngtest.o libpng.so