Imported from libpng-1.2.4beta1.tar
This commit is contained in:
parent
cfbed9bdf2
commit
07748d1b2c
40
ANNOUNCE
40
ANNOUNCE
@ -1,37 +1,17 @@
|
||||
|
||||
Libpng 1.2.3 - May 21, 2002
|
||||
Libpng 1.2.4beta1 - May 25, 2002
|
||||
|
||||
This is a public release of libpng, intended for use in production codes.
|
||||
This is not intended to be a public release. It will be replaced
|
||||
within a few weeks by a public version or by another test version.
|
||||
|
||||
Changes since the last public release (1.2.2):
|
||||
Changes since the last public release (1.2.3):
|
||||
|
||||
Changed ${PNGMAJ}.${PNGVER} bug to ${PNGVER} in makefile.sgi and makefile.sggcc
|
||||
Fixed VER -> PNGVER typo in makefile.macosx and added install-static to install
|
||||
Added install: target to makefile.32sunu and makefile.64sunu
|
||||
Revised 15 makefiles to link libpng.a to libpngNN.a and the include libpng
|
||||
subdirectory to libpngNN subdirectory without the full pathname.
|
||||
Moved generation of libpng.pc from "install" to "all" in 15 makefiles.
|
||||
Added install-man target to 15 makefiles (Dimitri Papadopolous-Orfanos).
|
||||
Added $(DESTDIR) feature to 24 makefiles (Tim Mooney)
|
||||
Fixed bug with $prefix, should be $(prefix) in makefile.hpux.
|
||||
Updated cygwin-specific portion of pngconf.h and revised makefile.cygwin
|
||||
Added a link from libpngNN.pc to libpng.pc in 15 makefiles.
|
||||
Added links from include/libpngNN/*.h to include/*.h in 24 makefiles.
|
||||
Revised makefile.darwin to make relative links without full pathname.
|
||||
Added setjmp() at the end of png_create_*_struct_2() in case user forgets
|
||||
to put one in their application.
|
||||
Fixed bug in reporting number of channels in pngget.c, introduced in
|
||||
version 1.2.2
|
||||
Added "libpng.pc" dependency to the "install-shared" target in 15 makefiles.
|
||||
Remove old libpng.pc and libpngNN.pc before installing new ones.
|
||||
Revised 15 makefiles to build libpng-config and libpngNN-config from
|
||||
libpng-config-*.in.
|
||||
Added "Win32 DLL VB" configuration to projects/msvc/libpng.dsp
|
||||
Changed "error" and "message" in prototypes to "error_message" and
|
||||
"warning_message" to avoid namespace conflict.
|
||||
Restored png_zalloc and png_zfree to nonexported form as in libpng-1.2.1.
|
||||
Removed description of png_set_mem_fn() from documentation.
|
||||
Revised projects/msvc/README.txt
|
||||
version 1.2.4beta1 [May 25, 2002]
|
||||
Added libpng.pc and libpng-config to "all:" target in 16 makefiles.
|
||||
Fixed bug in 16 makefiles: $(DESTDIR)/$(LIBPATH) to $(DESTDIR)$(LIBPATH)
|
||||
Added missing "\" before closing double quote in makefile.gcmmx.
|
||||
Plugged various memory leaks; added png_malloc_warn() and png_set_text_2()
|
||||
functions.
|
||||
|
||||
Send comments/corrections/commendations to
|
||||
png-implement@ccrc.wustl.edu or to randeg@alum.rpi.edu
|
||||
|
8
CHANGES
8
CHANGES
@ -1118,13 +1118,19 @@ version 1.2.3rc6 [May 14, 2002]
|
||||
Changed "Gz" to "Gd" in projects/msvc/libpng.dsp and zlib.dsp.
|
||||
Removed leftover libpng-config "sed" script from four makefiles.
|
||||
Revised libpng-config creating script in 16 makefiles.
|
||||
version 1.2.3 [May 21, 2002]
|
||||
version 1.2.3 [May 22, 2002]
|
||||
Revised libpng-config target in makefile.cygwin.
|
||||
Removed description of png_set_mem_fn() from documentation.
|
||||
Revised makefile.freebsd.
|
||||
Minor cosmetic changes to 15 makefiles, e.g., $(DI) = $(DESTDIR)/$(INCDIR).
|
||||
Revised projects/msvc/README.txt
|
||||
Changed -lpng to -lpngNN in LDFLAGS in several makefiles.
|
||||
version 1.2.4beta1 [May 25, 2002]
|
||||
Added libpng.pc and libpng-config to "all:" target in 16 makefiles.
|
||||
Fixed bug in 16 makefiles: $(DESTDIR)/$(LIBPATH) to $(DESTDIR)$(LIBPATH)
|
||||
Added missing "\" before closing double quote in makefile.gcmmx.
|
||||
Plugged various memory leaks; added png_malloc_warn() and png_set_text_2()
|
||||
functions.
|
||||
|
||||
Send comments/corrections/commendations to
|
||||
png-implement@ccrc.wustl.edu or to randeg@alum.rpi.edu
|
||||
|
14
INSTALL
14
INSTALL
@ -1,5 +1,5 @@
|
||||
|
||||
Installing libpng version 1.2.3 - May 21, 2002
|
||||
Installing libpng version 1.2.4beta1 - May 25, 2002
|
||||
|
||||
Before installing libpng, you must first install zlib. zlib
|
||||
can usually be found wherever you got libpng. zlib can be
|
||||
@ -10,7 +10,7 @@ zlib.h and zconf.h include files that correspond to the
|
||||
version of zlib that's installed.
|
||||
|
||||
You can rename the directories that you downloaded (they
|
||||
might be called "libpng-1.2.3" or "lpng109" and "zlib-1.1.3"
|
||||
might be called "libpng-1.2.4beta1" or "lpng109" and "zlib-1.1.3"
|
||||
or "zlib113") so that you have directories called "zlib" and "libpng".
|
||||
|
||||
Your directory structure should look like this:
|
||||
@ -64,8 +64,8 @@ The files that are presently available in the scripts directory
|
||||
include
|
||||
|
||||
makefile.std => Generic UNIX makefile (cc, creates static libpng.a)
|
||||
makefile.linux => Linux/ELF makefile (gcc, creates libpng12.so.0.1.2.3)
|
||||
makefile.gcmmx => Linux/ELF makefile (gcc, creates libpng12.so.0.1.2.3,
|
||||
makefile.linux => Linux/ELF makefile (gcc, creates libpng12.so.0.1.2.4beta1)
|
||||
makefile.gcmmx => Linux/ELF makefile (gcc, creates libpng12.so.0.1.2.4beta1,
|
||||
uses assembler code tuned for Intel MMX platform)
|
||||
makefile.gcc => Generic makefile (gcc, creates static libpng.a)
|
||||
makefile.knr => Archaic UNIX Makefile that converts files with
|
||||
@ -86,10 +86,10 @@ include
|
||||
makefile.ne0bsd => NetBSD/cc makefile, uses PNGGCCRD, makes libpng0.so
|
||||
makefile.openbsd => OpenBSD makefile
|
||||
makefile.sgi => Silicon Graphics IRIX makefile (cc, creates static lib)
|
||||
makefile.sggcc => Silicon Graphics (gcc, creates libpng12.so.0.1.2.3)
|
||||
makefile.sggcc => Silicon Graphics (gcc, creates libpng12.so.0.1.2.4beta1)
|
||||
makefile.sunos => Sun makefile
|
||||
makefile.solaris => Solaris 2.X makefile (gcc, creates libpng12.so.0.1.2.3)
|
||||
makefile.so9 => Solaris 9 makefile (gcc, creates libpng12.so.0.1.2.3)
|
||||
makefile.solaris => Solaris 2.X makefile (gcc, creates libpng12.so.0.1.2.4beta1)
|
||||
makefile.so9 => Solaris 9 makefile (gcc, creates libpng12.so.0.1.2.4beta1)
|
||||
makefile.32sunu => Sun Ultra 32-bit makefile
|
||||
makefile.64sunu => Sun Ultra 64-bit makefile
|
||||
makefile.sco => For SCO OSr5 ELF and Unixware 7 with Native cc
|
||||
|
2
KNOWNBUG
2
KNOWNBUG
@ -1,5 +1,5 @@
|
||||
|
||||
Known bugs in libpng version 1.2.3
|
||||
Known bugs in libpng version 1.2.4beta1
|
||||
|
||||
1. April 22, 2001: pnggccrd.c has been reported to crash on NetBSD when
|
||||
reading interlaced PNG files, when assembler code is enabled.
|
||||
|
4
LICENSE
4
LICENSE
@ -8,7 +8,7 @@ COPYRIGHT NOTICE, DISCLAIMER, and LICENSE:
|
||||
If you modify libpng you may insert additional notices immediately following
|
||||
this sentence.
|
||||
|
||||
libpng versions 1.0.7, July 1, 2000, through 1.2.3, May 21, 2002, are
|
||||
libpng versions 1.0.7, July 1, 2000, through 1.2.4beta1, May 25, 2002, are
|
||||
Copyright (c) 2000-2002 Glenn Randers-Pehrson
|
||||
and are distributed according to the same disclaimer and license as libpng-1.0.6
|
||||
with the following individuals added to the list of Contributing Authors
|
||||
@ -99,4 +99,4 @@ certification mark of the Open Source Initiative.
|
||||
|
||||
Glenn Randers-Pehrson
|
||||
randeg@alum.rpi.edu
|
||||
May 21, 2002
|
||||
May 25, 2002
|
||||
|
12
README
12
README
@ -1,4 +1,4 @@
|
||||
README for libpng 1.2.3 - May 21, 2002 (shared library 2.1)
|
||||
README for libpng 1.2.4beta1 - May 25, 2002 (shared library 2.1)
|
||||
See the note about version numbers near the top of png.h
|
||||
|
||||
See INSTALL for instructions on how to install libpng.
|
||||
@ -187,9 +187,9 @@ Files in this distribution:
|
||||
descrip.mms => VMS makefile for MMS or MMK
|
||||
makefile.std => Generic UNIX makefile (cc, creates static libpng.a)
|
||||
makefile.linux => Linux/ELF makefile
|
||||
(gcc, creates libpng12.so.0.1.2.3)
|
||||
(gcc, creates libpng12.so.0.1.2.4beta1)
|
||||
makefile.gcmmx => Linux/ELF makefile (gcc, creates
|
||||
libpng12.so.0.1.2.3, uses assembler code
|
||||
libpng12.so.0.1.2.4beta1, uses assembler code
|
||||
tuned for Intel MMX platform)
|
||||
makefile.gcc => Generic makefile (gcc, creates static libpng.a)
|
||||
makefile.knr => Archaic UNIX Makefile that converts files with
|
||||
@ -210,12 +210,12 @@ Files in this distribution:
|
||||
makefile.ne0bsd => NetBSD/cc makefile, PNGGCCRD, makes libpng0.so
|
||||
makefile.openbsd => OpenBSD makefile
|
||||
makefile.sgi => Silicon Graphics IRIX (cc, creates static lib)
|
||||
makefile.sggcc => Silicon Graphics (gcc, creates libpng12.so.0.1.2.3)
|
||||
makefile.sggcc => Silicon Graphics (gcc, creates libpng12.so.0.1.2.4beta1)
|
||||
makefile.sunos => Sun makefile
|
||||
makefile.solaris => Solaris 2.X makefile
|
||||
(gcc, creates libpng12.so.0.1.2.3)
|
||||
(gcc, creates libpng12.so.0.1.2.4beta1)
|
||||
makefile.so9 => Solaris 9 makefile
|
||||
(gcc, creates libpng12.so.0.1.2.3)
|
||||
(gcc, creates libpng12.so.0.1.2.4beta1)
|
||||
makefile.32sunu => Sun Ultra 32-bit makefile
|
||||
makefile.64sunu => Sun Ultra 64-bit makefile
|
||||
makefile.sco => For SCO OSr5 ELF and Unixware 7 with Native cc
|
||||
|
4
Y2KINFO
4
Y2KINFO
@ -1,13 +1,13 @@
|
||||
Y2K compliance in libpng:
|
||||
=========================
|
||||
|
||||
May 21, 2002
|
||||
May 25, 2002
|
||||
|
||||
Since the PNG Development group is an ad-hoc body, we can't make
|
||||
an official declaration.
|
||||
|
||||
This is your unofficial assurance that libpng from version 0.71 and
|
||||
upward through 1.2.3 are Y2K compliant. It is my belief that earlier
|
||||
upward through 1.2.4beta1 are Y2K compliant. It is my belief that earlier
|
||||
versions were also Y2K compliant.
|
||||
|
||||
Libpng only has three year fields. One is a 2-byte unsigned integer
|
||||
|
2
configure
vendored
2
configure
vendored
@ -1,5 +1,5 @@
|
||||
echo "
|
||||
There is no \"configure\" script for Libpng-1.2.3. Instead, please
|
||||
There is no \"configure\" script for Libpng-1.2.4beta1. Instead, please
|
||||
copy the appropriate makefile for your system from the \"scripts\"
|
||||
directory. Read the INSTALL file for more details.
|
||||
"
|
||||
|
@ -1,85 +0,0 @@
|
||||
|
||||
pngsuite
|
||||
--------
|
||||
(c) Willem van Schaik, 1999
|
||||
|
||||
Permission to use, copy, and distribute these images for any purpose and
|
||||
without fee is hereby granted.
|
||||
|
||||
These 15 images are part of the much larger PngSuite test-set of
|
||||
images, available for developers of PNG supporting software. The
|
||||
complete set, available at http:/www.schaik.com/pngsuite/, contains
|
||||
a variety of images to test interlacing, gamma settings, ancillary
|
||||
chunks, etc.
|
||||
|
||||
The images in this directory represent the basic PNG color-types:
|
||||
grayscale (1-16 bit deep), full color (8 or 16 bit), paletted
|
||||
(1-8 bit) and grayscale or color images with alpha channel. You
|
||||
can use them to test the proper functioning of PNG software.
|
||||
|
||||
filename depth type
|
||||
------------ ------ --------------
|
||||
basn0g01.png 1-bit grayscale
|
||||
basn0g02.png 2-bit grayscale
|
||||
basn0g04.png 4-bit grayscale
|
||||
basn0g08.png 8-bit grayscale
|
||||
basn0g16.png 16-bit grayscale
|
||||
basn2c08.png 8-bit truecolor
|
||||
basn2c16.png 16-bit truecolor
|
||||
basn3p01.png 1-bit paletted
|
||||
basn3p02.png 2-bit paletted
|
||||
basn3p04.png 4-bit paletted
|
||||
basn3p08.png 8-bit paletted
|
||||
basn4a08.png 8-bit gray with alpha
|
||||
basn4a16.png 16-bit gray with alpha
|
||||
basn6a08.png 8-bit RGBA
|
||||
basn6a16.png 16-bit RGBA
|
||||
|
||||
Here is the correct result of typing "pngtest -m *.png" in
|
||||
this directory:
|
||||
|
||||
Testing basn0g01.png: PASS (524 zero samples)
|
||||
Filter 0 was used 32 times
|
||||
Testing basn0g02.png: PASS (448 zero samples)
|
||||
Filter 0 was used 32 times
|
||||
Testing basn0g04.png: PASS (520 zero samples)
|
||||
Filter 0 was used 32 times
|
||||
Testing basn0g08.png: PASS (3 zero samples)
|
||||
Filter 1 was used 9 times
|
||||
Filter 4 was used 23 times
|
||||
Testing basn0g16.png: PASS (1 zero samples)
|
||||
Filter 1 was used 1 times
|
||||
Filter 2 was used 31 times
|
||||
Testing basn2c08.png: PASS (6 zero samples)
|
||||
Filter 1 was used 5 times
|
||||
Filter 4 was used 27 times
|
||||
Testing basn2c16.png: PASS (592 zero samples)
|
||||
Filter 1 was used 1 times
|
||||
Filter 4 was used 31 times
|
||||
Testing basn3p01.png: PASS (512 zero samples)
|
||||
Filter 0 was used 32 times
|
||||
Testing basn3p02.png: PASS (448 zero samples)
|
||||
Filter 0 was used 32 times
|
||||
Testing basn3p04.png: PASS (544 zero samples)
|
||||
Filter 0 was used 32 times
|
||||
Testing basn3p08.png: PASS (4 zero samples)
|
||||
Filter 0 was used 32 times
|
||||
Testing basn4a08.png: PASS (32 zero samples)
|
||||
Filter 1 was used 1 times
|
||||
Filter 4 was used 31 times
|
||||
Testing basn4a16.png: PASS (64 zero samples)
|
||||
Filter 0 was used 1 times
|
||||
Filter 1 was used 2 times
|
||||
Filter 2 was used 1 times
|
||||
Filter 4 was used 28 times
|
||||
Testing basn6a08.png: PASS (160 zero samples)
|
||||
Filter 1 was used 1 times
|
||||
Filter 4 was used 31 times
|
||||
Testing basn6a16.png: PASS (1072 zero samples)
|
||||
Filter 1 was used 4 times
|
||||
Filter 4 was used 28 times
|
||||
libpng passes test
|
||||
|
||||
Willem van Schaik
|
||||
<willem@schaik.com>
|
||||
October 1999
|
21
libpng.3
21
libpng.3
@ -1,6 +1,6 @@
|
||||
.TH LIBPNG 3 "May 21, 2002"
|
||||
.TH LIBPNG 3 "May 25, 2002"
|
||||
.SH NAME
|
||||
libpng \- Portable Network Graphics (PNG) Reference Library 1.2.3
|
||||
libpng \- Portable Network Graphics (PNG) Reference Library 1.2.4beta1
|
||||
.SH SYNOPSIS
|
||||
\fI\fB
|
||||
|
||||
@ -342,6 +342,10 @@ libpng \- Portable Network Graphics (PNG) Reference Library 1.2.3
|
||||
|
||||
\fI\fB
|
||||
|
||||
\fBpng_voidp png_malloc_warn (png_structp \fP\fIpng_ptr\fP\fB, png_uint_32 \fIsize\fP\fB);\fP
|
||||
|
||||
\fI\fB
|
||||
|
||||
\fBvoidp png_memcpy (png_voidp \fP\fIs1\fP\fB, png_voidp \fP\fIs2\fP\fB, png_size_t \fIsize\fP\fB);\fP
|
||||
|
||||
\fI\fB
|
||||
@ -787,7 +791,7 @@ Following is a copy of the libpng.txt file that accompanies libpng.
|
||||
.SH LIBPNG.TXT
|
||||
libpng.txt - A description on how to use and modify libpng
|
||||
|
||||
libpng version 1.2.3 - May 21, 2002
|
||||
libpng version 1.2.4beta1 - May 25, 2002
|
||||
Updated and distributed by Glenn Randers-Pehrson
|
||||
<randeg@alum.rpi.edu>
|
||||
Copyright (c) 1998-2002 Glenn Randers-Pehrson
|
||||
@ -3637,13 +3641,13 @@ application:
|
||||
|
||||
.SH IX. Y2K Compliance in libpng
|
||||
|
||||
May 21, 2002
|
||||
May 25, 2002
|
||||
|
||||
Since the PNG Development group is an ad-hoc body, we can't make
|
||||
an official declaration.
|
||||
|
||||
This is your unofficial assurance that libpng from version 0.71 and
|
||||
upward through 1.2.3 are Y2K compliant. It is my belief that earlier
|
||||
upward through 1.2.4beta1 are Y2K compliant. It is my belief that earlier
|
||||
versions were also Y2K compliant.
|
||||
|
||||
Libpng only has three year fields. One is a 2-byte unsigned integer that
|
||||
@ -3774,6 +3778,7 @@ the first widely used release:
|
||||
1.2.2 12 10202 12.so.0.1.2.2
|
||||
1.2.3rc1-6 12 10203 12.so.0.1.2.3rc1-6
|
||||
1.2.3 12 10203 12.so.0.1.2.3
|
||||
1.2.4beta1 13 10204 12.so.0.1.2.4beta1
|
||||
|
||||
Henceforth the source version will match the shared-library minor
|
||||
and patch numbers; the shared-library major version number will be
|
||||
@ -3831,7 +3836,7 @@ possible without all of you.
|
||||
|
||||
Thanks to Frank J. T. Wojcik for helping with the documentation.
|
||||
|
||||
Libpng version 1.2.3 - May 21, 2002:
|
||||
Libpng version 1.2.4beta1 - May 25, 2002:
|
||||
Initially created in 1995 by Guy Eric Schalnat, then of Group 42, Inc.
|
||||
Currently maintained by Glenn Randers-Pehrson (randeg@alum.rpi.edu).
|
||||
|
||||
@ -3848,7 +3853,7 @@ included in the libpng distribution, the latter shall prevail.)
|
||||
If you modify libpng you may insert additional notices immediately following
|
||||
this sentence.
|
||||
|
||||
libpng versions 1.0.7, July 1, 2000, through 1.2.3, May 21, 2002, are
|
||||
libpng versions 1.0.7, July 1, 2000, through 1.2.4beta1, May 25, 2002, are
|
||||
Copyright (c) 2000-2002 Glenn Randers-Pehrson, and are
|
||||
distributed according to the same disclaimer and license as libpng-1.0.6
|
||||
with the following individuals added to the list of Contributing Authors
|
||||
@ -3940,7 +3945,7 @@ certification mark of the Open Source Initiative.
|
||||
|
||||
Glenn Randers-Pehrson
|
||||
randeg@alum.rpi.edu
|
||||
May 21, 2002
|
||||
May 25, 2002
|
||||
|
||||
.\" end of man page
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
libpng.txt - A description on how to use and modify libpng
|
||||
|
||||
libpng version 1.2.3 - May 21, 2002
|
||||
libpng version 1.2.4beta1 - May 25, 2002
|
||||
Updated and distributed by Glenn Randers-Pehrson
|
||||
<randeg@alum.rpi.edu>
|
||||
Copyright (c) 1998-2002 Glenn Randers-Pehrson
|
||||
@ -2850,13 +2850,13 @@ application:
|
||||
|
||||
IX. Y2K Compliance in libpng
|
||||
|
||||
May 21, 2002
|
||||
May 25, 2002
|
||||
|
||||
Since the PNG Development group is an ad-hoc body, we can't make
|
||||
an official declaration.
|
||||
|
||||
This is your unofficial assurance that libpng from version 0.71 and
|
||||
upward through 1.2.3 are Y2K compliant. It is my belief that earlier
|
||||
upward through 1.2.4beta1 are Y2K compliant. It is my belief that earlier
|
||||
versions were also Y2K compliant.
|
||||
|
||||
Libpng only has three year fields. One is a 2-byte unsigned integer that
|
||||
|
@ -1,6 +1,6 @@
|
||||
.TH LIBPNGPF 3 "May 21, 2002"
|
||||
.TH LIBPNGPF 3 "May 25, 2002"
|
||||
.SH NAME
|
||||
libpng \- Portable Network Graphics (PNG) Reference Library 1.2.3
|
||||
libpng \- Portable Network Graphics (PNG) Reference Library 1.2.4beta1
|
||||
(private functions)
|
||||
.SH SYNOPSIS
|
||||
\fB#include <png.h>\fP
|
||||
@ -411,7 +411,7 @@ libpng \- Portable Network Graphics (PNG) Reference Library 1.2.3
|
||||
|
||||
\fI\fB
|
||||
|
||||
\fBvoid png_write_bKGD (png_structp \fP\fIpng_ptr\fP\fB, png_color_16p \fP\fIvalues\fP\fB, int \fIcolor_type\fP\fB);\fP
|
||||
\fBint png_set_text_2 (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fP\fIinfo_ptr\fP\fB, png_textp \fP\fItext_ptr\fP\fB, int \fInum_text)\fP\fB);\fP
|
||||
|
||||
\fI\fB
|
||||
|
||||
|
4
png.5
4
png.5
@ -1,4 +1,4 @@
|
||||
.TH PNG 5 "May 21, 2002"
|
||||
.TH PNG 5 "May 25, 2002"
|
||||
.SH NAME
|
||||
png \- Portable Network Graphics (PNG) format
|
||||
.SH DESCRIPTION
|
||||
@ -53,7 +53,7 @@ Thomas Boutell and others (png-list@ccrc.wustl.edu).
|
||||
The PNG-1.2 specification is copyright (c) 1999 Glenn Randers-Pehrson.
|
||||
See the specification for conditions of use and distribution.
|
||||
.LP
|
||||
The PNG-1.0 specification is copyright (c) 1996 Massachussets Institute of
|
||||
The PNG-1.0 specification is copyright (c) 1996 Massachusetts Institute of
|
||||
Technology. See the specification for conditions of use and distribution.
|
||||
.LP
|
||||
.\" end of man page
|
||||
|
14
png.c
14
png.c
@ -1,7 +1,7 @@
|
||||
|
||||
/* png.c - location for general purpose libpng functions
|
||||
*
|
||||
* libpng version 1.2.3 - May 21, 2002
|
||||
* libpng version 1.2.4beta1 - May 25, 2002
|
||||
* Copyright (c) 1998-2002 Glenn Randers-Pehrson
|
||||
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
|
||||
* (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
|
||||
@ -13,14 +13,14 @@
|
||||
#include "png.h"
|
||||
|
||||
/* Generate a compiler error if there is an old png.h in the search path. */
|
||||
typedef version_1_2_3 Your_png_h_is_not_version_1_2_3;
|
||||
typedef version_1_2_4beta1 Your_png_h_is_not_version_1_2_4beta1;
|
||||
|
||||
/* Version information for C files. This had better match the version
|
||||
* string defined in png.h. */
|
||||
|
||||
#ifdef PNG_USE_GLOBAL_ARRAYS
|
||||
/* png_libpng_ver was changed to a function in version 1.0.5c */
|
||||
const char png_libpng_ver[18] = "1.2.3";
|
||||
const char png_libpng_ver[18] = "1.2.4beta1";
|
||||
|
||||
/* png_sig was changed to a function in version 1.0.5c */
|
||||
/* Place to hold the signature string for a PNG file. */
|
||||
@ -663,7 +663,7 @@ png_charp PNGAPI
|
||||
png_get_copyright(png_structp png_ptr)
|
||||
{
|
||||
if (png_ptr != NULL || png_ptr == NULL) /* silence compiler warning */
|
||||
return ((png_charp) "\n libpng version 1.2.3 - May 21, 2002\n\
|
||||
return ((png_charp) "\n libpng version 1.2.4beta1 - May 25, 2002\n\
|
||||
Copyright (c) 1998-2002 Glenn Randers-Pehrson\n\
|
||||
Copyright (c) 1996-1997 Andreas Dilger\n\
|
||||
Copyright (c) 1995-1996 Guy Eric Schalnat, Group 42, Inc.\n");
|
||||
@ -681,8 +681,8 @@ png_get_libpng_ver(png_structp png_ptr)
|
||||
{
|
||||
/* Version of *.c files used when building libpng */
|
||||
if(png_ptr != NULL) /* silence compiler warning about unused png_ptr */
|
||||
return((png_charp) "1.2.3");
|
||||
return((png_charp) "1.2.3");
|
||||
return((png_charp) "1.2.4beta1");
|
||||
return((png_charp) "1.2.4beta1");
|
||||
}
|
||||
|
||||
png_charp PNGAPI
|
||||
@ -732,7 +732,7 @@ png_uint_32 PNGAPI
|
||||
png_access_version_number(void)
|
||||
{
|
||||
/* Version of *.c files used when building libpng */
|
||||
return((png_uint_32) 10203L);
|
||||
return((png_uint_32) 10204L);
|
||||
}
|
||||
|
||||
|
||||
|
45
png.h
45
png.h
@ -1,6 +1,6 @@
|
||||
/* png.h - header file for PNG reference library
|
||||
*
|
||||
* libpng version 1.2.3 - May 21, 2002
|
||||
* libpng version 1.2.4beta1 - May 25, 2002
|
||||
* Copyright (c) 1998-2002 Glenn Randers-Pehrson
|
||||
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
|
||||
* (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
|
||||
@ -8,7 +8,7 @@
|
||||
* Authors and maintainers:
|
||||
* libpng versions 0.71, May 1995, through 0.88, January 1996: Guy Schalnat
|
||||
* libpng versions 0.89c, June 1996, through 0.96, May 1997: Andreas Dilger
|
||||
* libpng versions 0.97, January 1998, through 1.2.3 - May 21, 2002: Glenn
|
||||
* libpng versions 0.97, January 1998, through 1.2.4beta1 - May 25, 2002: Glenn
|
||||
* See also "Contributing Authors", below.
|
||||
*
|
||||
* Note about libpng version numbers:
|
||||
@ -88,6 +88,7 @@
|
||||
* 1.2.2 12 10202 12.so.0.1.2.2
|
||||
* 1.2.3rc1-6 12 10203 12.so.0.1.2.3rc1-6
|
||||
* 1.2.3 12 10203 12.so.0.1.2.3
|
||||
* 1.2.4beta1 13 10204 12.so.0.1.2.4beta1
|
||||
*
|
||||
* Henceforth the source version will match the shared-library major
|
||||
* and minor numbers; the shared-library major version number will be
|
||||
@ -117,7 +118,7 @@
|
||||
* If you modify libpng you may insert additional notices immediately following
|
||||
* this sentence.
|
||||
*
|
||||
* libpng versions 1.0.7, July 1, 2000, through 1.2.3, May 21, 2002, are
|
||||
* libpng versions 1.0.7, July 1, 2000, through 1.2.4beta1, May 25, 2002, are
|
||||
* Copyright (c) 2000-2002 Glenn Randers-Pehrson, and are
|
||||
* distributed according to the same disclaimer and license as libpng-1.0.6
|
||||
* with the following individuals added to the list of Contributing Authors
|
||||
@ -222,13 +223,13 @@
|
||||
* Y2K compliance in libpng:
|
||||
* =========================
|
||||
*
|
||||
* May 21, 2002
|
||||
* May 25, 2002
|
||||
*
|
||||
* Since the PNG Development group is an ad-hoc body, we can't make
|
||||
* an official declaration.
|
||||
*
|
||||
* This is your unofficial assurance that libpng from version 0.71 and
|
||||
* upward through 1.2.3 are Y2K compliant. It is my belief that earlier
|
||||
* upward through 1.2.4beta1 are Y2K compliant. It is my belief that earlier
|
||||
* versions were also Y2K compliant.
|
||||
*
|
||||
* Libpng only has three year fields. One is a 2-byte unsigned integer
|
||||
@ -284,7 +285,7 @@
|
||||
*/
|
||||
|
||||
/* Version information for png.h - this should match the version in png.c */
|
||||
#define PNG_LIBPNG_VER_STRING "1.2.3"
|
||||
#define PNG_LIBPNG_VER_STRING "1.2.4beta1"
|
||||
|
||||
#define PNG_LIBPNG_VER_SONUM 0
|
||||
#define PNG_LIBPNG_VER_DLLNUM %DLLNUM%
|
||||
@ -292,11 +293,11 @@
|
||||
/* These should match the first 3 components of PNG_LIBPNG_VER_STRING: */
|
||||
#define PNG_LIBPNG_VER_MAJOR 1
|
||||
#define PNG_LIBPNG_VER_MINOR 2
|
||||
#define PNG_LIBPNG_VER_RELEASE 3
|
||||
#define PNG_LIBPNG_VER_RELEASE 4
|
||||
/* This should match the numeric part of the final component of
|
||||
* PNG_LIBPNG_VER_STRING, omitting any leading zero: */
|
||||
|
||||
#define PNG_LIBPNG_VER_BUILD 0
|
||||
#define PNG_LIBPNG_VER_BUILD 1
|
||||
|
||||
#define PNG_LIBPNG_BUILD_ALPHA 1
|
||||
#define PNG_LIBPNG_BUILD_BETA 2
|
||||
@ -304,14 +305,14 @@
|
||||
#define PNG_LIBPNG_BUILD_STABLE 4
|
||||
#define PNG_LIBPNG_BUILD_TYPEMASK 7
|
||||
#define PNG_LIBPNG_BUILD_PATCH 8 /* Can be OR'ed with STABLE only */
|
||||
#define PNG_LIBPNG_BUILD_TYPE 4
|
||||
#define PNG_LIBPNG_BUILD_TYPE 2
|
||||
|
||||
/* Careful here. At one time, Guy wanted to use 082, but that would be octal.
|
||||
* We must not include leading zeros.
|
||||
* Versions 0.7 through 1.0.0 were in the range 0 to 100 here (only
|
||||
* version 1.0.0 was mis-numbered 100 instead of 10000). From
|
||||
* version 1.0.1 it's xxyyzz, where x=major, y=minor, z=release */
|
||||
#define PNG_LIBPNG_VER 10203 /* 1.2.3 */
|
||||
#define PNG_LIBPNG_VER 10204 /* 1.2.4 */
|
||||
|
||||
#ifndef PNG_VERSION_INFO_ONLY
|
||||
|
||||
@ -1260,13 +1261,22 @@ struct png_struct_def
|
||||
|
||||
png_bytep big_row_buf; /* buffer to save current (unfiltered) row */
|
||||
|
||||
#if defined(PNG_READ_DITHER_SUPPORTED)
|
||||
/* The following three members were added at version 1.2.4 */
|
||||
png_bytep dither_sort; /* working sort array */
|
||||
png_bytep index_to_palette; /* where the original index currently is */
|
||||
/* in the palette */
|
||||
png_bytep palette_to_index; /* which original index points to this */
|
||||
/* palette color */
|
||||
#endif
|
||||
|
||||
};
|
||||
|
||||
|
||||
/* This prevents a compiler error in png.c if png.c and png.h are both at
|
||||
version 1.2.3
|
||||
version 1.2.4beta1
|
||||
*/
|
||||
typedef png_structp version_1_2_3;
|
||||
typedef png_structp version_1_2_4beta1;
|
||||
|
||||
typedef png_struct FAR * FAR * png_structpp;
|
||||
|
||||
@ -1815,6 +1825,10 @@ extern PNG_EXPORT(void,png_progressive_combine_row) PNGARG((png_structp png_ptr,
|
||||
extern PNG_EXPORT(png_voidp,png_malloc) PNGARG((png_structp png_ptr,
|
||||
png_uint_32 size));
|
||||
|
||||
/* Added at libpng version 1.2.4 */
|
||||
extern PNG_EXPORT(png_voidp,png_malloc_warn) PNGARG((png_structp png_ptr,
|
||||
png_uint_32 size));
|
||||
|
||||
/* frees a pointer allocated by png_malloc() */
|
||||
extern PNG_EXPORT(void,png_free) PNGARG((png_structp png_ptr, png_voidp ptr));
|
||||
|
||||
@ -2388,7 +2402,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 */
|
||||
|
||||
#define PNG_HEADER_VERSION_STRING \
|
||||
" libpng version 1.2.3 - May 21, 2002 (header)\n"
|
||||
" libpng version 1.2.4beta1 - May 25, 2002 (header)\n"
|
||||
|
||||
#ifdef PNG_READ_COMPOSITE_NODIV_SUPPORTED
|
||||
/* With these routines we avoid an integer divide, which will be slower on
|
||||
@ -2846,6 +2860,11 @@ PNG_EXTERN void png_write_iTXt PNGARG((png_structp png_ptr,
|
||||
png_charp text));
|
||||
#endif
|
||||
|
||||
#if defined(PNG_TEXT_SUPPORTED) /* Added at version 1.2.4 */
|
||||
PNG_EXTERN int png_set_text_2 PNGARG((png_structp png_ptr,
|
||||
png_infop info_ptr, png_textp text_ptr, int num_text));
|
||||
#endif
|
||||
|
||||
#if defined(PNG_WRITE_oFFs_SUPPORTED)
|
||||
PNG_EXTERN void png_write_oFFs PNGARG((png_structp png_ptr,
|
||||
png_int_32 x_offset, png_int_32 y_offset, int unit_type));
|
||||
|
@ -1,6 +1,6 @@
|
||||
/* pngasmrd.h - assembler version of utilities to read a PNG file
|
||||
*
|
||||
* libpng 1.2.3 - May 21, 2002
|
||||
* libpng 1.2.4beta1 - May 25, 2002
|
||||
* For conditions of distribution and use, see copyright notice in png.h
|
||||
* Copyright (c) 2002 Glenn Randers-Pehrson
|
||||
*
|
||||
|
@ -1,6 +1,6 @@
|
||||
/* pngconf.h - machine configurable file for libpng
|
||||
*
|
||||
* libpng 1.2.3 - May 21, 2002
|
||||
* libpng 1.2.4beta1 - May 25, 2002
|
||||
* For conditions of distribution and use, see copyright notice in png.h
|
||||
* Copyright (c) 1998-2002 Glenn Randers-Pehrson
|
||||
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
|
||||
|
@ -1,7 +1,7 @@
|
||||
|
||||
/* pngerror.c - stub functions for i/o and memory allocation
|
||||
*
|
||||
* libpng 1.2.3 - May 21, 2002
|
||||
* libpng 1.2.4beta1 - May 25, 2002
|
||||
* For conditions of distribution and use, see copyright notice in png.h
|
||||
* Copyright (c) 1998-2002 Glenn Randers-Pehrson
|
||||
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
|
||||
|
@ -6,7 +6,7 @@
|
||||
* and http://www.intel.com/drg/pentiumII/appnotes/923/923.htm
|
||||
* for Intel's performance analysis of the MMX vs. non-MMX code.
|
||||
*
|
||||
* libpng version 1.2.3 - May 21, 2002
|
||||
* libpng version 1.2.4beta1 - May 25, 2002
|
||||
* For conditions of distribution and use, see copyright notice in png.h
|
||||
* Copyright (c) 1998-2002 Glenn Randers-Pehrson
|
||||
* Copyright (c) 1998, Intel Corporation
|
||||
|
2
pngget.c
2
pngget.c
@ -1,7 +1,7 @@
|
||||
|
||||
/* pngget.c - retrieval of values from info struct
|
||||
*
|
||||
* libpng 1.2.3 - May 21, 2002
|
||||
* libpng 1.2.4beta1 - May 25, 2002
|
||||
* For conditions of distribution and use, see copyright notice in png.h
|
||||
* Copyright (c) 1998-2002 Glenn Randers-Pehrson
|
||||
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
|
||||
|
27
pngmem.c
27
pngmem.c
@ -1,7 +1,7 @@
|
||||
|
||||
/* pngmem.c - stub functions for memory allocation
|
||||
*
|
||||
* libpng 1.2.3 - May 21, 2002
|
||||
* libpng 1.2.4beta1 - May 25, 2002
|
||||
* For conditions of distribution and use, see copyright notice in png.h
|
||||
* Copyright (c) 1998-2002 Glenn Randers-Pehrson
|
||||
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
|
||||
@ -110,12 +110,12 @@ png_destroy_struct_2(png_voidp struct_ptr, png_free_ptr free_fn,
|
||||
* result, we would be truncating potentially larger memory requests
|
||||
* (which should cause a fatal error) and introducing major problems.
|
||||
*/
|
||||
|
||||
png_voidp PNGAPI
|
||||
png_malloc(png_structp png_ptr, png_uint_32 size)
|
||||
{
|
||||
#ifndef PNG_USER_MEM_SUPPORTED
|
||||
png_voidp ret;
|
||||
#endif
|
||||
|
||||
if (png_ptr == NULL || size == 0)
|
||||
return (NULL);
|
||||
|
||||
@ -399,7 +399,6 @@ png_destroy_struct_2(png_voidp struct_ptr, png_free_ptr free_fn,
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/* Allocate memory. For reasonable files, size should never exceed
|
||||
64K. However, zlib may allocate more then 64K if you don't tell
|
||||
it not to. See zconf.h and png.h for more information. zlib does
|
||||
@ -410,13 +409,14 @@ png_voidp PNGAPI
|
||||
png_malloc(png_structp png_ptr, png_uint_32 size)
|
||||
{
|
||||
png_voidp ret;
|
||||
|
||||
if (png_ptr == NULL || size == 0)
|
||||
return (NULL);
|
||||
|
||||
#ifdef PNG_USER_MEM_SUPPORTED
|
||||
if(png_ptr->malloc_fn != NULL)
|
||||
{
|
||||
ret = ((png_voidp)(*(png_ptr->malloc_fn))(png_ptr, size));
|
||||
ret = ((png_voidp)(*(png_ptr->malloc_fn))(png_ptr, (png_size_t)size));
|
||||
if (ret == NULL && (png_ptr->flags&PNG_FLAG_MALLOC_NULL_MEM_OK) == 0)
|
||||
png_error(png_ptr, "Out of Memory!");
|
||||
return (ret);
|
||||
@ -424,6 +424,7 @@ png_malloc(png_structp png_ptr, png_uint_32 size)
|
||||
else
|
||||
return (png_malloc_default(png_ptr, size));
|
||||
}
|
||||
|
||||
png_voidp PNGAPI
|
||||
png_malloc_default(png_structp png_ptr, png_uint_32 size)
|
||||
{
|
||||
@ -493,6 +494,22 @@ png_free_default(png_structp png_ptr, png_voidp ptr)
|
||||
|
||||
#endif /* Not Borland DOS special memory handler */
|
||||
|
||||
/* This function was added at libpng version 1.3.0. The png_malloc_warn()
|
||||
* function will issue a png_warning and return NULL instead of issuing a
|
||||
* png_error, if it fails to allocate the requested memory.
|
||||
*/
|
||||
png_voidp PNGAPI
|
||||
png_malloc_warn(png_structp png_ptr, png_uint_32 size)
|
||||
{
|
||||
png_voidp ptr;
|
||||
png_uint_32 save_flags=png_ptr->flags;
|
||||
|
||||
png_ptr->flags|=PNG_FLAG_MALLOC_NULL_MEM_OK;
|
||||
ptr = (png_voidp)png_malloc((png_structp)png_ptr, size);
|
||||
png_ptr->flags=save_flags;
|
||||
return(ptr);
|
||||
}
|
||||
|
||||
png_voidp PNGAPI
|
||||
png_memcpy_check (png_structp png_ptr, png_voidp s1, png_voidp s2,
|
||||
png_uint_32 length)
|
||||
|
18
pngpread.c
18
pngpread.c
@ -1,7 +1,7 @@
|
||||
|
||||
/* pngpread.c - read a png file in push mode
|
||||
*
|
||||
* libpng 1.2.3 - May 21, 2002
|
||||
* libpng 1.2.4beta1 - May 25, 2002
|
||||
* For conditions of distribution and use, see copyright notice in png.h
|
||||
* Copyright (c) 1998-2002 Glenn Randers-Pehrson
|
||||
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
|
||||
@ -1051,6 +1051,7 @@ png_push_read_tEXt(png_structp png_ptr, png_infop info_ptr)
|
||||
png_textp text_ptr;
|
||||
png_charp text;
|
||||
png_charp key;
|
||||
int ret;
|
||||
|
||||
if (png_ptr->buffer_size < 4)
|
||||
{
|
||||
@ -1083,10 +1084,13 @@ png_push_read_tEXt(png_structp png_ptr, png_infop info_ptr)
|
||||
#endif
|
||||
text_ptr->text = text;
|
||||
|
||||
png_set_text(png_ptr, info_ptr, text_ptr, 1);
|
||||
ret = png_set_text_2(png_ptr, info_ptr, text_ptr, 1);
|
||||
|
||||
png_free(png_ptr, key);
|
||||
png_free(png_ptr, text_ptr);
|
||||
|
||||
if (ret)
|
||||
png_warning(png_ptr, "Insufficient memory to store text chunk.");
|
||||
}
|
||||
}
|
||||
#endif
|
||||
@ -1268,10 +1272,13 @@ png_push_read_zTXt(png_structp png_ptr, png_infop info_ptr)
|
||||
#endif
|
||||
text_ptr->text = text;
|
||||
|
||||
png_set_text(png_ptr, info_ptr, text_ptr, 1);
|
||||
ret = png_set_text_2(png_ptr, info_ptr, text_ptr, 1);
|
||||
|
||||
png_free(png_ptr, key);
|
||||
png_free(png_ptr, text_ptr);
|
||||
|
||||
if (ret)
|
||||
png_warning(png_ptr, "Insufficient memory to store text chunk.");
|
||||
}
|
||||
}
|
||||
#endif
|
||||
@ -1332,6 +1339,7 @@ png_push_read_iTXt(png_structp png_ptr, png_infop info_ptr)
|
||||
png_charp lang;
|
||||
png_charp lang_key;
|
||||
png_charp text;
|
||||
int ret;
|
||||
|
||||
if (png_ptr->buffer_size < 4)
|
||||
{
|
||||
@ -1377,9 +1385,11 @@ png_push_read_iTXt(png_structp png_ptr, png_infop info_ptr)
|
||||
text_ptr->text_length = 0;
|
||||
text_ptr->itxt_length = png_strlen(text);
|
||||
|
||||
png_set_text(png_ptr, info_ptr, text_ptr, 1);
|
||||
ret = png_set_text_2(png_ptr, info_ptr, text_ptr, 1);
|
||||
|
||||
png_free(png_ptr, text_ptr);
|
||||
if (ret)
|
||||
png_warning(png_ptr, "Insufficient memory to store iTXt chunk.");
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
@ -1,7 +1,7 @@
|
||||
|
||||
/* pngread.c - read a PNG file
|
||||
*
|
||||
* libpng 1.2.3 - May 21, 2002
|
||||
* libpng 1.2.4beta1 - May 25, 2002
|
||||
* For conditions of distribution and use, see copyright notice in png.h
|
||||
* Copyright (c) 1998-2002 Glenn Randers-Pehrson
|
||||
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
|
||||
@ -795,7 +795,7 @@ png_read_row(png_structp png_ptr, png_bytep row, png_bytep dsp_row)
|
||||
* not called png_set_interlace_handling(), the display_row buffer will
|
||||
* be ignored, so pass NULL to it.
|
||||
*
|
||||
* [*] png_handle_alpha() does not exist yet, as of libpng version 1.2.3
|
||||
* [*] png_handle_alpha() does not exist yet, as of libpng version 1.2.4beta1
|
||||
*/
|
||||
|
||||
void PNGAPI
|
||||
@ -844,7 +844,7 @@ png_read_rows(png_structp png_ptr, png_bytepp row,
|
||||
* only call this function once. If you desire to have an image for
|
||||
* each pass of a interlaced image, use png_read_rows() instead.
|
||||
*
|
||||
* [*] png_handle_alpha() does not exist yet, as of libpng version 1.2.3
|
||||
* [*] png_handle_alpha() does not exist yet, as of libpng version 1.2.4beta1
|
||||
*/
|
||||
void PNGAPI
|
||||
png_read_image(png_structp png_ptr, png_bytepp image)
|
||||
|
2
pngrio.c
2
pngrio.c
@ -1,7 +1,7 @@
|
||||
|
||||
/* pngrio.c - functions for data input
|
||||
*
|
||||
* libpng 1.2.3 - May 21, 2002
|
||||
* libpng 1.2.4beta1 - May 25, 2002
|
||||
* For conditions of distribution and use, see copyright notice in png.h
|
||||
* Copyright (c) 1998-2002 Glenn Randers-Pehrson
|
||||
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
|
||||
|
91
pngrtran.c
91
pngrtran.c
@ -1,7 +1,7 @@
|
||||
|
||||
/* pngrtran.c - transforms the data in a row for PNG readers
|
||||
*
|
||||
* libpng 1.2.3 - May 21, 2002
|
||||
* libpng 1.2.4beta1 - May 25, 2002
|
||||
* For conditions of distribution and use, see copyright notice in png.h
|
||||
* Copyright (c) 1998-2002 Glenn Randers-Pehrson
|
||||
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
|
||||
@ -167,15 +167,14 @@ png_set_dither(png_structp png_ptr, png_colorp palette,
|
||||
Perhaps not the best solution, but good enough. */
|
||||
|
||||
int i;
|
||||
png_bytep sort;
|
||||
|
||||
/* initialize an array to sort colors */
|
||||
sort = (png_bytep)png_malloc(png_ptr, (png_uint_32)(num_palette
|
||||
* sizeof (png_byte)));
|
||||
png_ptr->dither_sort = (png_bytep)png_malloc(png_ptr,
|
||||
(png_uint_32)(num_palette * sizeof (png_byte)));
|
||||
|
||||
/* initialize the sort array */
|
||||
/* initialize the dither_sort array */
|
||||
for (i = 0; i < num_palette; i++)
|
||||
sort[i] = (png_byte)i;
|
||||
png_ptr->dither_sort[i] = (png_byte)i;
|
||||
|
||||
/* Find the least used palette entries by starting a
|
||||
bubble sort, and running it until we have sorted
|
||||
@ -191,13 +190,14 @@ png_set_dither(png_structp png_ptr, png_colorp palette,
|
||||
done = 1;
|
||||
for (j = 0; j < i; j++)
|
||||
{
|
||||
if (histogram[sort[j]] < histogram[sort[j + 1]])
|
||||
if (histogram[png_ptr->dither_sort[j]]
|
||||
< histogram[png_ptr->dither_sort[j + 1]])
|
||||
{
|
||||
png_byte t;
|
||||
|
||||
t = sort[j];
|
||||
sort[j] = sort[j + 1];
|
||||
sort[j + 1] = t;
|
||||
t = png_ptr->dither_sort[j];
|
||||
png_ptr->dither_sort[j] = png_ptr->dither_sort[j + 1];
|
||||
png_ptr->dither_sort[j + 1] = t;
|
||||
done = 0;
|
||||
}
|
||||
}
|
||||
@ -214,11 +214,11 @@ png_set_dither(png_structp png_ptr, png_colorp palette,
|
||||
move the others */
|
||||
for (i = 0; i < maximum_colors; i++)
|
||||
{
|
||||
if ((int)sort[i] >= maximum_colors)
|
||||
if ((int)png_ptr->dither_sort[i] >= maximum_colors)
|
||||
{
|
||||
do
|
||||
j--;
|
||||
while ((int)sort[j] >= maximum_colors);
|
||||
while ((int)png_ptr->dither_sort[j] >= maximum_colors);
|
||||
palette[i] = palette[j];
|
||||
}
|
||||
}
|
||||
@ -232,13 +232,13 @@ png_set_dither(png_structp png_ptr, png_colorp palette,
|
||||
for (i = 0; i < maximum_colors; i++)
|
||||
{
|
||||
/* only move the colors we need to */
|
||||
if ((int)sort[i] >= maximum_colors)
|
||||
if ((int)png_ptr->dither_sort[i] >= maximum_colors)
|
||||
{
|
||||
png_color tmp_color;
|
||||
|
||||
do
|
||||
j--;
|
||||
while ((int)sort[j] >= maximum_colors);
|
||||
while ((int)png_ptr->dither_sort[j] >= maximum_colors);
|
||||
|
||||
tmp_color = palette[j];
|
||||
palette[j] = palette[i];
|
||||
@ -276,7 +276,8 @@ png_set_dither(png_structp png_ptr, png_colorp palette,
|
||||
}
|
||||
}
|
||||
}
|
||||
png_free(png_ptr, sort);
|
||||
png_free(png_ptr, png_ptr->dither_sort);
|
||||
png_ptr->dither_sort=NULL;
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -291,23 +292,22 @@ png_set_dither(png_structp png_ptr, png_colorp palette,
|
||||
int i;
|
||||
int max_d;
|
||||
int num_new_palette;
|
||||
png_dsortp t;
|
||||
png_dsortpp hash;
|
||||
png_bytep index_to_palette;
|
||||
/* where the original index currently is in the palette */
|
||||
png_bytep palette_to_index;
|
||||
/* which original index points to this palette color */
|
||||
|
||||
t=NULL;
|
||||
|
||||
/* initialize palette index arrays */
|
||||
index_to_palette = (png_bytep)png_malloc(png_ptr,
|
||||
png_ptr->index_to_palette = (png_bytep)png_malloc(png_ptr,
|
||||
(png_uint_32)(num_palette * sizeof (png_byte)));
|
||||
palette_to_index = (png_bytep)png_malloc(png_ptr,
|
||||
png_ptr->palette_to_index = (png_bytep)png_malloc(png_ptr,
|
||||
(png_uint_32)(num_palette * sizeof (png_byte)));
|
||||
|
||||
/* initialize the sort array */
|
||||
for (i = 0; i < num_palette; i++)
|
||||
{
|
||||
index_to_palette[i] = (png_byte)i;
|
||||
palette_to_index[i] = (png_byte)i;
|
||||
png_ptr->index_to_palette[i] = (png_byte)i;
|
||||
png_ptr->palette_to_index[i] = (png_byte)i;
|
||||
}
|
||||
|
||||
hash = (png_dsortpp)png_malloc(png_ptr, (png_uint_32)(769 *
|
||||
@ -342,18 +342,22 @@ png_set_dither(png_structp png_ptr, png_colorp palette,
|
||||
|
||||
if (d <= max_d)
|
||||
{
|
||||
png_dsortp t;
|
||||
|
||||
t = (png_dsortp)png_malloc(png_ptr, (png_uint_32)(sizeof
|
||||
(png_dsort)));
|
||||
t = (png_dsortp)png_malloc_warn(png_ptr,
|
||||
(png_uint_32)(sizeof(png_dsort)));
|
||||
if (t == NULL)
|
||||
break;
|
||||
t->next = hash[d];
|
||||
t->left = (png_byte)i;
|
||||
t->right = (png_byte)j;
|
||||
hash[d] = t;
|
||||
}
|
||||
}
|
||||
if (t == NULL)
|
||||
break;
|
||||
}
|
||||
|
||||
if (t != NULL)
|
||||
for (i = 0; i <= max_d; i++)
|
||||
{
|
||||
if (hash[i] != NULL)
|
||||
@ -362,8 +366,10 @@ png_set_dither(png_structp png_ptr, png_colorp palette,
|
||||
|
||||
for (p = hash[i]; p; p = p->next)
|
||||
{
|
||||
if ((int)index_to_palette[p->left] < num_new_palette &&
|
||||
(int)index_to_palette[p->right] < num_new_palette)
|
||||
if ((int)png_ptr->index_to_palette[p->left]
|
||||
< num_new_palette &&
|
||||
(int)png_ptr->index_to_palette[p->right]
|
||||
< num_new_palette)
|
||||
{
|
||||
int j, next_j;
|
||||
|
||||
@ -379,7 +385,8 @@ png_set_dither(png_structp png_ptr, png_colorp palette,
|
||||
}
|
||||
|
||||
num_new_palette--;
|
||||
palette[index_to_palette[j]] = palette[num_new_palette];
|
||||
palette[png_ptr->index_to_palette[j]]
|
||||
= palette[num_new_palette];
|
||||
if (!full_dither)
|
||||
{
|
||||
int k;
|
||||
@ -387,23 +394,23 @@ png_set_dither(png_structp png_ptr, png_colorp palette,
|
||||
for (k = 0; k < num_palette; k++)
|
||||
{
|
||||
if (png_ptr->dither_index[k] ==
|
||||
index_to_palette[j])
|
||||
png_ptr->index_to_palette[j])
|
||||
png_ptr->dither_index[k] =
|
||||
index_to_palette[next_j];
|
||||
png_ptr->index_to_palette[next_j];
|
||||
if ((int)png_ptr->dither_index[k] ==
|
||||
num_new_palette)
|
||||
png_ptr->dither_index[k] =
|
||||
index_to_palette[j];
|
||||
png_ptr->index_to_palette[j];
|
||||
}
|
||||
}
|
||||
|
||||
index_to_palette[palette_to_index[num_new_palette]] =
|
||||
index_to_palette[j];
|
||||
palette_to_index[index_to_palette[j]] =
|
||||
palette_to_index[num_new_palette];
|
||||
png_ptr->index_to_palette[png_ptr->palette_to_index
|
||||
[num_new_palette]] = png_ptr->index_to_palette[j];
|
||||
png_ptr->palette_to_index[png_ptr->index_to_palette[j]]
|
||||
= png_ptr->palette_to_index[num_new_palette];
|
||||
|
||||
index_to_palette[j] = (png_byte)num_new_palette;
|
||||
palette_to_index[num_new_palette] = (png_byte)j;
|
||||
png_ptr->index_to_palette[j] = (png_byte)num_new_palette;
|
||||
png_ptr->palette_to_index[num_new_palette] = (png_byte)j;
|
||||
}
|
||||
if (num_new_palette <= maximum_colors)
|
||||
break;
|
||||
@ -420,8 +427,6 @@ png_set_dither(png_structp png_ptr, png_colorp palette,
|
||||
png_dsortp p = hash[i];
|
||||
while (p)
|
||||
{
|
||||
png_dsortp t;
|
||||
|
||||
t = p->next;
|
||||
png_free(png_ptr, p);
|
||||
p = t;
|
||||
@ -432,8 +437,10 @@ png_set_dither(png_structp png_ptr, png_colorp palette,
|
||||
max_d += 96;
|
||||
}
|
||||
png_free(png_ptr, hash);
|
||||
png_free(png_ptr, palette_to_index);
|
||||
png_free(png_ptr, index_to_palette);
|
||||
png_free(png_ptr, png_ptr->palette_to_index);
|
||||
png_free(png_ptr, png_ptr->index_to_palette);
|
||||
png_ptr->palette_to_index=NULL;
|
||||
png_ptr->index_to_palette=NULL;
|
||||
}
|
||||
num_palette = maximum_colors;
|
||||
}
|
||||
|
133
pngrutil.c
133
pngrutil.c
@ -1,7 +1,7 @@
|
||||
|
||||
/* pngrutil.c - utilities to read a PNG file
|
||||
*
|
||||
* libpng 1.2.3 - May 21, 2002
|
||||
* libpng 1.2.4beta1 - May 25, 2002
|
||||
* For conditions of distribution and use, see copyright notice in png.h
|
||||
* Copyright (c) 1998-2002 Glenn Randers-Pehrson
|
||||
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
|
||||
@ -200,7 +200,12 @@ png_decompress_chunk(png_structp png_ptr, int comp_type,
|
||||
if (text == NULL)
|
||||
{
|
||||
text_size = prefix_size + sizeof(msg) + 1;
|
||||
text = (png_charp)png_malloc(png_ptr, text_size);
|
||||
text = (png_charp)png_malloc_warn(png_ptr, text_size);
|
||||
if (text == NULL)
|
||||
{
|
||||
png_free(png_ptr,chunkdata);
|
||||
png_error(png_ptr,"Not enough memory to decompress chunk");
|
||||
}
|
||||
png_memcpy(text, chunkdata, prefix_size);
|
||||
}
|
||||
|
||||
@ -218,7 +223,12 @@ png_decompress_chunk(png_structp png_ptr, int comp_type,
|
||||
{
|
||||
text_size = prefix_size +
|
||||
png_ptr->zbuf_size - png_ptr->zstream.avail_out;
|
||||
text = (png_charp)png_malloc(png_ptr, text_size + 1);
|
||||
text = (png_charp)png_malloc_warn(png_ptr, text_size + 1);
|
||||
if (text == NULL)
|
||||
{
|
||||
png_free(png_ptr,chunkdata);
|
||||
png_error(png_ptr,"Not enough memory to decompress chunk.");
|
||||
}
|
||||
png_memcpy(text + prefix_size, png_ptr->zbuf,
|
||||
text_size - prefix_size);
|
||||
png_memcpy(text, chunkdata, prefix_size);
|
||||
@ -229,8 +239,15 @@ png_decompress_chunk(png_structp png_ptr, int comp_type,
|
||||
png_charp tmp;
|
||||
|
||||
tmp = text;
|
||||
text = (png_charp)png_malloc(png_ptr, (png_uint_32)(text_size +
|
||||
text = (png_charp)png_malloc_warn(png_ptr,
|
||||
(png_uint_32)(text_size +
|
||||
png_ptr->zbuf_size - png_ptr->zstream.avail_out + 1));
|
||||
if (text == NULL)
|
||||
{
|
||||
png_free(png_ptr, tmp);
|
||||
png_free(png_ptr, chunkdata);
|
||||
png_error(png_ptr,"Not enough memory to decompress chunk..");
|
||||
}
|
||||
png_memcpy(text, tmp, text_size);
|
||||
png_free(png_ptr, tmp);
|
||||
png_memcpy(text + text_size, png_ptr->zbuf,
|
||||
@ -269,7 +286,12 @@ png_decompress_chunk(png_structp png_ptr, int comp_type,
|
||||
text_size=prefix_size;
|
||||
if (text == NULL)
|
||||
{
|
||||
text = (png_charp)png_malloc(png_ptr, text_size+1);
|
||||
text = (png_charp)png_malloc_warn(png_ptr, text_size+1);
|
||||
if (text == NULL)
|
||||
{
|
||||
png_free(png_ptr, chunkdata);
|
||||
png_error(png_ptr,"Not enough memory for text.");
|
||||
}
|
||||
png_memcpy(text, chunkdata, prefix_size);
|
||||
}
|
||||
*(text + text_size) = 0x00;
|
||||
@ -1542,7 +1564,12 @@ png_handle_pCAL(png_structp png_ptr, png_infop info_ptr, png_uint_32 length)
|
||||
|
||||
png_debug1(2, "Allocating and reading pCAL chunk data (%lu bytes)\n",
|
||||
length + 1);
|
||||
purpose = (png_charp)png_malloc(png_ptr, length + 1);
|
||||
purpose = (png_charp)png_malloc_warn(png_ptr, length + 1);
|
||||
if (purpose == NULL)
|
||||
{
|
||||
png_warning(png_ptr, "No memory for pCAL purpose.");
|
||||
return;
|
||||
}
|
||||
slength = (png_size_t)length;
|
||||
png_crc_read(png_ptr, (png_bytep)purpose, slength);
|
||||
|
||||
@ -1597,8 +1624,14 @@ png_handle_pCAL(png_structp png_ptr, png_infop info_ptr, png_uint_32 length)
|
||||
/* Empty loop to move past the units string. */ ;
|
||||
|
||||
png_debug(3, "Allocating pCAL parameters array\n");
|
||||
params = (png_charpp)png_malloc(png_ptr, (png_uint_32)(nparams
|
||||
params = (png_charpp)png_malloc_warn(png_ptr, (png_uint_32)(nparams
|
||||
*sizeof(png_charp))) ;
|
||||
if (params == NULL)
|
||||
{
|
||||
png_free(png_ptr, purpose);
|
||||
png_warning(png_ptr, "No memory for pCAL params.");
|
||||
return;
|
||||
}
|
||||
|
||||
/* Get pointers to the start of each parameter string. */
|
||||
for (i = 0; i < (int)nparams; i++)
|
||||
@ -1662,7 +1695,12 @@ png_handle_sCAL(png_structp png_ptr, png_infop info_ptr, png_uint_32 length)
|
||||
|
||||
png_debug1(2, "Allocating and reading sCAL chunk data (%lu bytes)\n",
|
||||
length + 1);
|
||||
buffer = (png_charp)png_malloc(png_ptr, length + 1);
|
||||
buffer = (png_charp)png_malloc_warn(png_ptr, length + 1);
|
||||
if (buffer == NULL)
|
||||
{
|
||||
png_warning(png_ptr, "Out of memory while processing sCAL chunk");
|
||||
return;
|
||||
}
|
||||
slength = (png_size_t)length;
|
||||
png_crc_read(png_ptr, (png_bytep)buffer, slength);
|
||||
|
||||
@ -1685,7 +1723,12 @@ png_handle_sCAL(png_structp png_ptr, png_infop info_ptr, png_uint_32 length)
|
||||
}
|
||||
#else
|
||||
#ifdef PNG_FIXED_POINT_SUPPORTED
|
||||
swidth = (png_charp)png_malloc(png_ptr, png_strlen(ep) + 1);
|
||||
swidth = (png_charp)png_malloc_warn(png_ptr, png_strlen(ep) + 1);
|
||||
if (swidth == NULL)
|
||||
{
|
||||
png_warning(png_ptr, "Out of memory while processing sCAL chunk width");
|
||||
return;
|
||||
}
|
||||
png_memcpy(swidth, ep, (png_size_t)png_strlen(ep));
|
||||
#endif
|
||||
#endif
|
||||
@ -1703,7 +1746,12 @@ png_handle_sCAL(png_structp png_ptr, png_infop info_ptr, png_uint_32 length)
|
||||
}
|
||||
#else
|
||||
#ifdef PNG_FIXED_POINT_SUPPORTED
|
||||
sheight = (png_charp)png_malloc(png_ptr, png_strlen(ep) + 1);
|
||||
sheight = (png_charp)png_malloc_warn(png_ptr, png_strlen(ep) + 1);
|
||||
if (swidth == NULL)
|
||||
{
|
||||
png_warning(png_ptr, "Out of memory while processing sCAL chunk height");
|
||||
return;
|
||||
}
|
||||
png_memcpy(sheight, ep, (png_size_t)png_strlen(ep));
|
||||
#endif
|
||||
#endif
|
||||
@ -1793,6 +1841,7 @@ png_handle_tEXt(png_structp png_ptr, png_infop info_ptr, png_uint_32 length)
|
||||
png_charp text;
|
||||
png_uint_32 skip = 0;
|
||||
png_size_t slength;
|
||||
int ret;
|
||||
|
||||
png_debug(1, "in png_handle_tEXt\n");
|
||||
|
||||
@ -1811,7 +1860,12 @@ png_handle_tEXt(png_structp png_ptr, png_infop info_ptr, png_uint_32 length)
|
||||
}
|
||||
#endif
|
||||
|
||||
key = (png_charp)png_malloc(png_ptr, length + 1);
|
||||
key = (png_charp)png_malloc_warn(png_ptr, length + 1);
|
||||
if (key == NULL)
|
||||
{
|
||||
png_warning(png_ptr, "No memory to process text chunk.");
|
||||
return;
|
||||
}
|
||||
slength = (png_size_t)length;
|
||||
png_crc_read(png_ptr, (png_bytep)key, slength);
|
||||
|
||||
@ -1829,7 +1883,13 @@ png_handle_tEXt(png_structp png_ptr, png_infop info_ptr, png_uint_32 length)
|
||||
if (text != key + slength)
|
||||
text++;
|
||||
|
||||
text_ptr = (png_textp)png_malloc(png_ptr, (png_uint_32)sizeof(png_text));
|
||||
text_ptr = (png_textp)png_malloc_warn(png_ptr, (png_uint_32)sizeof(png_text));
|
||||
if (text_ptr == NULL)
|
||||
{
|
||||
png_warning(png_ptr, "Not enough memory to process text chunk.");
|
||||
png_free(png_ptr, key);
|
||||
return;
|
||||
}
|
||||
text_ptr->compression = PNG_TEXT_COMPRESSION_NONE;
|
||||
text_ptr->key = key;
|
||||
#ifdef PNG_iTXt_SUPPORTED
|
||||
@ -1840,10 +1900,12 @@ png_handle_tEXt(png_structp png_ptr, png_infop info_ptr, png_uint_32 length)
|
||||
text_ptr->text = text;
|
||||
text_ptr->text_length = png_strlen(text);
|
||||
|
||||
png_set_text(png_ptr, info_ptr, text_ptr, 1);
|
||||
ret=png_set_text_2(png_ptr, info_ptr, text_ptr, 1);
|
||||
|
||||
png_free(png_ptr, key);
|
||||
png_free(png_ptr, text_ptr);
|
||||
if (ret)
|
||||
png_warning(png_ptr, "Insufficient memory to process text chunk.");
|
||||
}
|
||||
#endif
|
||||
|
||||
@ -1856,6 +1918,7 @@ png_handle_zTXt(png_structp png_ptr, png_infop info_ptr, png_uint_32 length)
|
||||
png_charp chunkdata;
|
||||
png_charp text;
|
||||
int comp_type;
|
||||
int ret;
|
||||
png_size_t slength, prefix_len, data_len;
|
||||
|
||||
png_debug(1, "in png_handle_zTXt\n");
|
||||
@ -1876,8 +1939,13 @@ png_handle_zTXt(png_structp png_ptr, png_infop info_ptr, png_uint_32 length)
|
||||
}
|
||||
#endif
|
||||
|
||||
chunkdata = (png_charp)png_malloc(png_ptr, length + 1);
|
||||
slength = (png_size_t)length;
|
||||
chunkdata = (png_charp)png_malloc_warn(png_ptr, length + 1);
|
||||
if (chunkdata == NULL)
|
||||
{
|
||||
png_warning(png_ptr,"Out of memory processing zTXt chunk.");
|
||||
return;
|
||||
}
|
||||
slength = (png_size_t)length;
|
||||
png_crc_read(png_ptr, (png_bytep)chunkdata, slength);
|
||||
if (png_crc_finish(png_ptr, 0))
|
||||
{
|
||||
@ -1911,7 +1979,13 @@ png_handle_zTXt(png_structp png_ptr, png_infop info_ptr, png_uint_32 length)
|
||||
chunkdata = (png_charp)png_decompress_chunk(png_ptr, comp_type, chunkdata,
|
||||
(png_size_t)length, prefix_len, &data_len);
|
||||
|
||||
text_ptr = (png_textp)png_malloc(png_ptr, (png_uint_32)sizeof(png_text));
|
||||
text_ptr = (png_textp)png_malloc_warn(png_ptr, (png_uint_32)sizeof(png_text));
|
||||
if (text_ptr == NULL)
|
||||
{
|
||||
png_warning(png_ptr,"Not enough memory to process zTXt chunk.");
|
||||
png_free(png_ptr, chunkdata);
|
||||
return;
|
||||
}
|
||||
text_ptr->compression = comp_type;
|
||||
text_ptr->key = chunkdata;
|
||||
#ifdef PNG_iTXt_SUPPORTED
|
||||
@ -1922,10 +1996,12 @@ png_handle_zTXt(png_structp png_ptr, png_infop info_ptr, png_uint_32 length)
|
||||
text_ptr->text = chunkdata + prefix_len;
|
||||
text_ptr->text_length = data_len;
|
||||
|
||||
png_set_text(png_ptr, info_ptr, text_ptr, 1);
|
||||
ret=png_set_text_2(png_ptr, info_ptr, text_ptr, 1);
|
||||
|
||||
png_free(png_ptr, text_ptr);
|
||||
png_free(png_ptr, chunkdata);
|
||||
if (ret)
|
||||
png_error(png_ptr, "Insufficient memory to store zTXt chunk.");
|
||||
}
|
||||
#endif
|
||||
|
||||
@ -1939,6 +2015,7 @@ png_handle_iTXt(png_structp png_ptr, png_infop info_ptr, png_uint_32 length)
|
||||
png_charp key, lang, text, lang_key;
|
||||
int comp_flag;
|
||||
int comp_type = 0;
|
||||
int ret;
|
||||
png_size_t slength, prefix_len, data_len;
|
||||
|
||||
png_debug(1, "in png_handle_iTXt\n");
|
||||
@ -1960,7 +2037,12 @@ png_handle_iTXt(png_structp png_ptr, png_infop info_ptr, png_uint_32 length)
|
||||
}
|
||||
#endif
|
||||
|
||||
chunkdata = (png_charp)png_malloc(png_ptr, length + 1);
|
||||
chunkdata = (png_charp)png_malloc_warn(png_ptr, length + 1);
|
||||
if (chunkdata == NULL)
|
||||
{
|
||||
png_warning(png_ptr, "No memory to process iTXt chunk.");
|
||||
return;
|
||||
}
|
||||
slength = (png_size_t)length;
|
||||
png_crc_read(png_ptr, (png_bytep)chunkdata, slength);
|
||||
if (png_crc_finish(png_ptr, 0))
|
||||
@ -2006,7 +2088,13 @@ png_handle_iTXt(png_structp png_ptr, png_infop info_ptr, png_uint_32 length)
|
||||
(size_t)length, prefix_len, &data_len);
|
||||
else
|
||||
data_len=png_strlen(chunkdata + prefix_len);
|
||||
text_ptr = (png_textp)png_malloc(png_ptr, (png_uint_32)sizeof(png_text));
|
||||
text_ptr = (png_textp)png_malloc_warn(png_ptr, (png_uint_32)sizeof(png_text));
|
||||
if (text_ptr == NULL)
|
||||
{
|
||||
png_warning(png_ptr,"Not enough memory to process iTXt chunk.");
|
||||
png_free(png_ptr, chunkdata);
|
||||
return;
|
||||
}
|
||||
text_ptr->compression = (int)comp_flag + 1;
|
||||
text_ptr->lang_key = chunkdata+(lang_key-key);
|
||||
text_ptr->lang = chunkdata+(lang-key);
|
||||
@ -2015,10 +2103,12 @@ png_handle_iTXt(png_structp png_ptr, png_infop info_ptr, png_uint_32 length)
|
||||
text_ptr->key = chunkdata;
|
||||
text_ptr->text = chunkdata + prefix_len;
|
||||
|
||||
png_set_text(png_ptr, info_ptr, text_ptr, 1);
|
||||
ret=png_set_text_2(png_ptr, info_ptr, text_ptr, 1);
|
||||
|
||||
png_free(png_ptr, text_ptr);
|
||||
png_free(png_ptr, chunkdata);
|
||||
if (ret)
|
||||
png_error(png_ptr, "Insufficient memory to store iTXt chunk.");
|
||||
}
|
||||
#endif
|
||||
|
||||
@ -2084,7 +2174,10 @@ png_handle_unknown(png_structp png_ptr, png_infop info_ptr, png_uint_32 length)
|
||||
if (!(png_ptr->chunk_name[0] & 0x20))
|
||||
if(png_handle_as_unknown(png_ptr, png_ptr->chunk_name) !=
|
||||
HANDLE_CHUNK_ALWAYS)
|
||||
{
|
||||
png_free(png_ptr, chunk.data);
|
||||
png_chunk_error(png_ptr, "unknown critical chunk");
|
||||
}
|
||||
png_set_unknown_chunks(png_ptr, info_ptr, &chunk, 1);
|
||||
}
|
||||
}
|
||||
|
92
pngset.c
92
pngset.c
@ -1,7 +1,7 @@
|
||||
|
||||
/* pngset.c - storage of image information into info struct
|
||||
*
|
||||
* libpng 1.2.3 - May 21, 2002
|
||||
* libpng 1.2.4beta1 - May 25, 2002
|
||||
* For conditions of distribution and use, see copyright notice in png.h
|
||||
* Copyright (c) 1998-2002 Glenn Randers-Pehrson
|
||||
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
|
||||
@ -216,8 +216,13 @@ png_set_hIST(png_structp png_ptr, png_infop info_ptr, png_uint_16p hist)
|
||||
png_free_data(png_ptr, info_ptr, PNG_FREE_HIST, 0);
|
||||
#endif
|
||||
/* Changed from info->num_palette to 256 in version 1.2.1 */
|
||||
png_ptr->hist = (png_uint_16p)png_malloc(png_ptr,
|
||||
png_ptr->hist = (png_uint_16p)png_malloc_warn(png_ptr,
|
||||
(png_uint_32)(256 * sizeof (png_uint_16)));
|
||||
if (png_ptr->hist == NULL)
|
||||
{
|
||||
png_warning(png_ptr, "Insufficient memory for hIST chunk data.");
|
||||
return;
|
||||
}
|
||||
|
||||
for (i = 0; i < info_ptr->num_palette; i++)
|
||||
png_ptr->hist[i] = hist[i];
|
||||
@ -358,7 +363,12 @@ png_set_pCAL(png_structp png_ptr, png_infop info_ptr,
|
||||
|
||||
length = png_strlen(purpose) + 1;
|
||||
png_debug1(3, "allocating purpose for info (%lu bytes)\n", length);
|
||||
info_ptr->pcal_purpose = (png_charp)png_malloc(png_ptr, length);
|
||||
info_ptr->pcal_purpose = (png_charp)png_malloc_warn(png_ptr, length);
|
||||
if (info_ptr->pcal_purpose == NULL)
|
||||
{
|
||||
png_warning(png_ptr, "Insufficient memory for pCAL purpose.");
|
||||
return;
|
||||
}
|
||||
png_memcpy(info_ptr->pcal_purpose, purpose, (png_size_t)length);
|
||||
|
||||
png_debug(3, "storing X0, X1, type, and nparams in info\n");
|
||||
@ -369,11 +379,21 @@ png_set_pCAL(png_structp png_ptr, png_infop info_ptr,
|
||||
|
||||
length = png_strlen(units) + 1;
|
||||
png_debug1(3, "allocating units for info (%lu bytes)\n", length);
|
||||
info_ptr->pcal_units = (png_charp)png_malloc(png_ptr, length);
|
||||
info_ptr->pcal_units = (png_charp)png_malloc_warn(png_ptr, length);
|
||||
if (info_ptr->pcal_units == NULL)
|
||||
{
|
||||
png_warning(png_ptr, "Insufficient memory for pCAL units.");
|
||||
return;
|
||||
}
|
||||
png_memcpy(info_ptr->pcal_units, units, (png_size_t)length);
|
||||
|
||||
info_ptr->pcal_params = (png_charpp)png_malloc(png_ptr,
|
||||
info_ptr->pcal_params = (png_charpp)png_malloc_warn(png_ptr,
|
||||
(png_uint_32)((nparams + 1) * sizeof(png_charp)));
|
||||
if (info_ptr->pcal_params == NULL)
|
||||
{
|
||||
png_warning(png_ptr, "Insufficient memory for pCAL params.");
|
||||
return;
|
||||
}
|
||||
|
||||
info_ptr->pcal_params[nparams] = NULL;
|
||||
|
||||
@ -381,7 +401,12 @@ png_set_pCAL(png_structp png_ptr, png_infop info_ptr,
|
||||
{
|
||||
length = png_strlen(params[i]) + 1;
|
||||
png_debug2(3, "allocating parameter %d for info (%lu bytes)\n", i, length);
|
||||
info_ptr->pcal_params[i] = (png_charp)png_malloc(png_ptr, length);
|
||||
info_ptr->pcal_params[i] = (png_charp)png_malloc_warn(png_ptr, length);
|
||||
if (info_ptr->pcal_params[i] == NULL)
|
||||
{
|
||||
png_warning(png_ptr, "Insufficient memory for pCAL parameter.");
|
||||
return;
|
||||
}
|
||||
png_memcpy(info_ptr->pcal_params[i], params[i], (png_size_t)length);
|
||||
}
|
||||
|
||||
@ -627,6 +652,16 @@ png_set_iCCP(png_structp png_ptr, png_infop info_ptr,
|
||||
void PNGAPI
|
||||
png_set_text(png_structp png_ptr, png_infop info_ptr, png_textp text_ptr,
|
||||
int num_text)
|
||||
{
|
||||
int ret;
|
||||
ret=png_set_text_2(png_ptr, info_ptr, text_ptr, num_text);
|
||||
if (ret)
|
||||
png_error(png_ptr, "Insufficient memory to store text");
|
||||
}
|
||||
|
||||
int /* PRIVATE */
|
||||
png_set_text_2(png_structp png_ptr, png_infop info_ptr, png_textp text_ptr,
|
||||
int num_text)
|
||||
{
|
||||
int i;
|
||||
|
||||
@ -634,7 +669,7 @@ png_set_text(png_structp png_ptr, png_infop info_ptr, png_textp text_ptr,
|
||||
"text" : (png_const_charp)png_ptr->chunk_name));
|
||||
|
||||
if (png_ptr == NULL || info_ptr == NULL || num_text == 0)
|
||||
return;
|
||||
return(0);
|
||||
|
||||
/* Make sure we have enough space in the "text" array in info_struct
|
||||
* to hold all of the incoming text_ptr objects.
|
||||
@ -649,8 +684,13 @@ png_set_text(png_structp png_ptr, png_infop info_ptr, png_textp text_ptr,
|
||||
old_max = info_ptr->max_text;
|
||||
info_ptr->max_text = info_ptr->num_text + num_text + 8;
|
||||
old_text = info_ptr->text;
|
||||
info_ptr->text = (png_textp)png_malloc(png_ptr,
|
||||
info_ptr->text = (png_textp)png_malloc_warn(png_ptr,
|
||||
(png_uint_32)(info_ptr->max_text * sizeof (png_text)));
|
||||
if (info_ptr->text == NULL)
|
||||
{
|
||||
png_free(png_ptr, old_text);
|
||||
return(1);
|
||||
}
|
||||
png_memcpy(info_ptr->text, old_text, (png_size_t)(old_max *
|
||||
sizeof(png_text)));
|
||||
png_free(png_ptr, old_text);
|
||||
@ -659,8 +699,10 @@ png_set_text(png_structp png_ptr, png_infop info_ptr, png_textp text_ptr,
|
||||
{
|
||||
info_ptr->max_text = num_text + 8;
|
||||
info_ptr->num_text = 0;
|
||||
info_ptr->text = (png_textp)png_malloc(png_ptr,
|
||||
info_ptr->text = (png_textp)png_malloc_warn(png_ptr,
|
||||
(png_uint_32)(info_ptr->max_text * sizeof (png_text)));
|
||||
if (info_ptr->text == NULL)
|
||||
return(1);
|
||||
#ifdef PNG_FREE_ME_SUPPORTED
|
||||
info_ptr->free_me |= PNG_FREE_TEXT;
|
||||
#endif
|
||||
@ -720,8 +762,10 @@ png_set_text(png_structp png_ptr, png_infop info_ptr, png_textp text_ptr,
|
||||
textp->compression = text_ptr[i].compression;
|
||||
}
|
||||
|
||||
textp->key = (png_charp)png_malloc(png_ptr,
|
||||
textp->key = (png_charp)png_malloc_warn(png_ptr,
|
||||
(png_uint_32)(key_len + text_length + lang_len + lang_key_len + 4));
|
||||
if (textp->key == NULL)
|
||||
return(1);
|
||||
png_debug2(2, "Allocated %lu bytes at %x in png_set_text\n",
|
||||
(png_uint_32)(key_len + lang_len + lang_key_len + text_length + 4),
|
||||
(int)textp->key);
|
||||
@ -772,6 +816,7 @@ png_set_text(png_structp png_ptr, png_infop info_ptr, png_textp text_ptr,
|
||||
info_ptr->num_text++;
|
||||
png_debug1(3, "transferred text chunk %d\n", info_ptr->num_text);
|
||||
}
|
||||
return(0);
|
||||
}
|
||||
#endif
|
||||
|
||||
@ -839,8 +884,13 @@ png_set_sPLT(png_structp png_ptr,
|
||||
png_sPLT_tp np;
|
||||
int i;
|
||||
|
||||
np = (png_sPLT_tp)png_malloc(png_ptr,
|
||||
np = (png_sPLT_tp)png_malloc_warn(png_ptr,
|
||||
(info_ptr->splt_palettes_num + nentries) * sizeof(png_sPLT_t));
|
||||
if (np == NULL)
|
||||
{
|
||||
png_warning(png_ptr, "No memory for splt palettes.");
|
||||
return;
|
||||
}
|
||||
|
||||
png_memcpy(np, info_ptr->splt_palettes,
|
||||
info_ptr->splt_palettes_num * sizeof(png_sPLT_t));
|
||||
@ -883,9 +933,14 @@ png_set_unknown_chunks(png_structp png_ptr,
|
||||
if (png_ptr == NULL || info_ptr == NULL || num_unknowns == 0)
|
||||
return;
|
||||
|
||||
np = (png_unknown_chunkp)png_malloc(png_ptr,
|
||||
np = (png_unknown_chunkp)png_malloc_warn(png_ptr,
|
||||
(info_ptr->unknown_chunks_num + num_unknowns) *
|
||||
sizeof(png_unknown_chunk));
|
||||
if (np == NULL)
|
||||
{
|
||||
png_warning(png_ptr, "Out of memory while processing unknown chunk.");
|
||||
return;
|
||||
}
|
||||
|
||||
png_memcpy(np, info_ptr->unknown_chunks,
|
||||
info_ptr->unknown_chunks_num * sizeof(png_unknown_chunk));
|
||||
@ -899,11 +954,16 @@ png_set_unknown_chunks(png_structp png_ptr,
|
||||
|
||||
png_strcpy((png_charp)to->name, (png_charp)from->name);
|
||||
to->data = (png_bytep)png_malloc(png_ptr, from->size);
|
||||
png_memcpy(to->data, from->data, from->size);
|
||||
to->size = from->size;
|
||||
if (to->data == NULL)
|
||||
png_warning(png_ptr, "Out of memory while processing unknown chunk.");
|
||||
else
|
||||
{
|
||||
png_memcpy(to->data, from->data, from->size);
|
||||
to->size = from->size;
|
||||
|
||||
/* note our location in the read or write sequence */
|
||||
to->location = (png_byte)(png_ptr->mode & 0xff);
|
||||
/* note our location in the read or write sequence */
|
||||
to->location = (png_byte)(png_ptr->mode & 0xff);
|
||||
}
|
||||
}
|
||||
|
||||
info_ptr->unknown_chunks = np;
|
||||
|
@ -1,7 +1,7 @@
|
||||
|
||||
/* pngtest.c - a simple test program to test libpng
|
||||
*
|
||||
* libpng 1.2.3 - May 21, 2002
|
||||
* libpng 1.2.4beta1 - May 25, 2002
|
||||
* For conditions of distribution and use, see copyright notice in png.h
|
||||
* Copyright (c) 1998-2002 Glenn Randers-Pehrson
|
||||
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
|
||||
@ -1512,4 +1512,4 @@ main(int argc, char *argv[])
|
||||
}
|
||||
|
||||
/* Generate a compiler error if there is an old png.h in the search path. */
|
||||
typedef version_1_2_3 your_png_h_is_not_version_1_2_3;
|
||||
typedef version_1_2_4beta1 your_png_h_is_not_version_1_2_4beta1;
|
||||
|
@ -1,7 +1,7 @@
|
||||
|
||||
/* pngtrans.c - transforms the data in a row (used by both readers and writers)
|
||||
*
|
||||
* libpng 1.2.3 - May 21, 2002
|
||||
* libpng 1.2.4beta1 - May 25, 2002
|
||||
* For conditions of distribution and use, see copyright notice in png.h
|
||||
* Copyright (c) 1998-2002 Glenn Randers-Pehrson
|
||||
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
|
||||
|
@ -2,7 +2,7 @@
|
||||
*
|
||||
* For Intel x86 CPU and Microsoft Visual C++ compiler
|
||||
*
|
||||
* libpng version 1.2.3 - May 21, 2002
|
||||
* libpng version 1.2.4beta1 - May 25, 2002
|
||||
* For conditions of distribution and use, see copyright notice in png.h
|
||||
* Copyright (c) 1998-2002 Glenn Randers-Pehrson
|
||||
* Copyright (c) 1998, Intel Corporation
|
||||
|
2
pngwio.c
2
pngwio.c
@ -1,7 +1,7 @@
|
||||
|
||||
/* pngwio.c - functions for data output
|
||||
*
|
||||
* libpng 1.2.3 - May 21, 2002
|
||||
* libpng 1.2.4beta1 - May 25, 2002
|
||||
* For conditions of distribution and use, see copyright notice in png.h
|
||||
* Copyright (c) 1998-2002 Glenn Randers-Pehrson
|
||||
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
|
||||
|
@ -1,7 +1,7 @@
|
||||
|
||||
/* pngwrite.c - general routines to write a PNG file
|
||||
*
|
||||
* libpng 1.2.3 - May 21, 2002
|
||||
* libpng 1.2.4beta1 - May 25, 2002
|
||||
* For conditions of distribution and use, see copyright notice in png.h
|
||||
* Copyright (c) 1998-2002 Glenn Randers-Pehrson
|
||||
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
|
||||
|
@ -1,7 +1,7 @@
|
||||
|
||||
/* pngwtran.c - transforms the data in a row for PNG writers
|
||||
*
|
||||
* libpng 1.2.3 - May 21, 2002
|
||||
* libpng 1.2.4beta1 - May 25, 2002
|
||||
* For conditions of distribution and use, see copyright notice in png.h
|
||||
* Copyright (c) 1998-2002 Glenn Randers-Pehrson
|
||||
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
|
||||
|
@ -1,7 +1,7 @@
|
||||
|
||||
/* pngwutil.c - utilities to write a PNG file
|
||||
*
|
||||
* libpng 1.2.3 - May 21, 2002
|
||||
* libpng 1.2.4beta1 - May 25, 2002
|
||||
* For conditions of distribution and use, see copyright notice in png.h
|
||||
* Copyright (c) 1998-2002 Glenn Randers-Pehrson
|
||||
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
|
||||
|
@ -1,5 +1,5 @@
|
||||
Microsoft Developer Studio Build File, Format Version 6.00 for
|
||||
libpng 1.2.3 (May 21, 2002) and zlib
|
||||
libpng 1.2.4beta1 (May 25, 2002) and zlib
|
||||
|
||||
Copyright (C) 2000 Simon-Pierre Cadieux
|
||||
For conditions of distribution and use, see copyright notice in png.h
|
||||
|
@ -6,7 +6,7 @@ LIBRARY
|
||||
DESCRIPTION "PNG image compression library for Windows"
|
||||
|
||||
EXPORTS
|
||||
;Version 1.2.3
|
||||
;Version 1.2.4beta1
|
||||
png_build_grayscale_palette @1
|
||||
png_check_sig @2
|
||||
png_chunk_error @3
|
||||
@ -216,3 +216,5 @@ EXPORTS
|
||||
; Added at version 1.2.2 and deleted from 1.2.3
|
||||
; png_zalloc @195
|
||||
; png_zfree @196
|
||||
; Added at version 1.2.4
|
||||
png_malloc_warn @195
|
||||
|
@ -1,6 +1,6 @@
|
||||
A set of project files is available for Netware. Get
|
||||
libpng-1.2.3-project-netware.zip from a libpng distribution
|
||||
libpng-1.2.4beta1-project-netware.zip from a libpng distribution
|
||||
site such as http://libpng.sourceforge.net
|
||||
|
||||
Put the zip file in this directory (projects) and then run
|
||||
"unzip -a libpng-1.2.3-project-netware.zip"
|
||||
"unzip -a libpng-1.2.4beta1-project-netware.zip"
|
||||
|
@ -1,6 +1,6 @@
|
||||
A set of project files is available for WinCE. Get
|
||||
libpng-1.2.3-project-wince.zip from a libpng distribution
|
||||
libpng-1.2.4beta1-project-wince.zip from a libpng distribution
|
||||
site such as http://libpng.sourceforge.net
|
||||
|
||||
Put the zip file in this directory (projects) and then run
|
||||
"unzip -a libpng-1.2.3-project-wince.zip"
|
||||
"unzip -a libpng-1.2.4beta1-project-wince.zip"
|
||||
|
@ -8,7 +8,7 @@
|
||||
|
||||
# Modeled after libxml-config.
|
||||
|
||||
version=1.2.3
|
||||
version=1.2.4beta1
|
||||
prefix=""
|
||||
cppflags=""
|
||||
cflags=""
|
||||
|
@ -6,6 +6,6 @@ includedir=${exec_prefix}/include
|
||||
|
||||
Name: libpng12
|
||||
Description: Loads and saves PNG files
|
||||
Version: 1.2.3
|
||||
Version: 1.2.4beta1
|
||||
Libs: -L${libdir} -lpng12 -lz -lm
|
||||
Cflags: -I${includedir}/libpng12
|
||||
|
@ -33,7 +33,7 @@ RANLIB=echo
|
||||
|
||||
LIBNAME=libpng12
|
||||
PNGMAJ = 0
|
||||
PNGMIN = 1.2.3
|
||||
PNGMIN = 1.2.4beta1
|
||||
PNGVER = $(PNGMAJ).$(PNGMIN)
|
||||
|
||||
INCPATH=$(prefix)/include
|
||||
@ -47,14 +47,14 @@ BINPATH=$(prefix)/bin
|
||||
# make install DESTDIR=/tmp/build/libpng
|
||||
#
|
||||
# If you're going to install into a temporary location
|
||||
# via DESTDIR, that location must already exist before
|
||||
# via DESTDIR, $(DESTDIR)$(prefix) must already exist before
|
||||
# you execute make install.
|
||||
DESTDIR=
|
||||
|
||||
DB=$(DESTDIR)/$(BINPATH)
|
||||
DI=$(DESTDIR)/$(INCPATH)
|
||||
DL=$(DESTDIR)/$(LIBPATH)
|
||||
DM=$(DESTDIR)/$(MANPATH)
|
||||
DB=$(DESTDIR)$(BINPATH)
|
||||
DI=$(DESTDIR)$(INCPATH)
|
||||
DL=$(DESTDIR)$(LIBPATH)
|
||||
DM=$(DESTDIR)$(MANPATH)
|
||||
|
||||
OBJS = png.o pngset.o pngget.o pngrutil.o pngtrans.o pngwutil.o \
|
||||
pngread.o pngrio.o pngwio.o pngwrite.o pngrtran.o \
|
||||
@ -67,7 +67,7 @@ OBJSDLL = $(OBJS:.o=.pic.o)
|
||||
.c.pic.o:
|
||||
$(CC) -c $(CFLAGS) -KPIC -o $@ $*.c
|
||||
|
||||
all: libpng.a $(LIBNAME).so pngtest
|
||||
all: libpng.a $(LIBNAME).so pngtest libpng.pc libpng-config
|
||||
|
||||
libpng.a: $(OBJS)
|
||||
ar rc $@ $(OBJS)
|
||||
@ -118,12 +118,10 @@ install-headers: png.h pngconf.h
|
||||
-@if [ ! -d $(DI) ]; then mkdir $(DI); fi
|
||||
-@if [ ! -d $(DI)/$(LIBNAME) ]; then mkdir $(DI)/$(LIBNAME); fi
|
||||
cp png.h pngconf.h $(DI)/$(LIBNAME)
|
||||
chmod 644 $(DI)/$(LIBNAME)/png.h \
|
||||
$(DI)/$(LIBNAME)/pngconf.h
|
||||
chmod 644 $(DI)/$(LIBNAME)/png.h $(DI)/$(LIBNAME)/pngconf.h
|
||||
-@/bin/rm -f $(DI)/png.h $(DI)/pngconf.h
|
||||
-@/bin/rm $(DI)/libpng
|
||||
(cd $(DI); ln -f -s $(LIBNAME) libpng; \
|
||||
ln -f -s $(LIBNAME)/* .)
|
||||
(cd $(DI); ln -f -s $(LIBNAME) libpng; ln -f -s $(LIBNAME)/* .)
|
||||
|
||||
install-static: install-headers libpng.a
|
||||
-@if [ ! -d $(DL) ]; then mkdir $(DL); fi
|
||||
@ -134,8 +132,7 @@ install-static: install-headers libpng.a
|
||||
|
||||
install-shared: install-headers $(LIBNAME).so.$(PNGVER) libpng.pc
|
||||
-@if [ ! -d $(DL) ]; then mkdir $(DL); fi
|
||||
-@/bin/rm -f $(DL)/$(LIBNAME).so.$(PNGMAJ)* \
|
||||
$(DL)/$(LIBNAME).so
|
||||
-@/bin/rm -f $(DL)/$(LIBNAME).so.$(PNGMAJ)* $(DL)/$(LIBNAME).so
|
||||
-@/bin/rm -f $(DL)/libpng.so
|
||||
-@/bin/rm -f $(DL)/libpng.so.3
|
||||
-@/bin/rm -f $(DL)/libpng.so.3.*
|
||||
|
@ -33,7 +33,7 @@ RANLIB=echo
|
||||
|
||||
LIBNAME=libpng12
|
||||
PNGMAJ = 0
|
||||
PNGMIN = 1.2.3
|
||||
PNGMIN = 1.2.4beta1
|
||||
PNGVER = $(PNGMAJ).$(PNGMIN)
|
||||
|
||||
INCPATH=$(prefix)/include
|
||||
@ -47,14 +47,14 @@ BINPATH=$(prefix)/bin
|
||||
# make install DESTDIR=/tmp/build/libpng
|
||||
#
|
||||
# If you're going to install into a temporary location
|
||||
# via DESTDIR, that location must already exist before
|
||||
# via DESTDIR, $(DESTDIR)$(prefix) must already exist before
|
||||
# you execute make install.
|
||||
DESTDIR=
|
||||
|
||||
DB=$(DESTDIR)/$(BINPATH)
|
||||
DI=$(DESTDIR)/$(INCPATH)
|
||||
DL=$(DESTDIR)/$(LIBPATH)
|
||||
DM=$(DESTDIR)/$(MANPATH)
|
||||
DB=$(DESTDIR)$(BINPATH)
|
||||
DI=$(DESTDIR)$(INCPATH)
|
||||
DL=$(DESTDIR)$(LIBPATH)
|
||||
DM=$(DESTDIR)$(MANPATH)
|
||||
|
||||
OBJS = png.o pngset.o pngget.o pngrutil.o pngtrans.o pngwutil.o \
|
||||
pngread.o pngrio.o pngwio.o pngwrite.o pngrtran.o \
|
||||
@ -67,7 +67,7 @@ OBJSDLL = $(OBJS:.o=.pic.o)
|
||||
.c.pic.o:
|
||||
$(CC) -c $(CFLAGS) -KPIC -o $@ $*.c
|
||||
|
||||
all: libpng.a $(LIBNAME).so pngtest
|
||||
all: libpng.a $(LIBNAME).so pngtest libpng.pc libpng-config
|
||||
|
||||
libpng.a: $(OBJS)
|
||||
ar rc $@ $(OBJS)
|
||||
@ -118,12 +118,10 @@ install-headers: png.h pngconf.h
|
||||
-@if [ ! -d $(DI) ]; then mkdir $(DI); fi
|
||||
-@if [ ! -d $(DI)/$(LIBNAME) ]; then mkdir $(DI)/$(LIBNAME); fi
|
||||
cp png.h pngconf.h $(DI)/$(LIBNAME)
|
||||
chmod 644 $(DI)/$(LIBNAME)/png.h \
|
||||
$(DI)/$(LIBNAME)/pngconf.h
|
||||
chmod 644 $(DI)/$(LIBNAME)/png.h $(DI)/$(LIBNAME)/pngconf.h
|
||||
-@/bin/rm -f $(DI)/png.h $(DI)/pngconf.h
|
||||
-@/bin/rm $(DI)/libpng
|
||||
(cd $(DI); ln -f -s $(LIBNAME) libpng; \
|
||||
ln -f -s $(LIBNAME)/* .)
|
||||
(cd $(DI); ln -f -s $(LIBNAME) libpng; ln -f -s $(LIBNAME)/* .)
|
||||
|
||||
install-static: install-headers libpng.a
|
||||
-@if [ ! -d $(DL) ]; then mkdir $(DL); fi
|
||||
@ -134,8 +132,7 @@ install-static: install-headers libpng.a
|
||||
|
||||
install-shared: install-headers $(LIBNAME).so.$(PNGVER) libpng.pc
|
||||
-@if [ ! -d $(DL) ]; then mkdir $(DL); fi
|
||||
-@/bin/rm -f $(DL)/$(LIBNAME).so.$(PNGMAJ)* \
|
||||
$(DL)/$(LIBNAME).so
|
||||
-@/bin/rm -f $(DL)/$(LIBNAME).so.$(PNGMAJ)* $(DL)/$(LIBNAME).so
|
||||
-@/bin/rm -f $(DL)/libpng.so
|
||||
-@/bin/rm -f $(DL)/libpng.so.3
|
||||
-@/bin/rm -f $(DL)/libpng.so.3.*
|
||||
|
@ -17,7 +17,7 @@ RANLIB = ranlib
|
||||
RM = rm -f
|
||||
|
||||
PNGMAJ = 0
|
||||
PNGMIN = 1.2.3
|
||||
PNGMIN = 1.2.4beta1
|
||||
PNGVER = $(PNGMAJ).$(PNGMIN)
|
||||
|
||||
prefix=/usr/local
|
||||
@ -30,7 +30,7 @@ LIBPATH=$(prefix)/lib
|
||||
# make install DESTDIR=/tmp/build/libpng
|
||||
#
|
||||
# If you're going to install into a temporary location
|
||||
# via DESTDIR, that location must already exist before
|
||||
# via DESTDIR, $(DESTDIR)$(prefix) must already exist before
|
||||
# you execute make install.
|
||||
DESTDIR=
|
||||
|
||||
|
@ -20,7 +20,7 @@ LIBPATH=$(prefix)/lib
|
||||
# make install DESTDIR=/tmp/build/libpng
|
||||
#
|
||||
# If you're going to install into a temporary location
|
||||
# via DESTDIR, that location must already exist before
|
||||
# via DESTDIR, $(DESTDIR)$(prefix) must already exist before
|
||||
# you execute make install.
|
||||
DESTDIR=
|
||||
|
||||
|
@ -12,7 +12,7 @@ ZLIBLIB=/usr/local/lib
|
||||
ZLIBINC=/usr/local/include
|
||||
|
||||
PNGMAJ = 0
|
||||
PNGMIN = 1.2.3
|
||||
PNGMIN = 1.2.4beta1
|
||||
PNGVER = $(PNGMAJ).$(PNGMIN)
|
||||
|
||||
ALIGN=
|
||||
@ -46,14 +46,14 @@ BINPATH=$(prefix)/bin
|
||||
# make install DESTDIR=/tmp/build/libpng
|
||||
#
|
||||
# If you're going to install into a temporary location
|
||||
# via DESTDIR, that location must already exist before
|
||||
# via DESTDIR, $(DESTDIR)$(prefix) must already exist before
|
||||
# you execute make install.
|
||||
DESTDIR=
|
||||
|
||||
DB=$(DESTDIR)/$(BINPATH)
|
||||
DI=$(DESTDIR)/$(INCPATH)
|
||||
DL=$(DESTDIR)/$(LIBPATH)
|
||||
DM=$(DESTDIR)/$(MANPATH)
|
||||
DB=$(DESTDIR)$(BINPATH)
|
||||
DI=$(DESTDIR)$(INCPATH)
|
||||
DL=$(DESTDIR)$(LIBPATH)
|
||||
DM=$(DESTDIR)$(MANPATH)
|
||||
|
||||
LIBNAME=libpng12
|
||||
|
||||
@ -65,7 +65,7 @@ OBJSDLL = $(OBJS)
|
||||
|
||||
.SUFFIXES: .c .o
|
||||
|
||||
all: libpng.a $(LIBNAME).so pngtest
|
||||
all: libpng.a $(LIBNAME).so pngtest libpng.pc libpng-config
|
||||
|
||||
libpng.a: $(OBJS)
|
||||
ar rc $@ $(OBJS)
|
||||
@ -106,8 +106,7 @@ install-headers: png.h pngconf.h
|
||||
-@if [ ! -d $(DI) ]; then mkdir $(DI); fi
|
||||
-@if [ ! -d $(DI)/$(LIBNAME) ]; then mkdir $(DI)/$(LIBNAME); fi
|
||||
cp png.h pngconf.h $(DI)/$(LIBNAME)
|
||||
chmod 644 $(DI)/$(LIBNAME)/png.h \
|
||||
$(DI)/$(LIBNAME)/pngconf.h
|
||||
chmod 644 $(DI)/$(LIBNAME)/png.h $(DI)/$(LIBNAME)/pngconf.h
|
||||
-@/bin/rm -f $(DI)/png.h $(DI)/pngconf.h
|
||||
-@/bin/rm -f $(DI)/libpng
|
||||
(cd $(DI); ln -sf $(LIBNAME) libpng; ln -sf $(LIBNAME)/* .)
|
||||
@ -121,8 +120,7 @@ install-static: install-headers libpng.a
|
||||
|
||||
install-shared: install-headers $(LIBNAME).so.$(PNGVER) libpng.pc
|
||||
-@if [ ! -d $(DL) ]; then mkdir $(DL); fi
|
||||
-@/bin/rm -f $(DL)/$(LIBNAME).so.$(PNGMAJ)* \
|
||||
$(DL)/$(LIBNAME).so
|
||||
-@/bin/rm -f $(DL)/$(LIBNAME).so.$(PNGMAJ)* $(DL)/$(LIBNAME).so
|
||||
-@/bin/rm -f $(DL)/libpng.so
|
||||
-@/bin/rm -f $(DL)/libpng.so.3
|
||||
-@/bin/rm -f $(DL)/libpng.so.3.*
|
||||
|
@ -26,7 +26,7 @@ endif
|
||||
# make install DESTDIR=/tmp/build/libpng
|
||||
#
|
||||
# If you're going to install into a temporary location
|
||||
# via DESTDIR, that location must already exist before
|
||||
# via DESTDIR, $(DESTDIR)$(prefix) must already exist before
|
||||
# you execute make install.
|
||||
|
||||
DESTDIR=
|
||||
@ -79,7 +79,7 @@ CFLAGS= $(strip $(MINGW_CCFLAGS) $(addprefix -I,$(ZLIBINC)) \
|
||||
LIBNAME = libpng12
|
||||
PNGMAJ = 0
|
||||
PNGDLL = 12
|
||||
PNGMIN = 1.2.3
|
||||
PNGMIN = 1.2.4beta1
|
||||
PNGVER = $(PNGMAJ).$(PNGMIN)
|
||||
|
||||
SHAREDLIB=cygpng$(PNGDLL).dll
|
||||
@ -108,9 +108,9 @@ MAN5PATH=$(MANPATH)/man5
|
||||
# cosmetic: shortened strings:
|
||||
S =$(SRCDIR)
|
||||
D =$(DESTDIR)
|
||||
DB =$(D)/$(BINPATH)
|
||||
DI =$(D)/$(INCPATH)
|
||||
DL =$(D)/$(LIBPATH)
|
||||
DB =$(D)$(BINPATH)
|
||||
DI =$(D)$(INCPATH)
|
||||
DL =$(D)$(LIBPATH)
|
||||
|
||||
OBJS = png.o pngset.o pngget.o pngrutil.o pngtrans.o pngwutil.o \
|
||||
pngread.o pngrio.o pngwio.o pngwrite.o pngrtran.o \
|
||||
@ -126,7 +126,7 @@ OBJSDLL = $(OBJS:.o=.pic.o)
|
||||
%.pic.o : %.c
|
||||
$(CC) -c $(CFLAGS) -o $@ $<
|
||||
|
||||
all: all-static all-shared libpng.pc libpng-config
|
||||
all: all-static all-shared libpng.pc libpng-config libpng.pc libpng-config
|
||||
|
||||
# Make this to verify that "make [...] install" will do what you want.
|
||||
buildsetup-tell:
|
||||
|
@ -23,7 +23,7 @@ LDFLAGS=-L. -L$(ZLIBLIB) -lpng12 -lz
|
||||
RANLIB=ranlib
|
||||
|
||||
PNGMAJ = 0
|
||||
PNGMIN = 1.2.3
|
||||
PNGMIN = 1.2.4beta1
|
||||
PNGVER = $(PNGMAJ).$(PNGMIN)
|
||||
LIBNAME = libpng12
|
||||
|
||||
@ -38,14 +38,14 @@ BINPATH=$(prefix)/bin
|
||||
# make install DESTDIR=/tmp/build/libpng
|
||||
#
|
||||
# If you're going to install into a temporary location
|
||||
# via DESTDIR, that location must already exist before
|
||||
# via DESTDIR, $(DESTDIR)$(prefix) must already exist before
|
||||
# you execute make install.
|
||||
DESTDIR=
|
||||
|
||||
DB=$(DESTDIR)/$(BINPATH)
|
||||
DI=$(DESTDIR)/$(INCPATH)
|
||||
DL=$(DESTDIR)/$(LIBPATH)
|
||||
DM=$(DESTDIR)/$(MANPATH)
|
||||
DB=$(DESTDIR)$(BINPATH)
|
||||
DI=$(DESTDIR)$(INCPATH)
|
||||
DL=$(DESTDIR)$(LIBPATH)
|
||||
DM=$(DESTDIR)$(MANPATH)
|
||||
|
||||
OBJS = png.o pngset.o pngget.o pngrutil.o pngtrans.o pngwutil.o \
|
||||
pngread.o pngrio.o pngwio.o pngwrite.o pngrtran.o \
|
||||
@ -58,7 +58,7 @@ OBJSDLL = $(OBJS:.o=.pic.o)
|
||||
.c.pic.o:
|
||||
$(CC) -c $(CFLAGS) -fno-common -o $@ $*.c
|
||||
|
||||
all: libpng.a $(LIBNAME).dylib pngtest
|
||||
all: libpng.a $(LIBNAME).dylib pngtest libpng.pc libpng-config
|
||||
|
||||
libpng.a: $(OBJS)
|
||||
ar rc $@ $(OBJS)
|
||||
@ -101,8 +101,7 @@ install-headers: png.h pngconf.h
|
||||
-@if [ ! -d $(DI) ]; then mkdir $(DI); fi
|
||||
-@if [ ! -d $(DI)/$(LIBNAME) ]; then mkdir $(DI)/$(LIBNAME); fi
|
||||
cp png.h pngconf.h $(DI)/$(LIBNAME)
|
||||
chmod 644 $(DI)/$(LIBNAME)/png.h \
|
||||
$(DI)/$(LIBNAME)/pngconf.h
|
||||
chmod 644 $(DI)/$(LIBNAME)/png.h $(DI)/$(LIBNAME)/pngconf.h
|
||||
-@/bin/rm -f $(DI)/png.h $(DI)/pngconf.h
|
||||
-@/bin/rm -f $(DI)/libpng
|
||||
(cd $(DI); ln -sf $(LIBNAME) libpng; ln -sf $(LIBNAME)/* .)
|
||||
|
@ -16,14 +16,14 @@ BINPATH=$(prefix)/bin
|
||||
# make install DESTDIR=/tmp/build/libpng
|
||||
#
|
||||
# If you're going to install into a temporary location
|
||||
# via DESTDIR, that location must already exist before
|
||||
# via DESTDIR, $(DESTDIR)$(prefix) must already exist before
|
||||
# you execute make install.
|
||||
DESTDIR=
|
||||
|
||||
DB=$(DESTDIR)/$(BINPATH)
|
||||
DI=$(DESTDIR)/$(INCPATH)
|
||||
DL=$(DESTDIR)/$(LIBPATH)
|
||||
DM=$(DESTDIR)/$(MANPATH)
|
||||
DB=$(DESTDIR)$(BINPATH)
|
||||
DI=$(DESTDIR)$(INCPATH)
|
||||
DL=$(DESTDIR)$(LIBPATH)
|
||||
DM=$(DESTDIR)$(MANPATH)
|
||||
|
||||
# Where the zlib library and include files are located
|
||||
#ZLIBLIB=/usr/local/lib
|
||||
@ -32,7 +32,7 @@ ZLIBLIB=../zlib
|
||||
ZLIBINC=../zlib
|
||||
|
||||
PNGMAJ = 0
|
||||
PNGMIN = 1.2.3
|
||||
PNGMIN = 1.2.4beta1
|
||||
PNGVER = $(PNGMAJ).$(PNGMIN)
|
||||
LIBNAME = libpng12
|
||||
|
||||
@ -47,7 +47,7 @@ OBJS = png.o pngset.o pngget.o pngrutil.o pngtrans.o pngwutil.o \
|
||||
pngread.o pngrio.o pngwio.o pngwrite.o pngrtran.o \
|
||||
pngwtran.o pngmem.o pngerror.o pngpread.o
|
||||
|
||||
all: $(LIBNAME).so libpng.a pngtest
|
||||
all: $(LIBNAME).so libpng.a pngtest libpng.pc libpng-config
|
||||
|
||||
libpng.a: $(OBJS)
|
||||
ar rc $@ $(OBJS)
|
||||
@ -85,8 +85,7 @@ install-headers: png.h pngconf.h
|
||||
-@if [ ! -d $(DI) ]; then mkdir $(DI); fi
|
||||
-@if [ ! -d $(DI)/$(LIBNAME) ]; then mkdir $(DI)/$(LIBNAME); fi
|
||||
cp png.h pngconf.h $(DI)/$(LIBNAME)
|
||||
chmod 644 $(DI)/$(LIBNAME)/png.h \
|
||||
$(DI)/$(LIBNAME)/pngconf.h
|
||||
chmod 644 $(DI)/$(LIBNAME)/png.h $(DI)/$(LIBNAME)/pngconf.h
|
||||
-@/bin/rm -f $(DI)/png.h $(DI)/pngconf.h
|
||||
-@/bin/rm -f $(DI)/libpng
|
||||
(cd $(DI); ln -sf $(LIBNAME) libpng; ln -sf $(LIBNAME)/* .)
|
||||
@ -100,8 +99,7 @@ install-static: install-headers libpng.a
|
||||
|
||||
install-shared: install-headers $(LIBNAME).so.$(PNGVER) libpng.pc
|
||||
-@if [ ! -d $(DL) ]; then mkdir $(DL); fi
|
||||
-@/bin/rm -f $(DL)/$(LIBNAME).so.$(PNGMAJ)* \
|
||||
$(DL)/$(LIBNAME).so
|
||||
-@/bin/rm -f $(DL)/$(LIBNAME).so.$(PNGMAJ)* $(DL)/$(LIBNAME).so
|
||||
-@/bin/rm -f $(DL)/libpng.so
|
||||
-@/bin/rm -f $(DL)/libpng.so.3
|
||||
-@/bin/rm -f $(DL)/libpng.so.3.*
|
||||
|
@ -15,7 +15,7 @@
|
||||
|
||||
LIBNAME = libpng12
|
||||
PNGMAJ = 0
|
||||
PNGMIN = 1.2.3
|
||||
PNGMIN = 1.2.4beta1
|
||||
PNGVER = $(PNGMAJ).$(PNGMIN)
|
||||
|
||||
CC=gcc
|
||||
@ -71,14 +71,14 @@ BINPATH=$(prefix)/bin
|
||||
# make install DESTDIR=/tmp/build/libpng
|
||||
#
|
||||
# If you're going to install into a temporary location
|
||||
# via DESTDIR, that location must already exist before
|
||||
# via DESTDIR, $(DESTDIR)$(prefix) must already exist before
|
||||
# you execute make install.
|
||||
DESTDIR=
|
||||
|
||||
DB=$(DESTDIR)/$(BINPATH)
|
||||
DI=$(DESTDIR)/$(INCPATH)
|
||||
DL=$(DESTDIR)/$(LIBPATH)
|
||||
DM=$(DESTDIR)/$(MANPATH)
|
||||
DB=$(DESTDIR)$(BINPATH)
|
||||
DI=$(DESTDIR)$(INCPATH)
|
||||
DL=$(DESTDIR)$(LIBPATH)
|
||||
DM=$(DESTDIR)$(MANPATH)
|
||||
|
||||
OBJS = png.o pngset.o pngget.o pngrutil.o pngtrans.o pngwutil.o \
|
||||
pngread.o pngrio.o pngwio.o pngwrite.o pngrtran.o \
|
||||
@ -91,7 +91,7 @@ OBJSDLL = $(OBJS:.o=.pic.o)
|
||||
.c.pic.o:
|
||||
$(CC) -c $(CFLAGS) -fPIC -o $@ $*.c
|
||||
|
||||
all: libpng.a $(LIBNAME).so pngtest pngtest-static
|
||||
all: libpng.a $(LIBNAME).so pngtest pngtest-static libpng.pc libpng-config
|
||||
|
||||
libpng.pc:
|
||||
cat scripts/libpng.pc.in | sed -e s\!@PREFIX@!$(prefix)! > libpng.pc
|
||||
@ -100,7 +100,7 @@ libpng-config:
|
||||
( cat scripts/libpng-config-head.in; \
|
||||
echo prefix=\"$(prefix)\"; \
|
||||
echo cppflags=\"-I$(INCPATH)/$(LIBNAME) -DPNG_THREAD_UNSAFE_OK \
|
||||
-DPNG_USE_PNGGCCRD"; \
|
||||
-DPNG_USE_PNGGCCRD\"; \
|
||||
echo cflags=\"\"; \
|
||||
echo ldflags=\"\"; \
|
||||
echo libs=\"-lpng12 -lz -lm\"; \
|
||||
@ -147,8 +147,7 @@ install-headers: png.h pngconf.h
|
||||
-@if [ ! -d $(DI) ]; then mkdir $(DI); fi
|
||||
-@if [ ! -d $(DI)/$(LIBNAME) ]; then mkdir $(DI)/$(LIBNAME); fi
|
||||
cp png.h pngconf.h $(DI)/$(LIBNAME)
|
||||
chmod 644 $(DI)/$(LIBNAME)/png.h \
|
||||
$(DI)/$(LIBNAME)/pngconf.h
|
||||
chmod 644 $(DI)/$(LIBNAME)/png.h $(DI)/$(LIBNAME)/pngconf.h
|
||||
-@/bin/rm -f $(DI)/png.h $(DI)/pngconf.h
|
||||
-@/bin/rm -f $(DI)/libpng
|
||||
(cd $(DI); ln -sf $(LIBNAME) libpng; ln -sf $(LIBNAME)/* .)
|
||||
@ -162,8 +161,7 @@ install-static: install-headers libpng.a
|
||||
|
||||
install-shared: install-headers $(LIBNAME).so.$(PNGVER) libpng.pc
|
||||
-@if [ ! -d $(DL) ]; then mkdir $(DL); fi
|
||||
-@/bin/rm -f $(DL)/$(LIBNAME).so.$(PNGMAJ)* \
|
||||
$(DL)/$(LIBNAME).so
|
||||
-@/bin/rm -f $(DL)/$(LIBNAME).so.$(PNGMAJ)* $(DL)/$(LIBNAME).so
|
||||
-@/bin/rm -f $(DL)/libpng.so
|
||||
-@/bin/rm -f $(DL)/libpng.so.3
|
||||
-@/bin/rm -f $(DL)/libpng.so.3.*
|
||||
|
@ -33,7 +33,7 @@ RANLIB=ranlib
|
||||
#RANLIB=echo
|
||||
|
||||
PNGMAJ = 0
|
||||
PNGMIN = 1.2.3
|
||||
PNGMIN = 1.2.4beta1
|
||||
PNGVER = $(PNGMAJ).$(PNGMIN)
|
||||
LIBNAME = libpng12
|
||||
|
||||
@ -48,14 +48,14 @@ BINPATH=$(prefix)/bin
|
||||
# make install DESTDIR=/tmp/build/libpng
|
||||
#
|
||||
# If you're going to install into a temporary location
|
||||
# via DESTDIR, that location must already exist before
|
||||
# via DESTDIR, $(DESTDIR)$(prefix) must already exist before
|
||||
# you execute make install.
|
||||
DESTDIR=
|
||||
|
||||
DB=$(DESTDIR)/$(BINPATH)
|
||||
DI=$(DESTDIR)/$(INCPATH)
|
||||
DL=$(DESTDIR)/$(LIBPATH)
|
||||
DM=$(DESTDIR)/$(MANPATH)
|
||||
DB=$(DESTDIR)$(BINPATH)
|
||||
DI=$(DESTDIR)$(INCPATH)
|
||||
DL=$(DESTDIR)$(LIBPATH)
|
||||
DM=$(DESTDIR)$(MANPATH)
|
||||
|
||||
OBJS = png.o pngset.o pngget.o pngrutil.o pngtrans.o pngwutil.o \
|
||||
pngread.o pngrio.o pngwio.o pngwrite.o pngrtran.o \
|
||||
@ -68,7 +68,7 @@ OBJSDLL = $(OBJS:.o=.pic.o)
|
||||
.c.pic.o:
|
||||
$(CC) -c $(CFLAGS) -fPIC -o $@ $*.c
|
||||
|
||||
all: libpng.a $(LIBNAME).sl pngtest
|
||||
all: libpng.a $(LIBNAME).sl pngtest libpng.pc libpng-config
|
||||
|
||||
libpng.a: $(OBJS)
|
||||
ar rc $@ $(OBJS)
|
||||
@ -108,8 +108,7 @@ install-headers: png.h pngconf.h
|
||||
-@if [ ! -d $(DI) ]; then mkdir $(DI); fi
|
||||
-@if [ ! -d $(DI)/$(LIBNAME) ]; then mkdir $(DI)/$(LIBNAME); fi
|
||||
cp png.h pngconf.h $(DI)/$(LIBNAME)
|
||||
chmod 644 $(DI)/$(LIBNAME)/png.h \
|
||||
$(DI)/$(LIBNAME)/pngconf.h
|
||||
chmod 644 $(DI)/$(LIBNAME)/png.h $(DI)/$(LIBNAME)/pngconf.h
|
||||
-@/bin/rm -f $(DI)/png.h $(DI)/pngconf.h
|
||||
-@/bin/rm -f $(DI)/libpng
|
||||
(cd $(DI); ln -sf $(LIBNAME) libpng; ln -sf $(LIBNAME)/* .)
|
||||
@ -123,8 +122,7 @@ install-static: install-headers libpng.a
|
||||
|
||||
install-shared: install-headers $(LIBNAME).sl.$(PNGVER) libpng.pc
|
||||
-@if [ ! -d $(DL) ]; then mkdir $(DL); fi
|
||||
-@/bin/rm -f $(DL)/$(LIBNAME).sl.$(PNGMAJ)* \
|
||||
$(DL)/$(LIBNAME).sl
|
||||
-@/bin/rm -f $(DL)/$(LIBNAME).sl.$(PNGMAJ)* $(DL)/$(LIBNAME).sl
|
||||
-@/bin/rm -f $(DL)/libpng.so
|
||||
-@/bin/rm -f $(DL)/libpng.so.3
|
||||
-@/bin/rm -f $(DL)/libpng.so.3.*
|
||||
|
@ -17,7 +17,7 @@ LDFLAGS=-L. -L$(ZLIBLIB) -lpng -lz -lm
|
||||
RANLIB=ranlib
|
||||
|
||||
PNGMAJ = 0
|
||||
PNGMIN = 1.2.3
|
||||
PNGMIN = 1.2.4beta1
|
||||
PNGVER = $(PNGMAJ).$(PNGMIN)
|
||||
LIBNAME = libpng12
|
||||
|
||||
@ -34,14 +34,14 @@ BINPATH=$(prefix)/bin
|
||||
# make install DESTDIR=/tmp/build/libpng
|
||||
#
|
||||
# If you're going to install into a temporary location
|
||||
# via DESTDIR, that location must already exist before
|
||||
# via DESTDIR, $(DESTDIR)$(prefix) must already exist before
|
||||
# you execute make install.
|
||||
DESTDIR=
|
||||
|
||||
DB=$(DESTDIR)/$(BINPATH)
|
||||
DI=$(DESTDIR)/$(INCPATH)
|
||||
DL=$(DESTDIR)/$(LIBPATH)
|
||||
DM=$(DESTDIR)/$(MANPATH)
|
||||
DB=$(DESTDIR)$(BINPATH)
|
||||
DI=$(DESTDIR)$(INCPATH)
|
||||
DL=$(DESTDIR)$(LIBPATH)
|
||||
DM=$(DESTDIR)$(MANPATH)
|
||||
|
||||
OBJS = png.o pngset.o pngget.o pngrutil.o pngtrans.o pngwutil.o \
|
||||
pngread.o pngrio.o pngwio.o pngwrite.o pngrtran.o \
|
||||
@ -54,7 +54,7 @@ OBJSDLL = $(OBJS:.o=.pic.o)
|
||||
.c.pic.o:
|
||||
$(CC) -c $(CFLAGS) +z -o $@ $*.c
|
||||
|
||||
all: libpng.a $(LIBNAME).sl pngtest
|
||||
all: libpng.a $(LIBNAME).sl pngtest libpng.pc libpng-config
|
||||
|
||||
libpng.a: $(OBJS)
|
||||
ar rc $@ $(OBJS)
|
||||
@ -94,8 +94,7 @@ install-headers: png.h pngconf.h
|
||||
-@if [ ! -d $(DI) ]; then mkdir $(DI); fi
|
||||
-@if [ ! -d $(DI)/$(LIBNAME) ]; then mkdir $(DI)/$(LIBNAME); fi
|
||||
cp png.h pngconf.h $(DI)/$(LIBNAME)
|
||||
chmod 644 $(DI)/$(LIBNAME)/png.h \
|
||||
$(DI)/$(LIBNAME)/pngconf.h
|
||||
chmod 644 $(DI)/$(LIBNAME)/png.h $(DI)/$(LIBNAME)/pngconf.h
|
||||
-@/bin/rm -f $(DI)/png.h $(DI)/pngconf.h
|
||||
-@/bin/rm -f $(DI)/libpng
|
||||
(cd $(DI); ln -sf $(LIBNAME) libpng; ln -sf $(LIBNAME)/* .)
|
||||
@ -109,8 +108,7 @@ install-static: install-headers libpng.a
|
||||
|
||||
install-shared: install-headers $(LIBNAME).sl.$(PNGVER) libpng.pc
|
||||
-@if [ ! -d $(DL) ]; then mkdir $(DL); fi
|
||||
-@/bin/rm -f $(DL)/$(LIBNAME).sl.$(PNGMAJ)* \
|
||||
$(DL)/$(LIBNAME).sl
|
||||
-@/bin/rm -f $(DL)/$(LIBNAME).sl.$(PNGMAJ)* $(DL)/$(LIBNAME).sl
|
||||
-@/bin/rm -f $(DL)/libpng.sl
|
||||
-@/bin/rm -f $(DL)/libpng.sl.3
|
||||
-@/bin/rm -f $(DL)/libpng.sl.3.*
|
||||
|
@ -19,7 +19,7 @@ LIBPATH=$(prefix)/lib
|
||||
# make install DESTDIR=/tmp/build/libpng
|
||||
#
|
||||
# If you're going to install into a temporary location
|
||||
# via DESTDIR, that location must already exist before
|
||||
# via DESTDIR, $(DESTDIR)$(prefix) must already exist before
|
||||
# you execute make install.
|
||||
DESTDIR=
|
||||
|
||||
|
@ -5,7 +5,7 @@
|
||||
|
||||
LIBNAME = libpng12
|
||||
PNGMAJ = 0
|
||||
PNGMIN = 1.2.3
|
||||
PNGMIN = 1.2.4beta1
|
||||
PNGVER = $(PNGMAJ).$(PNGMIN)
|
||||
|
||||
CC=gcc
|
||||
@ -50,14 +50,14 @@ BINPATH=$(prefix)/bin
|
||||
# make install DESTDIR=/tmp/build/libpng
|
||||
#
|
||||
# If you're going to install into a temporary location
|
||||
# via DESTDIR, that location must already exist before
|
||||
# via DESTDIR, $(DESTDIR)$(prefix) must already exist before
|
||||
# you execute make install.
|
||||
DESTDIR=
|
||||
|
||||
DB=$(DESTDIR)/$(BINPATH)
|
||||
DI=$(DESTDIR)/$(INCPATH)
|
||||
DL=$(DESTDIR)/$(LIBPATH)
|
||||
DM=$(DESTDIR)/$(MANPATH)
|
||||
DB=$(DESTDIR)$(BINPATH)
|
||||
DI=$(DESTDIR)$(INCPATH)
|
||||
DL=$(DESTDIR)$(LIBPATH)
|
||||
DM=$(DESTDIR)$(MANPATH)
|
||||
|
||||
OBJS = png.o pngset.o pngget.o pngrutil.o pngtrans.o pngwutil.o \
|
||||
pngread.o pngrio.o pngwio.o pngwrite.o pngrtran.o \
|
||||
@ -70,7 +70,7 @@ OBJSDLL = $(OBJS:.o=.pic.o)
|
||||
.c.pic.o:
|
||||
$(CC) -c $(CFLAGS) -fPIC -o $@ $*.c
|
||||
|
||||
all: libpng.a $(LIBNAME).so pngtest
|
||||
all: libpng.a $(LIBNAME).so pngtest libpng.pc libpng-config
|
||||
|
||||
libpng.a: $(OBJS)
|
||||
ar rc $@ $(OBJS)
|
||||
@ -120,8 +120,7 @@ install-headers: png.h pngconf.h
|
||||
-@if [ ! -d $(DI) ]; then mkdir $(DI); fi
|
||||
-@if [ ! -d $(DI)/$(LIBNAME) ]; then mkdir $(DI)/$(LIBNAME); fi
|
||||
cp png.h pngconf.h $(DI)/$(LIBNAME)
|
||||
chmod 644 $(DI)/$(LIBNAME)/png.h \
|
||||
$(DI)/$(LIBNAME)/pngconf.h
|
||||
chmod 644 $(DI)/$(LIBNAME)/png.h $(DI)/$(LIBNAME)/pngconf.h
|
||||
-@/bin/rm -f $(DI)/png.h $(DI)/pngconf.h
|
||||
-@/bin/rm -f $(DI)/libpng
|
||||
(cd $(DI); ln -sf $(LIBNAME) libpng; ln -sf $(LIBNAME)/* .)
|
||||
@ -135,8 +134,7 @@ install-static: install-headers libpng.a
|
||||
|
||||
install-shared: install-headers $(LIBNAME).so.$(PNGVER) libpng.pc
|
||||
-@if [ ! -d $(DL) ]; then mkdir $(DL); fi
|
||||
-@/bin/rm -f $(DL)/$(LIBNAME).so.$(PNGMAJ)* \
|
||||
$(DL)/$(LIBNAME).so
|
||||
-@/bin/rm -f $(DL)/$(LIBNAME).so.$(PNGMAJ)* $(DL)/$(LIBNAME).so
|
||||
-@/bin/rm -f $(DL)/libpng.so
|
||||
-@/bin/rm -f $(DL)/libpng.so.3
|
||||
-@/bin/rm -f $(DL)/libpng.so.3.*
|
||||
@ -148,8 +146,7 @@ install-shared: install-headers $(LIBNAME).so.$(PNGVER) libpng.pc
|
||||
ln -sf $(LIBNAME).so.$(PNGVER) libpng.so.3.$(PNGMIN); \
|
||||
ln -sf $(LIBNAME).so.$(PNGVER) $(LIBNAME).so.$(PNGMAJ); \
|
||||
ln -sf $(LIBNAME).so.$(PNGMAJ) $(LIBNAME).so)
|
||||
-@if [ ! -d $(DL)/pkgconfig ]; then mkdir \
|
||||
$(DL)/pkgconfig; fi
|
||||
-@if [ ! -d $(DL)/pkgconfig ]; then mkdir $(DL)/pkgconfig; fi
|
||||
-@/bin/rm -f $(DL)/pkgconfig/$(LIBNAME).pc
|
||||
-@/bin/rm -f $(DL)/pkgconfig/libpng.pc
|
||||
cp libpng.pc $(DL)/pkgconfig/$(LIBNAME).pc
|
||||
|
@ -17,7 +17,7 @@ ZLIBINC=../zlib
|
||||
CC=cc
|
||||
|
||||
PNGMAJ = 0
|
||||
PNGMIN = 1.2.3
|
||||
PNGMIN = 1.2.4beta1
|
||||
PNGVER = $(PNGMAJ).$(PNGMIN)
|
||||
|
||||
CFLAGS=-fno-common -I$(ZLIBINC) -O # -g -DPNG_DEBUG=5
|
||||
@ -38,14 +38,14 @@ BINPATH=$(prefix)/bin
|
||||
# make install DESTDIR=/tmp/build/libpng
|
||||
#
|
||||
# If you're going to install into a temporary location
|
||||
# via DESTDIR, that location must already exist before
|
||||
# via DESTDIR, $(DESTDIR)$(prefix) must already exist before
|
||||
# you execute make install.
|
||||
DESTDIR=
|
||||
|
||||
DB=$(DESTDIR)/$(BINPATH)
|
||||
DI=$(DESTDIR)/$(INCPATH)
|
||||
DL=$(DESTDIR)/$(LIBPATH)
|
||||
DM=$(DESTDIR)/$(MANPATH)
|
||||
DB=$(DESTDIR)$(BINPATH)
|
||||
DI=$(DESTDIR)$(INCPATH)
|
||||
DL=$(DESTDIR)$(LIBPATH)
|
||||
DM=$(DESTDIR)$(MANPATH)
|
||||
|
||||
#RANLIB=echo
|
||||
RANLIB=ranlib
|
||||
@ -54,7 +54,7 @@ OBJS = png.o pngset.o pngget.o pngrutil.o pngtrans.o pngwutil.o \
|
||||
pngread.o pngrio.o pngwio.o pngwrite.o pngrtran.o \
|
||||
pngwtran.o pngmem.o pngerror.o pngpread.o
|
||||
|
||||
all: libpng.a pngtest shared
|
||||
all: libpng.a pngtest shared libpng.pc libpng-config
|
||||
|
||||
shared: $(LIBNAME).$(PNGVER).$(SHAREDLIB_POSTFIX)
|
||||
|
||||
@ -89,12 +89,10 @@ install-headers: png.h pngconf.h
|
||||
-@if [ ! -d $(DI) ]; then mkdir $(DI); fi
|
||||
-@if [ ! -d $(DI)/$(LIBNAME) ]; then mkdir $(DI)/$(LIBNAME); fi
|
||||
cp png.h pngconf.h $(DI)/$(LIBNAME)
|
||||
chmod 644 $(DI)/$(LIBNAME)/png.h \
|
||||
$(DI)/$(LIBNAME)/pngconf.h
|
||||
chmod 644 $(DI)/$(LIBNAME)/png.h $(DI)/$(LIBNAME)/pngconf.h
|
||||
-@/bin/rm -f $(DI)/png.h $(DI)/pngconf.h
|
||||
-@/bin/rm -f $(DI)/libpng
|
||||
(cd $(DI); ln -f -s $(LIBNAME) libpng; \
|
||||
ln -f -s $(LIBNAME)/* .)
|
||||
(cd $(DI); ln -f -s $(LIBNAME) libpng; ln -f -s $(LIBNAME)/* .)
|
||||
|
||||
install-static: install-headers libpng.a
|
||||
-@if [ ! -d $(DL) ]; then mkdir $(DL); fi
|
||||
|
@ -14,7 +14,7 @@ LIBPATH=$(prefix)/lib
|
||||
# make install DESTDIR=/tmp/build/libpng
|
||||
#
|
||||
# If you're going to install into a temporary location
|
||||
# via DESTDIR, that location must already exist before
|
||||
# via DESTDIR, $(DESTDIR)$(prefix) must already exist before
|
||||
# you execute make install.
|
||||
DESTDIR=
|
||||
|
||||
|
@ -13,7 +13,7 @@ INCSDIR=${LOCALBASE}/include/libpng12
|
||||
|
||||
LIB= png12
|
||||
SHLIB_MAJOR= 0
|
||||
SHLIB_MINOR= 1.2.3
|
||||
SHLIB_MINOR= 1.2.4beta1
|
||||
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 \
|
||||
pngwtran.c pngmem.c pngerror.c pngpread.c
|
||||
|
@ -13,7 +13,7 @@ INCSDIR=${LOCALBASE}/include/libpng
|
||||
|
||||
LIB= png
|
||||
SHLIB_MAJOR= 3
|
||||
SHLIB_MINOR= 1.2.3
|
||||
SHLIB_MINOR= 1.2.4beta1
|
||||
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 \
|
||||
pngwtran.c pngmem.c pngerror.c pngpread.c
|
||||
|
@ -7,7 +7,7 @@ LIBDIR= ${PREFIX}/lib
|
||||
MANDIR= ${PREFIX}/man/cat
|
||||
|
||||
SHLIB_MAJOR= 0
|
||||
SHLIB_MINOR= 1.2.3
|
||||
SHLIB_MINOR= 1.2.4beta1
|
||||
|
||||
LIB= png
|
||||
SRCS= png.c pngerror.c pnggccrd.c pngget.c pngmem.c pngpread.c \
|
||||
|
@ -24,7 +24,7 @@ LDFLAGS=-L. -L$(ZLIBLIB) -lpng12 -lz -lm
|
||||
RANLIB=echo
|
||||
|
||||
PNGMAJ = 0
|
||||
PNGMIN = 1.2.3
|
||||
PNGMIN = 1.2.4beta1
|
||||
PNGVER = $(PNGMAJ).$(PNGMIN)
|
||||
LIBNAME = libpng12
|
||||
|
||||
@ -39,14 +39,14 @@ BINPATH=$(prefix)/bin
|
||||
# make install DESTDIR=/tmp/build/libpng
|
||||
#
|
||||
# If you're going to install into a temporary location
|
||||
# via DESTDIR, that location must already exist before
|
||||
# via DESTDIR, $(DESTDIR)$(prefix) must already exist before
|
||||
# you execute make install.
|
||||
DESTDIR=
|
||||
|
||||
DB=$(DESTDIR)/$(BINPATH)
|
||||
DI=$(DESTDIR)/$(INCPATH)
|
||||
DL=$(DESTDIR)/$(LIBPATH)
|
||||
DM=$(DESTDIR)/$(MANPATH)
|
||||
DB=$(DESTDIR)$(BINPATH)
|
||||
DI=$(DESTDIR)$(INCPATH)
|
||||
DL=$(DESTDIR)$(LIBPATH)
|
||||
DM=$(DESTDIR)$(MANPATH)
|
||||
|
||||
OBJS = png.o pngset.o pngget.o pngrutil.o pngtrans.o pngwutil.o \
|
||||
pngread.o pngrio.o pngwio.o pngwrite.o pngrtran.o \
|
||||
@ -59,7 +59,7 @@ OBJSDLL = $(OBJS:.o=.pic.o)
|
||||
.c.pic.o:
|
||||
$(CC) -c $(CFLAGS) -KPIC -o $@ $*.c
|
||||
|
||||
all: libpng.a $(LIBNAME).so pngtest
|
||||
all: libpng.a $(LIBNAME).so pngtest libpng.pc libpng-config
|
||||
|
||||
libpng.a: $(OBJS)
|
||||
ar rc $@ $(OBJS)
|
||||
@ -101,12 +101,10 @@ install-headers: png.h pngconf.h
|
||||
-@/bin/rm -f $(DI)/png.h
|
||||
-@/bin/rm -f $(DI)/pngconf.h
|
||||
cp png.h pngconf.h $(DI)/$(LIBNAME)
|
||||
chmod 644 $(DI)/$(LIBNAME)/png.h \
|
||||
$(DI)/$(LIBNAME)/pngconf.h
|
||||
chmod 644 $(DI)/$(LIBNAME)/png.h $(DI)/$(LIBNAME)/pngconf.h
|
||||
-@/bin/rm -f $(DI)/png.h $(DI)/pngconf.h
|
||||
-@/bin/rm -f $(DI)/libpng
|
||||
(cd $(DI); ln -f -s $(LIBNAME) libpng; \
|
||||
ln -f -s $(LIBNAME)/* .)
|
||||
(cd $(DI); ln -f -s $(LIBNAME) libpng; ln -f -s $(LIBNAME)/* .)
|
||||
|
||||
install-static: install-headers libpng.a
|
||||
-@if [ ! -d $(DL) ]; then mkdir $(DL); fi
|
||||
@ -117,8 +115,7 @@ install-static: install-headers libpng.a
|
||||
|
||||
install-shared: install-headers $(LIBNAME).so.$(PNGVER) libpng.pc
|
||||
-@if [ ! -d $(DL) ]; then mkdir $(DL); fi
|
||||
-@/bin/rm -f $(DL)/$(LIBNAME).so.$(PNGMAJ)* \
|
||||
$(DL)/$(LIBNAME).so
|
||||
-@/bin/rm -f $(DL)/$(LIBNAME).so.$(PNGMAJ)* $(DL)/$(LIBNAME).so
|
||||
-@/bin/rm -f $(DL)/libpng.so
|
||||
-@/bin/rm -f $(DL)/libpng.so.3
|
||||
-@/bin/rm -f $(DL)/libpng.so.3.*
|
||||
|
@ -26,7 +26,7 @@ LDSHARED=CC $(ABI) -shared
|
||||
|
||||
LIBNAME=libpng12
|
||||
PNGMAJ = 0
|
||||
PNGMIN = 1.2.3
|
||||
PNGMIN = 1.2.4beta1
|
||||
PNGVER = $(PNGMAJ).$(PNGMIN)
|
||||
LIBS=$(LIBNAME).so.$(PNGVER)
|
||||
INCPATH=$(prefix)/include
|
||||
@ -40,14 +40,14 @@ BINPATH=$(prefix)/bin
|
||||
# make install DESTDIR=/tmp/build/libpng
|
||||
#
|
||||
# If you're going to install into a temporary location
|
||||
# via DESTDIR, that location must already exist before
|
||||
# via DESTDIR, $(DESTDIR)$(prefix) must already exist before
|
||||
# you execute make install.
|
||||
DESTDIR=
|
||||
|
||||
DB=$(DESTDIR)/$(BINPATH)
|
||||
DI=$(DESTDIR)/$(INCPATH)
|
||||
DL=$(DESTDIR)/$(LIBPATH)
|
||||
DM=$(DESTDIR)/$(MANPATH)
|
||||
DB=$(DESTDIR)$(BINPATH)
|
||||
DI=$(DESTDIR)$(INCPATH)
|
||||
DL=$(DESTDIR)$(LIBPATH)
|
||||
DM=$(DESTDIR)$(MANPATH)
|
||||
|
||||
RANLIB=echo
|
||||
#RANLIB=ranlib
|
||||
@ -56,7 +56,7 @@ OBJS = png.o pngset.o pngget.o pngrutil.o pngtrans.o pngwutil.o \
|
||||
pngread.o pngrio.o pngwio.o pngwrite.o pngrtran.o \
|
||||
pngwtran.o pngmem.o pngerror.o pngpread.o
|
||||
|
||||
all: libpng.a $(LIBNAME).so.$(PNGVER) pngtest
|
||||
all: libpng.a $(LIBNAME).so.$(PNGVER) pngtest libpng.pc libpng-config
|
||||
|
||||
libpng.a: $(OBJS)
|
||||
ar rc $@ $(OBJS)
|
||||
@ -93,12 +93,10 @@ install-headers: png.h pngconf.h
|
||||
-@if [ ! -d $(DI) ]; then mkdir $(DI); fi
|
||||
-@if [ ! -d $(DI)/$(LIBNAME) ]; then mkdir $(DI)/$(LIBNAME); fi
|
||||
cp png.h pngconf.h $(DI)/$(LIBNAME)
|
||||
chmod 644 $(DI)/$(LIBNAME)/png.h \
|
||||
$(DI)/$(LIBNAME)/pngconf.h
|
||||
chmod 644 $(DI)/$(LIBNAME)/png.h $(DI)/$(LIBNAME)/pngconf.h
|
||||
-@/bin/rm -f $(DI)/png.h $(DI)/pngconf.h
|
||||
-@/bin/rm -f $(DI)/libpng
|
||||
(cd $(DI); ln -sf $(LIBNAME) libpng; \
|
||||
ln -sf $(LIBNAME)/* .)
|
||||
(cd $(DI); ln -sf $(LIBNAME) libpng; ln -sf $(LIBNAME)/* .)
|
||||
|
||||
install-static: install-headers libpng.a
|
||||
-@if [ ! -d $(DL) ]; then mkdir $(DL); fi
|
||||
@ -109,8 +107,7 @@ install-static: install-headers libpng.a
|
||||
|
||||
install-shared: install-headers $(LIBNAME).so.$(PNGVER) libpng.pc
|
||||
-@if [ ! -d $(DL) ]; then mkdir $(DL); fi
|
||||
-@/bin/rm -f $(DL)/$(LIBNAME).so.$(PNGMAJ)* \
|
||||
$(DL)/$(LIBNAME).so
|
||||
-@/bin/rm -f $(DL)/$(LIBNAME).so.$(PNGMAJ)* $(DL)/$(LIBNAME).so
|
||||
-@/bin/rm -f $(DL)/libpng.so
|
||||
-@/bin/rm -f $(DL)/libpng.so.3
|
||||
-@/bin/rm -f $(DL)/libpng.so.3.*
|
||||
|
@ -31,7 +31,7 @@ LDSHARED=cc $(ABI) -shared
|
||||
|
||||
LIBNAME=libpng12
|
||||
PNGMAJ = 0
|
||||
PNGMIN = 1.2.3
|
||||
PNGMIN = 1.2.4beta1
|
||||
PNGVER = $(PNGMAJ).$(PNGMIN)
|
||||
|
||||
RANLIB=echo
|
||||
@ -50,20 +50,20 @@ BINPATH=$(prefix)/bin
|
||||
# make install DESTDIR=/tmp/build/libpng
|
||||
#
|
||||
# If you're going to install into a temporary location
|
||||
# via DESTDIR, that location must already exist before
|
||||
# via DESTDIR, $(DESTDIR)$(prefix) must already exist before
|
||||
# you execute make install.
|
||||
DESTDIR=
|
||||
|
||||
DB=$(DESTDIR)/$(BINPATH)
|
||||
DI=$(DESTDIR)/$(INCPATH)
|
||||
DL=$(DESTDIR)/$(LIBPATH)
|
||||
DM=$(DESTDIR)/$(MANPATH)
|
||||
DB=$(DESTDIR)$(BINPATH)
|
||||
DI=$(DESTDIR)$(INCPATH)
|
||||
DL=$(DESTDIR)$(LIBPATH)
|
||||
DM=$(DESTDIR)$(MANPATH)
|
||||
|
||||
OBJS = pnggccrd.o png.o pngset.o pngget.o pngrutil.o pngtrans.o pngwutil.o \
|
||||
pngread.o pngrio.o pngwio.o pngwrite.o pngrtran.o \
|
||||
pngwtran.o pngmem.o pngerror.o pngpread.o
|
||||
|
||||
all: libpng.a pngtest shared
|
||||
all: libpng.a pngtest shared libpng.pc libpng-config
|
||||
|
||||
shared: $(LIBNAME).so.$(PNGVER)
|
||||
|
||||
@ -105,8 +105,7 @@ install-headers: png.h pngconf.h
|
||||
$(DI)/$(LIBNAME)/pngconf.h
|
||||
-@/bin/rm -f $(DI)/png.h $(DI)/pngconf.h
|
||||
-@/bin/rm -f $(DI)/libpng
|
||||
(cd $(DI); ln -sf $(LIBNAME) libpng; \
|
||||
ln -sf $(LIBNAME)/* .)
|
||||
(cd $(DI); ln -sf $(LIBNAME) libpng; ln -sf $(LIBNAME)/* .)
|
||||
|
||||
install-static: install-headers libpng.a
|
||||
-@if [ ! -d $(DL) ]; then mkdir $(DL); fi
|
||||
@ -117,8 +116,7 @@ install-static: install-headers libpng.a
|
||||
|
||||
install-shared: install-headers $(LIBNAME).so.$(PNGVER) libpng.pc
|
||||
-@if [ ! -d $(DL) ]; then mkdir $(DL); fi
|
||||
-@/bin/rm -f $(DL)/$(LIBNAME).so.$(PNGMAJ)* \
|
||||
$(DL)/$(LIBNAME).so
|
||||
-@/bin/rm -f $(DL)/$(LIBNAME).so.$(PNGMAJ)* $(DL)/$(LIBNAME).so
|
||||
-@/bin/rm -f $(DL)/libpng.so
|
||||
-@/bin/rm -f $(DL)/libpng.so.3
|
||||
-@/bin/rm -f $(DL)/libpng.so.3.*
|
||||
|
@ -34,7 +34,7 @@ LDFLAGS=-L. -R. -L$(ZLIBLIB) -R$(ZLIBLIB) -lpng12 -lz -lm
|
||||
RANLIB=echo
|
||||
|
||||
PNGMAJ = 0
|
||||
PNGMIN = 1.2.3
|
||||
PNGMIN = 1.2.4beta1
|
||||
PNGVER = $(PNGMAJ).$(PNGMIN)
|
||||
LIBNAME = libpng12
|
||||
|
||||
@ -49,14 +49,14 @@ BINPATH=$(prefix)/bin
|
||||
# make install DESTDIR=/tmp/build/libpng
|
||||
#
|
||||
# If you're going to install into a temporary location
|
||||
# via DESTDIR, that location must already exist before
|
||||
# via DESTDIR, $(DESTDIR)$(prefix) must already exist before
|
||||
# you execute make install.
|
||||
DESTDIR=
|
||||
|
||||
DB=$(DESTDIR)/$(BINPATH)
|
||||
DI=$(DESTDIR)/$(INCPATH)
|
||||
DL=$(DESTDIR)/$(LIBPATH)
|
||||
DM=$(DESTDIR)/$(MANPATH)
|
||||
DB=$(DESTDIR)$(BINPATH)
|
||||
DI=$(DESTDIR)$(INCPATH)
|
||||
DL=$(DESTDIR)$(LIBPATH)
|
||||
DM=$(DESTDIR)$(MANPATH)
|
||||
|
||||
OBJS = png.o pngset.o pngget.o pngrutil.o pngtrans.o pngwutil.o \
|
||||
pngread.o pngrio.o pngwio.o pngwrite.o pngrtran.o \
|
||||
@ -69,7 +69,7 @@ OBJSDLL = $(OBJS:.o=.pic.o)
|
||||
.c.pic.o:
|
||||
$(CC) -c $(CFLAGS) -KPIC -o $@ $*.c
|
||||
|
||||
all: libpng.a $(LIBNAME).so pngtest
|
||||
all: libpng.a $(LIBNAME).so pngtest libpng.pc libpng-config
|
||||
|
||||
libpng.a: $(OBJS)
|
||||
ar rc $@ $(OBJS)
|
||||
@ -120,8 +120,7 @@ install-headers: png.h pngconf.h
|
||||
-@if [ ! -d $(DI) ]; then mkdir $(DI); fi
|
||||
-@if [ ! -d $(DI)/$(LIBNAME) ]; then mkdir $(DI)/$(LIBNAME); fi
|
||||
cp png.h pngconf.h $(DI)/$(LIBNAME)
|
||||
chmod 644 $(DI)/$(LIBNAME)/png.h \
|
||||
$(DI)/$(LIBNAME)/pngconf.h
|
||||
chmod 644 $(DI)/$(LIBNAME)/png.h $(DI)/$(LIBNAME)/pngconf.h
|
||||
-@/bin/rm -f $(DI)/png.h $(DI)/pngconf.h
|
||||
-@/bin/rm -f $(DI)/libpng
|
||||
(cd $(DI); ln -f -s $(LIBNAME) libpng)
|
||||
@ -131,13 +130,11 @@ install-static: install-headers libpng.a
|
||||
cp libpng.a $(DL)/$(LIBNAME).a
|
||||
chmod 644 $(DL)/$(LIBNAME).a
|
||||
-@/bin/rm -f $(DL)/libpng.a
|
||||
(cd $(DI); ln -f -s $(LIBNAME) libpng; \
|
||||
ln -f -s $(LIBNAME)/* .)
|
||||
(cd $(DI); ln -f -s $(LIBNAME) libpng; ln -f -s $(LIBNAME)/* .)
|
||||
|
||||
install-shared: install-headers $(LIBNAME).so.$(PNGVER) libpng.pc
|
||||
-@if [ ! -d $(DL) ]; then mkdir $(DL); fi
|
||||
-@/bin/rm -f $(DL)/$(LIBNAME).so.$(PNGMAJ)* \
|
||||
$(DL)/$(LIBNAME).so
|
||||
-@/bin/rm -f $(DL)/$(LIBNAME).so.$(PNGMAJ)* $(DL)/$(LIBNAME).so
|
||||
-@/bin/rm -f $(DL)/libpng.so
|
||||
-@/bin/rm -f $(DL)/libpng.so.3
|
||||
-@/bin/rm -f $(DL)/libpng.so.3.*
|
||||
@ -149,8 +146,7 @@ install-shared: install-headers $(LIBNAME).so.$(PNGVER) libpng.pc
|
||||
ln -f -s $(LIBNAME).so.$(PNGVER) libpng.so.3.$(PNGMIN); \
|
||||
ln -f -s $(LIBNAME).so.$(PNGVER) $(LIBNAME).so.$(PNGMAJ); \
|
||||
ln -f -s $(LIBNAME).so.$(PNGMAJ) $(LIBNAME).so)
|
||||
-@if [ ! -d $(DL)/pkgconfig ]; then mkdir \
|
||||
$(DL)/pkgconfig; fi
|
||||
-@if [ ! -d $(DL)/pkgconfig ]; then mkdir $(DL)/pkgconfig; fi
|
||||
-@/bin/rm -f $(DL)/pkgconfig/$(LIBNAME).pc
|
||||
-@/bin/rm -f $(DL)/pkgconfig/libpng.pc
|
||||
cp libpng.pc $(DL)/pkgconfig/$(LIBNAME).pc
|
||||
|
@ -30,7 +30,7 @@ LDFLAGS=-L. -R. -L$(ZLIBLIB) -R$(ZLIBLIB) -lpng12 -lz -lm
|
||||
RANLIB=echo
|
||||
|
||||
PNGMAJ = 0
|
||||
PNGMIN = 1.2.3
|
||||
PNGMIN = 1.2.4beta1
|
||||
PNGVER = $(PNGMAJ).$(PNGMIN)
|
||||
LIBNAME = libpng12
|
||||
|
||||
@ -45,14 +45,14 @@ BINPATH=$(prefix)/bin
|
||||
# make install DESTDIR=/tmp/build/libpng
|
||||
#
|
||||
# If you're going to install into a temporary location
|
||||
# via DESTDIR, that location must already exist before
|
||||
# via DESTDIR, $(DESTDIR)$(prefix) must already exist before
|
||||
# you execute make install.
|
||||
DESTDIR=
|
||||
|
||||
DB=$(DESTDIR)/$(BINPATH)
|
||||
DI=$(DESTDIR)/$(INCPATH)
|
||||
DL=$(DESTDIR)/$(LIBPATH)
|
||||
DM=$(DESTDIR)/$(MANPATH)
|
||||
DB=$(DESTDIR)$(BINPATH)
|
||||
DI=$(DESTDIR)$(INCPATH)
|
||||
DL=$(DESTDIR)$(LIBPATH)
|
||||
DM=$(DESTDIR)$(MANPATH)
|
||||
|
||||
OBJS = png.o pngset.o pngget.o pngrutil.o pngtrans.o pngwutil.o \
|
||||
pngread.o pngrio.o pngwio.o pngwrite.o pngrtran.o \
|
||||
@ -65,7 +65,7 @@ OBJSDLL = $(OBJS:.o=.pic.o)
|
||||
.c.pic.o:
|
||||
$(CC) -c $(CFLAGS) -fPIC -o $@ $*.c
|
||||
|
||||
all: libpng.a $(LIBNAME).so pngtest
|
||||
all: libpng.a $(LIBNAME).so pngtest libpng.pc libpng-config
|
||||
|
||||
libpng.a: $(OBJS)
|
||||
ar rc $@ $(OBJS)
|
||||
@ -117,12 +117,10 @@ install-headers: png.h pngconf.h
|
||||
-@if [ ! -d $(DI) ]; then mkdir $(DI); fi
|
||||
-@if [ ! -d $(DI)/$(LIBNAME) ]; then mkdir $(DI)/$(LIBNAME); fi
|
||||
cp png.h pngconf.h $(DI)/$(LIBNAME)
|
||||
chmod 644 $(DI)/$(LIBNAME)/png.h \
|
||||
$(DI)/$(LIBNAME)/pngconf.h
|
||||
chmod 644 $(DI)/$(LIBNAME)/png.h $(DI)/$(LIBNAME)/pngconf.h
|
||||
-@/bin/rm -f $(DI)/png.h $(DI)/pngconf.h
|
||||
-@/bin/rm -f $(DI)/libpng
|
||||
(cd $(DI); ln -f -s $(LIBNAME) libpng; \
|
||||
ln -f -s $(LIBNAME)/* .)
|
||||
(cd $(DI); ln -f -s $(LIBNAME) libpng; ln -f -s $(LIBNAME)/* .)
|
||||
|
||||
install-static: install-headers libpng.a
|
||||
-@if [ ! -d $(DL) ]; then mkdir $(DL); fi
|
||||
@ -133,8 +131,7 @@ install-static: install-headers libpng.a
|
||||
|
||||
install-shared: install-headers $(LIBNAME).so.$(PNGVER) libpng.pc
|
||||
-@if [ ! -d $(DL) ]; then mkdir $(DL); fi
|
||||
-@/bin/rm -f $(DL)/$(LIBNAME).so.$(PNGMAJ)* \
|
||||
$(DL)/$(LIBNAME).so
|
||||
-@/bin/rm -f $(DL)/$(LIBNAME).so.$(PNGMAJ)* $(DL)/$(LIBNAME).so
|
||||
-@/bin/rm -f $(DL)/libpng.so
|
||||
-@/bin/rm -f $(DL)/libpng.so.3
|
||||
-@/bin/rm -f $(DL)/libpng.so.3.*
|
||||
|
@ -14,7 +14,7 @@ LIBPATH=$(prefix)/lib
|
||||
# make install DESTDIR=/tmp/build/libpng
|
||||
#
|
||||
# If you're going to install into a temporary location
|
||||
# via DESTDIR, that location must already exist before
|
||||
# via DESTDIR, $(DESTDIR)$(prefix) must already exist before
|
||||
# you execute make install.
|
||||
DESTDIR=
|
||||
|
||||
|
@ -14,7 +14,7 @@ LIBPATH=$(prefix)/lib
|
||||
# make install DESTDIR=/tmp/build/libpng
|
||||
#
|
||||
# If you're going to install into a temporary location
|
||||
# via DESTDIR, that location must already exist before
|
||||
# via DESTDIR, $(DESTDIR)$(prefix) must already exist before
|
||||
# you execute make install.
|
||||
DESTDIR=
|
||||
|
||||
|
@ -7,8 +7,8 @@ unit pngdef;
|
||||
interface
|
||||
|
||||
const
|
||||
PNG_LIBPNG_VER_STRING = '1.2.3';
|
||||
PNG_LIBPNG_VER = 10203;
|
||||
PNG_LIBPNG_VER_STRING = '1.2.4beta1';
|
||||
PNG_LIBPNG_VER = 10204;
|
||||
|
||||
type
|
||||
png_uint_32 = Cardinal;
|
||||
|
@ -2,7 +2,7 @@
|
||||
; PNG.LIB module definition file for OS/2
|
||||
;----------------------------------------
|
||||
|
||||
; Version 1.2.3
|
||||
; Version 1.2.4beta1
|
||||
|
||||
LIBRARY PNG
|
||||
DESCRIPTION "PNG image compression library for OS/2"
|
||||
@ -203,6 +203,9 @@ EXPORTS
|
||||
; png_zalloc
|
||||
; png_zfree
|
||||
|
||||
; Added at version 1.2.4
|
||||
png_malloc_warn
|
||||
|
||||
; These are not present when libpng is compiled with PNG_NO_GLOBAL_ARRAYS
|
||||
png_libpng_ver
|
||||
png_pass_start
|
||||
|
Loading…
Reference in New Issue
Block a user