Imported from libpng-1.2.6beta3.tar

This commit is contained in:
Glenn Randers-Pehrson
2004-07-17 22:45:44 -05:00
parent 761bf9f06f
commit 5b5dcf8b88
103 changed files with 3153 additions and 4254 deletions

View File

@@ -77,10 +77,6 @@ while test $# -gt 0; do
echo ${R_opts}
;;
--ldopts)
echo ${ldopts}
;;
--ldflags)
echo ${ldflags} ${L_opts} ${R_opts} ${libs}
;;

View File

@@ -8,7 +8,7 @@
# Modeled after libxml-config.
version=1.2.6beta2
version=1.2.5
prefix=""
libdir=""
libs=""

View File

@@ -6,6 +6,6 @@ includedir=${exec_prefix}/include
Name: libpng12
Description: Loads and saves PNG files
Version: 1.2.6beta2
Version: 1.2.5
Libs: -L${libdir} -lpng12 -lz -lm
Cflags: -I${includedir}/libpng12

View File

@@ -8,10 +8,6 @@
CC=cc
SUN_CC_FLAGS=-fast -xtarget=ultra
SUN_LD_FLAGS=-fast -xtarget=ultra
AR=ar
ARFLAGS=rc
#RANLIB=ranlib
RANLIB=echo
# where make install puts libpng.a, libpng12.so and libpng12/png.h
prefix=/a
@@ -32,9 +28,12 @@ CFLAGS=-I$(ZLIBINC) $(SUN_CC_FLAGS) \
# $(WARNMORE) -g -DPNG_DEBUG=5
LDFLAGS=$(SUN_LD_FLAGS) -L$(ZLIBLIB) -R$(ZLIBLIB) libpng.a -lz -lm
#RANLIB=ranlib
RANLIB=echo
LIBNAME=libpng12
PNGMAJ = 0
PNGMIN = 1.2.6beta2
PNGMIN = 1.2.5
PNGVER = $(PNGMAJ).$(PNGMIN)
INCPATH=$(prefix)/include
@@ -71,7 +70,7 @@ OBJSDLL = $(OBJS:.o=.pic.o)
all: libpng.a $(LIBNAME).so pngtest libpng.pc libpng-config
libpng.a: $(OBJS)
$(AR) $(ARFLAGS) $@ $(OBJS)
ar rc $@ $(OBJS)
$(RANLIB) $@
libpng.pc:
@@ -178,7 +177,7 @@ install-config: libpng-config
-@/bin/rm -f $(DB)/libpng12-config
cp libpng-config $(DB)/libpng12-config
chmod 755 $(DB)/libpng12-config
(cd $(DB); ln -sf libpng12-config libpng-config)
(cd $(DB); ln -f -s libpng12-config libpng-config)
install: install-static install-shared install-man install-config

View File

@@ -8,10 +8,6 @@
CC=cc
SUN_CC_FLAGS=-fast -xtarget=ultra -xarch=v9
SUN_LD_FLAGS=-fast -xtarget=ultra -xarch=v9
AR=ar
ARFLAGS=rc
#RANLIB=ranlib
RANLIB=echo
# where make install puts libpng.a, libpng12.so and libpng12/png.h
prefix=/a
@@ -30,11 +26,14 @@ WARNMORE=-Wwrite-strings -Wpointer-arith -Wshadow \
-Wstrict-prototypes -Wmissing-prototypes #-Wconversion
CFLAGS=-I$(ZLIBINC) $(SUN_CC_FLAGS) \
# $(WARNMORE) -g -DPNG_DEBUG=5
LDFLAGS=$(SUN_LD_FLAGS) -L$(ZLIBLIB) -R$(ZLIBLIB) libpng.a -lz -lm
LDFLAGS=-L. -R. $(SUN_LD_FLAGS) -L$(ZLIBLIB) -R$(ZLIBLIB) -lpng12 -lz -lm
#RANLIB=ranlib
RANLIB=echo
LIBNAME=libpng12
PNGMAJ = 0
PNGMIN = 1.2.6beta2
PNGMIN = 1.2.5
PNGVER = $(PNGMAJ).$(PNGMIN)
INCPATH=$(prefix)/include
@@ -71,7 +70,7 @@ OBJSDLL = $(OBJS:.o=.pic.o)
all: libpng.a $(LIBNAME).so pngtest libpng.pc libpng-config
libpng.a: $(OBJS)
$(AR) $(ARFLAGS) $@ $(OBJS)
ar rc $@ $(OBJS)
$(RANLIB) $@
libpng.pc:
@@ -178,7 +177,7 @@ install-config: libpng-config
-@/bin/rm -f $(DB)/$(LIBNAME)-config
cp libpng-config $(DB)/$(LIBNAME)-config
chmod 755 $(DB)/$(LIBNAME)-config
(cd $(DB); ln -sf $(LIBNAME)-config libpng-config)
(cd $(DB); ln -f -s $(LIBNAME)-config libpng-config)
install: install-static install-shared install-man install-config

View File

@@ -12,14 +12,13 @@ ZLIBLIB = ../zlib
# Compiler, linker, lib and other tools
CC = gcc
LD = $(CC)
AR=ar
ARFLAGS=rcs
AR = ar rcs
RANLIB = ranlib
RM = rm -f
LIBNAME=libpng12
PNGMAJ = 0
PNGMIN = 1.2.6beta2
PNGMIN = 1.2.5
PNGVER = $(PNGMAJ).$(PNGMIN)
prefix=/usr/local
@@ -61,7 +60,7 @@ OBJS = png$(O) pngerror$(O) pngget$(O) pngmem$(O) pngpread$(O) \
all: $(LIBNAME)$(A) pngtest$(E)
$(LIBNAME)$(A): $(OBJS)
$(AR) $(ARFLAGS) $@ $(OBJS)
$(AR) $@ $(OBJS)
$(RANLIB) $@
test: pngtest$(E)

View File

@@ -9,16 +9,6 @@
ZLIB=/zlib
#compiler
CC=sc
# linker
LN= slink
# file deletion command
RM= delete quiet
# library (.lib) file creation command
AR= oml
ARFLAGS=
# make directory command
MKDIR= makedir
#compiler flags
# WARNING: a bug in V6.51 causes bad code with OPTGO
# So use V6.55 or set NOOPTGO!!!!!!!!!
@@ -29,6 +19,14 @@ CFLAGS= NOSTKCHK PARMS=REG OPTIMIZE OPTGO OPTPEEP OPTINLOCAL OPTINL\
LDFLAGS= SD ND BATCH
#link libs
LDLIBS= libpng.lib libgz.lib LIB:scm.lib LIB:sc.lib Lib:amiga.lib
# linker
LN= slink
# file deletion command
RM= delete quiet
# library (.lib) file creation command
AR= oml
# make directory command
MKDIR= makedir
OBJS = png.o pngset.o pngget.o pngrutil.o pngtrans.o pngwutil.o \
pngread.o pngrio.o pngwio.o pngwrite.o pngrtran.o \
@@ -38,7 +36,7 @@ all: libpng.lib pngtest
libpng.lib: $(OBJS)
-$(RM) libpng.lib
$(AR) $(ARFLAGS) libpng.lib r $(OBJS)
$(AR) libpng.lib r $(OBJS)
pngtest: pngtest.o libpng.lib
$(LN) <WITH <

View File

@@ -1,76 +0,0 @@
# Makefile for png32bd.dll
# -------------------- 32-bit Borland C++ --------------------
# This makefile expects to find zlib.h and zlib32bd.lib in the
# $(ZLIBDIR) directory.
# The object files here are compiled with the "stdcall" calling convention.
# This DLL requires zlib32bd.lib to be compiled in the same way.
# Note that png32bd.dll exports the zlib functions adler32, crc32 and
# the deflate... and inflate... functions. It does not export the
# compress and uncompress functions, nor any of the gz... functions,
# since libpng does not call them.
.AUTODEPEND
ZLIBDIR=..\zlib
ZLIB=zlib32bd.lib
PNGDLL=png32bd.dll
PNGLIB=png32bd.lib
CC=bcc32
CFLAGS= -ps -O2 -N- -k- -d -r- -w-par -w-aus -I$(ZLIBDIR) \
-DPNG_NO_GLOBAL_ARRAYS #-DPNG_DEBUG=5
#LINK=tlink32
#LINK=ilink32
LINK=bcc32
#LINKFLAGS= -Tpd -aa -c
LINKFLAGS= -WDE
IMPLIB=implib
# Use this if you don't want Borland's fancy exception handling
NOEHLIB=noeh32.lib
.c.obj:
$(CC) -c $(CFLAGS) $<
.c.exe:
$(CC) $(CFLAGS) $< $(PNGLIB) $(NOEHLIB)
OBJ1=png.obj pngerror.obj pngget.obj pngmem.obj pngpread.obj
OBJ2=pngread.obj pngrio.obj pngrtran.obj pngrutil.obj pngset.obj
OBJ3=pngtrans.obj pngwio.obj pngwrite.obj pngwtran.obj pngwutil.obj
all: $(PNGDLL)
test: pngtest.exe
pngtest
$(PNGDLL): $(OBJ1) $(OBJ2) $(OBJ3) $(ZLIBDIR)\$(ZLIB)
$(LINK) @&&|
$(LINKFLAGS)
-e$(PNGDLL)
$(OBJ1)
$(OBJ2)
$(OBJ3)
$(ZLIBDIR)\$(ZLIB)
$(NOEHLIB)
|
$(IMPLIB) -c $(@R).lib $@
# Clean up anything else you want
clean:
-del *.obj
-del *.dll
-del *.exe
-del *.lib
-del *.lst
-del *.map
-del *.tds
# End of makefile for png32bd.dll

View File

@@ -6,17 +6,13 @@
# For conditions of distribution and use, see copyright notice in png.h
CC=gcc
AR=ar
ARFLAGS=rc
RANLIB=ranlib
#RANLIB=echo
# Where the zlib library and include files are located
ZLIBLIB=/usr/local/lib
ZLIBINC=/usr/local/include
PNGMAJ = 0
PNGMIN = 1.2.6beta2
PNGMIN = 1.2.5
PNGVER = $(PNGMAJ).$(PNGMIN)
ALIGN=
@@ -31,6 +27,11 @@ WARNMORE=-Wwrite-strings -Wpointer-arith -Wshadow \
# still here in R4.5
CFLAGS=-I$(ZLIBINC) -Wall -O1 -funroll-loops \
$(ALIGN) # $(WARNMORE) -g -DPNG_DEBUG=5
# LDFLAGS=-L. -Wl,-rpath,. -L$(ZLIBLIB) -Wl,-rpath,$(ZLIBLIB) -lpng -lz -lm
LDFLAGS=-L. -Wl,-soname=$(LIBNAME).so.$(PNGMAJ) -L$(ZLIBLIB) -lz -lm
RANLIB=ranlib
#RANLIB=echo
# where make install puts libpng.a, libpng12.so*, and png.h
prefix=/usr/local
@@ -67,7 +68,7 @@ OBJSDLL = $(OBJS)
all: libpng.a $(LIBNAME).so pngtest libpng.pc libpng-config
libpng.a: $(OBJS)
$(AR) $(ARFLAGS) $@ $(OBJS)
ar rc $@ $(OBJS)
$(RANLIB) $@
libpng.pc:

View File

@@ -36,12 +36,6 @@ DESTDIR=
# list at the bottom of this makefile.
CC=gcc
AR=ar
ARFLAGS=rc
RANLIB=ranlib
#RANLIB=echo
MKDIR=/bin/mkdir -pv
ifdef MINGW
MINGW_CCFLAGS=-mno-cygwin -I/usr/include/mingw
MINGW_LDFLAGS=-mno-cygwin -L/usr/lib/mingw
@@ -85,7 +79,7 @@ CFLAGS= $(strip $(MINGW_CCFLAGS) $(addprefix -I,$(ZLIBINC)) \
LIBNAME = libpng12
PNGMAJ = 0
CYGDLL = 12
PNGMIN = 1.2.6beta2
PNGMIN = 1.2.5
PNGVER = $(PNGMAJ).$(PNGMIN)
SHAREDLIB=cygpng$(CYGDLL).dll
@@ -99,6 +93,10 @@ LDFLAGS=$(strip -L. $(MINGW_LDFLAGS) -lpng $(addprefix -L,$(ZLIBLIB)) -lz)
LDSFLAGS=$(strip -shared -L. $(MINGW_LDFLAGS) -Wl,--export-all)
LDEXTRA=-Wl,--out-implib=$(IMPLIB) $(addprefix -L,$(ZLIBLIB)) -lz
MKDIR=/bin/mkdir -pv
RANLIB=ranlib
#RANLIB=echo
INCPATH=$(prefix)/include
LIBPATH=$(prefix)/lib
@@ -175,7 +173,7 @@ pnggccrd.pic.o: pnggccrd.c png.h pngconf.h
$(CC) -c $(CFLAGS) -DPNG_BUILD_DLL -o $@ $<
$(STATLIB): $(OBJS)
$(AR) $(ARFLAGS) $@ $(OBJS)
ar rc $@ $(OBJS)
$(RANLIB) $@
$(SHAREDDEF): projects/msvc/png32ms.def

View File

@@ -16,16 +16,14 @@ ZLIBLIB=../zlib
ZLIBINC=../zlib
CC=cc
AR=ar
ARFLAGS=rc
#RANLIB=echo
RANLIB=ranlib
CFLAGS=-I$(ZLIBINC) -Wall -O3 -funroll-loops
LDFLAGS=-L. -L$(ZLIBLIB) -lpng12 -lz
#RANLIB=echo
RANLIB=ranlib
PNGMAJ = 0
PNGMIN = 1.2.6beta2
PNGMIN = 1.2.5
PNGVER = $(PNGMAJ).$(PNGMIN)
LIBNAME = libpng12
@@ -63,7 +61,7 @@ OBJSDLL = $(OBJS:.o=.pic.o)
all: libpng.a $(LIBNAME).dylib pngtest libpng.pc libpng-config
libpng.a: $(OBJS)
$(AR) $(ARFLAGS) $@ $(OBJS)
ar rc $@ $(OBJS)
$(RANLIB) $@
libpng.pc:

View File

@@ -32,19 +32,17 @@ ZLIBLIB=../zlib
ZLIBINC=../zlib
PNGMAJ = 0
PNGMIN = 1.2.6beta2
PNGMIN = 1.2.5
PNGVER = $(PNGMAJ).$(PNGMIN)
LIBNAME = libpng12
CC=cc
AR=ar
ARFLAGS=rc
#RANLIB=echo
RANLIB=ranlib
CFLAGS=-std -w1 -I$(ZLIBINC) -O # -g -DPNG_DEBUG=1
LDFLAGS=-L$(ZLIBLIB) -rpath $(ZLIBLIB) libpng.a -lz -lm
#RANLIB=echo
RANLIB=ranlib
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
@@ -52,7 +50,7 @@ OBJS = png.o pngset.o pngget.o pngrutil.o pngtrans.o pngwutil.o \
all: $(LIBNAME).so libpng.a pngtest libpng.pc libpng-config
libpng.a: $(OBJS)
$(AR) $(ARFLAGS) $@ $(OBJS)
ar rc $@ $(OBJS)
$(RANLIB) $@
libpng.pc:

View File

@@ -10,8 +10,6 @@ INCPATH=$(prefix)/include
LIBPATH=$(prefix)/lib
CC=gcc
AR=ar
ARFLAGS=rc
CFLAGS=-I../zlib -O
LDFLAGS=-L. -L../zlib/ -lpng -lz -lm
@@ -24,7 +22,7 @@ OBJS = png.o pngset.o pngget.o pngrutil.o pngtrans.o pngwutil.o \
all: libpng.a pngtest
libpng.a: $(OBJS)
$(AR) $(ARFLAGS) $@ $(OBJS)
ar rc $@ $(OBJS)
$(RANLIB) $@
pngtest: pngtest.o libpng.a

View File

@@ -10,8 +10,7 @@ ZLIBLIB = ../zlib
# Compiler, linker, lib and other tools
CC = gcc
LD = $(CC)
AR=ar
ARFLAGS=rcs
AR = ar rcs
RANLIB = ranlib
RM = rm -f
@@ -36,7 +35,7 @@ OBJS = png$(O) pngerror$(O) pngget$(O) pngmem$(O) pngpread$(O) \
all: libpng$(A) pngtest$(E)
libpng$(A): $(OBJS)
$(AR) $(ARFLAGS) $@ $(OBJS)
$(AR) $@ $(OBJS)
$(RANLIB) $@
test: pngtest$(E)

View File

@@ -15,14 +15,10 @@
LIBNAME = libpng12
PNGMAJ = 0
PNGMIN = 1.2.6beta2
PNGMIN = 1.2.5
PNGVER = $(PNGMAJ).$(PNGMIN)
CC=gcc
AR=ar
ARFLAGS=rc
RANLIB=ranlib
#RANLIB=echo
# where "make install" puts libpng12.a, libpng12.so*,
# libpng12/png.h and libpng12/pngconf.h
@@ -62,6 +58,9 @@ CFLAGS=-DPNG_THREAD_UNSAFE_OK -DPNG_USE_PNGGCCRD -I$(ZLIBINC) -Wall \
LDFLAGS=-L. -Wl,-rpath,. -L$(ZLIBLIB) -Wl,-rpath,$(ZLIBLIB) -lpng12 -lz -lm
LDFLAGS_A=-L$(ZLIBLIB) -Wl,-rpath,$(ZLIBLIB) libpng.a -lz -lm
RANLIB=ranlib
#RANLIB=echo
INCPATH=$(prefix)/include
LIBPATH=$(prefix)/lib
MANPATH=$(prefix)/man
@@ -96,7 +95,7 @@ OBJSDLL = $(OBJS:.o=.pic.o)
all: libpng.a $(LIBNAME).so pngtest pngtest-static libpng.pc libpng-config
libpng.a: $(OBJS)
$(AR) $(ARFLAGS) $@ $(OBJS)
ar rc $@ $(OBJS)
$(RANLIB) $@
libpng.pc:

View File

@@ -6,11 +6,7 @@
# For conditions of distribution and use, see copyright notice in png.h
CC=gcc
AR=ar
ARFLAGS=rc
LD=ld
RANLIB=ranlib
#RANLIB=echo
# where "make install" puts libpng.a, libpng.sl*, png.h and pngconf.h
prefix=/usr/local
@@ -39,10 +35,13 @@ WARNMORE=-Wwrite-strings -Wpointer-arith -Wshadow \
CFLAGS=-I$(ZLIBINC) -Wall -O3 -funroll-loops \
$(ALIGN) # $(WARNMORE) -g -DPNG_DEBUG=5
#LDFLAGS=-L. -Wl,-rpath,. -L$(ZLIBLIB) -Wl,-rpath,$(ZLIBLIB) -lpng12 -lz -lm
LDFLAGS=-L$(ZLIBLIB) libpng.a -lz -lm
LDFLAGS=-L. -L$(ZLIBLIB) -lpng12 -lz -lm
RANLIB=ranlib
#RANLIB=echo
PNGMAJ = 0
PNGMIN = 1.2.6beta2
PNGMIN = 1.2.5
PNGVER = $(PNGMAJ).$(PNGMIN)
LIBNAME = libpng12
@@ -80,7 +79,7 @@ OBJSDLL = $(OBJS:.o=.pic.o)
all: libpng.a $(LIBNAME).sl pngtest libpng.pc libpng-config
libpng.a: $(OBJS)
$(AR) $(ARFLAGS) $@ $(OBJS)
ar rc $@ $(OBJS)
$(RANLIB) $@
libpng.pc:

View File

@@ -16,17 +16,15 @@ ZLIBINC=/opt/zlib/include
# SHAREDLIB=libz.sl
CC=cc
AR=ar
ARFLAGS=rc
RANLIB=ranlib
CFLAGS=-I$(ZLIBINC) -O -Ae +DA1.1 +DS2.0
# Caution: be sure you have built zlib with the same CFLAGS.
CCFLAGS=-I$(ZLIBINC) -O -Ae +DA1.1 +DS2.0
LDFLAGS=-L$(ZLIBLIB) libpng.a -lz -lm
LDFLAGS=-L. -L$(ZLIBLIB) -lpng -lz -lm
RANLIB=ranlib
PNGMAJ = 0
PNGMIN = 1.2.6beta2
PNGMIN = 1.2.5
PNGVER = $(PNGMAJ).$(PNGMIN)
LIBNAME = libpng12
@@ -66,7 +64,7 @@ OBJSDLL = $(OBJS:.o=.pic.o)
all: libpng.a $(LIBNAME).sl pngtest libpng.pc libpng-config
libpng.a: $(OBJS)
$(AR) $(ARFLAGS) $@ $(OBJS)
ar rc $@ $(OBJS)
$(RANLIB) $@
libpng.pc:

View File

@@ -16,7 +16,6 @@ ZLIBLIB = ../zlib
CC = icc
LD = ilink
AR = ilib
ARFLAGS=
RM = del
CFLAGS = -I$(ZLIBINC) -Mc -O2 -W3
@@ -38,7 +37,7 @@ LIBS = libpng$(A) $(ZLIBLIB)/zlib$(A)
all: libpng$(A) pngtest$(E)
libpng$(A): $(OBJS)
$(AR) $(ARFLAGS) -out:$@ $(OBJS)
$(AR) -out:$@ $(OBJS)
test: pngtest$(E)
pngtest$(E)

View File

@@ -24,8 +24,6 @@ LIBPATH=$(prefix)/lib
DESTDIR=
CC=cc
AR=ar
ARFLAGS=rc
CFLAGS=-I../zlib -O
LDFLAGS=-L. -L../zlib/ -lpng -lz -lm
# flags for ansi2knr
@@ -51,7 +49,7 @@ ansi2knr: ansi2knr.c
$(CC) $(CFLAGS) $(ANSI2KNRFLAGS) -o ansi2knr ansi2knr.c
libpng.a: ansi2knr $(OBJS)
$(AR) $(ARFLAGS) $@ $(OBJS)
ar rc $@ $(OBJS)
$(RANLIB) $@
pngtest: pngtest.o libpng.a

View File

@@ -5,14 +5,10 @@
LIBNAME = libpng12
PNGMAJ = 0
PNGMIN = 1.2.6beta2
PNGMIN = 1.2.5
PNGVER = $(PNGMAJ).$(PNGMIN)
CC=gcc
AR=ar
ARFLAGS=rc
RANLIB=ranlib
#RANLIB=echo
# where "make install" puts libpng12.a, libpng12.so*,
# libpng12/png.h and libpng12/pngconf.h
@@ -41,6 +37,9 @@ CFLAGS=-I$(ZLIBINC) -Wall -O3 -funroll-loops \
LDFLAGS=-L. -Wl,-rpath,. -L$(ZLIBLIB) -Wl,-rpath,$(ZLIBLIB) -lpng12 -lz -lm
LDFLAGS_A=-L$(ZLIBLIB) -Wl,-rpath,$(ZLIBLIB) libpng.a -lz -lm
RANLIB=ranlib
#RANLIB=echo
INCPATH=$(prefix)/include
LIBPATH=$(prefix)/lib
MANPATH=$(prefix)/man
@@ -75,7 +74,7 @@ OBJSDLL = $(OBJS:.o=.pic.o)
all: libpng.a $(LIBNAME).so pngtest pngtest-static libpng.pc libpng-config
libpng.a: $(OBJS)
$(AR) $(ARFLAGS) $@ $(OBJS)
ar rc $@ $(OBJS)
$(RANLIB) $@
libpng.pc:

View File

@@ -15,17 +15,13 @@ ZLIBLIB=../zlib
ZLIBINC=../zlib
CC=cc
AR=ar
ARFLAGS=rc
#RANLIB=echo
RANLIB=ranlib
PNGMAJ = 0
PNGMIN = 1.2.6beta2
PNGMIN = 1.2.5
PNGVER = $(PNGMAJ).$(PNGMIN)
CFLAGS=-fno-common -I$(ZLIBINC) -O # -g -DPNG_DEBUG=5
LDFLAGS=-L$(ZLIBLIB) libpng.a -lz
LDFLAGS=-L. -L$(ZLIBLIB) -lpng -lz
LIBNAME=libpng12
SHAREDLIB_POSTFIX=dylib
@@ -49,6 +45,9 @@ DI=$(DESTDIR)$(INCPATH)
DL=$(DESTDIR)$(LIBPATH)
DM=$(DESTDIR)$(MANPATH)
#RANLIB=echo
RANLIB=ranlib
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
@@ -71,7 +70,7 @@ libpng-config:
chmod +x libpng-config
libpng.a: $(OBJS)
$(AR) $(ARFLAGS) $@ $(OBJS)
ar rc $@ $(OBJS)
$(RANLIB) $@
$(LIBNAME).$(PNGVER).$(SHAREDLIB_POSTFIX): $(OBJS)
@@ -109,21 +108,21 @@ install-shared: install-headers $(LIBNAME).$(PNGVER).$(SHAREDLIB_POSTFIX) \
-@/bin/rm -f \
$(DL)/$(LIBNAME).$(PNGVER)*.$(SHAREDLIB_POSTFIX)
-@/bin/rm -f $(DL)/$(LIBNAME).$(SHAREDLIB_POSTFIX)
-@/bin/rm -f libpng.$(SHARED_POSTFIX)
-@/bin/rm -f libpng.3.$(SHARED_POSTFIX)
-@/bin/rm -f libpng.3.$(PNGMIN)*.$(SHARED_POSTFIX)
-@/bin/rm -f libpng.$(SHAREDLIB_POSTFIX)
-@/bin/rm -f libpng.3.$(SHAREDLIB_POSTFIX)
-@/bin/rm -f libpng.3.$(PNGMIN)*.$(SHAREDLIB_POSTFIX)
cp libpng.3.$(PNGMIN).$(SHAREDLIB_POSTFIX) $(DL)
cp $(LIBNAME).$(PNGVER).$(SHAREDLIB_POSTFIX) $(DL)
chmod 755 $(DL)/$(LIBNAME).$(PNGVER).$(SHAREDLIB_POSTFIX)
chmod 755 $(DL)/libpng.3.$(PNGMIN).$(SHAREDLIB_POSTFIX)
(cd $(DL); \
ln -f -s libpng.3.$(PNGMIN).$(SHARED_POSTFIX) \
libpng.3.$(SHARED_POSTFIX); \
ln -f -s libpng.3.$(SHARED_POSTFIX) libpng.$(SHARED_POSTFIX); \
ln -f -s $(LIBNAME).$(PNGVER).$(SHARED_POSTFIX) \
libpng.$(SHARED_POSTFIX); \
ln -f -s libpng.3.$(PNGMIN).$(SHARED_POSTFIX) \
libpng.3.$(SHARED_POSTFIX); \
ln -f -s libpng.3.$(PNGMIN).$(SHAREDLIB_POSTFIX) \
libpng.3.$(SHAREDLIB_POSTFIX); \
ln -f -s libpng.3.$(SHAREDLIB_POSTFIX) libpng.$(SHAREDLIB_POSTFIX); \
ln -f -s $(LIBNAME).$(PNGVER).$(SHAREDLIB_POSTFIX) \
libpng.$(SHAREDLIB_POSTFIX); \
ln -f -s libpng.3.$(PNGMIN).$(SHAREDLIB_POSTFIX) \
libpng.3.$(SHAREDLIB_POSTFIX); \
ln -f -s $(LIBNAME).$(PNGVER).$(SHAREDLIB_POSTFIX) \
$(LIBNAME).$(PNGMAJ).$(SHAREDLIB_POSTFIX); \
ln -f -s $(LIBNAME).$(PNGMAJ).$(SHAREDLIB_POSTFIX) \

View File

@@ -19,8 +19,6 @@ LIBPATH=$(prefix)/lib
DESTDIR=
CC=cc
AR=ar
ARFLAGS=rc
CFLAGS=-I../zlib -O -systype sysv -DSYSV -w -Dmips
#CFLAGS=-O
LDFLAGS=-L. -L../zlib/ -lpng -lz -lm
@@ -35,7 +33,7 @@ OBJS = png.o pngset.o pngget.o pngrutil.o pngtrans.o pngwutil.o \
all: libpng.a pngtest
libpng.a: $(OBJS)
$(AR) $(ARFLAGS) $@ $(OBJS)
ar rc $@ $(OBJS)
$(RANLIB) $@
pngtest: pngtest.o libpng.a

View File

@@ -13,7 +13,7 @@ INCSDIR=${LOCALBASE}/include/libpng12
LIB= png12
SHLIB_MAJOR= 0
SHLIB_MINOR= 1.2.6beta2
SHLIB_MINOR= 1.2.5
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

View File

@@ -13,7 +13,7 @@ INCSDIR=${LOCALBASE}/include/libpng
LIB= png
SHLIB_MAJOR= 3
SHLIB_MINOR= 1.2.6beta2
SHLIB_MINOR= 1.2.5
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

View File

@@ -7,7 +7,7 @@ LIBDIR= ${PREFIX}/lib
MANDIR= ${PREFIX}/man/cat
SHLIB_MAJOR= 0
SHLIB_MINOR= 1.2.6beta2
SHLIB_MINOR= 1.2.5
LIB= png
SRCS= png.c pngerror.c pnggccrd.c pngget.c pngmem.c pngpread.c \

View File

@@ -16,7 +16,6 @@ CFLAGS=-I$(ZLIBINC) -Wall -O6 -funroll-loops -malign-loops=2 \
-malign-functions=2 #$(WARNMORE) -g -DPNG_DEBUG=5
LDFLAGS=-L. -L$(ZLIBLIB) -lpng -lzdll -Zcrtdll
AR=emxomfar
ARFLAGS=rc
PNGLIB=png.lib
IMPLIB=emximp
@@ -32,7 +31,7 @@ OBJS = png.o pngset.o pngget.o pngrutil.o pngtrans.o pngwutil.o \
all: $(PNGLIB) $(SHAREDLIB) $(SHAREDLIBIMP)
$(PNGLIB): $(OBJS)
$(AR) $(ARFLAGS) $@ $(OBJS)
$(AR) rc $@ $(OBJS)
$(SHAREDLIB): $(OBJS) pngos2.def
$(CC) $(LDFLAGS) -Zdll -o $@ $^

View File

@@ -7,10 +7,6 @@
# For conditions of distribution and use, see copyright notice in png.h
CC=cc
AR=ar
ARFLAGS=rc
#RANLIB=ranlib
RANLIB=echo
# where make install puts libpng.a, libpng.so*, and png.h
prefix=/usr/local
@@ -24,8 +20,11 @@ ZLIBINC=../zlib
CFLAGS= -dy -belf -I$(ZLIBINC) -O3
LDFLAGS=-L. -L$(ZLIBLIB) -lpng12 -lz -lm
#RANLIB=ranlib
RANLIB=echo
PNGMAJ = 0
PNGMIN = 1.2.6beta2
PNGMIN = 1.2.5
PNGVER = $(PNGMAJ).$(PNGMIN)
LIBNAME = libpng12
@@ -63,7 +62,7 @@ OBJSDLL = $(OBJS:.o=.pic.o)
all: libpng.a $(LIBNAME).so pngtest libpng.pc libpng-config
libpng.a: $(OBJS)
$(AR) $(ARFLAGS) $@ $(OBJS)
ar rc $@ $(OBJS)
$(RANLIB) $@
libpng.pc:

View File

@@ -18,14 +18,9 @@ ZLIBINC=../zlib
LIBNAME=libpng12
PNGMAJ = 0
PNGMIN = 1.2.6beta2
PNGMIN = 1.2.5
PNGVER = $(PNGMAJ).$(PNGMIN)
CC=gcc
AR=ar
ARFLAGS=rc
RANLIB=echo
#RANLIB=ranlib
# ABI can be blank to use default for your system, -32, -o32, -n32, or -64
# See "man abi". zlib must be built with the same ABI.
@@ -33,13 +28,16 @@ ABI=
WARNMORE= # -g -DPNG_DEBUG=5
CFLAGS=$(ABI) -I$(ZLIBINC) -O2 $(WARNMORE) -fPIC -mabi=n32
LDFLAGS=$(ABI) -L$(ZLIBLIB) libpng.a -lz -lm
LDFLAGS=$(ABI) -L. -L$(ZLIBLIB) -lpng -lz -lm
LDSHARED=cc $(ABI) -shared -soname $(LIBNAME).so.$(PNGMAJ) \
-set_version sgi$(PNGMAJ).0
LDLEGACY=cc $(ABI) -shared -soname libpng.so.3 \
-set_version sgi$3.0
# See "man dso" for info about shared objects
RANLIB=echo
#RANLIB=ranlib
INCPATH=$(prefix)/include
LIBPATH=$(prefix)/lib
#LIBPATH=$(prefix)/lib32
@@ -68,7 +66,7 @@ OBJS = pnggccrd.o png.o pngset.o pngget.o pngrutil.o pngtrans.o pngwutil.o \
all: libpng.a pngtest shared libpng.pc libpng-config
libpng.a: $(OBJS)
$(AR) $(ARFLAGS) $@ $(OBJS)
ar rc $@ $(OBJS)
$(RANLIB) $@
shared: $(LIBNAME).so.$(PNGVER)

View File

@@ -5,7 +5,7 @@
LIBNAME=libpng12
PNGMAJ = 0
PNGMIN = 1.2.6beta2
PNGMIN = 1.2.5
PNGVER = $(PNGMAJ).$(PNGMIN)
# Where make install puts libpng.a, libpng12.so, and libpng12/png.h
@@ -22,10 +22,6 @@ ZLIBLIB=../zlib
ZLIBINC=../zlib
CC=cc
AR=ar
ARFLAGS=rc
RANLIB=echo
#RANLIB=ranlib
# ABI can be blank to use default for your system, -32, -o32, -n32, or -64
# See "man abi". zlib must be built with the same ABI.
@@ -36,7 +32,7 @@ WARNMORE=-fullwarn
#CFLAGS= $(ABI) -I$(ZLIBINC) -O $(WARNMORE) -KPIC -DPNG_USE_PNGGCCRD # -g -DPNG_DEBUG=5
CFLAGS=$(ABI) -I$(ZLIBINC) -O $(WARNMORE) -DPNG_USE_PNGGCCRD \
-DPNG_NO_ASSEMBLER_CODE
LDFLAGS_A=$(ABI) -L$(ZLIBLIB) libpng.a -lz -lm
LDFLAGS_A=$(ABI) -L. -L$(ZLIBLIB) -lpng12 -lz -lm
LDFLAGS=$(ABI) -L. -L$(ZLIBLIB) -lpng -lz -lm
LDSHARED=cc $(ABI) -shared -soname $(LIBNAME).so.$(PNGMAJ) \
-set_version sgi$(PNGMAJ).0
@@ -44,6 +40,9 @@ LDLEGACY=cc $(ABI) -shared -soname libpng.so.3 \
-set_version sgi$3.0
# See "man dso" for info about shared objects
RANLIB=echo
#RANLIB=ranlib
INCPATH=$(prefix)/include
LIBPATH=$(prefix)/lib
#LIBPATH=$(prefix)/lib32
@@ -72,7 +71,7 @@ OBJS = pnggccrd.o png.o pngset.o pngget.o pngrutil.o pngtrans.o pngwutil.o \
all: libpng.a pngtest shared libpng.pc libpng-config
libpng.a: $(OBJS)
$(AR) $(ARFLAGS) $@ $(OBJS)
ar rc $@ $(OBJS)
$(RANLIB) $@
shared: $(LIBNAME).so.$(PNGVER)

View File

@@ -8,10 +8,6 @@
# gcc 2.95 doesn't work.
CC=cc
AR=ar
ARFLAGS=rc
#RANLIB=ranlib
RANLIB=echo
# Where make install puts libpng.a, libpng.so*, and png.h
prefix=/usr/local
@@ -34,8 +30,11 @@ ZLIBINC=/usr/include
CFLAGS=-I$(ZLIBINC) -O3
LDFLAGS=-L. -R. -L$(ZLIBLIB) -R$(ZLIBLIB) -lpng12 -lz -lm
#RANLIB=ranlib
RANLIB=echo
PNGMAJ = 0
PNGMIN = 1.2.6beta2
PNGMIN = 1.2.5
PNGVER = $(PNGMAJ).$(PNGMIN)
LIBNAME = libpng12
@@ -73,7 +72,7 @@ OBJSDLL = $(OBJS:.o=.pic.o)
all: libpng.a $(LIBNAME).so pngtest libpng.pc libpng-config
libpng.a: $(OBJS)
$(AR) $(ARFLAGS) $@ $(OBJS)
ar rc $@ $(OBJS)
$(RANLIB) $@
libpng.pc:

View File

@@ -6,10 +6,6 @@
# For conditions of distribution and use, see copyright notice in png.h
CC=gcc
AR=ar
ARFLAGS=rc
#RANLIB=ranlib
RANLIB=echo
# Where make install puts libpng.a, libpng12.so*, and png.h
prefix=/usr/local
@@ -30,8 +26,11 @@ CFLAGS=-I$(ZLIBINC) -Wall -O3 \
# $(WARNMORE) -g -DPNG_DEBUG=5
LDFLAGS=-L. -R. -L$(ZLIBLIB) -R$(ZLIBLIB) -lpng12 -lz -lm
#RANLIB=ranlib
RANLIB=echo
PNGMAJ = 0
PNGMIN = 1.2.6beta2
PNGMIN = 1.2.5
PNGVER = $(PNGMAJ).$(PNGMIN)
LIBNAME = libpng12
@@ -69,7 +68,7 @@ OBJSDLL = $(OBJS:.o=.pic.o)
all: libpng.a $(LIBNAME).so pngtest libpng.pc libpng-config
libpng.a: $(OBJS)
$(AR) $(ARFLAGS) $@ $(OBJS)
ar rc $@ $(OBJS)
$(RANLIB) $@
libpng.pc:

View File

@@ -25,14 +25,12 @@ ZLIBLIB=../zlib
ZLIBINC=../zlib
CC=cc
AR=ar
ARFLAGS=rc
#RANLIB=echo
RANLIB=ranlib
CFLAGS=-I$(ZLIBINC) -O # -g -DPNG_DEBUG=5
LDFLAGS=-L. -L$(ZLIBLIB) -lpng -lz -lm
#RANLIB=echo
RANLIB=ranlib
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
@@ -40,7 +38,7 @@ OBJS = png.o pngset.o pngget.o pngrutil.o pngtrans.o pngwutil.o \
all: libpng.a pngtest
libpng.a: $(OBJS)
$(AR) $(ARFLAGS) $@ $(OBJS)
ar rc $@ $(OBJS)
$(RANLIB) $@
pngtest: pngtest.o libpng.a

View File

@@ -29,14 +29,12 @@ WARNMORE=-Wwrite-strings -Wpointer-arith -Wshadow -Wconversion \
-Wmissing-declarations -Wtraditional -Wcast-align \
-Wstrict-prototypes -Wmissing-prototypes
CC=gcc
AR=ar
ARFLAGS=rc
RANLIB=ranlib
#RANLIB=echo
CFLAGS=-I$(ZLIBINC) -O # $(WARNMORE) -DPNG_DEBUG=5
LDFLAGS=-L. -L$(ZLIBLIB) -lpng -lz -lm
RANLIB=ranlib
#RANLIB=echo
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
@@ -44,7 +42,7 @@ OBJS = png.o pngset.o pngget.o pngrutil.o pngtrans.o pngwutil.o \
all: libpng.a pngtest
libpng.a: $(OBJS)
$(AR) $(ARFLAGS) $@ $(OBJS)
ar rc $@ $(OBJS)
$(RANLIB) $@
pngtest: pngtest.o libpng.a

View File

@@ -5,31 +5,35 @@
# To use, do "nmake /f scripts\makefile.vcawin32"
# -------- Microsoft Visual C++ 5.0 and later, uses assembler code --------
# If you don't want to use assembler (MMX) code, use makefile.vcwin32 instead.
# Caution: the assembler code was introduced at libpng version 1.0.4 and has
# not yet been thoroughly tested.
# Compiler, linker, librarian, and other tools
CC = cl
LD = link
AR = lib
CFLAGS = -DPNG_USE_PNGVCRD -nologo -MD -O2 -W3 -I..\zlib
LDFLAGS = -nologo
ARFLAGS = -nologo
RM = del
# If you don't want to use assembler code, use makefile.vcwin32 instead.
CFLAGS=-DPNG_USE_PNGVCRD -Ox -GA3s -nologo -W3 -I..\zlib
CC=cl
LD=link
LDFLAGS=
# File extensions
O=.obj
#uncomment next to put error messages in a file
#ERRFILE= >> pngerrs
#ERRFILE= >> pngerrs.log
# variables
OBJS1 = png$(O) pngset$(O) pngget$(O) pngrutil$(O) pngtrans$(O) pngwutil$(O)
OBJS2 = pngmem$(O) pngpread$(O) pngread$(O) pngerror$(O) pngwrite$(O)
OBJS3 = pngrtran$(O) pngwtran$(O) pngrio$(O) pngwio$(O) pngvcrd$(O)
# Variables
OBJS1 = png$(O) pngerror$(O) pngget$(O) pngmem$(O) pngpread$(O)
OBJS2 = pngread$(O) pngrio$(O) pngrtran$(O) pngrutil$(O) pngset$(O)
OBJS3 = pngtrans$(O) pngwio$(O) pngwrite$(O) pngwtran$(O) pngwutil$(O)
OBJS4 = pngvcrd$(O)
OBJS = $(OBJS1) $(OBJS2) $(OBJS3) $(OBJS4)
# Targets
all: libpng.lib
png$(O): png.h pngconf.h
$(CC) -c $(CFLAGS) $*.c $(ERRFILE)
$(CC) -c $(CFLAGS) $*.c $(ERRFILE)
pngset$(O): png.h pngconf.h
$(CC) -c $(CFLAGS) $*.c $(ERRFILE)
@@ -49,9 +53,6 @@ pngrtran$(O): png.h pngconf.h
pngrutil$(O): png.h pngconf.h
$(CC) -c $(CFLAGS) $*.c $(ERRFILE)
pngvcrd$(O): png.h pngconf.h
$(CC) -c $(CFLAGS) $*.c $(ERRFILE)
pngerror$(O): png.h pngconf.h
$(CC) -c $(CFLAGS) $*.c $(ERRFILE)
@@ -79,16 +80,24 @@ pngwtran$(O): png.h pngconf.h
pngwutil$(O): png.h pngconf.h
$(CC) -c $(CFLAGS) $*.c $(ERRFILE)
libpng.lib: $(OBJS1) $(OBJS2) $(OBJS3)
echo something to del > libpng.lib
del libpng.lib
lib /OUT:libpng.lib $(OBJS1) $(OBJS2) $(OBJS3)
pngvcrd$(O): png.h pngconf.h
$(CC) -c $(CFLAGS) $*.c $(ERRFILE)
pngtest.exe: pngtest.obj libpng.lib
$(LD) $(LDFLAGS) pngtest.obj libpng.lib ..\zlib\zlib.lib /OUT:pngtest.exe /SUBSYSTEM:CONSOLE
libpng.lib: $(OBJS)
-$(RM) $@
$(AR) $(ARFLAGS) -out:$@ $(OBJS) $(ERRFILE)
pngtest.exe: pngtest$(O) libpng.lib
$(LD) $(LDFLAGS) -out:$@ pngtest$(O) libpng.lib ..\zlib\zlib.lib $(ERRFILE)
test: pngtest.exe
pngtest
clean:
-$(RM) *$(O)
-$(RM) libpng.lib
-$(RM) pngtest.exe
-$(RM) pngout.png
# End of makefile for libpng

View File

@@ -4,28 +4,35 @@
# Assumes that zlib.lib, zconf.h, and zlib.h have been copied to ..\zlib
# To use, do "nmake /f scripts\makefile.vcwin32"
# -------- Microsoft Visual C++ 4.0 and later, no assembler code --------
# If you want to use assembler code, use makefile.vcawin32 instead.
# -------- Microsoft Visual C++ 2.0 and later, no assembler code --------
# If you want to use assembler (MMX) code, use makefile.vcawin32 instead.
CFLAGS= -Ox -GA3s -nologo -W3 -I..\zlib
# Compiler, linker, librarian, and other tools
CC = cl
LD = link
AR = lib
CFLAGS = -nologo -MD -O2 -W3 -I..\zlib
LDFLAGS = -nologo
ARFLAGS = -nologo
RM = del
CC=cl
LD=link
LDFLAGS=
# File extensions
O=.obj
#uncomment next to put error messages in a file
#ERRFILE= >> pngerrs
#ERRFILE= >> pngerrs.log
# variables
OBJS1 = png$(O) pngset$(O) pngget$(O) pngrutil$(O) pngtrans$(O) pngwutil$(O)
OBJS2 = pngmem$(O) pngpread$(O) pngread$(O) pngerror$(O) pngwrite$(O)
OBJS3 = pngrtran$(O) pngwtran$(O) pngrio$(O) pngwio$(O)
# Variables
OBJS1 = png$(O) pngerror$(O) pngget$(O) pngmem$(O) pngpread$(O)
OBJS2 = pngread$(O) pngrio$(O) pngrtran$(O) pngrutil$(O) pngset$(O)
OBJS3 = pngtrans$(O) pngwio$(O) pngwrite$(O) pngwtran$(O) pngwutil$(O)
OBJS = $(OBJS1) $(OBJS2) $(OBJS3)
# Targets
all: libpng.lib
png$(O): png.h pngconf.h
$(CC) -c $(CFLAGS) $*.c $(ERRFILE)
$(CC) -c $(CFLAGS) $*.c $(ERRFILE)
pngset$(O): png.h pngconf.h
$(CC) -c $(CFLAGS) $*.c $(ERRFILE)
@@ -72,16 +79,21 @@ pngwtran$(O): png.h pngconf.h
pngwutil$(O): png.h pngconf.h
$(CC) -c $(CFLAGS) $*.c $(ERRFILE)
libpng.lib: $(OBJS1) $(OBJS2) $(OBJS3)
echo something to del > libpng.lib
del libpng.lib
lib /OUT:libpng.lib $(OBJS1) $(OBJS2) $(OBJS3)
libpng.lib: $(OBJS)
-$(RM) $@
$(AR) $(ARFLAGS) -out:$@ $(OBJS) $(ERRFILE)
pngtest.exe: pngtest.obj libpng.lib
$(LD) $(LDFLAGS) pngtest.obj libpng.lib ..\zlib\zlib.lib /OUT:pngtest.exe /SUBSYSTEM:CONSOLE
pngtest.exe: pngtest$(O) libpng.lib
$(LD) $(LDFLAGS) -out:$@ pngtest$(O) libpng.lib ..\zlib\zlib.lib $(ERRFILE)
test: pngtest.exe
pngtest
clean:
-$(RM) *$(O)
-$(RM) libpng.lib
-$(RM) pngtest.exe
-$(RM) pngout.png
# End of makefile for libpng

View File

@@ -1,795 +0,0 @@
unit pngdef;
// Caution: this file has fallen out of date since version 1.0.5. Write to
// png-implement@ccrc.wustl.edu or to randeg@alum.rpi.edu about volunteering
// to it up to date.
interface
const
PNG_LIBPNG_VER_STRING = '1.2.6beta2';
PNG_LIBPNG_VER = 10206;
type
png_uint_32 = Cardinal;
png_int_32 = Longint;
png_uint_16 = Word;
png_int_16 = Smallint;
png_byte = Byte;
png_size_t = png_uint_32;
png_charpp = ^png_charp;
png_charp = PChar;
float = single;
int = Integer;
png_bytepp = ^png_bytep;
png_bytep = ^png_byte;
png_uint_16p = ^png_uint_16;
png_uint_16pp = ^png_uint_16p;
png_voidp = pointer;
time_t = Longint;
png_doublep = ^png_double;
png_double = double;
user_error_ptr = Pointer;
png_error_ptrp = ^png_error_ptr;
png_error_ptr = procedure(png_ptr: Pointer; msg: Pointer);
stdcall;
png_rw_ptrp = ^png_rw_ptr;
png_rw_ptr = procedure(png_ptr: Pointer; data: Pointer;
length: png_size_t);
stdcall;
png_flush_ptrp = ^png_flush_ptr;
png_flush_ptr = procedure(png_ptr: Pointer);
stdcall;
png_progressive_info_ptrp = ^png_progressive_info_ptr;
png_progressive_info_ptr = procedure(png_ptr: Pointer;
info_ptr: Pointer);
stdcall;
png_progressive_end_ptrp = ^png_progressive_end_ptr;
png_progressive_end_ptr = procedure(png_ptr: Pointer;
info_ptr: Pointer);
stdcall;
png_progressive_row_ptrp = ^png_progressive_row_ptr;
png_progressive_row_ptr = procedure(png_ptr: Pointer;
data: Pointer; length: png_uint_32;
count: int);
stdcall;
png_read_status_ptr = procedure(png_ptr: Pointer;
row_number: png_uint_32; pass: int);
stdcall;
png_write_status_ptr = procedure(png_ptr: Pointer;
row_number: png_uint_32; pass: int);
stdcall;
png_user_chunk_ptr = procedure(png_ptr: Pointer;
data: png_unknown_chunkp);
stdcall;
png_user_transform_ptr = procedure(png_ptr: Pointer;
row_info: Pointer; data: png_bytep);
stdcall;
png_colorpp = ^png_colorp;
png_colorp = ^png_color;
png_color = packed record
red, green, blue: png_byte;
end;
png_color_16pp = ^png_color_16p;
png_color_16p = ^png_color_16;
png_color_16 = packed record
index: png_byte; //used for palette files
red, green, blue: png_uint_16; //for use in red green blue files
gray: png_uint_16; //for use in grayscale files
end;
png_color_8pp = ^png_color_8p;
png_color_8p = ^png_color_8;
png_color_8 = packed record
red, green, blue: png_byte; //for use in red green blue files
gray: png_byte; //for use in grayscale files
alpha: png_byte; //for alpha channel files
end;
png_textpp = ^png_textp;
png_textp = ^png_text;
png_text = packed record
compression: int; //compression value
key: png_charp; //keyword, 1-79 character description of "text"
text: png_charp; //comment, may be empty ("")
text_length: png_size_t; //length of text field
end;
png_timepp = ^png_timep;
png_timep = ^png_time;
png_time = packed record
year: png_uint_16; //yyyy
month: png_byte; //1..12
day: png_byte; //1..31
hour: png_byte; //0..23
minute: png_byte; //0..59
second: png_byte; //0..60 (leap seconds)
end;
png_infopp = ^png_infop;
png_infop = Pointer;
png_row_infopp = ^png_row_infop;
png_row_infop = ^png_row_info;
png_row_info = packed record
width: png_uint_32; //width of row
rowbytes: png_size_t; //number of bytes in row
color_type: png_byte; //color type of row
bit_depth: png_byte; //bit depth of row
channels: png_byte; //number of channels (1, 2, 3, or 4)
pixel_depth: png_byte; //bits per pixel (depth * channels)
end;
png_structpp = ^png_structp;
png_structp = Pointer;
const
// Supported compression types for text in PNG files (tEXt, and zTXt).
// The values of the PNG_TEXT_COMPRESSION_ defines should NOT be changed.
PNG_TEXT_COMPRESSION_NONE_WR = -3;
PNG_TEXT_COMPRESSION_zTXt_WR = -2;
PNG_TEXT_COMPRESSION_NONE = -1;
PNG_TEXT_COMPRESSION_zTXt = 0;
// These describe the color_type field in png_info.
// color type masks
PNG_COLOR_MASK_PALETTE = 1;
PNG_COLOR_MASK_COLOR = 2;
PNG_COLOR_MASK_ALPHA = 4;
// color types. Note that not all combinations are legal
PNG_COLOR_TYPE_GRAY = 0;
PNG_COLOR_TYPE_PALETTE = PNG_COLOR_MASK_COLOR or
PNG_COLOR_MASK_PALETTE;
PNG_COLOR_TYPE_RGB = PNG_COLOR_MASK_COLOR;
PNG_COLOR_TYPE_RGB_ALPHA = PNG_COLOR_MASK_COLOR or
PNG_COLOR_MASK_ALPHA;
PNG_COLOR_TYPE_GRAY_ALPHA = PNG_COLOR_MASK_ALPHA;
// This is for compression type. PNG 1.0 only defines the single type.
PNG_COMPRESSION_TYPE_BASE = 0; // Deflate method 8, 32K window
PNG_COMPRESSION_TYPE_DEFAULT = PNG_COMPRESSION_TYPE_BASE;
// This is for filter type. PNG 1.0 only defines the single type.
PNG_FILTER_TYPE_BASE = 0; // Single row per-byte filtering
PNG_FILTER_TYPE_DEFAULT = PNG_FILTER_TYPE_BASE;
// These are for the interlacing type. These values should NOT be changed.
PNG_INTERLACE_NONE = 0; // Non-interlaced image
PNG_INTERLACE_ADAM7 = 1; // Adam7 interlacing
// These are for the oFFs chunk. These values should NOT be changed.
PNG_OFFSET_PIXEL = 0; // Offset in pixels
PNG_OFFSET_MICROMETER = 1; // Offset in micrometers (1/10^6 meter)
// These are for the pCAL chunk. These values should NOT be changed.
PNG_EQUATION_LINEAR = 0; // Linear transformation
PNG_EQUATION_BASE_E = 1; // Exponential base e transform
PNG_EQUATION_ARBITRARY = 2; // Arbitrary base exponential transform
PNG_EQUATION_HYPERBOLIC = 3; // Hyperbolic sine transformation
// These are for the pHYs chunk. These values should NOT be changed.
PNG_RESOLUTION_UNKNOWN = 0; // pixels/unknown unit (aspect ratio)
PNG_RESOLUTION_METER = 1; // pixels/meter
// These are for the sRGB chunk. These values should NOT be changed.
PNG_sRGB_INTENT_PERCEPTUAL = 0;
PNG_sRGB_INTENT_RELATIVE = 1;
PNG_sRGB_INTENT_SATURATION = 2;
PNG_sRGB_INTENT_ABSOLUTE = 3;
// Handle alpha and tRNS by replacing with a background color.
PNG_BACKGROUND_GAMMA_UNKNOWN = 0;
PNG_BACKGROUND_GAMMA_SCREEN = 1;
PNG_BACKGROUND_GAMMA_FILE = 2;
PNG_BACKGROUND_GAMMA_UNIQUE = 3;
// Values for png_set_crc_action() to say how to handle CRC errors in
// ancillary and critical chunks, and whether to use the data contained
// therein. Note that it is impossible to "discard" data in a critical
// chunk. For versions prior to 0.90, the action was always error/quit,
// whereas in version 0.90 and later, the action for CRC errors in ancillary
// chunks is warn/discard. These values should NOT be changed.
// value action:critical action:ancillary
PNG_CRC_DEFAULT = 0; // error/quit warn/discard data
PNG_CRC_ERROR_QUIT = 1; // error/quit error/quit
PNG_CRC_WARN_DISCARD = 2; // (INVALID) warn/discard data
PNG_CRC_WARN_USE = 3; // warn/use data warn/use data
PNG_CRC_QUIET_USE = 4; // quiet/use data quiet/use data
PNG_CRC_NO_CHANGE = 5; // use current value use current value
// Flags for png_set_filter() to say which filters to use. The flags
// are chosen so that they don't conflict with real filter types
// below, in case they are supplied instead of the #defined constants.
// These values should NOT be changed.
PNG_NO_FILTERS = $00;
PNG_FILTER_NONE = $08;
PNG_FILTER_SUB = $10;
PNG_FILTER_UP = $20;
PNG_FILTER_AVG = $40;
PNG_FILTER_PAETH = $80;
PNG_ALL_FILTERS = PNG_FILTER_NONE or PNG_FILTER_SUB or
PNG_FILTER_UP or PNG_FILTER_AVG or
PNG_FILTER_PAETH;
// Filter values (not flags) - used in pngwrite.c, pngwutil.c for now.
// These defines should NOT be changed.
PNG_FILTER_VALUE_NONE = 0;
PNG_FILTER_VALUE_SUB = 1;
PNG_FILTER_VALUE_UP = 2;
PNG_FILTER_VALUE_AVG = 3;
PNG_FILTER_VALUE_PAETH = 4;
// Heuristic used for row filter selection. These defines should NOT be
// changed.
PNG_FILTER_HEURISTIC_DEFAULT = 0; // Currently "UNWEIGHTED"
PNG_FILTER_HEURISTIC_UNWEIGHTED = 1; // Used by libpng < 0.95
PNG_FILTER_HEURISTIC_WEIGHTED = 2; // Experimental feature
PNG_FILTER_HEURISTIC_LAST = 3; // Not a valid value
procedure png_build_grayscale_palette(bit_depth: int; palette: png_colorp);
stdcall;
function png_check_sig(sig: png_bytep; num: int): int;
stdcall;
procedure png_chunk_error(png_ptr: png_structp;
const mess: png_charp);
stdcall;
procedure png_chunk_warning(png_ptr: png_structp;
const mess: png_charp);
stdcall;
procedure png_convert_from_time_t(ptime: png_timep; ttime: time_t);
stdcall;
function png_convert_to_rfc1123(png_ptr: png_structp; ptime: png_timep):
png_charp;
stdcall;
function png_create_info_struct(png_ptr: png_structp): png_infop;
stdcall;
function png_create_read_struct(user_png_ver: png_charp;
error_ptr: user_error_ptr; error_fn: png_error_ptr;
warn_fn: png_error_ptr): png_structp;
stdcall;
function png_get_copyright(png_ptr: png_structp): png_charp;
stdcall;
function png_get_header_ver(png_ptr: png_structp): png_charp;
stdcall;
function png_get_header_version(png_ptr: png_structp): png_charp;
stdcall;
function png_get_libpng_ver(png_ptr: png_structp): png_charp;
stdcall;
function png_create_write_struct(user_png_ver: png_charp;
error_ptr: user_error_ptr; error_fn: png_error_ptr;
warn_fn: png_error_ptr): png_structp;
stdcall;
procedure png_destroy_info_struct(png_ptr: png_structp;
info_ptr_ptr: png_infopp);
stdcall;
procedure png_destroy_read_struct(png_ptr_ptr: png_structpp;
info_ptr_ptr, end_info_ptr_ptr: png_infopp);
stdcall;
procedure png_destroy_write_struct(png_ptr_ptr: png_structpp;
info_ptr_ptr: png_infopp);
stdcall;
function png_get_IHDR(png_ptr: png_structp; info_ptr: png_infop;
var width, height: png_uint_32; var bit_depth,
color_type, interlace_type, compression_type,
filter_type: int): png_uint_32;
stdcall;
function png_get_PLTE(png_ptr: png_structp; info_ptr: png_infop;
var palette: png_colorp; var num_palette: int):
png_uint_32;
stdcall;
function png_get_bKGD(png_ptr: png_structp; info_ptr: png_infop;
var background: png_color_16p): png_uint_32;
stdcall;
function png_get_bit_depth(png_ptr: png_structp; info_ptr: png_infop):
png_byte;
stdcall;
function png_get_cHRM(png_ptr: png_structp; info_ptr: png_infop;
var white_x, white_y, red_x, red_y, green_x, green_y,
blue_x, blue_y: double): png_uint_32;
stdcall;
function png_get_channels(png_ptr: png_structp; info_ptr: png_infop):
png_byte;
stdcall;
function png_get_color_type(png_ptr: png_structp; info_ptr: png_infop):
png_byte;
stdcall;
function png_get_compression_type(png_ptr: png_structp;
info_ptr: png_infop): png_byte;
stdcall;
function png_get_error_ptr(png_ptr: png_structp): png_voidp;
stdcall;
function png_get_filter_type(png_ptr: png_structp; info_ptr: png_infop):
png_byte;
stdcall;
function png_get_gAMA(png_ptr: png_structp; info_ptr: png_infop;
var file_gamma: double): png_uint_32;
stdcall;
function png_get_hIST(png_ptr: png_structp; info_ptr: png_infop;
var hist: png_uint_16p): png_uint_32;
stdcall;
function png_get_image_height(png_ptr: png_structp; info_ptr: png_infop):
png_uint_32;
stdcall;
function png_get_image_width(png_ptr: png_structp; info_ptr: png_infop):
png_uint_32;
stdcall;
function png_get_interlace_type(png_ptr: png_structp;
info_ptr: png_infop): png_byte;
stdcall;
function png_get_io_ptr(png_ptr: png_structp): png_voidp;
stdcall;
function png_get_oFFs(png_ptr: png_structp; info_ptr: png_infop;
var offset_x, offset_y: png_uint_32;
var unit_type: int): png_uint_32;
stdcall;
function png_get_sCAL(png_ptr: png_structp; info_ptr: png_infop;
var unit:int; var width: png_uint_32; height: png_uint_32):
png_uint_32;
stdcall
function png_get_pCAL(png_ptr: png_structp; info_ptr: png_infop;
var purpose: png_charp; var X0, X1: png_int_32;
var typ, nparams: int; var units: png_charp;
var params: png_charpp): png_uint_32;
stdcall;
function png_get_pHYs(png_ptr: png_structp; info_ptr: png_infop;
var res_x, res_y: png_uint_32; var unit_type: int):
png_uint_32;
stdcall;
function png_get_pixel_aspect_ratio(png_ptr: png_structp;
info_ptr: png_infop): float;
stdcall;
function png_get_pixels_per_meter(png_ptr: png_structp;
info_ptr: png_infop): png_uint_32;
stdcall;
function png_get_progressive_ptr(png_ptr: png_structp): png_voidp;
stdcall;
function png_get_rgb_to_gray_status(png_ptr: png_structp);
stdcall;
function png_get_rowbytes(png_ptr: png_structp; info_ptr: png_infop):
png_uint_32;
stdcall;
function png_get_rows(png_ptr: png_structp; info_ptr: png_infop):
png_bytepp;
stdcall;
function png_get_sBIT(png_ptr: png_structp; info_ptr: png_infop;
var sig_bits: png_color_8p): png_uint_32;
stdcall;
function png_get_sRGB(png_ptr: png_structp; info_ptr: png_infop;
var file_srgb_intent: int): png_uint_32;
stdcall;
function png_get_signature(png_ptr: png_structp; info_ptr: png_infop):
png_bytep;
stdcall;
function png_get_tIME(png_ptr: png_structp; info_ptr: png_infop;
var mod_time: png_timep): png_uint_32;
stdcall;
function png_get_tRNS(png_ptr: png_structp; info_ptr: png_infop;
var trans: png_bytep; var num_trans: int;
var trans_values: png_color_16p): png_uint_32;
stdcall;
function png_get_text(png_ptr: png_structp; info_ptr: png_infop;
var text_ptr: png_textp; var num_text: int):
png_uint_32;
stdcall;
function png_get_user_chunk_ptr(png_ptr: png_structp):
png_voidp;
stdcall;
function png_get_valid(png_ptr: png_structp; info_ptr: png_infop;
flag: png_uint_32): png_uint_32;
stdcall;
function png_get_x_offset_microns(png_ptr: png_structp;
info_ptr: png_infop): png_uint_32;
stdcall;
function png_get_x_offset_pixels(png_ptr: png_structp;
info_ptr: png_infop): png_uint_32;
stdcall;
function png_get_x_pixels_per_meter(png_ptr: png_structp;
info_ptr: png_infop): png_uint_32;
stdcall;
function png_get_y_offset_microns(png_ptr: png_structp;
info_ptr: png_infop): png_uint_32;
stdcall;
function png_get_y_offset_pixels(png_ptr: png_structp;
info_ptr: png_infop): png_uint_32;
stdcall;
function png_get_y_pixels_per_meter(png_ptr: png_structp;
info_ptr: png_infop): png_uint_32;
stdcall;
procedure png_process_data(png_ptr: png_structp; info_ptr: png_infop;
buffer: png_bytep; buffer_size: png_size_t);
stdcall;
procedure png_progressive_combine_row(png_ptr: png_structp;
old_row, new_row: png_bytep);
stdcall;
procedure png_read_end(png_ptr: png_structp; info_ptr: png_infop);
stdcall;
procedure png_read_image(png_ptr: png_structp; image: png_bytepp);
stdcall;
procedure png_read_info(png_ptr: png_structp; info_ptr: png_infop);
stdcall;
procedure png_read_row(png_ptr: png_structp; row, dsp_row: png_bytep);
stdcall;
procedure png_read_rows(png_ptr: png_structp; row, display_row:
png_bytepp; num_rows: png_uint_32);
stdcall;
procedure png_read_update_info(png_ptr: png_structp; info_ptr: png_infop);
stdcall;
procedure png_set_IHDR(png_ptr: png_structp; info_ptr: png_infop;
width, height: png_uint_32; bit_depth, color_type,
interlace_type, compression_type, filter_type: int);
stdcall;
procedure png_set_PLTE(png_ptr: png_structp; info_ptr: png_infop;
palette: png_colorp; num_palette: int);
stdcall;
procedure png_set_bKGD(png_ptr: png_structp; info_ptr: png_infop;
background: png_color_16p);
stdcall;
procedure png_set_background(png_ptr: png_structp;
background_color: png_color_16p;
background_gamma_code, need_expand: int;
background_gamma: double);
stdcall;
procedure png_set_bgr(png_ptr: png_structp);
stdcall;
procedure png_set_cHRM(png_ptr: png_structp; info_ptr: png_infop;
white_x, white_y, red_x, red_y, green_x, green_y,
blue_x, blue_y: double);
stdcall;
procedure png_set_cHRM_fixed(png_ptr: png_structp; info_ptr: png_infop;
white_x, white_y, red_x, red_y, green_x, green_y,
blue_x, blue_y: png_fixed_point);
stdcall;
procedure png_set_compression_level(png_ptr: png_structp; level: int);
stdcall;
procedure png_set_compression_mem_level(png_ptr: png_structp;
mem_level: int);
stdcall;
procedure png_set_compression_method(png_ptr: png_structp; method: int);
stdcall;
procedure png_set_compression_strategy(png_ptr: png_structp;
strategy: int);
stdcall;
procedure png_set_compression_window_bits(png_ptr: png_structp;
window_bits: int);
stdcall;
procedure png_set_crc_action(png_ptr: png_structp;
crit_action, ancil_action: int);
stdcall;
procedure png_set_dither(png_ptr: png_structp; plaette: png_colorp;
num_palette, maximum_colors: int;
histogram: png_uint_16p; full_dither: int);
stdcall;
procedure png_set_error_fn(png_ptr: png_structp; error_ptr: png_voidp;
error_fn, warning_fn: png_error_ptr);
stdcall;
procedure png_set_expand(png_ptr: png_structp);
stdcall;
procedure png_set_filler(png_ptr: png_structp; filler: png_uint_32;
filler_loc: int);
stdcall;
procedure png_set_filter(png_ptr: png_structp; method, filters: int);
stdcall;
procedure png_set_filter_heuristics(png_ptr: png_structp;
heuristic_method, num_weights: int;
filter_weights, filter_costs: png_doublep);
stdcall;
procedure png_set_flush(png_ptr: png_structp; nrows: int);
stdcall;
procedure png_set_gAMA(png_ptr: png_structp; info_ptr: png_infop;
file_gamma: double);
stdcall;
procedure png_set_gAMA_fixed(png_ptr: png_structp; info_ptr: png_infop;
file_gamma: png_fixed_point);
stdcall;
procedure png_set_gamma(png_ptr: png_structp; screen_gamma,
default_file_gamma: double);
stdcall;
procedure png_set_gray_1_2_4_to_8(png_ptr: png_structp);
stdcall;
procedure png_set_gray_to_rgb(png_ptr: png_structp);
stdcall;
procedure png_set_hIST(png_ptr: png_structp; info_ptr: png_infop;
hist: png_uint_16p);
stdcall;
function png_set_interlace_handling(png_ptr: png_structp): int;
stdcall;
procedure png_set_invalid(png_ptr: png_structp; info_ptr:png_infop;
mask: int);
stdcall;
procedure png_set_invert_alpha(png_ptr: png_structp);
stdcall;
procedure png_set_invert_mono(png_ptr: png_structp);
stdcall;
procedure png_set_oFFs(png_ptr: png_structp; info_ptr: png_infop;
offset_x, offset_y: png_uint_32; unit_type: int);
stdcall;
procedure png_set_palette_to_rgb(png_ptr: png_structp);
stdcall;
procedure png_set_pCAL(png_ptr: png_structp; info_ptr: png_infop;
purpose: png_charp; X0, X1: png_int_32;
typ, nparams: int; units: png_charp;
params: png_charpp);
stdcall;
procedure png_set_pHYs(png_ptr: png_structp; info_ptr: png_infop;
res_x, res_y: png_uint_32; unit_type: int);
stdcall;
procedure png_set_packing(png_ptr: png_structp);
stdcall;
procedure png_set_packswap(png_ptr: png_structp);
stdcall;
procedure png_set_progressive_read_fn(png_ptr: png_structp;
progressive_ptr: png_voidp;
info_fn: png_progressive_info_ptr;
row_fn: png_progressive_row_ptr;
end_fn: png_progressive_end_ptr);
stdcall;
procedure png_set_read_fn(png_ptr: png_structp;
io_ptr: png_voidp; read_data_fn: png_rw_ptr);
stdcall;
procedure png_set_read_status_fn(png_ptr: png_structp;
read_row_fn: png_read_status_ptr);
stdcall;
procedure png_set_read_user_chunk_fn(png_ptr: png_structp;
read_user_chunk_fn: png_user_chunk_ptr);
stdcall;
procedure png_set_read_user_transform_fn(png_ptr: png_structp;
read_user_transform_fn: png_user_transform_ptr);
stdcall;
procedure png_set_rgb_to_gray(png_ptr: png_structp; int: error_action;
red_weight, green_weight: double);
stdcall;
procedure png_set_rgb_to_gray_fixed(png_ptr: png_structp; int: error_action;
red_weight, green_weight: png_fixed_point);
stdcall;
procedure png_set_rows(png_ptr: png_structp; info_ptr: png_infop;
row_pointers: png_bytepp);
stdcall;
procedure png_set_sBIT(png_ptr: png_structp; info_ptr: png_infop;
sig_bits: png_color_8p);
stdcall;
procedure png_set_sRGB(png_ptr: png_structp; info_ptr: png_infop;
intent: int);
stdcall;
procedure png_set_sRGB_gAMA_and_cHRM(png_ptr: png_structp;
info_ptr: png_infop; intent: int);
stdcall;
procedure png_set_shift(png_ptr: png_structp; true_bits: png_color_8p);
stdcall;
procedure png_set_sig_bytes(png_ptr: png_structp; num_bytes: int);
stdcall;
procedure png_set_strip_16(png_ptr: png_structp);
stdcall;
procedure png_set_strip_alpha(png_ptr: png_structp);
stdcall;
procedure png_set_swap(png_ptr: png_structp);
stdcall;
procedure png_set_swap_alpha(png_ptr: png_structp);
stdcall;
procedure png_set_tIME(png_ptr: png_structp; info_ptr: png_infop;
mod_time: png_timep);
stdcall;
procedure png_set_tRNS(png_ptr: png_structp; info_ptr: png_infop;
trans: png_bytep; num_trans: int;
trans_values: png_color_16p);
stdcall;
procedure png_set_tRNS_to_alpha(png_ptr: png_structp);
stdcall;
procedure png_set_text(png_ptr: png_structp; info_ptr: png_infop;
text_ptr: png_textp; num_text: int);
stdcall;
procedure png_set_write_fn(png_ptr: png_structp;
io_ptr: png_voidp; write_data_fn: png_rw_ptr;
output_flush_fn: png_flush_ptr);
stdcall;
procedure png_set_write_status_fn(png_ptr: png_structp;
write_row_fn: png_write_status_ptr);
stdcall;
procedure png_set_write_user_transform_fn(png_ptr: png_structp;
write_user_transform_fn: png_user_transform_ptr);
stdcall;
function png_sig_cmp(sig: png_bytep; start, num_to_check: png_size_t):
int;
stdcall;
procedure png_start_read_image(png_ptr: png_structp);
stdcall;
procedure png_write_chunk(png_ptr: png_structp;
chunk_name, data: png_bytep; length: png_size_t);
stdcall;
procedure png_write_chunk_data(png_ptr: png_structp;
data: png_bytep; length: png_size_t);
stdcall;
procedure png_write_chunk_end(png_ptr: png_structp);
stdcall;
procedure png_write_chunk_start(png_ptr: png_structp;
chunk_name: png_bytep; length: png_uint_32);
stdcall;
procedure png_write_end(png_ptr: png_structp; info_ptr: png_infop);
stdcall;
procedure png_write_flush(png_ptr: png_structp);
stdcall;
procedure png_write_image(png_ptr: png_structp; image: png_bytepp);
stdcall;
procedure png_write_info(png_ptr: png_structp; info_ptr: png_infop);
stdcall;
procedure png_write_info_before_PLTE(png_ptr: png_structp; info_ptr: png_infop);
stdcall;
procedure png_write_row(png_ptr: png_structp; row: png_bytep);
stdcall;
procedure png_write_rows(png_ptr: png_structp; row: png_bytepp;
num_rows: png_uint_32);
stdcall;
procedure png_get_iCCP(png_ptr: png_structp; info_ptr: png_infop;
name: png_charpp; compression_type: int *; profile: png_charpp;
proflen: png_int_32): png_bytep;
stdcall;
procedure png_get_sPLT(png_ptr: png_structp;
info_ptr: png_infop; entries: png_spalette_pp): png_uint_32;
stdcall;
procedure png_set_iCCP(png_ptr: png_structp; info_ptr: png_infop;
name: png_charp; compression_type: int; profile: png_charp;
proflen: int);
stdcall;
procedure png_free_data(png_ptr: png_structp; info_ptr: png_infop; num: int);
stdcall;
procedure png_set_sPLT(png_ptr: png_structp; info_ptr: png_infop;
entries: png_spalette_p; nentries: int);
stdcall;
implementation
const
pngDLL = 'png32bd.dll';
procedure png_build_grayscale_palette; external pngDLL;
function png_check_sig; external pngDLL;
procedure png_chunk_error; external pngDLL;
procedure png_chunk_warning; external pngDLL;
procedure png_convert_from_time_t; external pngDLL;
function png_convert_to_rfc1123; external pngDLL;
function png_create_info_struct; external pngDLL;
function png_create_read_struct; external pngDLL;
function png_create_write_struct; external pngDLL;
procedure png_destroy_info_struct; external pngDLL;
procedure png_destroy_read_struct; external pngDLL;
procedure png_destroy_write_struct; external pngDLL;
function png_get_IHDR; external pngDLL;
function png_get_PLTE; external pngDLL;
function png_get_bKGD; external pngDLL;
function png_get_bit_depth; external pngDLL;
function png_get_cHRM; external pngDLL;
function png_get_channels; external pngDLL;
function png_get_color_type; external pngDLL;
function png_get_compression_type; external pngDLL;
function png_get_error_ptr; external pngDLL;
function png_get_filter_type; external pngDLL;
function png_get_gAMA; external pngDLL;
function png_get_hIST; external pngDLL;
function png_get_image_height; external pngDLL;
function png_get_image_width; external pngDLL;
function png_get_interlace_type; external pngDLL;
function png_get_io_ptr; external pngDLL;
function png_get_oFFs; external pngDLL;
function png_get_pCAL; external pngDLL;
function png_get_pHYs; external pngDLL;
function png_get_pixel_aspect_ratio; external pngDLL;
function png_get_pixels_per_meter; external pngDLL;
function png_get_progressive_ptr; external pngDLL;
function png_get_rowbytes; external pngDLL;
function png_get_rows; external pngDLL;
function png_get_sBIT; external pngDLL;
function png_get_sRGB; external pngDLL;
function png_get_signature; external pngDLL;
function png_get_tIME; external pngDLL;
function png_get_tRNS; external pngDLL;
function png_get_text; external pngDLL;
function png_get_user_chunk_ptr; external pngDLL;
function png_get_valid; external pngDLL;
function png_get_x_offset_microns; external pngDLL;
function png_get_x_offset_pixels; external pngDLL;
function png_get_x_pixels_per_meter; external pngDLL;
function png_get_y_offset_microns; external pngDLL;
function png_get_y_offset_pixels; external pngDLL;
function png_get_y_pixels_per_meter; external pngDLL;
procedure png_process_data; external pngDLL;
procedure png_progressive_combine_row; external pngDLL;
procedure png_read_end; external pngDLL;
procedure png_read_image; external pngDLL;
procedure png_read_info; external pngDLL;
procedure png_read_row; external pngDLL;
procedure png_read_rows; external pngDLL;
procedure png_read_update_info; external pngDLL;
procedure png_set_IHDR; external pngDLL;
procedure png_set_PLTE; external pngDLL;
procedure png_set_bKGD; external pngDLL;
procedure png_set_background; external pngDLL;
procedure png_set_bgr; external pngDLL;
procedure png_set_cHRM; external pngDLL;
procedure png_set_cHRM_fixed; external pngDLL;
procedure png_set_compression_level; external pngDLL;
procedure png_set_compression_mem_level; external pngDLL;
procedure png_set_compression_method; external pngDLL;
procedure png_set_compression_strategy; external pngDLL;
procedure png_set_compression_window_bits; external pngDLL;
procedure png_set_crc_action; external pngDLL;
procedure png_set_dither; external pngDLL;
procedure png_set_error_fn; external pngDLL;
procedure png_set_expand; external pngDLL;
procedure png_set_filler; external pngDLL;
procedure png_set_filter; external pngDLL;
procedure png_set_filter_heuristics; external pngDLL;
procedure png_set_flush; external pngDLL;
procedure png_set_gAMA; external pngDLL;
procedure png_set_gAMA_fixed; external pngDLL;
procedure png_set_gamma; external pngDLL;
procedure png_set_gray_to_rgb; external pngDLL;
procedure png_set_hIST; external pngDLL;
function png_set_interlace_handling; external pngDLL;
procedure png_set_invert_alpha; external pngDLL;
procedure png_set_invert_mono; external pngDLL;
procedure png_set_oFFs; external pngDLL;
procedure png_set_pCAL; external pngDLL;
procedure png_set_pHYs; external pngDLL;
procedure png_set_packing; external pngDLL;
procedure png_set_packswap; external pngDLL;
procedure png_set_progressive_read_fn; external pngDLL;
procedure png_set_read_fn; external pngDLL;
procedure png_set_read_status_fn; external pngDLL;
procedure png_set_read_user_transform_fn; external pngDLL;
procedure png_set_rgb_to_gray; external pngDLL;
procedure png_set_rgb_to_gray_fixed; external pngDLL;
procedure png_set_rows; external pngDLL;
procedure png_set_sBIT; external pngDLL;
procedure png_set_sRGB; external pngDLL;
procedure png_set_sRGB_gAMA_and_cHRM; external pngDLL;
procedure png_set_shift; external pngDLL;
procedure png_set_sig_bytes; external pngDLL;
procedure png_set_strip_16; external pngDLL;
procedure png_set_strip_alpha; external pngDLL;
procedure png_set_swap; external pngDLL;
procedure png_set_swap_alpha; external pngDLL;
procedure png_set_tIME; external pngDLL;
procedure png_set_tRNS; external pngDLL;
procedure png_set_text; external pngDLL;
procedure png_set_user_chunk_fn; external pngDLL;
procedure png_set_write_fn; external pngDLL;
procedure png_set_write_status_fn; external pngDLL;
procedure png_set_write_user_transform_fn; external pngDLL;
function png_sig_cmp; external pngDLL;
procedure png_start_read_image; external pngDLL;
procedure png_write_chunk; external pngDLL;
procedure png_write_chunk_data; external pngDLL;
procedure png_write_chunk_end; external pngDLL;
procedure png_write_chunk_start; external pngDLL;
procedure png_write_end; external pngDLL;
procedure png_write_flush; external pngDLL;
procedure png_write_image; external pngDLL;
procedure png_write_info; external pngDLL;
procedure png_write_info_before_PLTE; external pngDLL;
procedure png_write_row; external pngDLL;
procedure png_write_rows; external pngDLL;
procedure png_get_iCCP; external pngDLL;
procedure png_get_sPLT; external pngDLL;
procedure png_set_iCCP; external pngDLL;
procedure png_set_sPLT; external pngDLL;
procedure png_free_data; external pngDLL;
end.

View File

@@ -2,7 +2,7 @@
; PNG.LIB module definition file for OS/2
;----------------------------------------
; Version 1.2.6beta2
; Version 1.2.5
LIBRARY PNG
DESCRIPTION "PNG image compression library for OS/2"

220
scripts/pngw32.def Normal file
View File

@@ -0,0 +1,220 @@
;------------------------------------------
; LIBPNG module definition file for Windows
;------------------------------------------
LIBRARY
DESCRIPTION "PNG image compression library for Windows"
EXPORTS
;Version 1.2.5
png_build_grayscale_palette @1
png_check_sig @2
png_chunk_error @3
png_chunk_warning @4
png_convert_from_struct_tm @5
png_convert_from_time_t @6
png_create_info_struct @7
png_create_read_struct @8
png_create_write_struct @9
png_data_freer @10
png_destroy_info_struct @11
png_destroy_read_struct @12
png_destroy_write_struct @13
png_error @14
png_free @15
png_free_data @16
png_get_IHDR @17
png_get_PLTE @18
png_get_bKGD @19
png_get_bit_depth @20
png_get_cHRM @21
png_get_cHRM_fixed @22
png_get_channels @23
png_get_color_type @24
png_get_compression_buffer_size @25
png_get_compression_type @26
png_get_copyright @27
png_get_error_ptr @28
png_get_filter_type @29
png_get_gAMA @30
png_get_gAMA_fixed @31
png_get_hIST @32
png_get_header_ver @33
png_get_header_version @34
png_get_iCCP @35
png_get_image_height @36
png_get_image_width @37
png_get_interlace_type @38
png_get_io_ptr @39
png_get_libpng_ver @40
png_get_oFFs @41
png_get_pCAL @42
png_get_pHYs @43
png_get_pixel_aspect_ratio @44
png_get_pixels_per_meter @45
png_get_progressive_ptr @46
png_get_rgb_to_gray_status @47
png_get_rowbytes @48
png_get_rows @49
png_get_sBIT @50
png_get_sCAL @51
png_get_sPLT @52
png_get_sRGB @53
png_get_signature @54
png_get_tIME @55
png_get_tRNS @56
png_get_text @57
png_get_unknown_chunks @58
png_get_user_chunk_ptr @59
png_get_user_transform_ptr @60
png_get_valid @61
png_get_x_offset_microns @62
png_get_x_offset_pixels @63
png_get_x_pixels_per_meter @64
png_get_y_offset_microns @65
png_get_y_offset_pixels @66
png_get_y_pixels_per_meter @67
png_malloc @68
png_memcpy_check @69
png_memset_check @70
; png_permit_empty_plte is deprecated
png_permit_empty_plte @71
png_process_data @72
png_progressive_combine_row @73
png_read_end @74
png_read_image @75
png_read_info @76
; png_read_init is deprecated
png_read_init @77
png_read_png @78
png_read_row @79
png_read_rows @80
png_read_update_info @81
png_reset_zstream @82
png_set_IHDR @83
png_set_PLTE @84
png_set_bKGD @85
png_set_background @86
png_set_bgr @87
png_set_cHRM @88
png_set_cHRM_fixed @89
png_set_compression_buffer_size @90
png_set_compression_level @91
png_set_compression_mem_level @92
png_set_compression_method @93
png_set_compression_strategy @94
png_set_compression_window_bits @95
png_set_crc_action @96
png_set_dither @97
png_set_error_fn @98
png_set_expand @99
png_set_filler @100
png_set_filter @101
png_set_filter_heuristics @102
png_set_flush @103
png_set_gAMA @104
png_set_gAMA_fixed @105
png_set_gamma @106
png_set_gray_1_2_4_to_8 @107
png_set_gray_to_rgb @108
png_set_hIST @109
png_set_iCCP @110
png_set_interlace_handling @111
png_set_invert_alpha @112
png_set_invert_mono @113
png_set_keep_unknown_chunks @114
png_set_oFFs @115
png_set_pCAL @116
png_set_pHYs @117
png_set_packing @118
png_set_packswap @119
png_set_palette_to_rgb @120
png_set_progressive_read_fn @121
png_set_read_fn @122
png_set_read_status_fn @123
png_set_read_user_chunk_fn @124
png_set_read_user_transform_fn @125
png_set_rgb_to_gray @126
png_set_rgb_to_gray_fixed @127
png_set_rows @128
png_set_sBIT @129
png_set_sCAL @130
png_set_sPLT @131
png_set_sRGB @132
png_set_sRGB_gAMA_and_cHRM @133
png_set_shift @134
png_set_sig_bytes @135
png_set_strip_16 @136
png_set_strip_alpha @137
png_set_swap @138
png_set_swap_alpha @139
png_set_tIME @140
png_set_tRNS @141
png_set_tRNS_to_alpha @142
png_set_text @143
png_set_unknown_chunk_location @144
png_set_unknown_chunks @145
png_set_user_transform_info @146
png_set_write_fn @147
png_set_write_status_fn @148
png_set_write_user_transform_fn @149
png_sig_cmp @150
png_start_read_image @151
png_warning @152
png_write_chunk @153
png_write_chunk_data @154
png_write_chunk_end @155
png_write_chunk_start @156
png_write_end @157
png_write_flush @158
png_write_image @159
png_write_info @160
png_write_info_before_PLTE @161
; png_write_init is deprecated
png_write_init @162
png_write_png @163
png_write_row @164
png_write_rows @165
; png_read_init_2 and png_write_init_2 are deprecated.
png_read_init_2 @166
png_write_init_2 @167
png_access_version_number @168
; png_sig_bytes @169
; png_libpng_ver @170
png_init_io @171
png_convert_to_rfc1123 @172
png_set_invalid @173
; Added at version 1.0.12
; For compatiblity with 1.0.7-1.0.11
png_info_init @174
png_read_init_3 @175
png_write_init_3 @176
png_info_init_3 @177
png_destroy_struct @178
; Added at version 1.2.0
; For use with PNG_USER_MEM_SUPPORTED
png_destroy_struct_2 @179
png_create_read_struct_2 @180
png_create_write_struct_2 @181
png_malloc_default @182
png_free_default @183
; MNG features
png_permit_mng_features @184
; MMX support
png_mmx_support @185
png_get_mmx_flagmask @186
png_get_asm_flagmask @187
png_get_asm_flags @188
png_get_mmx_bitdepth_threshold @189
png_get_mmx_rowbytes_threshold @190
png_set_asm_flags @191
png_init_mmx_flags @192
; Strip error numbers
png_set_strip_error_numbers @193
; Added at version 1.2.2
png_handle_as_unknown @194
; 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

95
scripts/pngw32.rc Normal file
View File

@@ -0,0 +1,95 @@
#define PNG_VERSION_INFO_ONLY
#include <windows.h>
#include "../png.h"
#define _QUOTE(x) # x
#define QUOTE(x) _QUOTE(x)
#define PNG_LIBPNG_DLLFNAME "LIBPNG"
#if defined(DLLFNAME_POSTFIX) && !defined(PRIVATEBUILD) && !defined(SPECIALBUILD)
# error PRIVATEBUILD or SPECIALBUILD must be defined as a string describing the type of change brought to the standard library
#endif /* defined(DLLFNAME_POSTFIX)... */
#if defined(PNG_USE_PNGVCRD)
# if !defined(SPECIALBUILD)
# define SPECIALBUILD "Use MMX instructions"
# endif /* SPECIALBUILD */
#endif
#if defined(PNG_DEBUG) && (PNG_DEBUG > 0)
# define VS_DEBUG VS_FF_DEBUG
# ifndef DLLFNAME_POSTFIX
# define DLLFNAME_POSTFIX "D"
# endif /* DLLFNAME_POSTFIX */
# ifndef COMMENTS
# define COMMENTS "PNG_DEBUG=" QUOTE(PNG_DEBUG)
# endif /* COMMENTS */
#else
# define VS_DEBUG 0
# ifndef DLLFNAME_POSTFIX
# define DLLFNAME_POSTFIX
# endif /* DLLFNAME_POSTFIX */
#endif /* defined(DEBUG)... */
#ifdef PRIVATEBUILD
# define VS_PRIVATEBUILD VS_FF_PRIVATEBUILD
#else
# define VS_PRIVATEBUILD 0
#endif /* PRIVATEBUILD */
#ifdef SPECIALBUILD
# define VS_SPECIALBUILD VS_FF_SPECIALBUILD
#else
# define VS_SPECIALBUILD 0
#endif /* SPECIALBUILD */
#if ((PNG_LIBPNG_BUILD_TYPE & PNG_LIBPNG_BUILD_TYPEMASK) != \
PNG_LIBPNG_BUILD_STABLE)
# define VS_PRERELEASE VS_FF_PRERELEASE
# define VS_PATCHED 0
#else
# define VS_PRERELEASE 0
# if (PNG_LIBPNG_BUILD_TYPE & PNG_LIBPNG_BUILD_PATCHED)
# define VS_PATCHED VS_FF_PATCHED
# else
# define VS_PATCHED 0
# endif
#endif
VS_VERSION_INFO VERSIONINFO
FILEVERSION PNG_LIBPNG_VER_MAJOR, PNG_LIBPNG_VER_MINOR, PNG_LIBPNG_VER_RELEASE, PNG_LIBPNG_VER_BUILD
PRODUCTVERSION PNG_LIBPNG_VER_MAJOR, PNG_LIBPNG_VER_MINOR, PNG_LIBPNG_VER_RELEASE, PNG_LIBPNG_VER_BUILD
FILEFLAGSMASK VS_FFI_FILEFLAGSMASK
FILEFLAGS VS_DEBUG | VS_PRIVATEBUILD | VS_SPECIALBUILD | VS_PRERELEASE | VS_PATCHED
FILEOS VOS__WINDOWS32
FILETYPE VFT_DLL
FILESUBTYPE VFT2_UNKNOWN
BEGIN
BLOCK "StringFileInfo"
BEGIN BLOCK "040904E4" /* Language type = U.S English(0x0409) and Character Set = Windows, Multilingual(0x04E4) */
BEGIN
#ifdef COMMENTS
VALUE "Comments", COMMENTS "\000"
#endif /* COMMENTS */
VALUE "FileDescription", "PNG image compression library\000"
VALUE "FileVersion", PNG_LIBPNG_VER_STRING "\000"
VALUE "InternalName", PNG_LIBPNG_DLLFNAME QUOTE(PNG_LIBPNG_VER_DLLNUM) DLLFNAME_POSTFIX " (Windows 32 bit)\000"
VALUE "LegalCopyright", "\251 1998-2004 Glenn Randers-Pehrson et al.\000"
VALUE "OriginalFilename", PNG_LIBPNG_DLLFNAME QUOTE(PNG_LIBPNG_VER_DLLNUM) DLLFNAME_POSTFIX ".DLL\000"
#ifdef PRIVATEBUILD
VALUE "PrivateBuild", PRIVATEBUILD
#endif /* PRIVATEBUILD */
VALUE "ProductName", "LibPNG\000"
VALUE "ProductVersion", "1\000"
#ifdef SPECIALBUILD
VALUE "SpecialBuild", SPECIALBUILD
#endif /* SPECIALBUILD */
END
END
BLOCK "VarFileInfo"
BEGIN
VALUE "Translation", 0x0409, 0x04E4
END
END