merge libpng 1.4.4 to trunk

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@66303 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Paul Cornett 2010-11-30 18:41:25 +00:00
parent 818eb2767c
commit b61cc19c06
151 changed files with 19260 additions and 21547 deletions

View File

@ -104,7 +104,6 @@ WXPNG_CFLAGS = -DNDEBUG $(__INC_ZLIB_p) $(____SHARED) $(CPPFLAGS) $(CFLAGS)
WXPNG_OBJECTS = \
wxpng_png.o \
wxpng_pngerror.o \
wxpng_pnggccrd.o \
wxpng_pngget.o \
wxpng_pngmem.o \
wxpng_pngpread.o \
@ -114,7 +113,6 @@ WXPNG_OBJECTS = \
wxpng_pngrutil.o \
wxpng_pngset.o \
wxpng_pngtrans.o \
wxpng_pngvcrd.o \
wxpng_pngwio.o \
wxpng_pngwrite.o \
wxpng_pngwtran.o \
@ -14486,9 +14484,6 @@ wxpng_png.o: $(srcdir)/src/png/png.c
wxpng_pngerror.o: $(srcdir)/src/png/pngerror.c
$(CCC) -c -o $@ $(WXPNG_CFLAGS) $(srcdir)/src/png/pngerror.c
wxpng_pnggccrd.o: $(srcdir)/src/png/pnggccrd.c
$(CCC) -c -o $@ $(WXPNG_CFLAGS) $(srcdir)/src/png/pnggccrd.c
wxpng_pngget.o: $(srcdir)/src/png/pngget.c
$(CCC) -c -o $@ $(WXPNG_CFLAGS) $(srcdir)/src/png/pngget.c
@ -14516,9 +14511,6 @@ wxpng_pngset.o: $(srcdir)/src/png/pngset.c
wxpng_pngtrans.o: $(srcdir)/src/png/pngtrans.c
$(CCC) -c -o $@ $(WXPNG_CFLAGS) $(srcdir)/src/png/pngtrans.c
wxpng_pngvcrd.o: $(srcdir)/src/png/pngvcrd.c
$(CCC) -c -o $@ $(WXPNG_CFLAGS) $(srcdir)/src/png/pngvcrd.c
wxpng_pngwio.o: $(srcdir)/src/png/pngwio.c
$(CCC) -c -o $@ $(WXPNG_CFLAGS) $(srcdir)/src/png/pngwio.c

View File

@ -30,7 +30,6 @@
<sources>
src/png/png.c
src/png/pngerror.c
src/png/pnggccrd.c
src/png/pngget.c
src/png/pngmem.c
src/png/pngpread.c
@ -40,7 +39,6 @@
src/png/pngrutil.c
src/png/pngset.c
src/png/pngtrans.c
src/png/pngvcrd.c
src/png/pngwio.c
src/png/pngwrite.c
src/png/pngwtran.c

View File

@ -76,7 +76,6 @@ WXPNG_CFLAGS = $(__RUNTIME_LIBS) -I$(BCCDIR)\include $(__DEBUGINFO) \
WXPNG_OBJECTS = \
$(OBJS)\wxpng_png.obj \
$(OBJS)\wxpng_pngerror.obj \
$(OBJS)\wxpng_pnggccrd.obj \
$(OBJS)\wxpng_pngget.obj \
$(OBJS)\wxpng_pngmem.obj \
$(OBJS)\wxpng_pngpread.obj \
@ -86,7 +85,6 @@ WXPNG_OBJECTS = \
$(OBJS)\wxpng_pngrutil.obj \
$(OBJS)\wxpng_pngset.obj \
$(OBJS)\wxpng_pngtrans.obj \
$(OBJS)\wxpng_pngvcrd.obj \
$(OBJS)\wxpng_pngwio.obj \
$(OBJS)\wxpng_pngwrite.obj \
$(OBJS)\wxpng_pngwtran.obj \
@ -5128,9 +5126,6 @@ $(OBJS)\wxpng_png.obj: ..\..\src\png\png.c
$(OBJS)\wxpng_pngerror.obj: ..\..\src\png\pngerror.c
$(CC) -q -c -P- -o$@ $(WXPNG_CFLAGS) ..\..\src\png\pngerror.c
$(OBJS)\wxpng_pnggccrd.obj: ..\..\src\png\pnggccrd.c
$(CC) -q -c -P- -o$@ $(WXPNG_CFLAGS) ..\..\src\png\pnggccrd.c
$(OBJS)\wxpng_pngget.obj: ..\..\src\png\pngget.c
$(CC) -q -c -P- -o$@ $(WXPNG_CFLAGS) ..\..\src\png\pngget.c
@ -5158,9 +5153,6 @@ $(OBJS)\wxpng_pngset.obj: ..\..\src\png\pngset.c
$(OBJS)\wxpng_pngtrans.obj: ..\..\src\png\pngtrans.c
$(CC) -q -c -P- -o$@ $(WXPNG_CFLAGS) ..\..\src\png\pngtrans.c
$(OBJS)\wxpng_pngvcrd.obj: ..\..\src\png\pngvcrd.c
$(CC) -q -c -P- -o$@ $(WXPNG_CFLAGS) ..\..\src\png\pngvcrd.c
$(OBJS)\wxpng_pngwio.obj: ..\..\src\png\pngwio.c
$(CC) -q -c -P- -o$@ $(WXPNG_CFLAGS) ..\..\src\png\pngwio.c

View File

@ -66,7 +66,6 @@ WXPNG_CFLAGS = $(__DEBUGINFO) $(__OPTIMIZEFLAG) $(__THREADSFLAG) $(GCCFLAGS) \
WXPNG_OBJECTS = \
$(OBJS)\wxpng_png.o \
$(OBJS)\wxpng_pngerror.o \
$(OBJS)\wxpng_pnggccrd.o \
$(OBJS)\wxpng_pngget.o \
$(OBJS)\wxpng_pngmem.o \
$(OBJS)\wxpng_pngpread.o \
@ -76,7 +75,6 @@ WXPNG_OBJECTS = \
$(OBJS)\wxpng_pngrutil.o \
$(OBJS)\wxpng_pngset.o \
$(OBJS)\wxpng_pngtrans.o \
$(OBJS)\wxpng_pngvcrd.o \
$(OBJS)\wxpng_pngwio.o \
$(OBJS)\wxpng_pngwrite.o \
$(OBJS)\wxpng_pngwtran.o \
@ -5278,9 +5276,6 @@ $(OBJS)\wxpng_png.o: ../../src/png/png.c
$(OBJS)\wxpng_pngerror.o: ../../src/png/pngerror.c
$(CC) -c -o $@ $(WXPNG_CFLAGS) $(CPPDEPS) $<
$(OBJS)\wxpng_pnggccrd.o: ../../src/png/pnggccrd.c
$(CC) -c -o $@ $(WXPNG_CFLAGS) $(CPPDEPS) $<
$(OBJS)\wxpng_pngget.o: ../../src/png/pngget.c
$(CC) -c -o $@ $(WXPNG_CFLAGS) $(CPPDEPS) $<
@ -5308,9 +5303,6 @@ $(OBJS)\wxpng_pngset.o: ../../src/png/pngset.c
$(OBJS)\wxpng_pngtrans.o: ../../src/png/pngtrans.c
$(CC) -c -o $@ $(WXPNG_CFLAGS) $(CPPDEPS) $<
$(OBJS)\wxpng_pngvcrd.o: ../../src/png/pngvcrd.c
$(CC) -c -o $@ $(WXPNG_CFLAGS) $(CPPDEPS) $<
$(OBJS)\wxpng_pngwio.o: ../../src/png/pngwio.c
$(CC) -c -o $@ $(WXPNG_CFLAGS) $(CPPDEPS) $<

View File

@ -71,7 +71,6 @@ WXPNG_CFLAGS = /M$(__RUNTIME_LIBS_40)$(__DEBUGRUNTIME) /DWIN32 $(__DEBUGINFO) \
WXPNG_OBJECTS = \
$(OBJS)\wxpng_png.obj \
$(OBJS)\wxpng_pngerror.obj \
$(OBJS)\wxpng_pnggccrd.obj \
$(OBJS)\wxpng_pngget.obj \
$(OBJS)\wxpng_pngmem.obj \
$(OBJS)\wxpng_pngpread.obj \
@ -81,7 +80,6 @@ WXPNG_OBJECTS = \
$(OBJS)\wxpng_pngrutil.obj \
$(OBJS)\wxpng_pngset.obj \
$(OBJS)\wxpng_pngtrans.obj \
$(OBJS)\wxpng_pngvcrd.obj \
$(OBJS)\wxpng_pngwio.obj \
$(OBJS)\wxpng_pngwrite.obj \
$(OBJS)\wxpng_pngwtran.obj \
@ -5708,9 +5706,6 @@ $(OBJS)\wxpng_png.obj: ..\..\src\png\png.c
$(OBJS)\wxpng_pngerror.obj: ..\..\src\png\pngerror.c
$(CC) /c /nologo /TC /Fo$@ $(WXPNG_CFLAGS) ..\..\src\png\pngerror.c
$(OBJS)\wxpng_pnggccrd.obj: ..\..\src\png\pnggccrd.c
$(CC) /c /nologo /TC /Fo$@ $(WXPNG_CFLAGS) ..\..\src\png\pnggccrd.c
$(OBJS)\wxpng_pngget.obj: ..\..\src\png\pngget.c
$(CC) /c /nologo /TC /Fo$@ $(WXPNG_CFLAGS) ..\..\src\png\pngget.c
@ -5738,9 +5733,6 @@ $(OBJS)\wxpng_pngset.obj: ..\..\src\png\pngset.c
$(OBJS)\wxpng_pngtrans.obj: ..\..\src\png\pngtrans.c
$(CC) /c /nologo /TC /Fo$@ $(WXPNG_CFLAGS) ..\..\src\png\pngtrans.c
$(OBJS)\wxpng_pngvcrd.obj: ..\..\src\png\pngvcrd.c
$(CC) /c /nologo /TC /Fo$@ $(WXPNG_CFLAGS) ..\..\src\png\pngvcrd.c
$(OBJS)\wxpng_pngwio.obj: ..\..\src\png\pngwio.c
$(CC) /c /nologo /TC /Fo$@ $(WXPNG_CFLAGS) ..\..\src\png\pngwio.c

View File

@ -3342,7 +3342,6 @@ WXPNG_CFLAGS = $(__DEBUGINFO) $(__OPTIMIZEFLAG) $(__THREADSFLAG) &
WXPNG_OBJECTS = &
$(OBJS)\wxpng_png.obj &
$(OBJS)\wxpng_pngerror.obj &
$(OBJS)\wxpng_pnggccrd.obj &
$(OBJS)\wxpng_pngget.obj &
$(OBJS)\wxpng_pngmem.obj &
$(OBJS)\wxpng_pngpread.obj &
@ -3352,7 +3351,6 @@ WXPNG_OBJECTS = &
$(OBJS)\wxpng_pngrutil.obj &
$(OBJS)\wxpng_pngset.obj &
$(OBJS)\wxpng_pngtrans.obj &
$(OBJS)\wxpng_pngvcrd.obj &
$(OBJS)\wxpng_pngwio.obj &
$(OBJS)\wxpng_pngwrite.obj &
$(OBJS)\wxpng_pngwtran.obj &
@ -5537,9 +5535,6 @@ $(OBJS)\wxpng_png.obj : .AUTODEPEND ..\..\src\png\png.c
$(OBJS)\wxpng_pngerror.obj : .AUTODEPEND ..\..\src\png\pngerror.c
$(CC) -bt=nt -zq -fo=$^@ $(WXPNG_CFLAGS) $<
$(OBJS)\wxpng_pnggccrd.obj : .AUTODEPEND ..\..\src\png\pnggccrd.c
$(CC) -bt=nt -zq -fo=$^@ $(WXPNG_CFLAGS) $<
$(OBJS)\wxpng_pngget.obj : .AUTODEPEND ..\..\src\png\pngget.c
$(CC) -bt=nt -zq -fo=$^@ $(WXPNG_CFLAGS) $<
@ -5567,9 +5562,6 @@ $(OBJS)\wxpng_pngset.obj : .AUTODEPEND ..\..\src\png\pngset.c
$(OBJS)\wxpng_pngtrans.obj : .AUTODEPEND ..\..\src\png\pngtrans.c
$(CC) -bt=nt -zq -fo=$^@ $(WXPNG_CFLAGS) $<
$(OBJS)\wxpng_pngvcrd.obj : .AUTODEPEND ..\..\src\png\pngvcrd.c
$(CC) -bt=nt -zq -fo=$^@ $(WXPNG_CFLAGS) $<
$(OBJS)\wxpng_pngwio.obj : .AUTODEPEND ..\..\src\png\pngwio.c
$(CC) -bt=nt -zq -fo=$^@ $(WXPNG_CFLAGS) $<

View File

@ -467,9 +467,6 @@
<File
RelativePath="..\..\src\png\pngerror.c">
</File>
<File
RelativePath="..\..\src\png\pnggccrd.c">
</File>
<File
RelativePath="..\..\src\png\pngget.c">
</File>
@ -497,9 +494,6 @@
<File
RelativePath="..\..\src\png\pngtrans.c">
</File>
<File
RelativePath="..\..\src\png\pngvcrd.c">
</File>
<File
RelativePath="..\..\src\png\pngwio.c">
</File>

View File

@ -675,10 +675,6 @@
RelativePath="..\..\src\png\pngerror.c"
>
</File>
<File
RelativePath="..\..\src\png\pnggccrd.c"
>
</File>
<File
RelativePath="..\..\src\png\pngget.c"
>
@ -715,10 +711,6 @@
RelativePath="..\..\src\png\pngtrans.c"
>
</File>
<File
RelativePath="..\..\src\png\pngvcrd.c"
>
</File>
<File
RelativePath="..\..\src\png\pngwio.c"
>

View File

@ -671,10 +671,6 @@
RelativePath="..\..\src\png\pngerror.c"
>
</File>
<File
RelativePath="..\..\src\png\pnggccrd.c"
>
</File>
<File
RelativePath="..\..\src\png\pngget.c"
>
@ -711,10 +707,6 @@
RelativePath="..\..\src\png\pngtrans.c"
>
</File>
<File
RelativePath="..\..\src\png\pngvcrd.c"
>
</File>
<File
RelativePath="..\..\src\png\pngwio.c"
>

View File

@ -243,10 +243,6 @@ SOURCE=..\..\src\png\pngerror.c
# End Source File
# Begin Source File
SOURCE=..\..\src\png\pnggccrd.c
# End Source File
# Begin Source File
SOURCE=..\..\src\png\pngget.c
# End Source File
# Begin Source File
@ -283,10 +279,6 @@ SOURCE=..\..\src\png\pngtrans.c
# End Source File
# Begin Source File
SOURCE=..\..\src\png\pngvcrd.c
# End Source File
# Begin Source File
SOURCE=..\..\src\png\pngwio.c
# End Source File
# Begin Source File

View File

@ -1,5 +1,5 @@
Libpng 1.2.34 - December 18, 2008
Libpng 1.4.4 - September 23, 2010
This is a public release of libpng, intended for use in production codes.
@ -8,66 +8,58 @@ Files available for download:
Source files with LF line endings (for Unix/Linux) and with a
"configure" script
libpng-1.2.34.tar.gz
libpng-1.2.34.tar.lzma
(Get the lzma codec from <http://tukaani.org/lzma>).
libpng-1.2.34.tar.bz2
Source files with LF line endings (for Unix/Linux) without the
"configure" script
libpng-1.2.34-no-config.tar.gz
libpng-1.2.34-no-config.tar.lzma
libpng-1.2.34-no-config.tar.bz2
libpng-1.4.4.tar.xz (LZMA-compressed, recommended)
libpng-1.4.4.tar.gz
libpng-1.4.4.tar.bz2
Source files with CRLF line endings (for Windows), without the
"configure" script
lpng1234.zip
lpng1234.7z
lpng1234.tar.bz2
Project files
libpng-1.2.34-project-netware.zip
libpng-1.2.34-project-wince.zip
lpng144.zip
lpng144.7z
Other information:
libpng-1.2.34-README.txt
libpng-1.2.34-KNOWNBUGS.txt
libpng-1.2.34-LICENSE.txt
libpng-1.2.34-Y2K-compliance.txt
libpng-1.2.34-[previous version]-diff.txt
libpng-1.4.4-README.txt
libpng-1.4.4-LICENSE.txt
Changes since the last public release (1.2.33):
Changes since the last public release (1.4.3):
Removed extraneous new_push_process_row.c file.
Revised the "SEE ALSO" style of libpng.3, libpngpf.3, and png.5
Removed some newly-added TAB characters from pngpread.c.
Fixed some indentation in pngpread.c and pngrutil.c
Changed "extern PNG_EXPORT" to "PNG_EXPORT" in png.h (Jan Nijtmans)
Changed "extern" to "PNG_EXTERN" in pngpriv.h (except for the 'extern "C" {')
Put "#ifndef PNG_EXTERN, #endif" around "#define PNG_EXTERN" in pngpriv.h
Added -DNO_PNG_SNPRINTF to CFLAGS in scripts/makefile.dj2
Moved the definition of png_snprintf() outside of the enclosing
#ifdef blocks in pngconf.h
Made a special case "#define PNGAPI" in pngconf.h for WATCOM.
Removed reference to cbuilder5/* from Makefile.in and Makefile.am
Updated the read macros and functions from 1.5.0beta38.
Updated projects/visualc71 so it can find scripts/pnglibconf.h
Removed unused png_mem_* defines from pngconf.h.
Correct use of _WINDOWS_ in pngconf.h
Don't try to use version-script with cygwin/mingw.
Revised contrib/gregbook to work under cygwin/mingw.
Updated prebuilt aclocal.m4 and ltmain.sh
Add .dll.a to the list of extensions to be symlinked by Makefile.am (Yaakov)
Updated CMakelists.txt to use CMAKE_INSTALL_LIBDIR variable; useful for
installing libpng in /usr/lib64 (Funda Wang).
Revised CMakeLists.txt to put the man pages in share/man/man* not man/man*
Revised CMakeLists.txt to make symlinks instead of copies when installing.
Moved "#include pngusr.h" ahead of PNG_USER_PRIVATEBUILD test in pngconf.h
Eliminated a deprecated reference to png_ptr->io_ptr in pngtest.c
Eliminated new unnecessary #if tests regarding the sCAL chunk from pngrutil.c
Updated the xcode project to work with libpng-1.4.x and added iOS targets
for simulator and device (Philippe Hausler).
Revised autogen.sh to recognize and use $AUTOCONF, $AUTOMAKE, $AUTOHEADER,
$AUTOPOINT, $ACLOCAL and $LIBTOOLIZE
Rebuilt configure scripts with automake-1.11.1 instead of automake-1.11.
Removed unused mkinstalldirs file.
version 1.2.34 [December 18, 2008]
version 1.2.34beta01 [December 18, 2008]
Revised png_warning() to write its message on standard output by default
when warning_fn is NULL. This was the behavior prior to libpng-1.2.9.
Fixed string vs pointer-to-string error in png_check_keyword().
Added png_check_cHRM_fixed() in png.c and moved checking from pngget.c,
pngrutil.c, and pngwrite.c, and eliminated floating point cHRM checking.
Added check for zero-area RGB cHRM triange in png_check_cHRM_fixed().
In png_check_cHRM_fixed(), ensure white_y is > 0, and removed redundant
check for all-zero coordinates that is detected by the triangle check.
Revised png_warning() to write its message on standard output by default
when warning_fn is NULL.
Corrected off-by-one error in bKGD validity check in png_write_bKGD()
and in png_handle_bKGD().
Merged with png_debug from libpng-1.4.0 to remove newlines.
Removed redundant check for key==NULL before calling png_check_keyword()
to ensure that new_key gets initialized and removed extra warning
(Arvan Pritchard).
Added PNG_TRANSFORM_STRIP_FILLER_BEFORE and
PNG_TRANSFORM_STRIP_FILLER_AFTER conditionals and deprecated
PNG_TRANSFORM_STRIP_FILLER (Jim Barry).
Send comments/corrections/commendations to png-mng-implement at lists.sf.net
(subscription required; visit
https://lists.sourceforge.net/lists/listinfo/png-mng-implement
to subscribe) or to glennrp at users.sourceforge.net
Send comments/corrections/commendations to glennrp at users.sourceforge.net
or to png-mng-implement at lists.sf.net (subscription required; visit
https://lists.sourceforge.net/lists/listinfo/png-mng-implement).
Glenn R-P

File diff suppressed because it is too large Load Diff

359
src/png/CMakeLists.txt Normal file
View File

@ -0,0 +1,359 @@
cmake_minimum_required(VERSION 2.4.4)
set(CMAKE_ALLOW_LOOSE_LOOP_CONSTRUCTS true)
if(UNIX AND NOT DEFINED CMAKE_BUILD_TYPE)
if(CMAKE_MAJOR_VERSION EQUAL 2 AND CMAKE_MINOR_VERSION EQUAL 4)
# workaround CMake 2.4.x bug
set(CMAKE_BUILD_TYPE "RelWithDebInfo" CACHE STRING "Choose the type of build, options are: None(CMAKE_CXX_FLAGS or CMAKE_C_FLAGS used) Debug Release RelWithDebInfo MinSizeRel.")
else()
set(CMAKE_BUILD_TYPE "RelWithDebInfo" CACHE STRING
"Choose the type of build, options are:
None(CMAKE_CXX_FLAGS or CMAKE_C_FLAGS used)
Debug
Release
RelWithDebInfo
MinSizeRel.")
endif()
endif()
project(libpng C)
enable_testing()
# Copyright (C) 2007-2010 Glenn Randers-Pehrson
# This code is released under the libpng license.
# For conditions of distribution and use, see the disclaimer
# and license in png.h
set(PNGLIB_MAJOR 1)
set(PNGLIB_MINOR 4)
set(PNGLIB_RELEASE 4)
set(PNGLIB_NAME libpng${PNGLIB_MAJOR}${PNGLIB_MINOR})
set(PNGLIB_VERSION ${PNGLIB_MAJOR}.${PNGLIB_MINOR}.${PNGLIB_RELEASE})
# needed packages
find_package(ZLIB REQUIRED)
include_directories(${ZLIB_INCLUDE_DIR})
if(NOT WIN32)
find_library(M_LIBRARY
NAMES m
PATHS /usr/lib /usr/local/lib
)
if(NOT M_LIBRARY)
message(STATUS
"math library 'libm' not found - floating point support disabled")
endif()
else()
# not needed on windows
set(M_LIBRARY "")
endif()
# COMMAND LINE OPTIONS
if(DEFINED PNG_SHARED)
option(PNG_SHARED "Build shared lib" ${PNG_SHARED})
else()
option(PNG_SHARED "Build shared lib" ON)
endif()
if(DEFINED PNG_STATIC)
option(PNG_STATIC "Build static lib" ${PNG_STATIC})
else()
option(PNG_STATIC "Build static lib" ON)
endif()
if(MINGW)
option(PNG_TESTS "Build pngtest" NO)
else()
option(PNG_TESTS "Build pngtest" YES)
endif()
option(PNG_NO_CONSOLE_IO "FIXME" YES)
option(PNG_NO_STDIO "FIXME" YES)
option(PNG_DEBUG "Build with debug output" NO)
option(PNGARG "FIXME" YES)
#TODO:
# PNG_CONSOLE_IO_SUPPORTED
# maybe needs improving, but currently I don't know when we can enable what :)
set(png_asm_tmp "OFF")
if(NOT WIN32)
find_program(uname_executable NAMES uname PATHS /bin /usr/bin /usr/local/bin)
if(uname_executable)
exec_program(${uname_executable}
ARGS --machine OUTPUT_VARIABLE uname_output)
if("uname_output" MATCHES "^.*i[1-9]86.*$")
set(png_asm_tmp "ON")
else("uname_output" MATCHES "^.*i[1-9]86.*$")
set(png_asm_tmp "OFF")
endif("uname_output" MATCHES "^.*i[1-9]86.*$")
endif(uname_executable)
else()
# this env var is normally only set on win64
set(TEXT "ProgramFiles(x86)")
if("$ENV{${TEXT}}" STREQUAL "")
set(png_asm_tmp "ON")
endif("$ENV{${TEXT}}" STREQUAL "")
endif()
# SET LIBNAME
set(PNG_LIB_NAME png${PNGLIB_MAJOR}${PNGLIB_MINOR})
# to distinguish between debug and release lib
set(CMAKE_DEBUG_POSTFIX "d")
# OUR SOURCES
set(libpng_sources
png.h
pngconf.h
pngpriv.h
png.c
pngerror.c
pngget.c
pngmem.c
pngpread.c
pngread.c
pngrio.c
pngrtran.c
pngrutil.c
pngset.c
pngtrans.c
pngwio.c
pngwrite.c
pngwtran.c
pngwutil.c
)
set(pngtest_sources
pngtest.c
)
# SOME NEEDED DEFINITIONS
add_definitions(-DPNG_CONFIGURE_LIBPNG)
if(_AIX)
add_definitions(-D_ALL_SOURCE)
endif(_AIX)
if(MSVC)
add_definitions(-DPNG_NO_MODULEDEF -D_CRT_SECURE_NO_DEPRECATE)
endif(MSVC)
if(PNG_SHARED OR NOT MSVC)
#if building msvc static this has NOT to be defined
add_definitions(-DZLIB_DLL)
endif()
if(PNG_CONSOLE_IO_SUPPORTED)
add_definitions(-DPNG_CONSOLE_IO_SUPPORTED)
endif()
if(PNG_NO_CONSOLE_IO)
add_definitions(-DPNG_NO_CONSOLE_IO)
endif()
if(PNG_NO_STDIO)
add_definitions(-DPNG_NO_STDIO)
endif()
if(PNG_DEBUG)
add_definitions(-DPNG_DEBUG)
endif()
if(NOT M_LIBRARY AND NOT WIN32)
add_definitions(-DPNG_NO_FLOATING_POINT_SUPPORTED)
endif()
# NOW BUILD OUR TARGET
include_directories(${CMAKE_CURRENT_SOURCE_DIR} ${ZLIB_INCLUDE_DIR})
if(PNG_SHARED)
add_library(${PNG_LIB_NAME} SHARED ${libpng_sources})
if(MSVC)
# msvc does not append 'lib' - do it here to have consistent name
set_target_properties(${PNG_LIB_NAME} PROPERTIES PREFIX "lib")
set_target_properties(${PNG_LIB_NAME} PROPERTIES IMPORT_PREFIX "lib")
endif()
target_link_libraries(${PNG_LIB_NAME} ${ZLIB_LIBRARY} ${M_LIBRARY})
endif()
if(PNG_STATIC)
# does not work without changing name
set(PNG_LIB_NAME_STATIC ${PNG_LIB_NAME}_static)
add_library(${PNG_LIB_NAME_STATIC} STATIC ${libpng_sources})
if(MSVC)
# msvc does not append 'lib' - do it here to have consistent name
set_target_properties(${PNG_LIB_NAME_STATIC} PROPERTIES PREFIX "lib")
endif()
target_link_libraries(${PNG_LIB_NAME_STATIC} ${ZLIB_LIBRARY} ${M_LIBRARY})
endif()
if(PNG_SHARED AND WIN32)
set_target_properties(${PNG_LIB_NAME} PROPERTIES DEFINE_SYMBOL PNG_BUILD_DLL)
endif()
if(PNG_TESTS AND PNG_SHARED)
# does not work with msvc due to png_lib_ver issue
add_executable(pngtest ${pngtest_sources})
target_link_libraries(pngtest ${PNG_LIB_NAME})
add_test(pngtest ./pngtest ${CMAKE_CURRENT_SOURCE_DIR}/pngtest.png)
endif()
#
# Set a variable with CMake code which:
# Creates a symlink from src to dest (if possible) or alternatively
# copies if different.
macro(_png_generate_symlink_code CODE SRC DEST)
if(WIN32 AND NOT CYGWIN)
set(_png_gsc_message "Copying ${SRC} to ${DEST} if needed")
set(_png_gsc_operation "copy_if_different")
else()
set(_png_gsc_message "Symlinking ${SRC} to ${DEST}")
set(_png_gsc_operation "create_symlink")
endif()
set(${CODE} "
message(STATUS \"${_png_gsc_message}\")
execute_process(COMMAND \${CMAKE_COMMAND} -E ${_png_gsc_operation}
\"${SRC}\" \"${DEST}\")
")
endmacro()
# CREATE PKGCONFIG FILES
# we use the same files like ./configure, so we have to set its vars
if(NOT DEFINED CMAKE_INSTALL_LIBDIR)
set(CMAKE_INSTALL_LIBDIR ${CMAKE_INSTALL_PREFIX}/lib)
endif(NOT DEFINED CMAKE_INSTALL_LIBDIR)
set(prefix ${CMAKE_INSTALL_PREFIX})
set(exec_prefix ${CMAKE_INSTALL_PREFIX})
set(libdir ${CMAKE_INSTALL_LIBDIR})
set(includedir ${CMAKE_INSTALL_PREFIX}/include)
set(LIBS "-lz -lm")
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/libpng.pc.in
${CMAKE_CURRENT_BINARY_DIR}/${PNGLIB_NAME}.pc @ONLY)
_png_generate_symlink_code(PNG_PC_INSTALL_CODE ${PNGLIB_NAME}.pc libpng.pc)
install(CODE ${PNG_PC_INSTALL_CODE})
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/libpng-config.in
${CMAKE_CURRENT_BINARY_DIR}/${PNGLIB_NAME}-config @ONLY)
_png_generate_symlink_code(PNG_CONFIG_INSTALL_CODE ${PNGLIB_NAME}-config libpng-config)
install(CODE ${PNG_CONFIG_INSTALL_CODE})
# SET UP LINKS
if(PNG_SHARED)
set_target_properties(${PNG_LIB_NAME} PROPERTIES
# VERSION 14.${PNGLIB_RELEASE}.1.4.4
VERSION 14.${PNGLIB_RELEASE}.0
SOVERSION 14
CLEAN_DIRECT_OUTPUT 1)
endif()
if(PNG_STATIC)
# MSVC doesn't use a different file extension for shared vs. static
# libs. We are able to change OUTPUT_NAME to remove the _static
# for all other platforms.
if(NOT MSVC)
set_target_properties(${PNG_LIB_NAME_STATIC} PROPERTIES
OUTPUT_NAME ${PNG_LIB_NAME}
CLEAN_DIRECT_OUTPUT 1)
endif()
endif()
# If CMake > 2.4.x, we set a variable used below to export
# targets to an export file.
# TODO: Use VERSION_GREATER after our cmake_minimum_required >= 2.6.2
if(CMAKE_MAJOR_VERSION GREATER 1 AND CMAKE_MINOR_VERSION GREATER 4)
set(PNG_EXPORT_RULE EXPORT libpng)
elseif(CMAKE_MAJOR_VERSION GREATER 2) # future proof
set(PNG_EXPORT_RULE EXPORT libpng)
endif()
# INSTALL
if(NOT SKIP_INSTALL_LIBRARIES AND NOT SKIP_INSTALL_ALL )
if(PNG_SHARED)
install(TARGETS ${PNG_LIB_NAME}
${PNG_EXPORT_RULE}
RUNTIME DESTINATION bin
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR})
# Create a symlink for libpng.dll.a => libpng14.dll.a on Cygwin
if(CYGWIN)
_png_generate_symlink_code(PNG_SHARED_IMPLIB_INSTALL_CODE
${PNGLIB_NAME}${CMAKE_IMPORT_LIBRARY_SUFFIX}
libpng${CMAKE_IMPORT_LIBRARY_SUFFIX})
install(CODE ${PNG_SHARED_IMPLIB_INSTALL_CODE})
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/libpng${CMAKE_IMPORT_LIBRARY_SUFFIX} DESTINATION ${CMAKE_INSTALL_LIBDIR})
endif()
if(NOT WIN32)
_png_generate_symlink_code(PNG_SHARED_INSTALL_CODE
${PNGLIB_NAME}${CMAKE_SHARED_LIBRARY_SUFFIX}
libpng${CMAKE_SHARED_LIBRARY_SUFFIX})
install(CODE ${PNG_SHARED_INSTALL_CODE})
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/libpng${CMAKE_SHARED_LIBRARY_SUFFIX} DESTINATION ${CMAKE_INSTALL_LIBDIR})
endif()
endif()
if(PNG_STATIC)
install(TARGETS ${PNG_LIB_NAME_STATIC}
${PNG_EXPORT_RULE}
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR})
if(NOT WIN32 OR CYGWIN)
_png_generate_symlink_code(PNG_STATIC_INSTALL_CODE
${PNGLIB_NAME}${CMAKE_STATIC_LIBRARY_SUFFIX}
libpng${CMAKE_STATIC_LIBRARY_SUFFIX})
install(CODE ${PNG_STATIC_INSTALL_CODE})
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/libpng${CMAKE_STATIC_LIBRARY_SUFFIX} DESTINATION ${CMAKE_INSTALL_LIBDIR})
endif()
endif()
endif()
if(NOT SKIP_INSTALL_HEADERS AND NOT SKIP_INSTALL_ALL )
install(FILES png.h pngconf.h DESTINATION include)
install(FILES png.h pngconf.h DESTINATION include/${PNGLIB_NAME})
endif()
if(NOT SKIP_INSTALL_EXECUTABLES AND NOT SKIP_INSTALL_ALL )
install(PROGRAMS ${CMAKE_CURRENT_BINARY_DIR}/libpng-config DESTINATION bin)
install(PROGRAMS ${CMAKE_CURRENT_BINARY_DIR}/${PNGLIB_NAME}-config
DESTINATION bin)
endif()
if(NOT SKIP_INSTALL_FILES AND NOT SKIP_INSTALL_ALL )
# Install man pages
if(NOT PNG_MAN_DIR)
set(PNG_MAN_DIR "share/man")
endif()
install(FILES libpng.3 libpngpf.3 DESTINATION ${PNG_MAN_DIR}/man3)
install(FILES png.5 DESTINATION ${PNG_MAN_DIR}/man5)
# Install pkg-config files
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/libpng.pc
DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig)
install(PROGRAMS ${CMAKE_CURRENT_BINARY_DIR}/libpng-config
DESTINATION bin)
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/${PNGLIB_NAME}.pc
DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig)
install(PROGRAMS ${CMAKE_CURRENT_BINARY_DIR}/${PNGLIB_NAME}-config
DESTINATION bin)
endif()
# On versions of CMake that support it, create an export file CMake
# users can include() to import our targets
if(PNG_EXPORT_RULE AND NOT SKIP_INSTALL_EXPORT AND NOT SKIP_INSTALL_ALL )
install(EXPORT libpng DESTINATION lib/libpng FILE lib${PNG_LIB_NAME}.cmake)
endif()
# what's with libpng.txt and all the extra files?
# UNINSTALL
# do we need this?
# DIST
# do we need this?
# to create msvc import lib for mingw compiled shared lib
# pexports libpng.dll > libpng.def
# lib /def:libpng.def /machine:x86

View File

@ -1,5 +1,5 @@
Installing libpng version 1.2.34 - December 18, 2008
Installing libpng version 1.4.4 - September 23, 2010
On Unix/Linux and similar systems, you can simply type
@ -25,27 +25,29 @@ Instead, you can use one of the custom-built makefiles in the
make test
make install
The files that are presently available in the scripts directory
are listed and described in scripts/README.txt.
Or you can use one of the "projects" in the "projects" directory.
If you want to use "cmake" (see www.cmake.org), copy CMakeLists.txt
from the "scripts" directory to this directory and type
cmake . [-DPNG_MMX=YES] -DCMAKE_INSTALL_PREFIX=/path
make
make install
Before installing libpng, you must first install zlib, if it
is not already on your system. zlib can usually be found
wherever you got libpng. zlib can be placed in another directory,
at the same level as libpng.
If you want to use "cmake" (see www.cmake.org), type
cmake . -DCMAKE_INSTALL_PREFIX=/path
make
make install
If your system already has a preinstalled zlib you will still need
to have access to the 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.34" or "lpng109" and "zlib-1.2.1"
or "zlib121") so that you have directories called "zlib" and "libpng".
might be called "libpng-1.4.4" or "libpng14" and "zlib-1.2.3"
or "zlib123") so that you have directories called "zlib" and "libpng".
Your directory structure should look like this:
@ -55,19 +57,27 @@ Your directory structure should look like this:
README
*.h
*.c
CMakeLists.txt => "cmake" script
configuration files:
configure.ac, configure, Makefile.am, Makefile.in,
autogen.sh, config.guess, ltmain.sh, missing,
aclocal.m4, config.h.in, config.sub,
depcomp, install-sh, test-pngtest.sh
contrib
gregbook
pngminim
pngminus
pngsuite
visupng
projects
beos
c5builder (Borland)
cbuilder5 (Borland)
visualc6 (msvc)
netware.txt
wince.txt
visualc71
vstudio
xcode
scripts
makefile.*
*.def (module definition files)
pngtest.png
etc.
zlib
@ -82,80 +92,13 @@ distribution of libpng. It is available in both tar.gz (UNIX style line
endings) and zip (DOS style line endings) formats.
If you are building libpng with MSVC, you can enter the
libpng projects\visualc6 directory and follow the instructions in
projects\visualc6\README.txt.
libpng projects\visualc6 or visualc71 directory and follow the instructions
in README.txt.
You can build libpng for WindowsCE by downloading and installing
the projects\wince directory as instructed in the projects\wince.txt file, and
then following the instructions in the README* files. Similarly, you can
build libpng for Netware or Beos as instructed in projects\netware.txt
or projects\beos.
Else enter the zlib directory and follow the instructions in zlib/README,
Otherwise enter the zlib directory and follow the instructions in zlib/README,
then come back here and run "configure" or choose the appropriate
makefile.sys in the scripts directory.
The files that are presently available in the scripts directory
include
CMakeLists.txt => "cmake" script
makefile.std => Generic UNIX makefile (cc, creates static libpng.a)
makefile.elf => Linux/ELF makefile symbol versioning,
gcc, creates libpng12.so.0.1.2.34)
makefile.linux => Linux/ELF makefile
(gcc, creates libpng12.so.0.1.2.34)
makefile.gcc => Generic makefile (gcc, creates static libpng.a)
makefile.knr => Archaic UNIX Makefile that converts files with
ansi2knr (Requires ansi2knr.c from
ftp://ftp.cs.wisc.edu/ghost)
makefile.aix => AIX/gcc makefile
makefile.cygwin => Cygwin/gcc makefile
makefile.darwin => Darwin makefile, can use on MacosX
makefile.dec => DEC Alpha UNIX makefile
makefile.freebsd => FreeBSD makefile
makefile.hpgcc => HPUX makefile using gcc
makefile.hpux => HPUX (10.20 and 11.00) makefile
makefile.hp64 => HPUX (10.20 and 11.00) makefile, 64-bit
makefile.ibmc => IBM C/C++ version 3.x for Win32 and OS/2 (static)
makefile.intel => Intel C/C++ version 4.0 and later
libpng.icc => Project file for IBM VisualAge/C++ version 4.0 or later
makefile.netbsd => NetBSD/cc makefile, uses PNGGCCRD, makes libpng.so.
makefile.ne12bsd => NetBSD/cc makefile, uses PNGGCCRD,
makes libpng12.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.34)
makefile.sunos => Sun makefile
makefile.solaris => Solaris 2.X makefile (gcc,
creates libpng12.so.0.1.2.34)
makefile.solaris-x86 => Solaris/intelMMX 2.X makefile (gcc,
creates libpng12.so.0.1.2.34)
makefile.so9 => Solaris 9 makefile (gcc,
creates libpng12.so.0.1.2.34)
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
makefile.mips => MIPS makefile
makefile.acorn => Acorn makefile
makefile.amiga => Amiga makefile
smakefile.ppc => AMIGA smakefile for SAS C V6.58/7.00 PPC compiler
(Requires SCOPTIONS, copied from scripts/SCOPTIONS.ppc)
makefile.atari => Atari makefile
makefile.beos => BEOS makefile for X86
makefile.bor => Borland makefile (uses bcc)
makefile.bc32 => 32-bit Borland C++ (all modules compiled in C mode)
makefile.tc3 => Turbo C 3.0 makefile
makefile.dj2 => DJGPP 2 makefile
makefile.msc => Microsoft C makefile
makefile.vcwin32 => makefile for Microsoft Visual C++ 4.0 and later
makefile.os2 => OS/2 Makefile (gcc and emx, requires pngos2.def)
pngos2.def => OS/2 module definition file used by makefile.os2
makefile.watcom => Watcom 10a+ Makefile, 32-bit flat memory model
makevms.com => VMS build script
descrip.mms => VMS makefile for MMS or MMK
SCOPTIONS.ppc => Used with smakefile.ppc
Copy the file (or files) that you need from the
scripts directory into this directory, for example
@ -185,9 +128,11 @@ run "make install".
If you encounter a compiler error message complaining about the
lines
__png.h__ already includes setjmp.h;
__dont__ include it again.;
This means you have compiled another module that includes setjmp.h,
this means you have compiled another module that includes setjmp.h,
which is hazardous because the two modules might not include exactly
the same setjmp.h. If you are sure that you know what you are doing
and that they are exactly the same, then you can comment out or
@ -197,23 +142,3 @@ instead, as demonstrated in contrib/visupng of the libpng distribution.
Further information can be found in the README and libpng.txt
files, in the individual makefiles, in png.h, and the manual pages
libpng.3 and png.5.
Using the ./configure script -- 16 December 2002.
=================================================
The ./configure script should work compatibly with what scripts/makefile.*
did, however there are some options you need to add to configure explicitly,
which previously was done semi-automatically (if you didn't edit
scripts/makefile.* yourself, that is)
CFLAGS="-Wall -O -funroll-loops \
-malign-loops=2 -malign-functions=2" ./configure --prefix=/usr/include \
--with-pkgconfigdir=/usr/lib/pkgconfig --includedir=/usr/include
You can alternatively specify --includedir=/usr/include, /usr/local/include,
/usr/include/png12, or whatever.

View File

@ -1,22 +0,0 @@
Known bugs in libpng version 1.2.34
1. February 23, 2006: The custom makefiles don't build libpng with -lz.
STATUS: This is a subject of debate. The change will probably be made
as a part of a major overhaul of the makefiles in libpng version 1.4.0.
2. February 24, 2006: The Makefile generated by the "configure" script
fails to install symbolic links
libpng12.so => libpng12.so.0.1.2.9betaN
that are generated by the custom makefiles.
3. September 4, 2007: There is a report that pngtest crashes on MacOS 10.
STATUS: workarounds are
1) Compile without optimization (crashes are observed with
-arch i386 and -O2 or -O3, using gcc-4.0.1).
2) Compile pngtest.c with PNG_DEBUG defined (the bug goes away if
you try to look at it).
3) Ignore the crash. The library itself seems to be OK.

View File

@ -8,8 +8,10 @@ COPYRIGHT NOTICE, DISCLAIMER, and LICENSE:
If you modify libpng you may insert additional notices immediately following
this sentence.
libpng versions 1.2.6, August 15, 2004, through 1.2.34, December 18, 2008, are
Copyright (c) 2004, 2006-2008 Glenn Randers-Pehrson, and are
This code is released under the libpng license.
libpng versions 1.2.6, August 15, 2004, through 1.4.4, September 23, 2010, are
Copyright (c) 2004, 2006-2010 Glenn Randers-Pehrson, and are
distributed according to the same disclaimer and license as libpng-1.2.5
with the following individual added to the list of Contributing Authors
@ -106,4 +108,4 @@ certification mark of the Open Source Initiative.
Glenn Randers-Pehrson
glennrp at users.sourceforge.net
December 18, 2008
September 23, 2010

View File

@ -1,12 +1,6 @@
# Makefile.am:
# Source file for Makefile.in (and hence Makefile)
#
# Makefile.am need only be changed on a major version number
# change (e.g. libpng12 --> libpng13). In that case seach
# this file for every instance of the old base name (libpng12)
# and change to the new one (libpng13), then change the
# -version-number settings below so that the new values have
# the correct major part (first field).
PNGLIB_BASENAME= libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@
@ -16,7 +10,7 @@ AUTOMAKE_OPTIONS = foreign
# test programs - run on make check, make distcheck
check_PROGRAMS= pngtest
pngtest_SOURCES = pngtest.c
pngtest_LDADD = libpng12.la
pngtest_LDADD = libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@.la
TESTS = test-pngtest.sh
TESTS_ENVIRONMENT= srcdir=$(srcdir)
@ -24,39 +18,33 @@ TESTS_ENVIRONMENT= srcdir=$(srcdir)
dist_man_MANS= libpng.3 libpngpf.3 png.5
# generate the -config scripts if required
binconfigs= libpng12-config
EXTRA_SCRIPTS= libpng-config libpng12-config
binconfigs= libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@-config
EXTRA_SCRIPTS= libpng-config libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@-config
bin_SCRIPTS= @binconfigs@
# rules to build libpng, only build the old library on request
lib_LTLIBRARIES=libpng12.la @compatlib@
EXTRA_LTLIBRARIES= libpng.la
libpng12_la_SOURCES = png.c pngset.c pngget.c pngrutil.c pngtrans.c pngwutil.c \
lib_LTLIBRARIES=libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@.la
# EXTRA_LTLIBRARIES= libpng.la
libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la_SOURCES = 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 \
png.h pngconf.h
libpng_la_SOURCES = $(libpng12_la_SOURCES)
png.h pngconf.h pngpriv.h
libpng_la_CPPFLAGS = @LIBPNG_DEFINES@
libpng12_la_CPPFLAGS = @LIBPNG_DEFINES@
libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la_CPPFLAGS = @LIBPNG_DEFINES@
# MAJOR UPGRADE: the version-number settings below must be changed.
libpng12_la_LDFLAGS = -no-undefined -export-dynamic \
-version-number 0:@PNGLIB_RELEASE@:0
# -rpath is needed as automake doesn't know the directory
libpng_la_LDFLAGS = -rpath '$(libdir)' -no-undefined -export-dynamic \
-version-number 3:@PNGLIB_RELEASE@:0
libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la_LDFLAGS = -no-undefined -export-dynamic \
-version-number @PNGLIB_MAJOR@@PNGLIB_MINOR@:@PNGLIB_RELEASE@:0
if HAVE_LD_VERSION_SCRIPT
# Versioned symbols and restricted exports
libpng12_la_LDFLAGS += -Wl,--version-script=libpng.vers
libpng12_la_DEPENDENCIES = libpng.vers
libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la_LDFLAGS += -Wl,--version-script=libpng.vers
libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la_DEPENDENCIES = libpng.vers
else
# Only restricted exports when possible
libpng12_la_LDFLAGS += -export-symbols libpng.sym
libpng12_la_DEPENDENCIES = libpng.sym
libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la_LDFLAGS += -export-symbols libpng.sym
libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la_DEPENDENCIES = libpng.sym
endif
libpng_la_DEPENDENCIES = $(libpng12_la_DEPENDENCIES)
# Avoid depending upon Character Ranges.
AN = '_abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789'
@ -68,27 +56,25 @@ pkginclude_HEADERS= png.h pngconf.h
# pkg-config stuff, note that libpng.pc is always required in order
# to get the correct library
pkgconfigdir = @pkgconfigdir@
pkgconfig_DATA = libpng12.pc
pkgconfig_DATA = libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@.pc
#extra source distribution files.
EXTRA_DIST= \
ANNOUNCE CHANGES INSTALL KNOWNBUG LICENSE README TODO Y2KINFO \
ANNOUNCE CHANGES INSTALL LICENSE README TODO \
pngtest.png pngbar.png pngnow.png pngbar.jpg autogen.sh \
${srcdir}/projects/cbuilder5/* \
${srcdir}/projects/beos/* \
${srcdir}/projects/visualc6/* \
${srcdir}/projects/visualc71/* \
${srcdir}/projects/wince.txt \
${srcdir}/projects/netware.txt \
${srcdir}/projects/xcode/* \
${srcdir}/scripts/* \
${srcdir}/contrib/gregbook/* \
${srcdir}/contrib/pngminim/* \
${srcdir}/contrib/pngminus/* \
${srcdir}/contrib/pngsuite/* \
${srcdir}/contrib/visupng/* \
$(TESTS) \
example.c libpng-1.2.34.txt pngvcrd.c
example.c libpng-*.txt
CLEANFILES= pngout.png libpng12.pc libpng12-config libpng.vers \
CLEANFILES= pngout.png libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@.pc libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@-config libpng.vers \
libpng.sym
MAINTAINERCLEANFILES = Makefile.in aclocal.m4 config.guess config.h.in \
@ -122,17 +108,18 @@ test: check
install-data-hook:
cd $(DESTDIR)$(includedir); rm -f png.h pngconf.h
cd $(DESTDIR)$(includedir); $(LN_S) $(PNGLIB_BASENAME)/png.h png.h
cd $(DESTDIR)$(includedir); $(LN_S) $(PNGLIB_BASENAME)/pngconf.h pngconf.h
cd $(DESTDIR)$(includedir); $(LN_S) $(PNGLIB_BASENAME)/pngconf.h \
pngconf.h
cd $(DESTDIR)$(pkgconfigdir); rm -f libpng.pc
cd $(DESTDIR)$(pkgconfigdir); $(LN_S) $(PNGLIB_BASENAME).pc libpng.pc
# do evil things to libpng to cause libpng12 to be used
# do evil things to libpng to cause libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@ to be used
install-exec-hook:
cd $(DESTDIR)$(bindir); rm -f libpng-config
cd $(DESTDIR)$(bindir); $(LN_S) $(PNGLIB_BASENAME)-config libpng-config
@set -x;\
cd $(DESTDIR)$(libdir);\
for ext in a la so sl dylib; do\
for ext in a la so so.@PNGLIB_MAJOR@@PNGLIB_MINOR@.@PNGLIB_RELEASE@ sl dylib dll.a; do\
rm -f libpng.$$ext;\
if test -f $(PNGLIB_BASENAME).$$ext; then\
$(LN_S) $(PNGLIB_BASENAME).$$ext libpng.$$ext;\
@ -143,10 +130,3 @@ uninstall-hook:
cd $(DESTDIR)$(includedir); rm -f png.h pngconf.h
rm -f $(DESTDIR)$(pkgconfigdir)/libpng.pc
rm -f $(DESTDIR)$(bindir)/libpng-config
@if test -n "@compatlib@"; then\
set -x;\
cd $(DESTDIR)$(libdir);\
for ext in a la so sl dylib; do\
rm -f libpng.$$ext;\
done;\
fi

File diff suppressed because it is too large Load Diff

View File

@ -1,15 +1,11 @@
README for libpng version 1.2.34 - December 18, 2008 (shared library 12.0)
README for libpng version 1.4.4 - September 23, 2010 (shared library 14.0)
See the note about version numbers near the top of png.h
See INSTALL for instructions on how to install libpng.
Libpng comes in several distribution formats. Get libpng-*.tar.gz,
libpng-*.tar.lzma, or libpng-*.tar.bz2 if you want UNIX-style line
endings in the text files, or lpng*.7z or lpng*.zip if you want DOS-style
line endings. You can get UNIX-style line endings from the *.zip file
by using "unzip -a" but there seems to be no simple way to recover
UNIX-style line endings from the *.7z file. The *.tar.lzma file is
recommended for *NIX users instead.
libpng-*.tar.xz or libpng-*.tar.bz2 if you want UNIX-style line endings
in the text files, or lpng*.zip if you want DOS-style line endings.
Version 0.89 was the first official release of libpng. Don't let the
fact that it's the first release fool you. The libpng library has been in
@ -58,9 +54,9 @@ to set different actions based on whether the CRC error occurred in a
critical or an ancillary chunk.
The changes made to the library, and bugs fixed are based on discussions
on the png-mng-implement mailing list
and not on material submitted privately to Guy, Andreas, or Glenn. They will
forward any good suggestions to the list.
on the PNG-implement mailing list and not on material submitted
privately to Guy, Andreas, or Glenn. They will forward any good
suggestions to the list.
For a detailed description on using libpng, read libpng.txt. For
examples of libpng in a program, see example.c and pngtest.c. For usage
@ -81,12 +77,12 @@ compression library that is useful for more things than just PNG files.
You can use zlib as a drop-in replacement for fread() and fwrite() if
you are so inclined.
zlib should be available at the same place that libpng is, or at
ftp://ftp.simplesystems.org/pub/png/src/
zlib should be available at the same place that libpng is, or at.
ftp://ftp.info-zip.org/pub/infozip/zlib
You may also want a copy of the PNG specification. It is available
as an RFC, a W3C Recommendation, and an ISO/IEC Standard. You can find
these at http://www.libpng.org/pub/png/pngdocs.html
these at http://www.libpng.org/pub/png/documents/
This code is currently being archived at libpng.sf.net in the
[DOWNLOAD] area, and on CompuServe, Lib 20 (PNG SUPPORT)
@ -105,23 +101,24 @@ Finally, if you get any warning messages when compiling libpng
fix. Please mention "libpng" somewhere in the subject line. Thanks.
This release was created and will be supported by myself (of course
based in a large way on Guy's and Andreas' earlier work), and the PNG group.
based in a large way on Guy's and Andreas' earlier work), and the PNG
development group.
Send comments/corrections/commendations to png-mng-implement at lists.sf.net
(subscription required; visit
Send comments/corrections/commendations to png-mng-implement at
lists.sourceforge.net (subscription required; visit
https://lists.sourceforge.net/lists/listinfo/png-mng-implement
to subscribe) or to glennrp at users.sourceforge.net
You can't reach Guy, the original libpng author, at the addresses
given in previous versions of this document. He and Andreas will read mail
addressed to the png-mng-implement list, however.
given in previous versions of this document. He and Andreas will
read mail addressed to the png-implement list, however.
Please do not send general questions about PNG. Send them to
the (png-mng-misc at lists.sourceforge.net, subscription required, visit
https://lists.sourceforge.net/lists/listinfo/png-mng-implement to subscribe)
the (png-list at ccrc.wustl.edu, subscription required, write to
majordomo at ccrc.wustl.edu with "subscribe png-list" in your message).
On the other hand,
please do not send libpng questions to that address, send them to me
or to the png-mng-implement list. I'll
or to the png-implement list. I'll
get them in the end anyway. If you have a question about something
in the PNG specification that is related to using libpng, send it
to me. Send me any questions that start with "I was using libpng,
@ -129,7 +126,7 @@ and ...". If in doubt, send questions to me. I'll bounce them
to others, if necessary.
Please do not send suggestions on how to change PNG. We have
been discussing PNG for twelve years now, and it is official and
been discussing PNG for nine years now, and it is official and
finished. If you have suggestions for libpng, however, I'll
gladly listen. Even if your suggestion is not used immediately,
it may be used later.
@ -144,7 +141,6 @@ Files in this distribution:
TODO => Things not implemented in the current library
Y2KINFO => Statement of Y2K compliance
example.c => Example code for using libpng functions
libpng-*-*-diff.txt => Diff from previous release
libpng.3 => manual page for libpng (includes libpng.txt)
libpng.txt => Description of libpng and its functions
libpngpf.3 => manual page for libpng's private functions
@ -178,28 +174,20 @@ Files in this distribution:
pngminus => Simple pnm2png and png2pnm programs
pngsuite => Test images
visupng => Contains a MSVC workspace for VisualPng
projects => Contains project files and workspaces for building DLL
beos => Contains a Beos workspace for building libpng
c5builder => Contains a Borland workspace for building libpng
and zlib
visualc6 => Contains a Microsoft Visual C++ (MSVC) workspace
for building libpng and zlib
netware.txt => Contains instructions for downloading a set of
project files for building libpng and zlib on
Netware.
wince.txt => Contains instructions for downloading a Microsoft
Visual C++ (Windows CD Toolkit) workspace for
building libpng and zlib on WindowsCE
projects => Contains project files and workspaces for
building a DLL
c5builder => Contains a Borland workspace for building
libpng and zlib
visualc6 => Contains a Microsoft Visual C++ (MSVC)
workspace for building libpng and zlib
scripts => Directory containing scripts for building libpng:
descrip.mms => VMS makefile for MMS or MMK
makefile.std => Generic UNIX makefile (cc, creates static libpng.a)
makefile.std => Generic UNIX makefile (cc, creates static
libpng.a)
makefile.elf => Linux/ELF makefile symbol versioning,
gcc, creates libpng12.so.0.1.2.34)
(gcc, creates libpng14.so.14.1.4.4)
makefile.linux => Linux/ELF makefile
(gcc, creates libpng12.so.0.1.2.34)
makefile.gcmmx => Linux/ELF makefile
(gcc, creates libpng12.so.0.1.2.34,
uses assembler code tuned for Intel MMX platform)
(gcc, creates libpng14.so.14.1.4.4)
makefile.gcc => Generic makefile (gcc, creates static libpng.a)
makefile.knr => Archaic UNIX Makefile that converts files with
ansi2knr (Requires ansi2knr.c from
@ -214,18 +202,19 @@ Files in this distribution:
makefile.hp64 => HPUX (10.20 and 11.00) makefile, 64 bit
makefile.ibmc => IBM C/C++ version 3.x for Win32 and OS/2 (static)
makefile.intel => Intel C/C++ version 4.0 and later
libpng.icc => Project file, IBM VisualAge/C++ 4.0 or later
makefile.netbsd => NetBSD/cc makefile, PNGGCCRD, makes libpng.so.
makefile.ne12bsd => NetBSD/cc makefile, PNGGCCRD, makes libpng12.so
makefile.mingw => Mingw/gcc makefile
makefile.netbsd => NetBSD/cc makefile, makes libpng.so.
makefile.ne14bsd => NetBSD/cc makefile, makes
libpng14.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.34)
(gcc, creates libpng14.so.14.1.4.4)
makefile.sunos => Sun makefile
makefile.solaris => Solaris 2.X makefile
(gcc, creates libpng12.so.0.1.2.34)
(gcc, creates libpng14.so.14.1.4.4)
makefile.so9 => Solaris 9 makefile
(gcc, creates libpng12.so.0.1.2.34)
(gcc, creates libpng14.so.14.1.4.4)
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
@ -242,25 +231,26 @@ Files in this distribution:
makefile.tc3 => Turbo C 3.0 makefile
makefile.dj2 => DJGPP 2 makefile
makefile.msc => Microsoft C makefile
makefile.vcawin32=> makefile for Microsoft Visual C++ 5.0 and
later (uses assembler code tuned for Intel MMX
platform)
makefile.vcwin32 => makefile for Microsoft Visual C++ 4.0 and
later (does not use assembler code)
makefile.os2 => OS/2 Makefile (gcc and emx, requires pngos2.def)
pngos2.def => OS/2 module definition file used by makefile.os2
png32ce.def => module definition for makefile.cegccg
pngos2.def => OS/2 module definition file used by
makefile.os2
pngwin.def => module definition file used by
makefile.cygwin and makefile.mingw
makefile.watcom => Watcom 10a+ Makefile, 32-bit flat memory model
makevms.com => VMS build script
SCOPTIONS.ppc => Used with smakefile.ppc
Good luck, and happy coding.
-Glenn Randers-Pehrson (current maintainer)
-Glenn Randers-Pehrson (current maintainer, since 1998)
Internet: glennrp at users.sourceforge.net
-Andreas Eric Dilger (former maintainer, 1996-1997)
Internet: adilger at enel.ucalgary.ca
Web: http://members.shaw.ca/adilger/
Web: http://www-mddsp.enel.ucalgary.ca/People/adilger/
-Guy Eric Schalnat (original author and former maintainer, 1995-1996)
(formerly of Group 42, Inc)

View File

@ -1,3 +1,4 @@
/*
TODO - list of things to do for libpng:
Final bug fixes.
@ -8,7 +9,7 @@ Fix problem with C++ and EXTERN "C".
cHRM transformation.
Improve setjmp/longjmp usage or remove it in favor of returning error codes.
Add "grayscale->palette" transformation and "palette->grayscale" detection.
Improved dithering.
Improved quantizing and dithering.
Multi-lingual error and warning message support.
Complete sRGB transformation (presently it simply uses gamma=0.45455).
Man pages for function calls.
@ -17,8 +18,14 @@ Better filter selection
(counting huffman bits/precompression? filter inertia? filter costs?).
Histogram creation.
Text conversion between different code pages (Latin-1 -> Mac and DOS).
Should we always malloc 2^bit_depth PLTE/tRNS/hIST entries for safety?
Build gamma tables using fixed point (and do away with floating point entirely).
Avoid building gamma tables whenever possible.
Use greater precision when changing to linear gamma for compositing against
background and doing rgb-to-gray transformation.
Investigate pre-incremented loop counters and other loop constructions.
Add interpolated method of handling interlacing.
Provide for conditional compilation of 16-bit support (except for the
initial stripping down to 8-bits when reading a 16-bit PNG datastream).
Switch to the simpler zlib (zlib/libpng) license if legally possible.
*/

View File

@ -1,55 +0,0 @@
Y2K compliance in libpng:
=========================
December 18, 2008
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.34 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 will hold years up to 65535. The other two hold the date in text
format, and will hold years up to 9999.
The integer is
"png_uint_16 year" in png_time_struct.
The strings are
"png_charp time_buffer" in png_struct and
"near_time_buffer", which is a local character string in png.c.
There are seven time-related functions:
png_convert_to_rfc_1123() in png.c
(formerly png_convert_to_rfc_1152() in error)
png_convert_from_struct_tm() in pngwrite.c, called in pngwrite.c
png_convert_from_time_t() in pngwrite.c
png_get_tIME() in pngget.c
png_handle_tIME() in pngrutil.c, called in pngread.c
png_set_tIME() in pngset.c
png_write_tIME() in pngwutil.c, called in pngwrite.c
All appear to handle dates properly in a Y2K environment. The
png_convert_from_time_t() function calls gmtime() to convert from system
clock time, which returns (year - 1900), which we properly convert to
the full 4-digit year. There is a possibility that applications using
libpng are not passing 4-digit years into the png_convert_to_rfc_1123()
function, or that they are incorrectly passing only a 2-digit year
instead of "year - 1900" into the png_convert_from_struct_tm() function,
but this is not under our control. The libpng documentation has always
stated that it works with 4-digit years, and the APIs have been
documented as such.
The tIME chunk itself is also Y2K compliant. It uses a 2-byte unsigned
integer to hold the year, and can hold years as large as 65535.
zlib, upon which libpng depends, is also Y2K compliant. It contains
no date-related code.
Glenn Randers-Pehrson
libpng maintainer
PNG Development Group

1511
src/png/aclocal.m4 vendored

File diff suppressed because it is too large Load Diff

View File

@ -4,22 +4,31 @@
#
# WARNING: if you run this you will change the versions
# of the tools which are used and, maybe, required!
touch Makefile.am configure.ac
# You can define your own replacements in your environment.
# $AUTOCONF, $AUTOMAKE, $AUTOHEADER, $AUTOPOINT, $ACLOCAL and $LIBTOOLIZE
touch Makefile.am configure.ac
{
echo "running libtoolize" >&2
libtoolize --force --copy --automake
LT=${LIBTOOLIZE-libtoolize}
echo "running $LT" >&2
$LT --force --copy --automake
} && {
echo "running aclocal" >&2
aclocal
AL=${ACLOCAL-aclocal}
echo "running $AL" >&2
$AL
} && {
echo "running autoheader [ignore the warnings]" >&2
autoheader
AH=${AUTOHEADER-autoheader}
echo "running $AH [ignore the warnings]" >&2
$AH
} && {
echo "running automake" >&2
automake --force-missing --foreign -a -c
AM=${AUTOMAKE-automake}
echo "running $AM" >&2
$AM --force-missing --foreign -a -c
} && {
echo "running autoconf" >&2
autoconf
AC=${AUTOCONF-autoconf}
echo "running $AC" >&2
$AC
} &&
echo "autogen complete" >&2 ||
echo "ERROR: autogen.sh failed, autogen is incomplete" >&2
echo "autogen complete" >&2 ||
echo "ERROR: autogen.sh failed, autogen is incomplete" >&2

View File

@ -64,6 +64,9 @@
/* Define to the one symbol short name of this package. */
#undef PACKAGE_TARNAME
/* Define to the home page for this package. */
#undef PACKAGE_URL
/* Define to the version of this package. */
#undef PACKAGE_VERSION

8050
src/png/configure vendored

File diff suppressed because it is too large Load Diff

View File

@ -18,16 +18,16 @@ AC_PREREQ(2.59)
dnl Version number stuff here:
AC_INIT([libpng], [1.2.34], [png-mng-implement@lists.sourceforge.net])
PNGLIB_VERSION=1.4.4
PNGLIB_MAJOR=1
PNGLIB_MINOR=4
PNGLIB_RELEASE=4
AC_INIT([libpng], [1.4.4], [png-mng-implement@lists.sourceforge.net])
AM_INIT_AUTOMAKE
dnl stop configure from automagically running automake
AM_MAINTAINER_MODE
PNGLIB_VERSION=1.2.34
PNGLIB_MAJOR=1
PNGLIB_MINOR=2
PNGLIB_RELEASE=34
dnl End of version number stuff
AC_CONFIG_SRCDIR([pngget.c])
@ -38,11 +38,10 @@ AC_PROG_CC
AC_PROG_LD
AC_PROG_CPP
AC_CHECK_TOOL(SED, sed, :)
AC_LIBTOOL_WIN32_DLL
AC_PROG_INSTALL
AC_PROG_LN_S
AC_PROG_MAKE_SET
AC_PROG_LIBTOOL
LT_INIT([win32-dll])
# Checks for header files.
AC_HEADER_STDC
@ -59,21 +58,25 @@ AC_CHECK_FUNCS([memset], , AC_ERROR([memset not found in libc]))
AC_CHECK_FUNCS([pow], , AC_CHECK_LIB(m, pow, , AC_ERROR([cannot find pow])) )
AC_CHECK_LIB(z, zlibVersion, , AC_ERROR([zlib not installed]))
LIBPNG_DEFINES=-DPNG_CONFIGURE_LIBPNG
AC_MSG_CHECKING(
[if assembler code in pnggccrd.c can be compiled without PNG_NO_MMX_CODE])
AC_TRY_COMPILE(
[#include "$srcdir/pnggccrd.c"],
[return 0;],
AC_MSG_RESULT(yes)
LIBPNG_NO_MMX="",
AC_MSG_RESULT(no)
LIBPNG_NO_MMX=-DPNG_NO_MMX_CODE)
LIBPNG_DEFINES=$LIBPNG_DEFINES\ $LIBPNG_NO_MMX
case $host_os in
aix*)
LIBPNG_DEFINES="-DPNG_CONFIGURE_LIBPNG -D_ALL_SOURCE";;
*)
LIBPNG_DEFINES=-DPNG_CONFIGURE_LIBPNG;;
esac
LIBPNG_DEFINES=$LIBPNG_DEFINES
AC_SUBST(LIBPNG_DEFINES)
AC_SUBST(LIBPNG_NO_MMX)
AC_MSG_CHECKING([if libraries can be versioned])
# Special case for PE/COFF platforms: ld reports
# support for version-script, but doesn't actually
# DO anything with it.
case $host in
*cygwin* | *mingw32* )
have_ld_version_script=no
AC_MSG_RESULT(no)
;;
* )
GLD=`$LD --help < /dev/null 2>/dev/null | grep version-script`
if test "$GLD"; then
have_ld_version_script=yes
@ -83,6 +86,9 @@ else
AC_MSG_RESULT(no)
AC_MSG_WARN(*** You have not enabled versioned symbols.)
fi
;;
esac
AM_CONDITIONAL(HAVE_LD_VERSION_SCRIPT, test "$have_ld_version_script" = "yes")
if test "$have_ld_version_script" = "yes"; then
@ -126,23 +132,9 @@ AC_ARG_WITH(binconfigs,
[binconfigs='${binconfigs}'])
AC_SUBST([binconfigs])
# Allow the old version number library, libpng.so, to be removed from
# the build
AC_ARG_WITH(libpng-compat,
AC_HELP_STRING([--with-libpng-compat],
[Generate the obsolete libpng.so library @<:@default=yes@:>@]),
[if test "${withval}" = no; then
compatlib=
AC_MSG_NOTICE([libpng.so will not be built])
else
compatlib=libpng.la
fi],
[compatlib=libpng.la])
AC_SUBST([compatlib])
# Config files, substituting as above
AC_CONFIG_FILES([Makefile libpng.pc:scripts/libpng.pc-configure.in])
AC_CONFIG_FILES([libpng-config:scripts/libpng-config.in],
AC_CONFIG_FILES([Makefile libpng.pc:libpng.pc.in])
AC_CONFIG_FILES([libpng-config:libpng-config.in],
[chmod +x libpng-config])
AC_OUTPUT

View File

@ -1,10 +1,10 @@
#! /bin/sh
# depcomp - compile a program generating dependencies as side-effects
scriptversion=2007-03-29.01
scriptversion=2009-04-28.21; # UTC
# Copyright (C) 1999, 2000, 2003, 2004, 2005, 2006, 2007 Free Software
# Foundation, Inc.
# Copyright (C) 1999, 2000, 2003, 2004, 2005, 2006, 2007, 2009 Free
# Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@ -17,9 +17,7 @@ scriptversion=2007-03-29.01
# GNU General Public License for more details.
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
# 02110-1301, USA.
# along with this program. If not, see <http://www.gnu.org/licenses/>.
# As a special exception to the GNU General Public License, if you
# distribute this file as part of a program that contains a
@ -87,6 +85,15 @@ if test "$depmode" = dashXmstdout; then
depmode=dashmstdout
fi
cygpath_u="cygpath -u -f -"
if test "$depmode" = msvcmsys; then
# This is just like msvisualcpp but w/o cygpath translation.
# Just convert the backslash-escaped backslashes to single forward
# slashes to satisfy depend.m4
cygpath_u="sed s,\\\\\\\\,/,g"
depmode=msvisualcpp
fi
case "$depmode" in
gcc3)
## gcc 3 implements dependency tracking that does exactly what
@ -192,14 +199,14 @@ sgi)
' < "$tmpdepfile" \
| sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' | \
tr '
' ' ' >> $depfile
echo >> $depfile
' ' ' >> "$depfile"
echo >> "$depfile"
# The second pass generates a dummy entry for each header file.
tr ' ' '
' < "$tmpdepfile" \
| sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' -e 's/$/:/' \
>> $depfile
>> "$depfile"
else
# The sourcefile does not contain any dependencies, so just
# store a dummy comment line, to avoid errors with the Makefile
@ -328,7 +335,12 @@ hp2)
if test -f "$tmpdepfile"; then
sed -e "s,^.*\.[a-z]*:,$object:," "$tmpdepfile" > "$depfile"
# Add `dependent.h:' lines.
sed -ne '2,${; s/^ *//; s/ \\*$//; s/$/:/; p;}' "$tmpdepfile" >> "$depfile"
sed -ne '2,${
s/^ *//
s/ \\*$//
s/$/:/
p
}' "$tmpdepfile" >> "$depfile"
else
echo "#dummy" > "$depfile"
fi
@ -404,7 +416,7 @@ dashmstdout)
# Remove the call to Libtool.
if test "$libtool" = yes; then
while test $1 != '--mode=compile'; do
while test "X$1" != 'X--mode=compile'; do
shift
done
shift
@ -455,32 +467,39 @@ makedepend)
"$@" || exit $?
# Remove any Libtool call
if test "$libtool" = yes; then
while test $1 != '--mode=compile'; do
while test "X$1" != 'X--mode=compile'; do
shift
done
shift
fi
# X makedepend
shift
cleared=no
for arg in "$@"; do
cleared=no eat=no
for arg
do
case $cleared in
no)
set ""; shift
cleared=yes ;;
esac
if test $eat = yes; then
eat=no
continue
fi
case "$arg" in
-D*|-I*)
set fnord "$@" "$arg"; shift ;;
# Strip any option that makedepend may not understand. Remove
# the object too, otherwise makedepend will parse it as a source file.
-arch)
eat=yes ;;
-*|$object)
;;
*)
set fnord "$@" "$arg"; shift ;;
esac
done
obj_suffix="`echo $object | sed 's/^.*\././'`"
obj_suffix=`echo "$object" | sed 's/^.*\././'`
touch "$tmpdepfile"
${MAKEDEPEND-makedepend} -o"$obj_suffix" -f"$tmpdepfile" "$@"
rm -f "$depfile"
@ -500,7 +519,7 @@ cpp)
# Remove the call to Libtool.
if test "$libtool" = yes; then
while test $1 != '--mode=compile'; do
while test "X$1" != 'X--mode=compile'; do
shift
done
shift
@ -538,13 +557,27 @@ cpp)
msvisualcpp)
# Important note: in order to support this mode, a compiler *must*
# always write the preprocessed file to stdout, regardless of -o,
# because we must use -o when running libtool.
# always write the preprocessed file to stdout.
"$@" || exit $?
# Remove the call to Libtool.
if test "$libtool" = yes; then
while test "X$1" != 'X--mode=compile'; do
shift
done
shift
fi
IFS=" "
for arg
do
case "$arg" in
-o)
shift
;;
$object)
shift
;;
"-Gm"|"/Gm"|"-Gi"|"/Gi"|"-ZI"|"/ZI")
set fnord "$@"
shift
@ -557,16 +590,23 @@ msvisualcpp)
;;
esac
done
"$@" -E |
sed -n '/^#line [0-9][0-9]* "\([^"]*\)"/ s::echo "`cygpath -u \\"\1\\"`":p' | sort | uniq > "$tmpdepfile"
"$@" -E 2>/dev/null |
sed -n '/^#line [0-9][0-9]* "\([^"]*\)"/ s::\1:p' | $cygpath_u | sort -u > "$tmpdepfile"
rm -f "$depfile"
echo "$object : \\" > "$depfile"
. "$tmpdepfile" | sed 's% %\\ %g' | sed -n '/^\(.*\)$/ s:: \1 \\:p' >> "$depfile"
sed < "$tmpdepfile" -n -e 's% %\\ %g' -e '/^\(.*\)$/ s:: \1 \\:p' >> "$depfile"
echo " " >> "$depfile"
. "$tmpdepfile" | sed 's% %\\ %g' | sed -n '/^\(.*\)$/ s::\1\::p' >> "$depfile"
sed < "$tmpdepfile" -n -e 's% %\\ %g' -e '/^\(.*\)$/ s::\1\::p' >> "$depfile"
rm -f "$tmpdepfile"
;;
msvcmsys)
# This case exists only to let depend.m4 do its work. It works by
# looking at the text of this script. This case will never be run,
# since it is checked for above.
exit 1
;;
none)
exec "$@"
;;
@ -585,5 +625,6 @@ exit 0
# eval: (add-hook 'write-file-hooks 'time-stamp)
# time-stamp-start: "scriptversion="
# time-stamp-format: "%:y-%02m-%02d.%02H"
# time-stamp-end: "$"
# time-stamp-time-zone: "UTC"
# time-stamp-end: "; # UTC"
# End:

View File

@ -2,9 +2,9 @@
#if 0 /* in case someone actually tries to compile this */
/* example.c - an example of using libpng
* Last changed in libpng 1.2.33 [December 18, 2008]
* Last changed in libpng 1.4.2 [May 6, 2010]
* This file has been placed in the public domain by the authors.
* Maintained 1998-2008 Glenn Randers-Pehrson
* Maintained 1998-2010 Glenn Randers-Pehrson
* Maintained 1996, 1997 Andreas Dilger)
* Written 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
*/
@ -91,14 +91,15 @@ void read_png(char *file_name) /* We need to open the file */
if ((fp = fopen(file_name, "rb")) == NULL)
return (ERROR);
#else no_open_file /* prototype 2 */
void read_png(FILE *fp, unsigned int sig_read) /* file is already open */
void read_png(FILE *fp, unsigned int sig_read) /* File is already open */
{
png_structp png_ptr;
png_infop info_ptr;
png_uint_32 width, height;
int bit_depth, color_type, interlace_type;
#endif no_open_file /* only use one prototype! */
#endif no_open_file /* Only use one prototype! */
/* Create and initialize the png_struct with the desired error handler
* functions. If you want to use the default stderr and longjump method,
@ -120,7 +121,7 @@ void read_png(FILE *fp, unsigned int sig_read) /* file is already open */
if (info_ptr == NULL)
{
fclose(fp);
png_destroy_read_struct(&png_ptr, png_infopp_NULL, png_infopp_NULL);
png_destroy_read_struct(&png_ptr, NULL, NULL);
return (ERROR);
}
@ -132,7 +133,7 @@ void read_png(FILE *fp, unsigned int sig_read) /* file is already open */
if (setjmp(png_jmpbuf(png_ptr)))
{
/* Free all of the memory associated with the png_ptr and info_ptr */
png_destroy_read_struct(&png_ptr, &info_ptr, png_infopp_NULL);
png_destroy_read_struct(&png_ptr, &info_ptr, NULL);
fclose(fp);
/* If we get here, we had a problem reading the file */
return (ERROR);
@ -159,11 +160,12 @@ void read_png(FILE *fp, unsigned int sig_read) /* file is already open */
* If you have enough memory to read in the entire image at once,
* and you need to specify only transforms that can be controlled
* with one of the PNG_TRANSFORM_* bits (this presently excludes
* dithering, filling, setting background, and doing gamma
* quantizing, filling, setting background, and doing gamma
* adjustment), then you can read the entire image (including
* pixels) into the info structure with this call:
*/
png_read_png(png_ptr, info_ptr, png_transforms, png_voidp_NULL);
png_read_png(png_ptr, info_ptr, png_transforms, NULL);
#else
/* OK, you're doing it the hard way, with the lower-level functions */
@ -173,15 +175,15 @@ void read_png(FILE *fp, unsigned int sig_read) /* file is already open */
png_read_info(png_ptr, info_ptr);
png_get_IHDR(png_ptr, info_ptr, &width, &height, &bit_depth, &color_type,
&interlace_type, int_p_NULL, int_p_NULL);
&interlace_type, NULL, NULL);
/* Set up the data transformations you want. Note that these are all
* optional. Only call them if you want/need them. Many of the
* transformations only work on specific types of images, and many
* are mutually exclusive.
*/
/* Set up the data transformations you want. Note that these are all
* optional. Only call them if you want/need them. Many of the
* transformations only work on specific types of images, and many
* are mutually exclusive.
*/
/* tell libpng to strip 16 bit/color files down to 8 bits/color */
/* Tell libpng to strip 16 bit/color files down to 8 bits/color */
png_set_strip_16(png_ptr);
/* Strip alpha bytes from the input data without combining with the
@ -228,10 +230,11 @@ void read_png(FILE *fp, unsigned int sig_read) /* file is already open */
png_set_background(png_ptr, &my_background,
PNG_BACKGROUND_GAMMA_SCREEN, 0, 1.0);
/* Some suggestions as to how to get a screen gamma value */
/* Note that screen gamma is the display_exponent, which includes
* the CRT_exponent and any correction for viewing conditions */
/* Some suggestions as to how to get a screen gamma value
*
* Note that screen gamma is the display_exponent, which includes
* the CRT_exponent and any correction for viewing conditions
*/
if (/* We have a user-defined screen gamma value */)
{
screen_gamma = user-defined screen_gamma;
@ -244,7 +247,7 @@ void read_png(FILE *fp, unsigned int sig_read) /* file is already open */
/* If we don't have another value */
else
{
screen_gamma = 2.2; /* A good guess for a PC monitors in a dimly
screen_gamma = 2.2; /* A good guess for a PC monitor in a dimly
lit room */
screen_gamma = 1.7 or 1.0; /* A good guess for Mac systems */
}
@ -268,7 +271,8 @@ void read_png(FILE *fp, unsigned int sig_read) /* file is already open */
png_set_gamma(png_ptr, screen_gamma, 0.45455);
}
/* Dither RGB files down to 8 bit palette or reduce palettes
#ifdef PNG_READ_QUANTIZE_SUPPORTED
/* Quantize RGB files down to 8 bit palette or reduce palettes
* to the number of colors available on your screen.
*/
if (color_type & PNG_COLOR_MASK_COLOR)
@ -277,13 +281,14 @@ void read_png(FILE *fp, unsigned int sig_read) /* file is already open */
png_colorp palette;
/* This reduces the image to the application supplied palette */
if (/* we have our own palette */)
if (/* We have our own palette */)
{
/* An array of colors to which the image should be dithered */
/* An array of colors to which the image should be quantized */
png_color std_color_cube[MAX_SCREEN_COLORS];
png_set_dither(png_ptr, std_color_cube, MAX_SCREEN_COLORS,
MAX_SCREEN_COLORS, png_uint_16p_NULL, 0);
/* Prior to libpng-1.4.2, this was png_set_dither(). */
png_set_quantize(png_ptr, std_color_cube, MAX_SCREEN_COLORS,
MAX_SCREEN_COLORS, NULL, 0);
}
/* This reduces the image to the palette supplied in the file */
else if (png_get_PLTE(png_ptr, info_ptr, &palette, &num_palette))
@ -292,12 +297,13 @@ void read_png(FILE *fp, unsigned int sig_read) /* file is already open */
png_get_hIST(png_ptr, info_ptr, &histogram);
png_set_dither(png_ptr, palette, num_palette,
png_set_quantize(png_ptr, palette, num_palette,
max_screen_colors, histogram, 0);
}
}
#endif /* PNG_READ_QUANTIZE_SUPPORTED */
/* invert monochrome files to have 0 as white and 1 as black */
/* Invert monochrome files to have 0 as white and 1 as black */
png_set_invert_mono(png_ptr);
/* If you want to shift the pixel values from the range [0,255] or
@ -306,20 +312,20 @@ void read_png(FILE *fp, unsigned int sig_read) /* file is already open */
*/
if (png_get_valid(png_ptr, info_ptr, PNG_INFO_sBIT))
{
png_color_8p sig_bit;
png_color_8p sig_bit_p;
png_get_sBIT(png_ptr, info_ptr, &sig_bit);
png_set_shift(png_ptr, sig_bit);
png_get_sBIT(png_ptr, info_ptr, &sig_bit_p);
png_set_shift(png_ptr, sig_bit_p);
}
/* flip the RGB pixels to BGR (or RGBA to BGRA) */
/* Flip the RGB pixels to BGR (or RGBA to BGRA) */
if (color_type & PNG_COLOR_MASK_COLOR)
png_set_bgr(png_ptr);
/* swap the RGBA or GA data to ARGB or AG (or BGRA to ABGR) */
/* Swap the RGBA or GA data to ARGB or AG (or BGRA to ABGR) */
png_set_swap_alpha(png_ptr);
/* swap bytes of 16 bit files to least significant byte first */
/* Swap bytes of 16 bit files to least significant byte first */
png_set_swap(png_ptr);
/* Add filler (or alpha) byte (before/after each RGB triplet) */
@ -342,11 +348,13 @@ void read_png(FILE *fp, unsigned int sig_read) /* file is already open */
/* The easiest way to read the image: */
png_bytep row_pointers[height];
/* Clear the pointer array */
for (row = 0; row < height; row++)
row_pointers[row] = NULL;
for (row = 0; row < height; row++)
{
row_pointers[row] = png_malloc(png_ptr, png_get_rowbytes(png_ptr,
info_ptr));
}
/* Now it's time to read the image. One of these methods is REQUIRED */
#ifdef entire /* Read the entire image in one go */
@ -360,44 +368,43 @@ void read_png(FILE *fp, unsigned int sig_read) /* file is already open */
#ifdef single /* Read the image a single row at a time */
for (y = 0; y < height; y++)
{
png_read_rows(png_ptr, &row_pointers[y], png_bytepp_NULL, 1);
png_read_rows(png_ptr, &row_pointers[y], NULL, 1);
}
#else no_single /* Read the image several rows at a time */
for (y = 0; y < height; y += number_of_rows)
{
#ifdef sparkle /* Read the image using the "sparkle" effect. */
png_read_rows(png_ptr, &row_pointers[y], png_bytepp_NULL,
png_read_rows(png_ptr, &row_pointers[y], NULL,
number_of_rows);
#else no_sparkle /* Read the image using the "rectangle" effect */
png_read_rows(png_ptr, png_bytepp_NULL, &row_pointers[y],
png_read_rows(png_ptr, NULL, &row_pointers[y],
number_of_rows);
#endif no_sparkle /* use only one of these two methods */
#endif no_sparkle /* Use only one of these two methods */
}
/* if you want to display the image after every pass, do
so here */
#endif no_single /* use only one of these two methods */
/* If you want to display the image after every pass, do so here */
#endif no_single /* Use only one of these two methods */
}
#endif no_entire /* use only one of these two methods */
#endif no_entire /* Use only one of these two methods */
/* read rest of file, and get additional chunks in info_ptr - REQUIRED */
/* Read rest of file, and get additional chunks in info_ptr - REQUIRED */
png_read_end(png_ptr, info_ptr);
#endif hilevel
/* At this point you have read the entire image */
/* clean up after the read, and free any memory allocated - REQUIRED */
png_destroy_read_struct(&png_ptr, &info_ptr, png_infopp_NULL);
/* Clean up after the read, and free any memory allocated - REQUIRED */
png_destroy_read_struct(&png_ptr, &info_ptr, NULL);
/* close the file */
/* Close the file */
fclose(fp);
/* that's it */
/* That's it */
return (OK);
}
/* progressively read a file */
/* Progressively read a file */
int
initialize_png_reader(png_structp *png_ptr, png_infop *info_ptr)
@ -421,13 +428,13 @@ initialize_png_reader(png_structp *png_ptr, png_infop *info_ptr)
if (*info_ptr == NULL)
{
png_destroy_read_struct(png_ptr, info_ptr, png_infopp_NULL);
png_destroy_read_struct(png_ptr, info_ptr, NULL);
return (ERROR);
}
if (setjmp(png_jmpbuf((*png_ptr))))
{
png_destroy_read_struct(png_ptr, info_ptr, png_infopp_NULL);
png_destroy_read_struct(png_ptr, info_ptr, NULL);
return (ERROR);
}
@ -456,13 +463,13 @@ process_data(png_structp *png_ptr, png_infop *info_ptr,
if (setjmp(png_jmpbuf((*png_ptr))))
{
/* Free the png_ptr and info_ptr memory on error */
png_destroy_read_struct(png_ptr, info_ptr, png_infopp_NULL);
png_destroy_read_struct(png_ptr, info_ptr, NULL);
return (ERROR);
}
/* This one's new also. Simply give it chunks of data as
* they arrive from the data stream (in order, of course).
* On Segmented machines, don't give it any more than 64K.
* On segmented machines, don't give it any more than 64K.
* The library seems to run fine with sizes of 4K, although
* you can give it much less if necessary (I assume you can
* give it chunks of 1 byte, but I haven't tried with less
@ -476,86 +483,84 @@ process_data(png_structp *png_ptr, png_infop *info_ptr,
info_callback(png_structp png_ptr, png_infop info)
{
/* do any setup here, including setting any of the transformations
* mentioned in the Reading PNG files section. For now, you _must_
* call either png_start_read_image() or png_read_update_info()
* after all the transformations are set (even if you don't set
* any). You may start getting rows before png_process_data()
* returns, so this is your last chance to prepare for that.
*/
/* Do any setup here, including setting any of the transformations
* mentioned in the Reading PNG files section. For now, you _must_
* call either png_start_read_image() or png_read_update_info()
* after all the transformations are set (even if you don't set
* any). You may start getting rows before png_process_data()
* returns, so this is your last chance to prepare for that.
*/
}
row_callback(png_structp png_ptr, png_bytep new_row,
png_uint_32 row_num, int pass)
{
/*
* This function is called for every row in the image. If the
* image is interlaced, and you turned on the interlace handler,
* this function will be called for every row in every pass.
*
* In this function you will receive a pointer to new row data from
* libpng called new_row that is to replace a corresponding row (of
* the same data format) in a buffer allocated by your application.
*
* The new row data pointer new_row may be NULL, indicating there is
* no new data to be replaced (in cases of interlace loading).
*
* If new_row is not NULL then you need to call
* png_progressive_combine_row() to replace the corresponding row as
* shown below:
*/
/* Check if row_num is in bounds. */
if ((row_num >= 0) && (row_num < height))
{
/* Get pointer to corresponding row in our
* PNG read buffer.
*/
png_bytep old_row = ((png_bytep *)our_data)[row_num];
/*
* This function is called for every row in the image. If the
* image is interlaced, and you turned on the interlace handler,
* this function will be called for every row in every pass.
*
* In this function you will receive a pointer to new row data from
* libpng called new_row that is to replace a corresponding row (of
* the same data format) in a buffer allocated by your application.
*
* The new row data pointer "new_row" may be NULL, indicating there is
* no new data to be replaced (in cases of interlace loading).
*
* If new_row is not NULL then you need to call
* png_progressive_combine_row() to replace the corresponding row as
* shown below:
*/
/* If both rows are allocated then copy the new row
* data to the corresponding row data.
*/
if ((old_row != NULL) && (new_row != NULL))
png_progressive_combine_row(png_ptr, old_row, new_row);
}
/*
* The rows and passes are called in order, so you don't really
* need the row_num and pass, but I'm supplying them because it
* may make your life easier.
*
* For the non-NULL rows of interlaced images, you must call
* png_progressive_combine_row() passing in the new row and the
* old row, as demonstrated above. You can call this function for
* NULL rows (it will just return) and for non-interlaced images
* (it just does the png_memcpy for you) if it will make the code
* easier. Thus, you can just do this for all cases:
*/
/* Get pointer to corresponding row in our
* PNG read buffer.
*/
png_bytep old_row = ((png_bytep *)our_data)[row_num];
/* If both rows are allocated then copy the new row
* data to the corresponding row data.
*/
if ((old_row != NULL) && (new_row != NULL))
png_progressive_combine_row(png_ptr, old_row, new_row);
/*
* The rows and passes are called in order, so you don't really
* need the row_num and pass, but I'm supplying them because it
* may make your life easier.
*
* For the non-NULL rows of interlaced images, you must call
* png_progressive_combine_row() passing in the new row and the
* old row, as demonstrated above. You can call this function for
* NULL rows (it will just return) and for non-interlaced images
* (it just does the png_memcpy for you) if it will make the code
* easier. Thus, you can just do this for all cases:
*/
png_progressive_combine_row(png_ptr, old_row, new_row);
/* where old_row is what was displayed for previous rows. Note
* that the first pass (pass == 0 really) will completely cover
* the old row, so the rows do not have to be initialized. After
* the first pass (and only for interlaced images), you will have
* to pass the current row as new_row, and the function will combine
* the old row and the new row.
*/
/* where old_row is what was displayed for previous rows. Note
* that the first pass (pass == 0 really) will completely cover
* the old row, so the rows do not have to be initialized. After
* the first pass (and only for interlaced images), you will have
* to pass the current row as new_row, and the function will combine
* the old row and the new row.
*/
}
end_callback(png_structp png_ptr, png_infop info)
{
/* this function is called when the whole image has been read,
* including any chunks after the image (up to and including
* the IEND). You will usually have the same info chunk as you
* had in the header, although some data may have been added
* to the comments and time fields.
*
* Most people won't do much here, perhaps setting a flag that
* marks the image as finished.
*/
/* This function is called when the whole image has been read,
* including any chunks after the image (up to and including
* the IEND). You will usually have the same info chunk as you
* had in the header, although some data may have been added
* to the comments and time fields.
*
* Most people won't do much here, perhaps setting a flag that
* marks the image as finished.
*/
}
/* write a png file */
/* Write a png file */
void write_png(char *file_name /* , ... other image information ... */)
{
FILE *fp;
@ -563,7 +568,7 @@ void write_png(char *file_name /* , ... other image information ... */)
png_infop info_ptr;
png_colorp palette;
/* open the file */
/* Open the file */
fp = fopen(file_name, "wb");
if (fp == NULL)
return (ERROR);
@ -588,7 +593,7 @@ void write_png(char *file_name /* , ... other image information ... */)
if (info_ptr == NULL)
{
fclose(fp);
png_destroy_write_struct(&png_ptr, png_infopp_NULL);
png_destroy_write_struct(&png_ptr, NULL);
return (ERROR);
}
@ -597,30 +602,34 @@ void write_png(char *file_name /* , ... other image information ... */)
*/
if (setjmp(png_jmpbuf(png_ptr)))
{
/* If we get here, we had a problem reading the file */
/* If we get here, we had a problem writing the file */
fclose(fp);
png_destroy_write_struct(&png_ptr, &info_ptr);
return (ERROR);
}
/* One of the following I/O initialization functions is REQUIRED */
#ifdef streams /* I/O initialization method 1 */
/* set up the output control if you are using standard C streams */
/* Set up the output control if you are using standard C streams */
png_init_io(png_ptr, fp);
#else no_streams /* I/O initialization method 2 */
/* If you are using replacement write functions, instead of calling
* png_init_io() here you would call */
* png_init_io() here you would call
*/
png_set_write_fn(png_ptr, (void *)user_io_ptr, user_write_fn,
user_IO_flush_function);
/* where user_io_ptr is a structure you want available to the callbacks */
#endif no_streams /* only use one initialization method */
#endif no_streams /* Only use one initialization method */
#ifdef hilevel
/* This is the easy way. Use it if you already have all the
* image info living info in the structure. You could "|" many
* image info living in the structure. You could "|" many
* PNG_TRANSFORM flags into the png_transforms integer here.
*/
png_write_png(png_ptr, info_ptr, png_transforms, png_voidp_NULL);
png_write_png(png_ptr, info_ptr, png_transforms, NULL);
#else
/* This is the hard way */
@ -635,25 +644,27 @@ void write_png(char *file_name /* , ... other image information ... */)
png_set_IHDR(png_ptr, info_ptr, width, height, bit_depth, PNG_COLOR_TYPE_???,
PNG_INTERLACE_????, PNG_COMPRESSION_TYPE_BASE, PNG_FILTER_TYPE_BASE);
/* set the palette if there is one. REQUIRED for indexed-color images */
/* Set the palette if there is one. REQUIRED for indexed-color images */
palette = (png_colorp)png_malloc(png_ptr, PNG_MAX_PALETTE_LENGTH
* png_sizeof(png_color));
/* ... set palette colors ... */
/* ... Set palette colors ... */
png_set_PLTE(png_ptr, info_ptr, palette, PNG_MAX_PALETTE_LENGTH);
/* You must not free palette here, because png_set_PLTE only makes a link to
the palette that you malloced. Wait until you are about to destroy
the png structure. */
* the palette that you malloced. Wait until you are about to destroy
* the png structure.
*/
/* optional significant bit chunk */
/* if we are dealing with a grayscale image then */
/* Optional significant bit (sBIT) chunk */
png_color_8 sig_bit;
/* If we are dealing with a grayscale image then */
sig_bit.gray = true_bit_depth;
/* otherwise, if we are dealing with a color image then */
/* Otherwise, if we are dealing with a color image then */
sig_bit.red = true_red_bit_depth;
sig_bit.green = true_green_bit_depth;
sig_bit.blue = true_blue_bit_depth;
/* if the image has an alpha channel then */
/* If the image has an alpha channel then */
sig_bit.alpha = true_alpha_bit_depth;
png_set_sBIT(png_ptr, info_ptr, sig_bit);
png_set_sBIT(png_ptr, info_ptr, &sig_bit);
/* Optional gamma chunk is strongly suggested if you have any guess
@ -673,14 +684,20 @@ void write_png(char *file_name /* , ... other image information ... */)
text_ptr[2].compression = PNG_TEXT_COMPRESSION_zTXt;
#ifdef PNG_iTXt_SUPPORTED
text_ptr[0].lang = NULL;
text_ptr[0].lang_key = NULL;
text_ptr[1].lang = NULL;
text_ptr[1].lang_key = NULL;
text_ptr[2].lang = NULL;
text_ptr[2].lang_key = NULL;
#endif
png_set_text(png_ptr, info_ptr, text_ptr, 3);
/* other optional chunks like cHRM, bKGD, tRNS, tIME, oFFs, pHYs, */
/* note that if sRGB is present the gAMA and cHRM chunks must be ignored
* on read and must be written in accordance with the sRGB profile */
/* Other optional chunks like cHRM, bKGD, tRNS, tIME, oFFs, pHYs */
/* Note that if sRGB is present the gAMA and cHRM chunks must be ignored
* on read and, if your application chooses to write them, they must
* be written in accordance with the sRGB profile
*/
/* Write the file header information. REQUIRED */
png_write_info(png_ptr, info_ptr);
@ -692,7 +709,7 @@ void write_png(char *file_name /* , ... other image information ... */)
* write_my_chunk();
* png_write_info(png_ptr, info_ptr);
*
* However, given the level of known- and unknown-chunk support in 1.1.0
* However, given the level of known- and unknown-chunk support in 1.2.0
* and up, this should no longer be necessary.
*/
@ -702,11 +719,11 @@ void write_png(char *file_name /* , ... other image information ... */)
* at the end.
*/
/* set up the transformations you want. Note that these are
/* Set up the transformations you want. Note that these are
* all optional. Only call them if you want them.
*/
/* invert monochrome pixels */
/* Invert monochrome pixels */
png_set_invert_mono(png_ptr);
/* Shift the pixels up to a legal bit depth and fill in
@ -714,10 +731,10 @@ void write_png(char *file_name /* , ... other image information ... */)
*/
png_set_shift(png_ptr, &sig_bit);
/* pack pixels into bytes */
/* Pack pixels into bytes */
png_set_packing(png_ptr);
/* swap location of alpha bytes from ARGB to RGBA */
/* Swap location of alpha bytes from ARGB to RGBA */
png_set_swap_alpha(png_ptr);
/* Get rid of filler (OR ALPHA) bytes, pack XRGB/RGBX/ARGB/RGBA into
@ -725,16 +742,16 @@ void write_png(char *file_name /* , ... other image information ... */)
*/
png_set_filler(png_ptr, 0, PNG_FILLER_BEFORE);
/* flip BGR pixels to RGB */
/* Flip BGR pixels to RGB */
png_set_bgr(png_ptr);
/* swap bytes of 16-bit files to most significant byte first */
/* Swap bytes of 16-bit files to most significant byte first */
png_set_swap(png_ptr);
/* swap bits of 1, 2, 4 bit packed pixel formats */
/* Swap bits of 1, 2, 4 bit packed pixel formats */
png_set_packswap(png_ptr);
/* turn on interlace handling if you are not using png_write_image() */
/* Turn on interlace handling if you are not using png_write_image() */
if (interlacing)
number_passes = png_set_interlace_handling(png_ptr);
else
@ -755,12 +772,14 @@ void write_png(char *file_name /* , ... other image information ... */)
row_pointers[k] = image + k*width*bytes_per_pixel;
/* One of the following output methods is REQUIRED */
#ifdef entire /* write out the entire image data in one call */
#ifdef entire /* Write out the entire image data in one call */
png_write_image(png_ptr, row_pointers);
/* the other way to write the image - deal with interlacing */
/* The other way to write the image - deal with interlacing */
#else no_entire /* Write out the image data by one or more scanlines */
#else no_entire /* write out the image data by one or more scanlines */
/* The number of passes is either 1 for non-interlaced images,
* or 7 for interlaced images.
*/
@ -771,14 +790,12 @@ void write_png(char *file_name /* , ... other image information ... */)
/* If you are only writing one row at a time, this works */
for (y = 0; y < height; y++)
{
png_write_rows(png_ptr, &row_pointers[y], 1);
}
}
#endif no_entire /* use only one output method */
#endif no_entire /* Use only one output method */
/* You can write optional chunks like tEXt, zTXt, and tIME at the end
* as well. Shouldn't be necessary in 1.1.0 and up as all the public
* as well. Shouldn't be necessary in 1.2.0 and up as all the public
* chunks are supported and you can use png_set_unknown_chunks() to
* register unknown chunks into the info structure to be written out.
*/
@ -788,26 +805,33 @@ void write_png(char *file_name /* , ... other image information ... */)
#endif hilevel
/* If you png_malloced a palette, free it here (don't free info_ptr->palette,
as recommended in versions 1.0.5m and earlier of this example; if
libpng mallocs info_ptr->palette, libpng will free it). If you
allocated it with malloc() instead of png_malloc(), use free() instead
of png_free(). */
* as recommended in versions 1.0.5m and earlier of this example; if
* libpng mallocs info_ptr->palette, libpng will free it). If you
* allocated it with malloc() instead of png_malloc(), use free() instead
* of png_free().
*/
png_free(png_ptr, palette);
palette = NULL;
/* Similarly, if you png_malloced any data that you passed in with
png_set_something(), such as a hist or trans array, free it here,
when you can be sure that libpng is through with it. */
* png_set_something(), such as a hist or trans array, free it here,
* when you can be sure that libpng is through with it.
*/
png_free(png_ptr, trans);
trans = NULL;
/* Whenever you use png_free() it is a good idea to set the pointer to
* NULL in case your application inadvertently tries to png_free() it
* again. When png_free() sees a NULL it returns without action, thus
* avoiding the double-free security problem.
*/
/* clean up after the write, and free any memory allocated */
/* Clean up after the write, and free any memory allocated */
png_destroy_write_struct(&png_ptr, &info_ptr);
/* close the file */
/* Close the file */
fclose(fp);
/* that's it */
/* That's it */
return (OK);
}

View File

@ -1,7 +1,7 @@
#!/bin/sh
# install - install a program, script, or datafile
scriptversion=2006-12-25.00
scriptversion=2009-04-28.21; # UTC
# This originates from X11R5 (mit/util/scripts/install.sh), which was
# later released in X11R6 (xc/config/util/install.sh) with the
@ -515,5 +515,6 @@ done
# eval: (add-hook 'write-file-hooks 'time-stamp)
# time-stamp-start: "scriptversion="
# time-stamp-format: "%:y-%02m-%02d.%02H"
# time-stamp-end: "$"
# time-stamp-time-zone: "UTC"
# time-stamp-end: "; # UTC"
# End:

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -4,7 +4,10 @@
# provides configuration info for libpng.
# Copyright (C) 2002, 2004, 2006, 2007 Glenn Randers-Pehrson
# For conditions of distribution and use, see copyright notice in png.h
# This code is released under the libpng license.
# For conditions of distribution and use, see the disclaimer
# and license in png.h
# Modeled after libxml-config.
@ -19,7 +22,7 @@ I_opts="-I${includedir}"
L_opts="-L${libdir}"
R_opts=""
cppflags=""
ccopts="@LIBPNG_NO_MMX@"
ccopts=""
ldopts=""
usage()

File diff suppressed because it is too large Load Diff

View File

@ -8,4 +8,4 @@ Description: Loads and saves PNG files
Version: @PNGLIB_VERSION@
Libs: -L${libdir} -lpng@PNGLIB_MAJOR@@PNGLIB_MINOR@
Libs.private: @LIBS@
Cflags: -I${includedir} @LIBPNG_NO_MMX@
Cflags: -I${includedir}

View File

@ -1,15 +1,21 @@
.TH LIBPNGPF 3 "December 18, 2008"
.TH LIBPNGPF 3 "September 23, 2010"
.SH NAME
libpng \- Portable Network Graphics (PNG) Reference Library 1.2.34
libpng \- Portable Network Graphics (PNG) Reference Library 1.4.4
(private functions)
.SH SYNOPSIS
\fB#include <png.h>\fP
\fI\fB
\fB#include \fI"pngpriv.h"
\fI\fB
\fBvoid png_build_gamma_table (png_structp \fIpng_ptr\fP\fB);\fP
\fBvoid png_64bit_product (long \fP\fIv1\fP\fB, long \fP\fIv2\fP\fB, unsigned long \fI*hi_product,
\fBunsigned long \fI*lo_product\fP\fB);\fP
\fI\fB
\fBvoid png_build_gamma_table (png_structp \fP\fIpng_ptr\fP\fB, png_byte \fIbit_depth\fP\fB);\fP
\fI\fB
@ -27,6 +33,12 @@ libpng \- Portable Network Graphics (PNG) Reference Library 1.2.34
\fI\fB
\fBint png_check_cHRM_fixed (png_structp \fP\fIpng_ptr\fP\fB, png_fixed_point \fP\fIint_white_x\fP\fB, png_fixed_point \fP\fIint_white_y\fP\fB, png_fixed_point \fP\fIint_red_x\fP\fB, png_fixed_point \fP\fIint_red_y\fP\fB, png_fixed_point \fP\fIint_green_x\fP\fB, png_fixed_point \fP\fIint_green_y\fP\fB, png_fixed_point \fP\fIint_blue_x\fP\fB, png_fixed_point \fIint_blue_y\fP\fB);\fP
\fI\fB
\fI\fB
\fBvoid png_check_chunk_name (png_structp \fP\fIpng_ptr\fP\fB, png_bytep \fIchunk_name\fP\fB);\fP
\fI\fB
@ -39,6 +51,12 @@ libpng \- Portable Network Graphics (PNG) Reference Library 1.2.34
\fI\fB
\fBvoid png_check_IHDR (png_structp \fP\fIpng_ptr\fP\fB, png_uint_32 \fP\fIwidth\fP\fB, png_uint_32 \fP\fIheight\fP\fB, int \fP\fIbit_depth\fP\fB, int \fP\fIcolor_type\fP\fB, int \fP\fIinterlace_type\fP\fB, int \fP\fIcompression_type\fP\fB, int \fIfilter_type\fP\fB);\fP
\fI\fB
\fI\fB
\fBvoid png_combine_row (png_structp \fP\fIpng_ptr\fP\fB, png_bytep \fP\fIrow\fP\fB, int \fImask\fP\fB);\fP
\fI\fB
@ -81,7 +99,19 @@ libpng \- Portable Network Graphics (PNG) Reference Library 1.2.34
\fI\fB
\fBvoid png_decompress_chunk (png_structp \fP\fIpng_ptr\fP\fB, int \fP\fIcomp_type\fP\fB, png_charp \fP\fIchunkdata\fP\fB, png_size_t \fP\fIchunklength\fP\fB, png_size_t \fP\fIprefix_length\fP\fB, png_size_t \fI*data_length\fP\fB);\fP
\fBint png_debug(int \fP\fIlevel\fP\fB, png_const_charp \fImessage\fP\fB);\fP
\fI\fB
\fBint png_debug1(int \fP\fIlevel\fP\fB, png_const_charp \fP\fImessage\fP\fB, \fIp1\fP\fB);\fP
\fI\fB
\fBint png_debug2(int \fP\fIlevel\fP\fB, png_const_charp \fP\fImessage\fP\fB, \fP\fIp1\fP\fB, \fIp2\fP\fB);\fP
\fI\fB
\fBvoid png_decompress_chunk (png_structp \fP\fIpng_ptr\fP\fB, int \fP\fIcomp_type\fP\fB, png_size_t \fP\fIchunklength\fP\fB, png_size_t \fP\fIprefix_length\fP\fB, png_size_t \fI*data_length\fP\fB);\fP
\fI\fB
@ -99,7 +129,7 @@ libpng \- Portable Network Graphics (PNG) Reference Library 1.2.34
\fI\fB
\fBvoid png_do_background (png_row_infop \fP\fIrow_info\fP\fB, png_bytep \fP\fIrow\fP\fB, png_color_16p \fP\fItrans_values\fP\fB, png_color_16p \fP\fIbackground\fP\fB, png_color_16p \fP\fIbackground_1\fP\fB, png_bytep \fP\fIgamma_table\fP\fB, png_bytep \fP\fIgamma_from_1\fP\fB, png_bytep \fP\fIgamma_to_1\fP\fB, png_uint_16pp \fP\fIgamma_16\fP\fB, png_uint_16pp \fP\fIgamma_16_from_1\fP\fB, png_uint_16pp \fP\fIgamma_16_to_1\fP\fB, int \fIgamma_shift\fP\fB);\fP
\fBvoid png_do_background (png_row_infop \fP\fIrow_info\fP\fB, png_bytep \fP\fIrow\fP\fB, png_color_16p \fP\fItrans_color\fP\fB, png_color_16p \fP\fIbackground\fP\fB, png_color_16p \fP\fIbackground_1\fP\fB, png_bytep \fP\fIgamma_table\fP\fB, png_bytep \fP\fIgamma_from_1\fP\fB, png_bytep \fP\fIgamma_to_1\fP\fB, png_uint_16pp \fP\fIgamma_16\fP\fB, png_uint_16pp \fP\fIgamma_16_from_1\fP\fB, png_uint_16pp \fP\fIgamma_16_to_1\fP\fB, int \fIgamma_shift\fP\fB);\fP
\fI\fB
@ -115,14 +145,6 @@ libpng \- Portable Network Graphics (PNG) Reference Library 1.2.34
\fI\fB
\fI\fB
\fBvoid png_do_dither (png_row_infop \fP\fIrow_info\fP\fB, png_bytep \fP\fIrow\fP\fB, png_bytep \fP\fIpalette_lookup\fP\fB, png_bytep \fIdither_lookup\fP\fB);\fP
\fI\fB
\fI\fB
\fBvoid png_do_expand (png_row_infop \fP\fIrow_info\fP\fB, png_bytep \fP\fIrow\fP\fB, png_color_16p \fItrans_value\fP\fB);\fP
\fI\fB
@ -165,6 +187,12 @@ libpng \- Portable Network Graphics (PNG) Reference Library 1.2.34
\fI\fB
\fBvoid png_do_quantize (png_row_infop \fP\fIrow_info\fP\fB, png_bytep \fP\fIrow\fP\fB, png_bytep \fP\fIpalette_lookup\fP\fB, png_bytep \fIquantize_lookup\fP\fB);\fP
\fI\fB
\fI\fB
\fBvoid png_do_read_filler (png_row_infop \fP\fIrow_info\fP\fB, png_bytep \fP\fIrow\fP\fB, png_uint_32 \fP\fIfiller\fP\fB, png_uint_32 \fIflags\fP\fB);\fP
\fI\fB
@ -181,8 +209,6 @@ libpng \- Portable Network Graphics (PNG) Reference Library 1.2.34
\fI\fB
\fI\fB
\fBvoid png_do_read_swap_alpha (png_row_infop \fP\fIrow_info\fP\fB, png_bytep \fIrow\fP\fB);\fP
\fI\fB
@ -537,16 +563,12 @@ libpng \- Portable Network Graphics (PNG) Reference Library 1.2.34
\fI\fB
\fBpng_uint_32 png_read_chunk_header (png_structp \fIpng_ptr\fP\fB);\fP
\fI\fB
\fI\fB
\fBvoid png_read_data (png_structp \fP\fIpng_ptr\fP\fB, png_bytep \fP\fIdata\fP\fB, png_size_t \fIlength\fP\fB);\fP
\fI\fB
\fBvoid png_read_destroy (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fP\fIinfo_ptr\fP\fB, png_infop \fIend_info_ptr\fP\fB);\fP
\fI\fB
\fBvoid png_read_filter_row (png_structp \fP\fIpng_ptr\fP\fB, png_row_infop \fP\fIrow_info\fP\fB, png_bytep \fP\fIrow\fP\fB, png_bytep \fP\fIprev_row\fP\fB, int \fIfilter\fP\fB);\fP
@ -607,6 +629,8 @@ libpng \- Portable Network Graphics (PNG) Reference Library 1.2.34
\fI\fB
\fBvoid png_write_destroy (png_structp \fIpng_ptr\fP\fB);\fP
\fI\fB
\fBvoid png_write_filtered_row (png_structp \fP\fIpng_ptr\fP\fB, png_bytep \fIfiltered_row\fP\fB);\fP
@ -717,12 +741,6 @@ libpng \- Portable Network Graphics (PNG) Reference Library 1.2.34
\fI\fB
\fBvoid png_write_sig (png_structp \fIpng_ptr\fP\fB);\fP
\fI\fB
\fI\fB
\fBvoid png_write_sRGB (png_structp \fP\fIpng_ptr\fP\fB, int \fIintent\fP\fB);\fP
\fI\fB
@ -785,6 +803,6 @@ are listed alphabetically here as an aid to libpng maintainers.
See png.h for more information on these functions.
.SH SEE ALSO
.IR libpng(3) ", " png(5)
.BR "png"(5), " libpng"(3), " zlib"(3), " deflate"(5), " " and " zlib"(5)
.SH AUTHOR
Glenn Randers-Pehrson

File diff suppressed because it is too large Load Diff

View File

@ -1,10 +1,10 @@
#! /bin/sh
# Common stub for a few missing GNU programs while installing.
scriptversion=2006-05-10.23
scriptversion=2009-04-28.21; # UTC
# Copyright (C) 1996, 1997, 1999, 2000, 2002, 2003, 2004, 2005, 2006
# Free Software Foundation, Inc.
# Copyright (C) 1996, 1997, 1999, 2000, 2002, 2003, 2004, 2005, 2006,
# 2008, 2009 Free Software Foundation, Inc.
# Originally by Fran,cois Pinard <pinard@iro.umontreal.ca>, 1996.
# This program is free software; you can redistribute it and/or modify
@ -18,9 +18,7 @@ scriptversion=2006-05-10.23
# GNU General Public License for more details.
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
# 02110-1301, USA.
# along with this program. If not, see <http://www.gnu.org/licenses/>.
# As a special exception to the GNU General Public License, if you
# distribute this file as part of a program that contains a
@ -89,6 +87,9 @@ Supported PROGRAM values:
tar try tar, gnutar, gtar, then tar without non-portable flags
yacc create \`y.tab.[ch]', if possible, from existing .[ch]
Version suffixes to PROGRAM as well as the prefixes \`gnu-', \`gnu', and
\`g' are ignored when checking the name.
Send bug reports to <bug-automake@gnu.org>."
exit $?
;;
@ -106,15 +107,22 @@ Send bug reports to <bug-automake@gnu.org>."
esac
# normalize program name to check for.
program=`echo "$1" | sed '
s/^gnu-//; t
s/^gnu//; t
s/^g//; t'`
# Now exit if we have it, but it failed. Also exit now if we
# don't have it and --version was passed (most likely to detect
# the program).
# the program). This is about non-GNU programs, so use $1 not
# $program.
case $1 in
lex|yacc)
lex*|yacc*)
# Not GNU programs, they don't have --version.
;;
tar)
tar*)
if test -n "$run"; then
echo 1>&2 "ERROR: \`tar' requires --run"
exit 1
@ -138,7 +146,7 @@ esac
# If it does not exist, or fails to run (possibly an outdated version),
# try to emulate it.
case $1 in
case $program in
aclocal*)
echo 1>&2 "\
WARNING: \`$1' is $msg. You should only need it if
@ -148,7 +156,7 @@ WARNING: \`$1' is $msg. You should only need it if
touch aclocal.m4
;;
autoconf)
autoconf*)
echo 1>&2 "\
WARNING: \`$1' is $msg. You should only need it if
you modified \`${configure_ac}'. You might want to install the
@ -157,7 +165,7 @@ WARNING: \`$1' is $msg. You should only need it if
touch configure
;;
autoheader)
autoheader*)
echo 1>&2 "\
WARNING: \`$1' is $msg. You should only need it if
you modified \`acconfig.h' or \`${configure_ac}'. You might want
@ -187,7 +195,7 @@ WARNING: \`$1' is $msg. You should only need it if
while read f; do touch "$f"; done
;;
autom4te)
autom4te*)
echo 1>&2 "\
WARNING: \`$1' is needed, but is $msg.
You might have modified some files without having the
@ -210,7 +218,7 @@ WARNING: \`$1' is needed, but is $msg.
fi
;;
bison|yacc)
bison*|yacc*)
echo 1>&2 "\
WARNING: \`$1' $msg. You should only need it if
you modified a \`.y' file. You may need the \`Bison' package
@ -240,7 +248,7 @@ WARNING: \`$1' $msg. You should only need it if
fi
;;
lex|flex)
lex*|flex*)
echo 1>&2 "\
WARNING: \`$1' is $msg. You should only need it if
you modified a \`.l' file. You may need the \`Flex' package
@ -263,7 +271,7 @@ WARNING: \`$1' is $msg. You should only need it if
fi
;;
help2man)
help2man*)
echo 1>&2 "\
WARNING: \`$1' is $msg. You should only need it if
you modified a dependency of a manual page. You may need the
@ -277,11 +285,11 @@ WARNING: \`$1' is $msg. You should only need it if
else
test -z "$file" || exec >$file
echo ".ab help2man is required to generate this page"
exit 1
exit $?
fi
;;
makeinfo)
makeinfo*)
echo 1>&2 "\
WARNING: \`$1' is $msg. You should only need it if
you modified a \`.texi' or \`.texinfo' file, or any other file
@ -310,7 +318,7 @@ WARNING: \`$1' is $msg. You should only need it if
touch $file
;;
tar)
tar*)
shift
# We have already tried tar in the generic part.
@ -363,5 +371,6 @@ exit 0
# eval: (add-hook 'write-file-hooks 'time-stamp)
# time-stamp-start: "scriptversion="
# time-stamp-format: "%:y-%02m-%02d.%02H"
# time-stamp-end: "$"
# time-stamp-time-zone: "UTC"
# time-stamp-end: "; # UTC"
# End:

View File

@ -1,161 +0,0 @@
#! /bin/sh
# mkinstalldirs --- make directory hierarchy
scriptversion=2006-05-11.19
# Original author: Noah Friedman <friedman@prep.ai.mit.edu>
# Created: 1993-05-16
# Public domain.
#
# This file is maintained in Automake, please report
# bugs to <bug-automake@gnu.org> or send patches to
# <automake-patches@gnu.org>.
nl='
'
IFS=" "" $nl"
errstatus=0
dirmode=
usage="\
Usage: mkinstalldirs [-h] [--help] [--version] [-m MODE] DIR ...
Create each directory DIR (with mode MODE, if specified), including all
leading file name components.
Report bugs to <bug-automake@gnu.org>."
# process command line arguments
while test $# -gt 0 ; do
case $1 in
-h | --help | --h*) # -h for help
echo "$usage"
exit $?
;;
-m) # -m PERM arg
shift
test $# -eq 0 && { echo "$usage" 1>&2; exit 1; }
dirmode=$1
shift
;;
--version)
echo "$0 $scriptversion"
exit $?
;;
--) # stop option processing
shift
break
;;
-*) # unknown option
echo "$usage" 1>&2
exit 1
;;
*) # first non-opt arg
break
;;
esac
done
for file
do
if test -d "$file"; then
shift
else
break
fi
done
case $# in
0) exit 0 ;;
esac
# Solaris 8's mkdir -p isn't thread-safe. If you mkdir -p a/b and
# mkdir -p a/c at the same time, both will detect that a is missing,
# one will create a, then the other will try to create a and die with
# a "File exists" error. This is a problem when calling mkinstalldirs
# from a parallel make. We use --version in the probe to restrict
# ourselves to GNU mkdir, which is thread-safe.
case $dirmode in
'')
if mkdir -p --version . >/dev/null 2>&1 && test ! -d ./--version; then
echo "mkdir -p -- $*"
exec mkdir -p -- "$@"
else
# On NextStep and OpenStep, the `mkdir' command does not
# recognize any option. It will interpret all options as
# directories to create, and then abort because `.' already
# exists.
test -d ./-p && rmdir ./-p
test -d ./--version && rmdir ./--version
fi
;;
*)
if mkdir -m "$dirmode" -p --version . >/dev/null 2>&1 &&
test ! -d ./--version; then
echo "mkdir -m $dirmode -p -- $*"
exec mkdir -m "$dirmode" -p -- "$@"
else
# Clean up after NextStep and OpenStep mkdir.
for d in ./-m ./-p ./--version "./$dirmode";
do
test -d $d && rmdir $d
done
fi
;;
esac
for file
do
case $file in
/*) pathcomp=/ ;;
*) pathcomp= ;;
esac
oIFS=$IFS
IFS=/
set fnord $file
shift
IFS=$oIFS
for d
do
test "x$d" = x && continue
pathcomp=$pathcomp$d
case $pathcomp in
-*) pathcomp=./$pathcomp ;;
esac
if test ! -d "$pathcomp"; then
echo "mkdir $pathcomp"
mkdir "$pathcomp" || lasterr=$?
if test ! -d "$pathcomp"; then
errstatus=$lasterr
else
if test ! -z "$dirmode"; then
echo "chmod $dirmode $pathcomp"
lasterr=
chmod "$dirmode" "$pathcomp" || lasterr=$?
if test ! -z "$lasterr"; then
errstatus=$lasterr
fi
fi
fi
fi
pathcomp=$pathcomp/
done
done
exit $errstatus
# Local Variables:
# mode: shell-script
# sh-indentation: 2
# eval: (add-hook 'write-file-hooks 'time-stamp)
# time-stamp-start: "scriptversion="
# time-stamp-format: "%:y-%02m-%02d.%02H"
# time-stamp-end: "$"
# End:

View File

@ -1,4 +1,4 @@
.TH PNG 5 "December 18, 2008"
.TH PNG 5 "September 23, 2010"
.SH NAME
png \- Portable Network Graphics (PNG) format
.SH DESCRIPTION
@ -18,7 +18,7 @@ gamma and chromaticity data for improved color matching on heterogeneous
platforms.
.SH "SEE ALSO"
.IR libpng(3) ", " zlib(3) ", " deflate(5) ", and " zlib(5)
.BR "libpng"(3), " libpngpf"(3), " zlib"(3), " deflate"(5), " " and " zlib"(5)
.LP
PNG specification (second edition), November 2003:
.IP
@ -35,7 +35,7 @@ PNG 1.0 specification, October 1996:
RFC 2083
.IP
.br
ftp://ftp.rfc-editor.org:/in-notes/rfc2083.txt
ftp://ds.internic.net/rfc/rfc2083.txt
.br
or (as a W3C Recommendation) at
.br

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -1,37 +1,41 @@
/* pngerror.c - stub functions for i/o and memory allocation
*
* Last changed in libpng 1.2.34 [December 18, 2008]
* For conditions of distribution and use, see copyright notice in png.h
* Copyright (c) 1998-2008 Glenn Randers-Pehrson
* Last changed in libpng 1.4.0 [January 3, 2010]
* Copyright (c) 1998-2010 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.)
*
* This code is released under the libpng license.
* For conditions of distribution and use, see the disclaimer
* and license in png.h
*
* This file provides a location for all error handling. Users who
* need special error handling are expected to write replacement functions
* and use png_set_error_fn() to use those functions. See the instructions
* at each function.
*/
#define PNG_INTERNAL
#define PNG_NO_PEDANTIC_WARNINGS
#include "png.h"
#if defined(PNG_READ_SUPPORTED) || defined(PNG_WRITE_SUPPORTED)
#include "pngpriv.h"
static void /* PRIVATE */
png_default_error PNGARG((png_structp png_ptr,
png_const_charp error_message));
#ifndef PNG_NO_WARNINGS
png_const_charp error_message)) PNG_NORETURN;
#ifdef PNG_WARNINGS_SUPPORTED
static void /* PRIVATE */
png_default_warning PNGARG((png_structp png_ptr,
png_const_charp warning_message));
#endif /* PNG_NO_WARNINGS */
#endif /* PNG_WARNINGS_SUPPORTED */
/* This function is called whenever there is a fatal error. This function
* should not be changed. If there is a need to handle errors differently,
* you should supply a replacement error function and use png_set_error_fn()
* to replace the error function at run-time.
*/
#ifndef PNG_NO_ERROR_TEXT
#ifdef PNG_ERROR_TEXT_SUPPORTED
void PNGAPI
png_error(png_structp png_ptr, png_const_charp error_message)
{
@ -42,9 +46,9 @@ png_error(png_structp png_ptr, png_const_charp error_message)
if (png_ptr->flags&
(PNG_FLAG_STRIP_ERROR_NUMBERS|PNG_FLAG_STRIP_ERROR_TEXT))
{
if (*error_message == '#')
if (*error_message == PNG_LITERAL_SHARP)
{
/* Strip "#nnnn " from beginning of error message. */
/* Strip "#nnnn " from beginning of error message. */
int offset;
for (offset = 1; offset<15; offset++)
if (error_message[offset] == ' ')
@ -90,9 +94,9 @@ png_err(png_structp png_ptr)
use the default handler, which will not return. */
png_default_error(png_ptr, '\0');
}
#endif /* PNG_NO_ERROR_TEXT */
#endif /* PNG_ERROR_TEXT_SUPPORTED */
#ifndef PNG_NO_WARNINGS
#ifdef PNG_WARNINGS_SUPPORTED
/* This function is called whenever there is a non-fatal error. This function
* should not be changed. If there is a need to handle warnings differently,
* you should supply a replacement warning function and use
@ -109,7 +113,7 @@ png_warning(png_structp png_ptr, png_const_charp warning_message)
(PNG_FLAG_STRIP_ERROR_NUMBERS|PNG_FLAG_STRIP_ERROR_TEXT))
#endif
{
if (*warning_message == '#')
if (*warning_message == PNG_LITERAL_SHARP)
{
for (offset = 1; offset < 15; offset++)
if (warning_message[offset] == ' ')
@ -122,8 +126,18 @@ png_warning(png_structp png_ptr, png_const_charp warning_message)
else
png_default_warning(png_ptr, warning_message + offset);
}
#endif /* PNG_NO_WARNINGS */
#endif /* PNG_WARNINGS_SUPPORTED */
#ifdef PNG_BENIGN_ERRORS_SUPPORTED
void PNGAPI
png_benign_error(png_structp png_ptr, png_const_charp error_message)
{
if (png_ptr->flags & PNG_FLAG_BENIGN_ERRORS_WARN)
png_warning(png_ptr, error_message);
else
png_error(png_ptr, error_message);
}
#endif
/* These utilities are used internally to build an error message that relates
* to the current chunk. The chunk name comes from png_ptr->chunk_name,
@ -138,8 +152,7 @@ static PNG_CONST char png_digit[16] = {
};
#define PNG_MAX_ERROR_TEXT 64
#if !defined(PNG_NO_WARNINGS) || !defined(PNG_NO_ERROR_TEXT)
#if defined(PNG_WARNINGS_SUPPORTED) || defined(PNG_ERROR_TEXT_SUPPORTED)
static void /* PRIVATE */
png_format_buffer(png_structp png_ptr, png_charp buffer, png_const_charp
error_message)
@ -151,10 +164,10 @@ png_format_buffer(png_structp png_ptr, png_charp buffer, png_const_charp
int c = png_ptr->chunk_name[iin++];
if (isnonalpha(c))
{
buffer[iout++] = '[';
buffer[iout++] = PNG_LITERAL_LEFT_SQUARE_BRACKET;
buffer[iout++] = png_digit[(c & 0xf0) >> 4];
buffer[iout++] = png_digit[c & 0x0f];
buffer[iout++] = ']';
buffer[iout++] = PNG_LITERAL_RIGHT_SQUARE_BRACKET;
}
else
{
@ -187,9 +200,9 @@ png_chunk_error(png_structp png_ptr, png_const_charp error_message)
}
}
#endif /* PNG_READ_SUPPORTED */
#endif /* !defined(PNG_NO_WARNINGS) || !defined(PNG_NO_ERROR_TEXT) */
#endif /* PNG_WARNINGS_SUPPORTED || PNG_ERROR_TEXT_SUPPORTED */
#ifndef PNG_NO_WARNINGS
#ifdef PNG_WARNINGS_SUPPORTED
void PNGAPI
png_chunk_warning(png_structp png_ptr, png_const_charp warning_message)
{
@ -202,8 +215,36 @@ png_chunk_warning(png_structp png_ptr, png_const_charp warning_message)
png_warning(png_ptr, msg);
}
}
#endif /* PNG_NO_WARNINGS */
#endif /* PNG_WARNINGS_SUPPORTED */
#ifdef PNG_READ_SUPPORTED
#ifdef PNG_BENIGN_ERRORS_SUPPORTED
void PNGAPI
png_chunk_benign_error(png_structp png_ptr, png_const_charp error_message)
{
if (png_ptr->flags & PNG_FLAG_BENIGN_ERRORS_WARN)
png_chunk_warning(png_ptr, error_message);
else
png_chunk_error(png_ptr, error_message);
}
#endif
#endif /* PNG_READ_SUPPORTED */
#ifdef PNG_SETJMP_SUPPORTED
/* This API only exists if ANSI-C style error handling is used,
* otherwise it is necessary for png_default_error to be overridden.
*/
jmp_buf* PNGAPI
png_set_longjmp_fn(png_structp png_ptr, png_longjmp_ptr longjmp_fn,
size_t jmp_buf_size)
{
if (png_ptr == NULL || jmp_buf_size != png_sizeof(jmp_buf))
return NULL;
png_ptr->longjmp_fn = longjmp_fn;
return &png_ptr->jmpbuf;
}
#endif
/* This is the default error handling function. Note that replacements for
* this function MUST NOT RETURN, or the program will likely crash. This
@ -213,11 +254,11 @@ png_chunk_warning(png_structp png_ptr, png_const_charp warning_message)
static void /* PRIVATE */
png_default_error(png_structp png_ptr, png_const_charp error_message)
{
#ifndef PNG_NO_CONSOLE_IO
#ifdef PNG_CONSOLE_IO_SUPPORTED
#ifdef PNG_ERROR_NUMBERS_SUPPORTED
if (*error_message == '#')
if (*error_message == PNG_LITERAL_SHARP)
{
/* Strip "#nnnn " from beginning of warning message. */
/* Strip "#nnnn " from beginning of error message. */
int offset;
char error_number[16];
for (offset = 0; offset<15; offset++)
@ -229,39 +270,47 @@ png_default_error(png_structp png_ptr, png_const_charp error_message)
if ((offset > 1) && (offset < 15))
{
error_number[offset - 1] = '\0';
fprintf(stderr, "libpng error no. %s: %s\n", error_number,
error_message + offset + 1);
fprintf(stderr, "libpng error no. %s: %s",
error_number, error_message + offset + 1);
fprintf(stderr, PNG_STRING_NEWLINE);
}
else
fprintf(stderr, "libpng error: %s, offset=%d\n", error_message, offset);
{
fprintf(stderr, "libpng error: %s, offset=%d",
error_message, offset);
fprintf(stderr, PNG_STRING_NEWLINE);
}
}
else
#endif
fprintf(stderr, "libpng error: %s\n", error_message);
{
fprintf(stderr, "libpng error: %s", error_message);
fprintf(stderr, PNG_STRING_NEWLINE);
}
#endif
#ifdef PNG_SETJMP_SUPPORTED
if (png_ptr)
if (png_ptr && png_ptr->longjmp_fn)
{
# ifdef USE_FAR_KEYWORD
{
jmp_buf jmpbuf;
png_memcpy(jmpbuf, png_ptr->jmpbuf, png_sizeof(jmp_buf));
longjmp(jmpbuf, 1);
png_ptr->longjmp_fn(jmpbuf, 1);
}
# else
longjmp(png_ptr->jmpbuf, 1);
png_ptr->longjmp_fn(png_ptr->jmpbuf, 1);
# endif
}
#else
PNG_ABORT();
#endif
#ifdef PNG_NO_CONSOLE_IO
error_message = error_message; /* make compiler happy */
/* Here if not setjmp support or if png_ptr is null. */
PNG_ABORT();
#ifndef PNG_CONSOLE_IO_SUPPORTED
error_message = error_message; /* Make compiler happy */
#endif
}
#ifndef PNG_NO_WARNINGS
#ifdef PNG_WARNINGS_SUPPORTED
/* This function is called when there is a warning, but the library thinks
* it can continue anyway. Replacement functions don't have to do anything
* here if you don't want them to. In the default configuration, png_ptr is
@ -270,9 +319,9 @@ png_default_error(png_structp png_ptr, png_const_charp error_message)
static void /* PRIVATE */
png_default_warning(png_structp png_ptr, png_const_charp warning_message)
{
#ifndef PNG_NO_CONSOLE_IO
#ifdef PNG_CONSOLE_IO_SUPPORTED
# ifdef PNG_ERROR_NUMBERS_SUPPORTED
if (*warning_message == '#')
if (*warning_message == PNG_LITERAL_SHARP)
{
int offset;
char warning_number[16];
@ -285,21 +334,29 @@ png_default_warning(png_structp png_ptr, png_const_charp warning_message)
if ((offset > 1) && (offset < 15))
{
warning_number[offset + 1] = '\0';
fprintf(stderr, "libpng warning no. %s: %s\n", warning_number,
warning_message + offset);
fprintf(stderr, "libpng warning no. %s: %s",
warning_number, warning_message + offset);
fprintf(stderr, PNG_STRING_NEWLINE);
}
else
fprintf(stderr, "libpng warning: %s\n", warning_message);
{
fprintf(stderr, "libpng warning: %s",
warning_message);
fprintf(stderr, PNG_STRING_NEWLINE);
}
}
else
# endif
fprintf(stderr, "libpng warning: %s\n", warning_message);
{
fprintf(stderr, "libpng warning: %s", warning_message);
fprintf(stderr, PNG_STRING_NEWLINE);
}
#else
warning_message = warning_message; /* make compiler happy */
warning_message = warning_message; /* Make compiler happy */
#endif
png_ptr = png_ptr; /* make compiler happy */
png_ptr = png_ptr; /* Make compiler happy */
}
#endif /* PNG_NO_WARNINGS */
#endif /* PNG_WARNINGS_SUPPORTED */
/* This function is called when the application wants to use another method
* of handling errors and warnings. Note that the error function MUST NOT

View File

@ -1,103 +0,0 @@
/* pnggccrd.c was removed from libpng-1.2.20. */
/* This code snippet is for use by configure's compilation test. */
#if (!defined _MSC_VER) && \
defined(PNG_ASSEMBLER_CODE_SUPPORTED) && \
defined(PNG_MMX_CODE_SUPPORTED)
int PNGAPI png_dummy_mmx_support(void);
static int _mmx_supported = 2; // 0: no MMX; 1: MMX supported; 2: not tested
int PNGAPI
png_dummy_mmx_support(void) __attribute__((noinline));
int PNGAPI
png_dummy_mmx_support(void)
{
int result;
#if defined(PNG_MMX_CODE_SUPPORTED) // superfluous, but what the heck
__asm__ __volatile__ (
#if defined(__x86_64__)
"pushq %%rbx \n\t" // rbx gets clobbered by CPUID instruction
"pushq %%rcx \n\t" // so does rcx...
"pushq %%rdx \n\t" // ...and rdx (but rcx & rdx safe on Linux)
"pushfq \n\t" // save Eflag to stack
"popq %%rax \n\t" // get Eflag from stack into rax
"movq %%rax, %%rcx \n\t" // make another copy of Eflag in rcx
"xorl $0x200000, %%eax \n\t" // toggle ID bit in Eflag (i.e., bit 21)
"pushq %%rax \n\t" // save modified Eflag back to stack
"popfq \n\t" // restore modified value to Eflag reg
"pushfq \n\t" // save Eflag to stack
"popq %%rax \n\t" // get Eflag from stack
"pushq %%rcx \n\t" // save original Eflag to stack
"popfq \n\t" // restore original Eflag
#else
"pushl %%ebx \n\t" // ebx gets clobbered by CPUID instruction
"pushl %%ecx \n\t" // so does ecx...
"pushl %%edx \n\t" // ...and edx (but ecx & edx safe on Linux)
"pushfl \n\t" // save Eflag to stack
"popl %%eax \n\t" // get Eflag from stack into eax
"movl %%eax, %%ecx \n\t" // make another copy of Eflag in ecx
"xorl $0x200000, %%eax \n\t" // toggle ID bit in Eflag (i.e., bit 21)
"pushl %%eax \n\t" // save modified Eflag back to stack
"popfl \n\t" // restore modified value to Eflag reg
"pushfl \n\t" // save Eflag to stack
"popl %%eax \n\t" // get Eflag from stack
"pushl %%ecx \n\t" // save original Eflag to stack
"popfl \n\t" // restore original Eflag
#endif
"xorl %%ecx, %%eax \n\t" // compare new Eflag with original Eflag
"jz 0f \n\t" // if same, CPUID instr. is not supported
"xorl %%eax, %%eax \n\t" // set eax to zero
// ".byte 0x0f, 0xa2 \n\t" // CPUID instruction (two-byte opcode)
"cpuid \n\t" // get the CPU identification info
"cmpl $1, %%eax \n\t" // make sure eax return non-zero value
"jl 0f \n\t" // if eax is zero, MMX is not supported
"xorl %%eax, %%eax \n\t" // set eax to zero and...
"incl %%eax \n\t" // ...increment eax to 1. This pair is
// faster than the instruction "mov eax, 1"
"cpuid \n\t" // get the CPU identification info again
"andl $0x800000, %%edx \n\t" // mask out all bits but MMX bit (23)
"cmpl $0, %%edx \n\t" // 0 = MMX not supported
"jz 0f \n\t" // non-zero = yes, MMX IS supported
"movl $1, %%eax \n\t" // set return value to 1
"jmp 1f \n\t" // DONE: have MMX support
"0: \n\t" // .NOT_SUPPORTED: target label for jump instructions
"movl $0, %%eax \n\t" // set return value to 0
"1: \n\t" // .RETURN: target label for jump instructions
#if defined(__x86_64__)
"popq %%rdx \n\t" // restore rdx
"popq %%rcx \n\t" // restore rcx
"popq %%rbx \n\t" // restore rbx
#else
"popl %%edx \n\t" // restore edx
"popl %%ecx \n\t" // restore ecx
"popl %%ebx \n\t" // restore ebx
#endif
// "ret \n\t" // DONE: no MMX support
// (fall through to standard C "ret")
: "=a" (result) // output list
: // any variables used on input (none)
// no clobber list
// , "%ebx", "%ecx", "%edx" // GRR: we handle these manually
// , "memory" // if write to a variable gcc thought was in a reg
// , "cc" // "condition codes" (flag bits)
);
_mmx_supported = result;
#else
_mmx_supported = 0;
#endif /* PNG_MMX_CODE_SUPPORTED */
return _mmx_supported;
}
#endif

View File

@ -1,55 +1,62 @@
/* pngget.c - retrieval of values from info struct
*
* Last changed in libpng 1.2.30 [August 15, 2008]
* For conditions of distribution and use, see copyright notice in png.h
* Copyright (c) 1998-2008 Glenn Randers-Pehrson
* Last changed in libpng 1.4.2 [May 6, 2010]
* Copyright (c) 1998-2010 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.)
*
* This code is released under the libpng license.
* For conditions of distribution and use, see the disclaimer
* and license in png.h
*
*/
#define PNG_INTERNAL
#define PNG_NO_PEDANTIC_WARNINGS
#include "png.h"
#if defined(PNG_READ_SUPPORTED) || defined(PNG_WRITE_SUPPORTED)
#include "pngpriv.h"
png_uint_32 PNGAPI
png_get_valid(png_structp png_ptr, png_infop info_ptr, png_uint_32 flag)
{
if (png_ptr != NULL && info_ptr != NULL)
return(info_ptr->valid & flag);
else
return(0);
}
png_uint_32 PNGAPI
png_size_t PNGAPI
png_get_rowbytes(png_structp png_ptr, png_infop info_ptr)
{
if (png_ptr != NULL && info_ptr != NULL)
return(info_ptr->rowbytes);
else
return(0);
}
#if defined(PNG_INFO_IMAGE_SUPPORTED)
#ifdef PNG_INFO_IMAGE_SUPPORTED
png_bytepp PNGAPI
png_get_rows(png_structp png_ptr, png_infop info_ptr)
{
if (png_ptr != NULL && info_ptr != NULL)
return(info_ptr->row_pointers);
else
return(0);
}
#endif
#ifdef PNG_EASY_ACCESS_SUPPORTED
/* easy access to info, added in libpng-0.99 */
/* Easy access to info, added in libpng-0.99 */
png_uint_32 PNGAPI
png_get_image_width(png_structp png_ptr, png_infop info_ptr)
{
if (png_ptr != NULL && info_ptr != NULL)
{
return info_ptr->width;
}
return (0);
}
@ -57,9 +64,8 @@ png_uint_32 PNGAPI
png_get_image_height(png_structp png_ptr, png_infop info_ptr)
{
if (png_ptr != NULL && info_ptr != NULL)
{
return info_ptr->height;
}
return (0);
}
@ -67,9 +73,8 @@ png_byte PNGAPI
png_get_bit_depth(png_structp png_ptr, png_infop info_ptr)
{
if (png_ptr != NULL && info_ptr != NULL)
{
return info_ptr->bit_depth;
}
return (0);
}
@ -77,9 +82,8 @@ png_byte PNGAPI
png_get_color_type(png_structp png_ptr, png_infop info_ptr)
{
if (png_ptr != NULL && info_ptr != NULL)
{
return info_ptr->color_type;
}
return (0);
}
@ -87,9 +91,8 @@ png_byte PNGAPI
png_get_filter_type(png_structp png_ptr, png_infop info_ptr)
{
if (png_ptr != NULL && info_ptr != NULL)
{
return info_ptr->filter_type;
}
return (0);
}
@ -97,9 +100,8 @@ png_byte PNGAPI
png_get_interlace_type(png_structp png_ptr, png_infop info_ptr)
{
if (png_ptr != NULL && info_ptr != NULL)
{
return info_ptr->interlace_type;
}
return (0);
}
@ -107,9 +109,8 @@ png_byte PNGAPI
png_get_compression_type(png_structp png_ptr, png_infop info_ptr)
{
if (png_ptr != NULL && info_ptr != NULL)
{
return info_ptr->compression_type;
}
return (0);
}
@ -117,13 +118,16 @@ png_uint_32 PNGAPI
png_get_x_pixels_per_meter(png_structp png_ptr, png_infop info_ptr)
{
if (png_ptr != NULL && info_ptr != NULL)
#if defined(PNG_pHYs_SUPPORTED)
#ifdef PNG_pHYs_SUPPORTED
if (info_ptr->valid & PNG_INFO_pHYs)
{
png_debug1(1, "in %s retrieval function", "png_get_x_pixels_per_meter");
if (info_ptr->phys_unit_type != PNG_RESOLUTION_METER)
return (0);
else return (info_ptr->x_pixels_per_unit);
else
return (info_ptr->x_pixels_per_unit);
}
#else
return (0);
@ -135,13 +139,16 @@ png_uint_32 PNGAPI
png_get_y_pixels_per_meter(png_structp png_ptr, png_infop info_ptr)
{
if (png_ptr != NULL && info_ptr != NULL)
#if defined(PNG_pHYs_SUPPORTED)
#ifdef PNG_pHYs_SUPPORTED
if (info_ptr->valid & PNG_INFO_pHYs)
{
png_debug1(1, "in %s retrieval function", "png_get_y_pixels_per_meter");
if (info_ptr->phys_unit_type != PNG_RESOLUTION_METER)
return (0);
else return (info_ptr->y_pixels_per_unit);
else
return (info_ptr->y_pixels_per_unit);
}
#else
return (0);
@ -153,14 +160,17 @@ png_uint_32 PNGAPI
png_get_pixels_per_meter(png_structp png_ptr, png_infop info_ptr)
{
if (png_ptr != NULL && info_ptr != NULL)
#if defined(PNG_pHYs_SUPPORTED)
#ifdef PNG_pHYs_SUPPORTED
if (info_ptr->valid & PNG_INFO_pHYs)
{
png_debug1(1, "in %s retrieval function", "png_get_pixels_per_meter");
if (info_ptr->phys_unit_type != PNG_RESOLUTION_METER ||
info_ptr->x_pixels_per_unit != info_ptr->y_pixels_per_unit)
return (0);
else return (info_ptr->x_pixels_per_unit);
else
return (info_ptr->x_pixels_per_unit);
}
#else
return (0);
@ -173,18 +183,21 @@ float PNGAPI
png_get_pixel_aspect_ratio(png_structp png_ptr, png_infop info_ptr)
{
if (png_ptr != NULL && info_ptr != NULL)
#if defined(PNG_pHYs_SUPPORTED)
#ifdef PNG_pHYs_SUPPORTED
if (info_ptr->valid & PNG_INFO_pHYs)
{
png_debug1(1, "in %s retrieval function", "png_get_aspect_ratio");
if (info_ptr->x_pixels_per_unit == 0)
return ((float)0.0);
else
return ((float)((float)info_ptr->y_pixels_per_unit
/(float)info_ptr->x_pixels_per_unit));
}
#else
return (0.0);
return (0.0);
#endif
return ((float)0.0);
}
@ -194,16 +207,20 @@ png_int_32 PNGAPI
png_get_x_offset_microns(png_structp png_ptr, png_infop info_ptr)
{
if (png_ptr != NULL && info_ptr != NULL)
#if defined(PNG_oFFs_SUPPORTED)
#ifdef PNG_oFFs_SUPPORTED
if (info_ptr->valid & PNG_INFO_oFFs)
{
png_debug1(1, "in %s retrieval function", "png_get_x_offset_microns");
if (info_ptr->offset_unit_type != PNG_OFFSET_MICROMETER)
return (0);
else return (info_ptr->x_offset);
else
return (info_ptr->x_offset);
}
#else
return (0);
return (0);
#endif
return (0);
}
@ -212,13 +229,17 @@ png_int_32 PNGAPI
png_get_y_offset_microns(png_structp png_ptr, png_infop info_ptr)
{
if (png_ptr != NULL && info_ptr != NULL)
#if defined(PNG_oFFs_SUPPORTED)
#ifdef PNG_oFFs_SUPPORTED
if (info_ptr->valid & PNG_INFO_oFFs)
{
png_debug1(1, "in %s retrieval function", "png_get_y_offset_microns");
if (info_ptr->offset_unit_type != PNG_OFFSET_MICROMETER)
return (0);
else return (info_ptr->y_offset);
else
return (info_ptr->y_offset);
}
#else
return (0);
@ -230,13 +251,17 @@ png_int_32 PNGAPI
png_get_x_offset_pixels(png_structp png_ptr, png_infop info_ptr)
{
if (png_ptr != NULL && info_ptr != NULL)
#if defined(PNG_oFFs_SUPPORTED)
#ifdef PNG_oFFs_SUPPORTED
if (info_ptr->valid & PNG_INFO_oFFs)
{
png_debug1(1, "in %s retrieval function", "png_get_x_offset_microns");
if (info_ptr->offset_unit_type != PNG_OFFSET_PIXEL)
return (0);
else return (info_ptr->x_offset);
else
return (info_ptr->x_offset);
}
#else
return (0);
@ -248,13 +273,17 @@ png_int_32 PNGAPI
png_get_y_offset_pixels(png_structp png_ptr, png_infop info_ptr)
{
if (png_ptr != NULL && info_ptr != NULL)
#if defined(PNG_oFFs_SUPPORTED)
#ifdef PNG_oFFs_SUPPORTED
if (info_ptr->valid & PNG_INFO_oFFs)
{
png_debug1(1, "in %s retrieval function", "png_get_y_offset_microns");
if (info_ptr->offset_unit_type != PNG_OFFSET_PIXEL)
return (0);
else return (info_ptr->y_offset);
else
return (info_ptr->y_offset);
}
#else
return (0);
@ -298,7 +327,7 @@ png_get_y_offset_inches(png_structp png_ptr, png_infop info_ptr)
*.00003937);
}
#if defined(PNG_pHYs_SUPPORTED)
#ifdef PNG_pHYs_SUPPORTED
png_uint_32 PNGAPI
png_get_pHYs_dpi(png_structp png_ptr, png_infop info_ptr,
png_uint_32 *res_x, png_uint_32 *res_y, int *unit_type)
@ -308,6 +337,7 @@ png_get_pHYs_dpi(png_structp png_ptr, png_infop info_ptr,
if (png_ptr != NULL && info_ptr != NULL && (info_ptr->valid & PNG_INFO_pHYs))
{
png_debug1(1, "in %s retrieval function", "pHYs");
if (res_x != NULL)
{
*res_x = info_ptr->x_pixels_per_unit;
@ -356,7 +386,7 @@ png_get_signature(png_structp png_ptr, png_infop info_ptr)
return (NULL);
}
#if defined(PNG_bKGD_SUPPORTED)
#ifdef PNG_bKGD_SUPPORTED
png_uint_32 PNGAPI
png_get_bKGD(png_structp png_ptr, png_infop info_ptr,
png_color_16p *background)
@ -365,6 +395,7 @@ png_get_bKGD(png_structp png_ptr, png_infop info_ptr,
&& background != NULL)
{
png_debug1(1, "in %s retrieval function", "bKGD");
*background = &(info_ptr->background);
return (PNG_INFO_bKGD);
}
@ -372,7 +403,7 @@ png_get_bKGD(png_structp png_ptr, png_infop info_ptr,
}
#endif
#if defined(PNG_cHRM_SUPPORTED)
#ifdef PNG_cHRM_SUPPORTED
#ifdef PNG_FLOATING_POINT_SUPPORTED
png_uint_32 PNGAPI
png_get_cHRM(png_structp png_ptr, png_infop info_ptr,
@ -382,6 +413,7 @@ png_get_cHRM(png_structp png_ptr, png_infop info_ptr,
if (png_ptr != NULL && info_ptr != NULL && (info_ptr->valid & PNG_INFO_cHRM))
{
png_debug1(1, "in %s retrieval function", "cHRM");
if (white_x != NULL)
*white_x = (double)info_ptr->x_white;
if (white_y != NULL)
@ -410,9 +442,10 @@ png_get_cHRM_fixed(png_structp png_ptr, png_infop info_ptr,
png_fixed_point *red_y, png_fixed_point *green_x, png_fixed_point *green_y,
png_fixed_point *blue_x, png_fixed_point *blue_y)
{
png_debug1(1, "in %s retrieval function", "cHRM");
if (png_ptr != NULL && info_ptr != NULL && (info_ptr->valid & PNG_INFO_cHRM))
{
png_debug1(1, "in %s retrieval function", "cHRM");
if (white_x != NULL)
*white_x = info_ptr->int_x_white;
if (white_y != NULL)
@ -436,15 +469,16 @@ png_get_cHRM_fixed(png_structp png_ptr, png_infop info_ptr,
#endif
#endif
#if defined(PNG_gAMA_SUPPORTED)
#ifdef PNG_gAMA_SUPPORTED
#ifdef PNG_FLOATING_POINT_SUPPORTED
png_uint_32 PNGAPI
png_get_gAMA(png_structp png_ptr, png_infop info_ptr, double *file_gamma)
{
png_debug1(1, "in %s retrieval function", "gAMA");
if (png_ptr != NULL && info_ptr != NULL && (info_ptr->valid & PNG_INFO_gAMA)
&& file_gamma != NULL)
{
png_debug1(1, "in %s retrieval function", "gAMA");
*file_gamma = (double)info_ptr->gamma;
return (PNG_INFO_gAMA);
}
@ -456,10 +490,11 @@ png_uint_32 PNGAPI
png_get_gAMA_fixed(png_structp png_ptr, png_infop info_ptr,
png_fixed_point *int_file_gamma)
{
png_debug1(1, "in %s retrieval function", "gAMA");
if (png_ptr != NULL && info_ptr != NULL && (info_ptr->valid & PNG_INFO_gAMA)
&& int_file_gamma != NULL)
{
png_debug1(1, "in %s retrieval function", "gAMA");
*int_file_gamma = info_ptr->int_gamma;
return (PNG_INFO_gAMA);
}
@ -468,14 +503,15 @@ png_get_gAMA_fixed(png_structp png_ptr, png_infop info_ptr,
#endif
#endif
#if defined(PNG_sRGB_SUPPORTED)
#ifdef PNG_sRGB_SUPPORTED
png_uint_32 PNGAPI
png_get_sRGB(png_structp png_ptr, png_infop info_ptr, int *file_srgb_intent)
{
png_debug1(1, "in %s retrieval function", "sRGB");
if (png_ptr != NULL && info_ptr != NULL && (info_ptr->valid & PNG_INFO_sRGB)
&& file_srgb_intent != NULL)
{
png_debug1(1, "in %s retrieval function", "sRGB");
*file_srgb_intent = (int)info_ptr->srgb_intent;
return (PNG_INFO_sRGB);
}
@ -483,20 +519,22 @@ png_get_sRGB(png_structp png_ptr, png_infop info_ptr, int *file_srgb_intent)
}
#endif
#if defined(PNG_iCCP_SUPPORTED)
#ifdef PNG_iCCP_SUPPORTED
png_uint_32 PNGAPI
png_get_iCCP(png_structp png_ptr, png_infop info_ptr,
png_charpp name, int *compression_type,
png_charpp profile, png_uint_32 *proflen)
{
png_debug1(1, "in %s retrieval function", "iCCP");
if (png_ptr != NULL && info_ptr != NULL && (info_ptr->valid & PNG_INFO_iCCP)
&& name != NULL && profile != NULL && proflen != NULL)
{
png_debug1(1, "in %s retrieval function", "iCCP");
*name = info_ptr->iccp_name;
*profile = info_ptr->iccp_profile;
/* compression_type is a dummy so the API won't have to change
if we introduce multiple compression types later. */
/* Compression_type is a dummy so the API won't have to change
* if we introduce multiple compression types later.
*/
*proflen = (int)info_ptr->iccp_proflen;
*compression_type = (int)info_ptr->iccp_compression;
return (PNG_INFO_iCCP);
@ -505,7 +543,7 @@ png_get_iCCP(png_structp png_ptr, png_infop info_ptr,
}
#endif
#if defined(PNG_sPLT_SUPPORTED)
#ifdef PNG_sPLT_SUPPORTED
png_uint_32 PNGAPI
png_get_sPLT(png_structp png_ptr, png_infop info_ptr,
png_sPLT_tpp spalettes)
@ -519,14 +557,15 @@ png_get_sPLT(png_structp png_ptr, png_infop info_ptr,
}
#endif
#if defined(PNG_hIST_SUPPORTED)
#ifdef PNG_hIST_SUPPORTED
png_uint_32 PNGAPI
png_get_hIST(png_structp png_ptr, png_infop info_ptr, png_uint_16p *hist)
{
png_debug1(1, "in %s retrieval function", "hIST");
if (png_ptr != NULL && info_ptr != NULL && (info_ptr->valid & PNG_INFO_hIST)
&& hist != NULL)
{
png_debug1(1, "in %s retrieval function", "hIST");
*hist = info_ptr->hist;
return (PNG_INFO_hIST);
}
@ -541,54 +580,48 @@ png_get_IHDR(png_structp png_ptr, png_infop info_ptr,
int *filter_type)
{
if (png_ptr != NULL && info_ptr != NULL && width != NULL && height != NULL &&
bit_depth != NULL && color_type != NULL)
{
png_debug1(1, "in %s retrieval function", "IHDR");
*width = info_ptr->width;
*height = info_ptr->height;
*bit_depth = info_ptr->bit_depth;
if (info_ptr->bit_depth < 1 || info_ptr->bit_depth > 16)
png_error(png_ptr, "Invalid bit depth");
*color_type = info_ptr->color_type;
if (info_ptr->color_type > 6)
png_error(png_ptr, "Invalid color type");
if (compression_type != NULL)
*compression_type = info_ptr->compression_type;
if (filter_type != NULL)
*filter_type = info_ptr->filter_type;
if (interlace_type != NULL)
*interlace_type = info_ptr->interlace_type;
png_debug1(1, "in %s retrieval function", "IHDR");
/* check for potential overflow of rowbytes */
if (*width == 0 || *width > PNG_UINT_31_MAX)
png_error(png_ptr, "Invalid image width");
if (*height == 0 || *height > PNG_UINT_31_MAX)
png_error(png_ptr, "Invalid image height");
if (info_ptr->width > (PNG_UINT_32_MAX
>> 3) /* 8-byte RGBA pixels */
- 64 /* bigrowbuf hack */
- 1 /* filter byte */
- 7*8 /* rounding of width to multiple of 8 pixels */
- 8) /* extra max_pixel_depth pad */
{
png_warning(png_ptr,
"Width too large for libpng to process image data.");
}
return (1);
}
return (0);
if (png_ptr == NULL || info_ptr == NULL || width == NULL ||
height == NULL || bit_depth == NULL || color_type == NULL)
return (0);
*width = info_ptr->width;
*height = info_ptr->height;
*bit_depth = info_ptr->bit_depth;
*color_type = info_ptr->color_type;
if (compression_type != NULL)
*compression_type = info_ptr->compression_type;
if (filter_type != NULL)
*filter_type = info_ptr->filter_type;
if (interlace_type != NULL)
*interlace_type = info_ptr->interlace_type;
/* This is redundant if we can be sure that the info_ptr values were all
* assigned in png_set_IHDR(). We do the check anyhow in case an
* application has ignored our advice not to mess with the members
* of info_ptr directly.
*/
png_check_IHDR (png_ptr, info_ptr->width, info_ptr->height,
info_ptr->bit_depth, info_ptr->color_type, info_ptr->interlace_type,
info_ptr->compression_type, info_ptr->filter_type);
return (1);
}
#if defined(PNG_oFFs_SUPPORTED)
#ifdef PNG_oFFs_SUPPORTED
png_uint_32 PNGAPI
png_get_oFFs(png_structp png_ptr, png_infop info_ptr,
png_int_32 *offset_x, png_int_32 *offset_y, int *unit_type)
{
png_debug1(1, "in %s retrieval function", "oFFs");
if (png_ptr != NULL && info_ptr != NULL && (info_ptr->valid & PNG_INFO_oFFs)
&& offset_x != NULL && offset_y != NULL && unit_type != NULL)
{
png_debug1(1, "in %s retrieval function", "oFFs");
*offset_x = info_ptr->x_offset;
*offset_y = info_ptr->y_offset;
*unit_type = (int)info_ptr->offset_unit_type;
@ -598,17 +631,18 @@ png_get_oFFs(png_structp png_ptr, png_infop info_ptr,
}
#endif
#if defined(PNG_pCAL_SUPPORTED)
#ifdef PNG_pCAL_SUPPORTED
png_uint_32 PNGAPI
png_get_pCAL(png_structp png_ptr, png_infop info_ptr,
png_charp *purpose, png_int_32 *X0, png_int_32 *X1, int *type, int *nparams,
png_charp *units, png_charpp *params)
{
png_debug1(1, "in %s retrieval function", "pCAL");
if (png_ptr != NULL && info_ptr != NULL && (info_ptr->valid & PNG_INFO_pCAL)
&& purpose != NULL && X0 != NULL && X1 != NULL && type != NULL &&
nparams != NULL && units != NULL && params != NULL)
&& purpose != NULL && X0 != NULL && X1 != NULL && type != NULL &&
nparams != NULL && units != NULL && params != NULL)
{
png_debug1(1, "in %s retrieval function", "pCAL");
*purpose = info_ptr->pcal_purpose;
*X0 = info_ptr->pcal_X0;
*X1 = info_ptr->pcal_X1;
@ -622,14 +656,14 @@ png_get_pCAL(png_structp png_ptr, png_infop info_ptr,
}
#endif
#if defined(PNG_sCAL_SUPPORTED)
#ifdef PNG_sCAL_SUPPORTED
#ifdef PNG_FLOATING_POINT_SUPPORTED
png_uint_32 PNGAPI
png_get_sCAL(png_structp png_ptr, png_infop info_ptr,
int *unit, double *width, double *height)
{
if (png_ptr != NULL && info_ptr != NULL &&
(info_ptr->valid & PNG_INFO_sCAL))
(info_ptr->valid & PNG_INFO_sCAL))
{
*unit = info_ptr->scal_unit;
*width = info_ptr->scal_pixel_width;
@ -645,7 +679,7 @@ png_get_sCAL_s(png_structp png_ptr, png_infop info_ptr,
int *unit, png_charpp width, png_charpp height)
{
if (png_ptr != NULL && info_ptr != NULL &&
(info_ptr->valid & PNG_INFO_sCAL))
(info_ptr->valid & PNG_INFO_sCAL))
{
*unit = info_ptr->scal_unit;
*width = info_ptr->scal_s_width;
@ -658,27 +692,30 @@ png_get_sCAL_s(png_structp png_ptr, png_infop info_ptr,
#endif
#endif
#if defined(PNG_pHYs_SUPPORTED)
#ifdef PNG_pHYs_SUPPORTED
png_uint_32 PNGAPI
png_get_pHYs(png_structp png_ptr, png_infop info_ptr,
png_uint_32 *res_x, png_uint_32 *res_y, int *unit_type)
{
png_uint_32 retval = 0;
png_debug1(1, "in %s retrieval function", "pHYs");
if (png_ptr != NULL && info_ptr != NULL &&
(info_ptr->valid & PNG_INFO_pHYs))
{
png_debug1(1, "in %s retrieval function", "pHYs");
if (res_x != NULL)
{
*res_x = info_ptr->x_pixels_per_unit;
retval |= PNG_INFO_pHYs;
}
if (res_y != NULL)
{
*res_y = info_ptr->y_pixels_per_unit;
retval |= PNG_INFO_pHYs;
}
if (unit_type != NULL)
{
*unit_type = (int)info_ptr->phys_unit_type;
@ -693,10 +730,11 @@ png_uint_32 PNGAPI
png_get_PLTE(png_structp png_ptr, png_infop info_ptr, png_colorp *palette,
int *num_palette)
{
png_debug1(1, "in %s retrieval function", "PLTE");
if (png_ptr != NULL && info_ptr != NULL && (info_ptr->valid & PNG_INFO_PLTE)
&& palette != NULL)
{
png_debug1(1, "in %s retrieval function", "PLTE");
*palette = info_ptr->palette;
*num_palette = info_ptr->num_palette;
png_debug1(3, "num_palette = %d", *num_palette);
@ -705,14 +743,15 @@ png_get_PLTE(png_structp png_ptr, png_infop info_ptr, png_colorp *palette,
return (0);
}
#if defined(PNG_sBIT_SUPPORTED)
#ifdef PNG_sBIT_SUPPORTED
png_uint_32 PNGAPI
png_get_sBIT(png_structp png_ptr, png_infop info_ptr, png_color_8p *sig_bit)
{
png_debug1(1, "in %s retrieval function", "sBIT");
if (png_ptr != NULL && info_ptr != NULL && (info_ptr->valid & PNG_INFO_sBIT)
&& sig_bit != NULL)
{
png_debug1(1, "in %s retrieval function", "sBIT");
*sig_bit = &(info_ptr->sig_bit);
return (PNG_INFO_sBIT);
}
@ -720,7 +759,7 @@ png_get_sBIT(png_structp png_ptr, png_infop info_ptr, png_color_8p *sig_bit)
}
#endif
#if defined(PNG_TEXT_SUPPORTED)
#ifdef PNG_TEXT_SUPPORTED
png_uint_32 PNGAPI
png_get_text(png_structp png_ptr, png_infop info_ptr, png_textp *text_ptr,
int *num_text)
@ -730,10 +769,13 @@ png_get_text(png_structp png_ptr, png_infop info_ptr, png_textp *text_ptr,
png_debug1(1, "in %s retrieval function",
(png_ptr->chunk_name[0] == '\0' ? "text"
: (png_const_charp)png_ptr->chunk_name));
if (text_ptr != NULL)
*text_ptr = info_ptr->text;
if (num_text != NULL)
*num_text = info_ptr->num_text;
return ((png_uint_32)info_ptr->num_text);
}
if (num_text != NULL)
@ -742,14 +784,15 @@ png_get_text(png_structp png_ptr, png_infop info_ptr, png_textp *text_ptr,
}
#endif
#if defined(PNG_tIME_SUPPORTED)
#ifdef PNG_tIME_SUPPORTED
png_uint_32 PNGAPI
png_get_tIME(png_structp png_ptr, png_infop info_ptr, png_timep *mod_time)
{
png_debug1(1, "in %s retrieval function", "tIME");
if (png_ptr != NULL && info_ptr != NULL && (info_ptr->valid & PNG_INFO_tIME)
&& mod_time != NULL)
{
png_debug1(1, "in %s retrieval function", "tIME");
*mod_time = &(info_ptr->mod_time);
return (PNG_INFO_tIME);
}
@ -757,34 +800,37 @@ png_get_tIME(png_structp png_ptr, png_infop info_ptr, png_timep *mod_time)
}
#endif
#if defined(PNG_tRNS_SUPPORTED)
#ifdef PNG_tRNS_SUPPORTED
png_uint_32 PNGAPI
png_get_tRNS(png_structp png_ptr, png_infop info_ptr,
png_bytep *trans, int *num_trans, png_color_16p *trans_values)
png_bytep *trans_alpha, int *num_trans, png_color_16p *trans_color)
{
png_uint_32 retval = 0;
if (png_ptr != NULL && info_ptr != NULL && (info_ptr->valid & PNG_INFO_tRNS))
{
png_debug1(1, "in %s retrieval function", "tRNS");
if (info_ptr->color_type == PNG_COLOR_TYPE_PALETTE)
{
if (trans != NULL)
if (trans_alpha != NULL)
{
*trans = info_ptr->trans;
*trans_alpha = info_ptr->trans_alpha;
retval |= PNG_INFO_tRNS;
}
if (trans_values != NULL)
*trans_values = &(info_ptr->trans_values);
if (trans_color != NULL)
*trans_color = &(info_ptr->trans_color);
}
else /* if (info_ptr->color_type != PNG_COLOR_TYPE_PALETTE) */
{
if (trans_values != NULL)
if (trans_color != NULL)
{
*trans_values = &(info_ptr->trans_values);
*trans_color = &(info_ptr->trans_color);
retval |= PNG_INFO_tRNS;
}
if (trans != NULL)
*trans = NULL;
if (trans_alpha != NULL)
*trans_alpha = NULL;
}
if (num_trans != NULL)
{
@ -796,7 +842,7 @@ png_get_tRNS(png_structp png_ptr, png_infop info_ptr,
}
#endif
#if defined(PNG_UNKNOWN_CHUNKS_SUPPORTED)
#ifdef PNG_UNKNOWN_CHUNKS_SUPPORTED
png_uint_32 PNGAPI
png_get_unknown_chunks(png_structp png_ptr, png_infop info_ptr,
png_unknown_chunkpp unknowns)
@ -810,7 +856,7 @@ png_get_unknown_chunks(png_structp png_ptr, png_infop info_ptr,
}
#endif
#if defined(PNG_READ_RGB_TO_GRAY_SUPPORTED)
#ifdef PNG_READ_RGB_TO_GRAY_SUPPORTED
png_byte PNGAPI
png_get_rgb_to_gray_status (png_structp png_ptr)
{
@ -818,7 +864,7 @@ png_get_rgb_to_gray_status (png_structp png_ptr)
}
#endif
#if defined(PNG_USER_CHUNKS_SUPPORTED)
#ifdef PNG_USER_CHUNKS_SUPPORTED
png_voidp PNGAPI
png_get_user_chunk_ptr(png_structp png_ptr)
{
@ -826,64 +872,16 @@ png_get_user_chunk_ptr(png_structp png_ptr)
}
#endif
#ifdef PNG_WRITE_SUPPORTED
png_uint_32 PNGAPI
png_size_t PNGAPI
png_get_compression_buffer_size(png_structp png_ptr)
{
return (png_uint_32)(png_ptr? png_ptr->zbuf_size : 0L);
}
#endif
#ifdef PNG_ASSEMBLER_CODE_SUPPORTED
#ifndef PNG_1_0_X
/* this function was added to libpng 1.2.0 and should exist by default */
png_uint_32 PNGAPI
png_get_asm_flags (png_structp png_ptr)
{
/* obsolete, to be removed from libpng-1.4.0 */
return (png_ptr? 0L: 0L);
return (png_ptr ? png_ptr->zbuf_size : 0L);
}
/* this function was added to libpng 1.2.0 and should exist by default */
png_uint_32 PNGAPI
png_get_asm_flagmask (int flag_select)
{
/* obsolete, to be removed from libpng-1.4.0 */
flag_select=flag_select;
return 0L;
}
/* GRR: could add this: && defined(PNG_MMX_CODE_SUPPORTED) */
/* this function was added to libpng 1.2.0 */
png_uint_32 PNGAPI
png_get_mmx_flagmask (int flag_select, int *compilerID)
{
/* obsolete, to be removed from libpng-1.4.0 */
flag_select=flag_select;
*compilerID = -1; /* unknown (i.e., no asm/MMX code compiled) */
return 0L;
}
/* this function was added to libpng 1.2.0 */
png_byte PNGAPI
png_get_mmx_bitdepth_threshold (png_structp png_ptr)
{
/* obsolete, to be removed from libpng-1.4.0 */
return (png_ptr? 0: 0);
}
/* this function was added to libpng 1.2.0 */
png_uint_32 PNGAPI
png_get_mmx_rowbytes_threshold (png_structp png_ptr)
{
/* obsolete, to be removed from libpng-1.4.0 */
return (png_ptr? 0L: 0L);
}
#endif /* ?PNG_1_0_X */
#endif /* ?PNG_ASSEMBLER_CODE_SUPPORTED */
#ifdef PNG_SET_USER_LIMITS_SUPPORTED
/* these functions were added to libpng 1.2.6 */
/* These functions were added to libpng 1.2.6 and were enabled
* by default in libpng-1.4.0 */
png_uint_32 PNGAPI
png_get_user_width_max (png_structp png_ptr)
{
@ -894,7 +892,34 @@ png_get_user_height_max (png_structp png_ptr)
{
return (png_ptr? png_ptr->user_height_max : 0);
}
/* This function was added to libpng 1.4.0 */
png_uint_32 PNGAPI
png_get_chunk_cache_max (png_structp png_ptr)
{
return (png_ptr? png_ptr->user_chunk_cache_max : 0);
}
/* This function was added to libpng 1.4.1 */
png_alloc_size_t PNGAPI
png_get_chunk_malloc_max (png_structp png_ptr)
{
return (png_ptr?
png_ptr->user_chunk_malloc_max : 0);
}
#endif /* ?PNG_SET_USER_LIMITS_SUPPORTED */
/* These functions were added to libpng 1.4.0 */
#ifdef PNG_IO_STATE_SUPPORTED
png_uint_32 PNGAPI
png_get_io_state (png_structp png_ptr)
{
return png_ptr->io_state;
}
png_bytep PNGAPI
png_get_io_chunk_name (png_structp png_ptr)
{
return png_ptr->chunk_name;
}
#endif /* ?PNG_IO_STATE_SUPPORTED */
#endif /* PNG_READ_SUPPORTED || PNG_WRITE_SUPPORTED */

View File

@ -1,12 +1,15 @@
/* pngmem.c - stub functions for memory allocation
*
* Last changed in libpng 1.2.30 [August 15, 2008]
* For conditions of distribution and use, see copyright notice in png.h
* Copyright (c) 1998-2008 Glenn Randers-Pehrson
* Last changed in libpng 1.4.2 [May 6, 2010]
* Copyright (c) 1998-2010 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.)
*
* This code is released under the libpng license.
* For conditions of distribution and use, see the disclaimer
* and license in png.h
*
* This file provides a location for all memory allocation. Users who
* need special memory handling are expected to supply replacement
* functions for png_malloc() and png_free(), and to use
@ -14,13 +17,14 @@
* identify the replacement functions.
*/
#define PNG_INTERNAL
#define PNG_NO_PEDANTIC_WARNINGS
#include "png.h"
#if defined(PNG_READ_SUPPORTED) || defined(PNG_WRITE_SUPPORTED)
#include "pngpriv.h"
/* Borland DOS special memory handler */
#if defined(__TURBOC__) && !defined(_Windows) && !defined(__FLAT__)
/* if you change this, be sure to change the one in png.h also */
/* If you change this, be sure to change the one in png.h also */
/* Allocate memory for a png_struct. The malloc and memset can be replaced
by a single call to calloc() if this is thought to improve performance. */
@ -28,7 +32,7 @@ png_voidp /* PRIVATE */
png_create_struct(int type)
{
#ifdef PNG_USER_MEM_SUPPORTED
return (png_create_struct_2(type, png_malloc_ptr_NULL, png_voidp_NULL));
return (png_create_struct_2(type, NULL, NULL));
}
/* Alternate version of png_create_struct, for use with user-defined malloc. */
@ -40,11 +44,11 @@ png_create_struct_2(int type, png_malloc_ptr malloc_fn, png_voidp mem_ptr)
png_voidp struct_ptr;
if (type == PNG_STRUCT_INFO)
size = png_sizeof(png_info);
size = png_sizeof(png_info);
else if (type == PNG_STRUCT_PNG)
size = png_sizeof(png_struct);
size = png_sizeof(png_struct);
else
return (png_get_copyright(NULL));
return (png_get_copyright(NULL));
#ifdef PNG_USER_MEM_SUPPORTED
if (malloc_fn != NULL)
@ -56,7 +60,7 @@ png_create_struct_2(int type, png_malloc_ptr malloc_fn, png_voidp mem_ptr)
}
else
#endif /* PNG_USER_MEM_SUPPORTED */
struct_ptr = (png_voidp)farmalloc(size);
struct_ptr = (png_voidp)farmalloc(size);
if (struct_ptr != NULL)
png_memset(struct_ptr, 0, size);
return (struct_ptr);
@ -67,7 +71,7 @@ void /* PRIVATE */
png_destroy_struct(png_voidp struct_ptr)
{
#ifdef PNG_USER_MEM_SUPPORTED
png_destroy_struct_2(struct_ptr, png_free_ptr_NULL, png_voidp_NULL);
png_destroy_struct_2(struct_ptr, NULL, NULL);
}
/* Free memory allocated by a png_create_struct() call */
@ -111,9 +115,19 @@ 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_calloc(png_structp png_ptr, png_alloc_size_t size)
{
png_voidp ret;
ret = (png_malloc(png_ptr, size));
if (ret != NULL)
png_memset(ret,0,(png_size_t)size);
return (ret);
}
png_voidp PNGAPI
png_malloc(png_structp png_ptr, png_uint_32 size)
png_malloc(png_structp png_ptr, png_alloc_size_t size)
{
png_voidp ret;
@ -122,16 +136,16 @@ png_malloc(png_structp png_ptr, png_uint_32 size)
#ifdef PNG_USER_MEM_SUPPORTED
if (png_ptr->malloc_fn != NULL)
ret = ((png_voidp)(*(png_ptr->malloc_fn))(png_ptr, (png_size_t)size));
ret = ((png_voidp)(*(png_ptr->malloc_fn))(png_ptr, (png_size_t)size));
else
ret = (png_malloc_default(png_ptr, size));
ret = (png_malloc_default(png_ptr, size));
if (ret == NULL && (png_ptr->flags&PNG_FLAG_MALLOC_NULL_MEM_OK) == 0)
png_error(png_ptr, "Out of memory!");
png_error(png_ptr, "Out of memory");
return (ret);
}
png_voidp PNGAPI
png_malloc_default(png_structp png_ptr, png_uint_32 size)
png_malloc_default(png_structp png_ptr, png_alloc_size_t size)
{
png_voidp ret;
#endif /* PNG_USER_MEM_SUPPORTED */
@ -149,12 +163,12 @@ png_malloc_default(png_structp png_ptr, png_uint_32 size)
#endif
if (size != (size_t)size)
ret = NULL;
ret = NULL;
else if (size == (png_uint_32)65536L)
{
if (png_ptr->offset_table == NULL)
{
/* try to see if we need to do any of this fancy stuff */
/* Try to see if we need to do any of this fancy stuff */
ret = farmalloc(size);
if (ret == NULL || ((png_size_t)ret & 0xffff))
{
@ -187,9 +201,9 @@ png_malloc_default(png_structp png_ptr, png_uint_32 size)
{
#ifndef PNG_USER_MEM_SUPPORTED
if ((png_ptr->flags&PNG_FLAG_MALLOC_NULL_MEM_OK) == 0)
png_error(png_ptr, "Out Of Memory."); /* Note "O" and "M" */
png_error(png_ptr, "Out Of Memory"); /* Note "O", "M" */
else
png_warning(png_ptr, "Out Of Memory.");
png_warning(png_ptr, "Out Of Memory");
#endif
return (NULL);
}
@ -215,9 +229,9 @@ png_malloc_default(png_structp png_ptr, png_uint_32 size)
{
#ifndef PNG_USER_MEM_SUPPORTED
if ((png_ptr->flags&PNG_FLAG_MALLOC_NULL_MEM_OK) == 0)
png_error(png_ptr, "Out Of memory."); /* Note "O" and "M" */
png_error(png_ptr, "Out Of memory"); /* Note "O", "m" */
else
png_warning(png_ptr, "Out Of memory.");
png_warning(png_ptr, "Out Of memory");
#endif
return (NULL);
}
@ -244,9 +258,9 @@ png_malloc_default(png_structp png_ptr, png_uint_32 size)
{
#ifndef PNG_USER_MEM_SUPPORTED
if ((png_ptr->flags&PNG_FLAG_MALLOC_NULL_MEM_OK) == 0)
png_error(png_ptr, "Out of Memory."); /* Note "o" and "M" */
png_error(png_ptr, "Out of Memory"); /* Note "o" and "M" */
else
png_warning(png_ptr, "Out of Memory.");
png_warning(png_ptr, "Out of Memory");
#endif
return (NULL);
}
@ -260,19 +274,19 @@ png_malloc_default(png_structp png_ptr, png_uint_32 size)
if (ret == NULL)
{
if ((png_ptr->flags&PNG_FLAG_MALLOC_NULL_MEM_OK) == 0)
png_error(png_ptr, "Out of memory."); /* Note "o" and "m" */
png_error(png_ptr, "Out of memory"); /* Note "o" and "m" */
else
png_warning(png_ptr, "Out of memory."); /* Note "o" and "m" */
png_warning(png_ptr, "Out of memory"); /* Note "o" and "m" */
}
#endif
return (ret);
}
/* free a pointer allocated by png_malloc(). In the default
configuration, png_ptr is not used, but is passed in case it
is needed. If ptr is NULL, return without taking any action. */
/* Free a pointer allocated by png_malloc(). In the default
* configuration, png_ptr is not used, but is passed in case it
* is needed. If ptr is NULL, return without taking any action.
*/
void PNGAPI
png_free(png_structp png_ptr, png_voidp ptr)
{
@ -285,7 +299,8 @@ png_free(png_structp png_ptr, png_voidp ptr)
(*(png_ptr->free_fn))(png_ptr, ptr);
return;
}
else png_free_default(png_ptr, ptr);
else
png_free_default(png_ptr, ptr);
}
void PNGAPI
@ -293,7 +308,8 @@ png_free_default(png_structp png_ptr, png_voidp ptr)
{
#endif /* PNG_USER_MEM_SUPPORTED */
if (png_ptr == NULL || ptr == NULL) return;
if (png_ptr == NULL || ptr == NULL)
return;
if (png_ptr->offset_table != NULL)
{
@ -332,7 +348,7 @@ png_voidp /* PRIVATE */
png_create_struct(int type)
{
#ifdef PNG_USER_MEM_SUPPORTED
return (png_create_struct_2(type, png_malloc_ptr_NULL, png_voidp_NULL));
return (png_create_struct_2(type, NULL, NULL));
}
/* Allocate memory for a png_struct or a png_info. The malloc and
@ -386,7 +402,7 @@ void /* PRIVATE */
png_destroy_struct(png_voidp struct_ptr)
{
#ifdef PNG_USER_MEM_SUPPORTED
png_destroy_struct_2(struct_ptr, png_free_ptr_NULL, png_voidp_NULL);
png_destroy_struct_2(struct_ptr, NULL, NULL);
}
/* Free memory allocated by a png_create_struct() call */
@ -420,13 +436,25 @@ 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
need to allocate exactly 64K, so whatever you call here must
have the ability to do that. */
* 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
* need to allocate exactly 64K, so whatever you call here must
* have the ability to do that.
*/
png_voidp PNGAPI
png_malloc(png_structp png_ptr, png_uint_32 size)
png_calloc(png_structp png_ptr, png_alloc_size_t size)
{
png_voidp ret;
ret = (png_malloc(png_ptr, size));
if (ret != NULL)
png_memset(ret,0,(png_size_t)size);
return (ret);
}
png_voidp PNGAPI
png_malloc(png_structp png_ptr, png_alloc_size_t size)
{
png_voidp ret;
@ -435,16 +463,16 @@ png_malloc(png_structp png_ptr, png_uint_32 size)
return (NULL);
if (png_ptr->malloc_fn != NULL)
ret = ((png_voidp)(*(png_ptr->malloc_fn))(png_ptr, (png_size_t)size));
ret = ((png_voidp)(*(png_ptr->malloc_fn))(png_ptr, (png_size_t)size));
else
ret = (png_malloc_default(png_ptr, size));
ret = (png_malloc_default(png_ptr, size));
if (ret == NULL && (png_ptr->flags&PNG_FLAG_MALLOC_NULL_MEM_OK) == 0)
png_error(png_ptr, "Out of Memory!");
png_error(png_ptr, "Out of Memory");
return (ret);
}
png_voidp PNGAPI
png_malloc_default(png_structp png_ptr, png_uint_32 size)
png_malloc_default(png_structp png_ptr, png_alloc_size_t size)
{
png_voidp ret;
#endif /* PNG_USER_MEM_SUPPORTED */
@ -464,23 +492,23 @@ png_malloc_default(png_structp png_ptr, png_uint_32 size)
}
#endif
/* Check for overflow */
/* Check for overflow */
#if defined(__TURBOC__) && !defined(__FLAT__)
if (size != (unsigned long)size)
ret = NULL;
else
ret = farmalloc(size);
if (size != (unsigned long)size)
ret = NULL;
else
ret = farmalloc(size);
#else
# if defined(_MSC_VER) && defined(MAXSEG_64K)
if (size != (unsigned long)size)
ret = NULL;
else
ret = halloc(size, 1);
if (size != (unsigned long)size)
ret = NULL;
else
ret = halloc(size, 1);
# else
if (size != (size_t)size)
ret = NULL;
else
ret = malloc((size_t)size);
if (size != (size_t)size)
ret = NULL;
else
ret = malloc((size_t)size);
# endif
#endif
@ -493,7 +521,8 @@ png_malloc_default(png_structp png_ptr, png_uint_32 size)
}
/* Free a pointer allocated by png_malloc(). If ptr is NULL, return
without taking any action. */
* without taking any action.
*/
void PNGAPI
png_free(png_structp png_ptr, png_voidp ptr)
{
@ -506,7 +535,8 @@ png_free(png_structp png_ptr, png_voidp ptr)
(*(png_ptr->free_fn))(png_ptr, ptr);
return;
}
else png_free_default(png_ptr, ptr);
else
png_free_default(png_ptr, ptr);
}
void PNGAPI
png_free_default(png_structp png_ptr, png_voidp ptr)
@ -529,20 +559,18 @@ png_free_default(png_structp png_ptr, png_voidp ptr)
#endif /* Not Borland DOS special memory handler */
#if defined(PNG_1_0_X)
# define png_malloc_warn png_malloc
#else
/* This function was added at libpng version 1.2.3. The png_malloc_warn()
* function will set up png_malloc() to 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_malloc_warn(png_structp png_ptr, png_alloc_size_t size)
{
png_voidp ptr;
png_uint_32 save_flags;
if (png_ptr == NULL) return (NULL);
if (png_ptr == NULL)
return (NULL);
save_flags = png_ptr->flags;
png_ptr->flags|=PNG_FLAG_MALLOC_NULL_MEM_OK;
@ -550,34 +578,7 @@ png_malloc_warn(png_structp png_ptr, png_uint_32 size)
png_ptr->flags=save_flags;
return(ptr);
}
#endif
png_voidp PNGAPI
png_memcpy_check (png_structp png_ptr, png_voidp s1, png_voidp s2,
png_uint_32 length)
{
png_size_t size;
size = (png_size_t)length;
if ((png_uint_32)size != length)
png_error(png_ptr, "Overflow in png_memcpy_check.");
return(png_memcpy (s1, s2, size));
}
png_voidp PNGAPI
png_memset_check (png_structp png_ptr, png_voidp s1, int value,
png_uint_32 length)
{
png_size_t size;
size = (png_size_t)length;
if ((png_uint_32)size != length)
png_error(png_ptr, "Overflow in png_memset_check.");
return (png_memset (s1, value, size));
}
#ifdef PNG_USER_MEM_SUPPORTED
/* This function is called when the application wants to use another method
@ -602,7 +603,8 @@ png_set_mem_fn(png_structp png_ptr, png_voidp mem_ptr, png_malloc_ptr
png_voidp PNGAPI
png_get_mem_ptr(png_structp png_ptr)
{
if (png_ptr == NULL) return (NULL);
if (png_ptr == NULL)
return (NULL);
return ((png_voidp)png_ptr->mem_ptr);
}
#endif /* PNG_USER_MEM_SUPPORTED */

File diff suppressed because it is too large Load Diff

954
src/png/pngpriv.h Normal file
View File

@ -0,0 +1,954 @@
/* pngpriv.h - private declarations for use inside libpng
*
* libpng version 1.4.4 - September 23, 2010
* For conditions of distribution and use, see copyright notice in png.h
* Copyright (c) 1998-2010 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.)
*
* This code is released under the libpng license.
* For conditions of distribution and use, see the disclaimer
* and license in png.h
*/
/* The symbols declared in this file (including the functions declared
* as PNG_EXTERN) are PRIVATE. They are not part of the libpng public
* interface, and are not recommended for use by regular applications.
* Some of them may become public in the future; others may stay private,
* change in an incompatible way, or even disappear.
* Although the libpng users are not forbidden to include this header,
* they should be well aware of the issues that may arise from doing so.
*/
#ifndef PNGPRIV_H
#define PNGPRIV_H
#ifndef PNG_VERSION_INFO_ONLY
#include <stdlib.h>
#ifndef PNG_EXTERN
/* The functions exported by PNG_EXTERN are internal functions, which
* aren't usually used outside the library (as far as I know), so it is
* debatable if they should be exported at all. In the future, when it
* is possible to have run-time registry of chunk-handling functions,
* some of these will be made available again.
# define PNG_EXTERN extern
*/
# define PNG_EXTERN
#endif
/* Other defines specific to compilers can go here. Try to keep
* them inside an appropriate ifdef/endif pair for portability.
*/
#ifdef PNG_FLOATING_POINT_SUPPORTED
# ifdef MACOS && !wxOSX_USE_IPHONE
/* We need to check that <math.h> hasn't already been included earlier
* as it seems it doesn't agree with <fp.h>, yet we should really use
* <fp.h> if possible.
*/
# if !defined(__MATH_H__) && !defined(__MATH_H) && !defined(__cmath__)
# include <fp.h>
# endif
# else
# include <math.h>
# endif
# if defined(_AMIGA) && defined(__SASC) && defined(_M68881)
/* Amiga SAS/C: We must include builtin FPU functions when compiling using
* MATH=68881
*/
# include <m68881.h>
# endif
#endif
/* Codewarrior on NT has linking problems without this. */
#if (defined(__MWERKS__) && defined(WIN32)) || defined(__STDC__)
# define PNG_ALWAYS_EXTERN
#endif
/* This provides the non-ANSI (far) memory allocation routines. */
#if defined(__TURBOC__) && defined(__MSDOS__)
# include <mem.h>
# include <alloc.h>
#endif
#if defined(WIN32) || defined(_Windows) || defined(_WINDOWS) || \
defined(_WIN32) || defined(__WIN32__)
# include <windows.h> /* defines _WINDOWS_ macro */
#endif
/* Various modes of operation. Note that after an init, mode is set to
* zero automatically when the structure is created.
*/
#define PNG_HAVE_IHDR 0x01
#define PNG_HAVE_PLTE 0x02
#define PNG_HAVE_IDAT 0x04
#define PNG_AFTER_IDAT 0x08 /* Have complete zlib datastream */
#define PNG_HAVE_IEND 0x10
#define PNG_HAVE_gAMA 0x20
#define PNG_HAVE_cHRM 0x40
#define PNG_HAVE_sRGB 0x80
#define PNG_HAVE_CHUNK_HEADER 0x100
#define PNG_WROTE_tIME 0x200
#define PNG_WROTE_INFO_BEFORE_PLTE 0x400
#define PNG_BACKGROUND_IS_GRAY 0x800
#define PNG_HAVE_PNG_SIGNATURE 0x1000
#define PNG_HAVE_CHUNK_AFTER_IDAT 0x2000 /* Have another chunk after IDAT */
/* Flags for the transformations the PNG library does on the image data */
#define PNG_BGR 0x0001
#define PNG_INTERLACE 0x0002
#define PNG_PACK 0x0004
#define PNG_SHIFT 0x0008
#define PNG_SWAP_BYTES 0x0010
#define PNG_INVERT_MONO 0x0020
#define PNG_QUANTIZE 0x0040 /* formerly PNG_DITHER */
#define PNG_BACKGROUND 0x0080
#define PNG_BACKGROUND_EXPAND 0x0100
/* 0x0200 unused */
#define PNG_16_TO_8 0x0400
#define PNG_RGBA 0x0800
#define PNG_EXPAND 0x1000
#define PNG_GAMMA 0x2000
#define PNG_GRAY_TO_RGB 0x4000
#define PNG_FILLER 0x8000L
#define PNG_PACKSWAP 0x10000L
#define PNG_SWAP_ALPHA 0x20000L
#define PNG_STRIP_ALPHA 0x40000L
#define PNG_INVERT_ALPHA 0x80000L
#define PNG_USER_TRANSFORM 0x100000L
#define PNG_RGB_TO_GRAY_ERR 0x200000L
#define PNG_RGB_TO_GRAY_WARN 0x400000L
#define PNG_RGB_TO_GRAY 0x600000L /* two bits, RGB_TO_GRAY_ERR|WARN */
/* 0x800000L Unused */
#define PNG_ADD_ALPHA 0x1000000L /* Added to libpng-1.2.7 */
#define PNG_EXPAND_tRNS 0x2000000L /* Added to libpng-1.2.9 */
/* 0x4000000L unused */
/* 0x8000000L unused */
/* 0x10000000L unused */
/* 0x20000000L unused */
/* 0x40000000L unused */
/* Flags for png_create_struct */
#define PNG_STRUCT_PNG 0x0001
#define PNG_STRUCT_INFO 0x0002
/* Scaling factor for filter heuristic weighting calculations */
#define PNG_WEIGHT_SHIFT 8
#define PNG_WEIGHT_FACTOR (1<<(PNG_WEIGHT_SHIFT))
#define PNG_COST_SHIFT 3
#define PNG_COST_FACTOR (1<<(PNG_COST_SHIFT))
/* Flags for the png_ptr->flags rather than declaring a byte for each one */
#define PNG_FLAG_ZLIB_CUSTOM_STRATEGY 0x0001
#define PNG_FLAG_ZLIB_CUSTOM_LEVEL 0x0002
#define PNG_FLAG_ZLIB_CUSTOM_MEM_LEVEL 0x0004
#define PNG_FLAG_ZLIB_CUSTOM_WINDOW_BITS 0x0008
#define PNG_FLAG_ZLIB_CUSTOM_METHOD 0x0010
#define PNG_FLAG_ZLIB_FINISHED 0x0020
#define PNG_FLAG_ROW_INIT 0x0040
#define PNG_FLAG_FILLER_AFTER 0x0080
#define PNG_FLAG_CRC_ANCILLARY_USE 0x0100
#define PNG_FLAG_CRC_ANCILLARY_NOWARN 0x0200
#define PNG_FLAG_CRC_CRITICAL_USE 0x0400
#define PNG_FLAG_CRC_CRITICAL_IGNORE 0x0800
/* 0x1000 unused */
/* 0x2000 unused */
/* 0x4000 unused */
#define PNG_FLAG_KEEP_UNKNOWN_CHUNKS 0x8000L
#define PNG_FLAG_KEEP_UNSAFE_CHUNKS 0x10000L
#define PNG_FLAG_LIBRARY_MISMATCH 0x20000L
#define PNG_FLAG_STRIP_ERROR_NUMBERS 0x40000L
#define PNG_FLAG_STRIP_ERROR_TEXT 0x80000L
#define PNG_FLAG_MALLOC_NULL_MEM_OK 0x100000L
#define PNG_FLAG_ADD_ALPHA 0x200000L /* Added to libpng-1.2.8 */
#define PNG_FLAG_STRIP_ALPHA 0x400000L /* Added to libpng-1.2.8 */
#define PNG_FLAG_BENIGN_ERRORS_WARN 0x800000L /* Added to libpng-1.4.0 */
/* 0x1000000L unused */
/* 0x2000000L unused */
/* 0x4000000L unused */
/* 0x8000000L unused */
/* 0x10000000L unused */
/* 0x20000000L unused */
/* 0x40000000L unused */
#define PNG_FLAG_CRC_ANCILLARY_MASK (PNG_FLAG_CRC_ANCILLARY_USE | \
PNG_FLAG_CRC_ANCILLARY_NOWARN)
#define PNG_FLAG_CRC_CRITICAL_MASK (PNG_FLAG_CRC_CRITICAL_USE | \
PNG_FLAG_CRC_CRITICAL_IGNORE)
#define PNG_FLAG_CRC_MASK (PNG_FLAG_CRC_ANCILLARY_MASK | \
PNG_FLAG_CRC_CRITICAL_MASK)
/* Save typing and make code easier to understand */
#define PNG_COLOR_DIST(c1, c2) (abs((int)((c1).red) - (int)((c2).red)) + \
abs((int)((c1).green) - (int)((c2).green)) + \
abs((int)((c1).blue) - (int)((c2).blue)))
/* Added to libpng-1.2.6 JB */
#define PNG_ROWBYTES(pixel_bits, width) \
((pixel_bits) >= 8 ? \
((png_size_t)(width) * (((png_size_t)(pixel_bits)) >> 3)) : \
(( ((png_size_t)(width) * ((png_size_t)(pixel_bits))) + 7) >> 3) )
/* PNG_OUT_OF_RANGE returns true if value is outside the range
* ideal-delta..ideal+delta. Each argument is evaluated twice.
* "ideal" and "delta" should be constants, normally simple
* integers, "value" a variable. Added to libpng-1.2.6 JB
*/
#define PNG_OUT_OF_RANGE(value, ideal, delta) \
( (value) < (ideal)-(delta) || (value) > (ideal)+(delta) )
/* Constant strings for known chunk types. If you need to add a chunk,
* define the name here, and add an invocation of the macro wherever it's
* needed.
*/
#define PNG_IHDR PNG_CONST png_byte png_IHDR[5] = { 73, 72, 68, 82, '\0'}
#define PNG_IDAT PNG_CONST png_byte png_IDAT[5] = { 73, 68, 65, 84, '\0'}
#define PNG_IEND PNG_CONST png_byte png_IEND[5] = { 73, 69, 78, 68, '\0'}
#define PNG_PLTE PNG_CONST png_byte png_PLTE[5] = { 80, 76, 84, 69, '\0'}
#define PNG_bKGD PNG_CONST png_byte png_bKGD[5] = { 98, 75, 71, 68, '\0'}
#define PNG_cHRM PNG_CONST png_byte png_cHRM[5] = { 99, 72, 82, 77, '\0'}
#define PNG_gAMA PNG_CONST png_byte png_gAMA[5] = {103, 65, 77, 65, '\0'}
#define PNG_hIST PNG_CONST png_byte png_hIST[5] = {104, 73, 83, 84, '\0'}
#define PNG_iCCP PNG_CONST png_byte png_iCCP[5] = {105, 67, 67, 80, '\0'}
#define PNG_iTXt PNG_CONST png_byte png_iTXt[5] = {105, 84, 88, 116, '\0'}
#define PNG_oFFs PNG_CONST png_byte png_oFFs[5] = {111, 70, 70, 115, '\0'}
#define PNG_pCAL PNG_CONST png_byte png_pCAL[5] = {112, 67, 65, 76, '\0'}
#define PNG_sCAL PNG_CONST png_byte png_sCAL[5] = {115, 67, 65, 76, '\0'}
#define PNG_pHYs PNG_CONST png_byte png_pHYs[5] = {112, 72, 89, 115, '\0'}
#define PNG_sBIT PNG_CONST png_byte png_sBIT[5] = {115, 66, 73, 84, '\0'}
#define PNG_sPLT PNG_CONST png_byte png_sPLT[5] = {115, 80, 76, 84, '\0'}
#define PNG_sRGB PNG_CONST png_byte png_sRGB[5] = {115, 82, 71, 66, '\0'}
#define PNG_sTER PNG_CONST png_byte png_sTER[5] = {115, 84, 69, 82, '\0'}
#define PNG_tEXt PNG_CONST png_byte png_tEXt[5] = {116, 69, 88, 116, '\0'}
#define PNG_tIME PNG_CONST png_byte png_tIME[5] = {116, 73, 77, 69, '\0'}
#define PNG_tRNS PNG_CONST png_byte png_tRNS[5] = {116, 82, 78, 83, '\0'}
#define PNG_zTXt PNG_CONST png_byte png_zTXt[5] = {122, 84, 88, 116, '\0'}
/* Inhibit C++ name-mangling for libpng functions but not for system calls. */
#ifdef __cplusplus
extern "C" {
#endif /* __cplusplus */
/* These functions are used internally in the code. They generally
* shouldn't be used unless you are writing code to add or replace some
* functionality in libpng. More information about most functions can
* be found in the files where the functions are located.
*/
/* Allocate memory for an internal libpng struct */
PNG_EXTERN png_voidp png_create_struct PNGARG((int type));
/* Free memory from internal libpng struct */
PNG_EXTERN void png_destroy_struct PNGARG((png_voidp struct_ptr));
PNG_EXTERN png_voidp png_create_struct_2 PNGARG((int type, png_malloc_ptr
malloc_fn, png_voidp mem_ptr));
PNG_EXTERN void png_destroy_struct_2 PNGARG((png_voidp struct_ptr,
png_free_ptr free_fn, png_voidp mem_ptr));
/* Free any memory that info_ptr points to and reset struct. */
PNG_EXTERN void png_info_destroy PNGARG((png_structp png_ptr,
png_infop info_ptr));
/* Function to allocate memory for zlib. PNGAPI is disallowed. */
PNG_EXTERN voidpf png_zalloc PNGARG((voidpf png_ptr, uInt items, uInt size));
/* Function to free memory for zlib. PNGAPI is disallowed. */
PNG_EXTERN void png_zfree PNGARG((voidpf png_ptr, voidpf ptr));
/* Next four functions are used internally as callbacks. PNGAPI is required
* but not PNG_EXPORT. PNGAPI added at libpng version 1.2.3. */
PNG_EXTERN void PNGAPI png_default_read_data PNGARG((png_structp png_ptr,
png_bytep data, png_size_t length));
#ifdef PNG_PROGRESSIVE_READ_SUPPORTED
PNG_EXTERN void PNGAPI png_push_fill_buffer PNGARG((png_structp png_ptr,
png_bytep buffer, png_size_t length));
#endif
PNG_EXTERN void PNGAPI png_default_write_data PNGARG((png_structp png_ptr,
png_bytep data, png_size_t length));
#ifdef PNG_WRITE_FLUSH_SUPPORTED
#ifdef PNG_STDIO_SUPPORTED
PNG_EXTERN void PNGAPI png_default_flush PNGARG((png_structp png_ptr));
#endif
#endif
/* Reset the CRC variable */
PNG_EXTERN void png_reset_crc PNGARG((png_structp png_ptr));
/* Write the "data" buffer to whatever output you are using */
PNG_EXTERN void png_write_data PNGARG((png_structp png_ptr, png_bytep data,
png_size_t length));
/* Read the chunk header (length + type name) */
PNG_EXTERN png_uint_32 png_read_chunk_header PNGARG((png_structp png_ptr));
/* Read data from whatever input you are using into the "data" buffer */
PNG_EXTERN void png_read_data PNGARG((png_structp png_ptr, png_bytep data,
png_size_t length));
/* Read bytes into buf, and update png_ptr->crc */
PNG_EXTERN void png_crc_read PNGARG((png_structp png_ptr, png_bytep buf,
png_size_t length));
/* Decompress data in a chunk that uses compression */
#if defined(PNG_zTXt_SUPPORTED) || defined(PNG_iTXt_SUPPORTED) || \
defined(PNG_iCCP_SUPPORTED) || defined(PNG_sPLT_SUPPORTED)
PNG_EXTERN void png_decompress_chunk PNGARG((png_structp png_ptr,
int comp_type, png_size_t chunklength, png_size_t prefix_length,
png_size_t *data_length));
#endif
/* Read "skip" bytes, read the file crc, and (optionally) verify png_ptr->crc */
PNG_EXTERN int png_crc_finish PNGARG((png_structp png_ptr, png_uint_32 skip));
/* Read the CRC from the file and compare it to the libpng calculated CRC */
PNG_EXTERN int png_crc_error PNGARG((png_structp png_ptr));
/* Calculate the CRC over a section of data. Note that we are only
* passing a maximum of 64K on systems that have this as a memory limit,
* since this is the maximum buffer size we can specify.
*/
PNG_EXTERN void png_calculate_crc PNGARG((png_structp png_ptr, png_bytep ptr,
png_size_t length));
#ifdef PNG_WRITE_FLUSH_SUPPORTED
PNG_EXTERN void png_flush PNGARG((png_structp png_ptr));
#endif
/* Write various chunks */
/* Write the IHDR chunk, and update the png_struct with the necessary
* information.
*/
PNG_EXTERN void png_write_IHDR PNGARG((png_structp png_ptr, png_uint_32 width,
png_uint_32 height,
int bit_depth, int color_type, int compression_method, int filter_method,
int interlace_method));
PNG_EXTERN void png_write_PLTE PNGARG((png_structp png_ptr, png_colorp palette,
png_uint_32 num_pal));
PNG_EXTERN void png_write_IDAT PNGARG((png_structp png_ptr, png_bytep data,
png_size_t length));
PNG_EXTERN void png_write_IEND PNGARG((png_structp png_ptr));
#ifdef PNG_WRITE_gAMA_SUPPORTED
#ifdef PNG_FLOATING_POINT_SUPPORTED
PNG_EXTERN void png_write_gAMA PNGARG((png_structp png_ptr, double file_gamma));
#endif
#ifdef PNG_FIXED_POINT_SUPPORTED
PNG_EXTERN void png_write_gAMA_fixed PNGARG((png_structp png_ptr,
png_fixed_point file_gamma));
#endif
#endif
#ifdef PNG_WRITE_sBIT_SUPPORTED
PNG_EXTERN void png_write_sBIT PNGARG((png_structp png_ptr, png_color_8p sbit,
int color_type));
#endif
#ifdef PNG_WRITE_cHRM_SUPPORTED
#ifdef PNG_FLOATING_POINT_SUPPORTED
PNG_EXTERN void png_write_cHRM PNGARG((png_structp png_ptr,
double white_x, double white_y,
double red_x, double red_y, double green_x, double green_y,
double blue_x, double blue_y));
#endif
PNG_EXTERN void png_write_cHRM_fixed PNGARG((png_structp png_ptr,
png_fixed_point int_white_x, png_fixed_point int_white_y,
png_fixed_point int_red_x, png_fixed_point int_red_y, png_fixed_point
int_green_x, png_fixed_point int_green_y, png_fixed_point int_blue_x,
png_fixed_point int_blue_y));
#endif
#ifdef PNG_WRITE_sRGB_SUPPORTED
PNG_EXTERN void png_write_sRGB PNGARG((png_structp png_ptr,
int intent));
#endif
#ifdef PNG_WRITE_iCCP_SUPPORTED
PNG_EXTERN void png_write_iCCP PNGARG((png_structp png_ptr,
png_charp name, int compression_type,
png_charp profile, int proflen));
/* Note to maintainer: profile should be png_bytep */
#endif
#ifdef PNG_WRITE_sPLT_SUPPORTED
PNG_EXTERN void png_write_sPLT PNGARG((png_structp png_ptr,
png_sPLT_tp palette));
#endif
#ifdef PNG_WRITE_tRNS_SUPPORTED
PNG_EXTERN void png_write_tRNS PNGARG((png_structp png_ptr, png_bytep trans,
png_color_16p values, int number, int color_type));
#endif
#ifdef PNG_WRITE_bKGD_SUPPORTED
PNG_EXTERN void png_write_bKGD PNGARG((png_structp png_ptr,
png_color_16p values, int color_type));
#endif
#ifdef PNG_WRITE_hIST_SUPPORTED
PNG_EXTERN void png_write_hIST PNGARG((png_structp png_ptr, png_uint_16p hist,
int num_hist));
#endif
#if defined(PNG_WRITE_TEXT_SUPPORTED) || defined(PNG_WRITE_pCAL_SUPPORTED) || \
defined(PNG_WRITE_iCCP_SUPPORTED) || defined(PNG_WRITE_sPLT_SUPPORTED)
PNG_EXTERN png_size_t png_check_keyword PNGARG((png_structp png_ptr,
png_charp key, png_charpp new_key));
#endif
#ifdef PNG_WRITE_tEXt_SUPPORTED
PNG_EXTERN void png_write_tEXt PNGARG((png_structp png_ptr, png_charp key,
png_charp text, png_size_t text_len));
#endif
#ifdef PNG_WRITE_zTXt_SUPPORTED
PNG_EXTERN void png_write_zTXt PNGARG((png_structp png_ptr, png_charp key,
png_charp text, png_size_t text_len, int compression));
#endif
#ifdef PNG_WRITE_iTXt_SUPPORTED
PNG_EXTERN void png_write_iTXt PNGARG((png_structp png_ptr,
int compression, png_charp key, png_charp lang, png_charp lang_key,
png_charp text));
#endif
#ifdef PNG_TEXT_SUPPORTED /* Added at version 1.0.14 and 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
#ifdef 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));
#endif
#ifdef PNG_WRITE_pCAL_SUPPORTED
PNG_EXTERN void png_write_pCAL PNGARG((png_structp png_ptr, png_charp purpose,
png_int_32 X0, png_int_32 X1, int type, int nparams,
png_charp units, png_charpp params));
#endif
#ifdef PNG_WRITE_pHYs_SUPPORTED
PNG_EXTERN void png_write_pHYs PNGARG((png_structp png_ptr,
png_uint_32 x_pixels_per_unit, png_uint_32 y_pixels_per_unit,
int unit_type));
#endif
#ifdef PNG_WRITE_tIME_SUPPORTED
PNG_EXTERN void png_write_tIME PNGARG((png_structp png_ptr,
png_timep mod_time));
#endif
#ifdef PNG_WRITE_sCAL_SUPPORTED
#if defined(PNG_FLOATING_POINT_SUPPORTED) && defined(PNG_STDIO_SUPPORTED)
PNG_EXTERN void png_write_sCAL PNGARG((png_structp png_ptr,
int unit, double width, double height));
#else
#ifdef PNG_FIXED_POINT_SUPPORTED
PNG_EXTERN void png_write_sCAL_s PNGARG((png_structp png_ptr,
int unit, png_charp width, png_charp height));
#endif
#endif
#endif
/* Called when finished processing a row of data */
PNG_EXTERN void png_write_finish_row PNGARG((png_structp png_ptr));
/* Internal use only. Called before first row of data */
PNG_EXTERN void png_write_start_row PNGARG((png_structp png_ptr));
#ifdef PNG_READ_GAMMA_SUPPORTED
PNG_EXTERN void png_build_gamma_table PNGARG((png_structp png_ptr,
png_byte bit_depth));
#endif
/* Combine a row of data, dealing with alpha, etc. if requested */
PNG_EXTERN void png_combine_row PNGARG((png_structp png_ptr, png_bytep row,
int mask));
#ifdef PNG_READ_INTERLACING_SUPPORTED
/* Expand an interlaced row */
/* OLD pre-1.0.9 interface:
PNG_EXTERN void png_do_read_interlace PNGARG((png_row_infop row_info,
png_bytep row, int pass, png_uint_32 transformations));
*/
PNG_EXTERN void png_do_read_interlace PNGARG((png_structp png_ptr));
#endif
/* GRR TO DO (2.0 or whenever): simplify other internal calling interfaces */
#ifdef PNG_WRITE_INTERLACING_SUPPORTED
/* Grab pixels out of a row for an interlaced pass */
PNG_EXTERN void png_do_write_interlace PNGARG((png_row_infop row_info,
png_bytep row, int pass));
#endif
/* Unfilter a row */
PNG_EXTERN void png_read_filter_row PNGARG((png_structp png_ptr,
png_row_infop row_info, png_bytep row, png_bytep prev_row, int filter));
/* Choose the best filter to use and filter the row data */
PNG_EXTERN void png_write_find_filter PNGARG((png_structp png_ptr,
png_row_infop row_info));
/* Write out the filtered row. */
PNG_EXTERN void png_write_filtered_row PNGARG((png_structp png_ptr,
png_bytep filtered_row));
/* Finish a row while reading, dealing with interlacing passes, etc. */
PNG_EXTERN void png_read_finish_row PNGARG((png_structp png_ptr));
/* Initialize the row buffers, etc. */
PNG_EXTERN void png_read_start_row PNGARG((png_structp png_ptr));
/* Optional call to update the users info structure */
PNG_EXTERN void png_read_transform_info PNGARG((png_structp png_ptr,
png_infop info_ptr));
/* These are the functions that do the transformations */
#ifdef PNG_READ_FILLER_SUPPORTED
PNG_EXTERN void png_do_read_filler PNGARG((png_row_infop row_info,
png_bytep row, png_uint_32 filler, png_uint_32 flags));
#endif
#ifdef PNG_READ_SWAP_ALPHA_SUPPORTED
PNG_EXTERN void png_do_read_swap_alpha PNGARG((png_row_infop row_info,
png_bytep row));
#endif
#ifdef PNG_WRITE_SWAP_ALPHA_SUPPORTED
PNG_EXTERN void png_do_write_swap_alpha PNGARG((png_row_infop row_info,
png_bytep row));
#endif
#ifdef PNG_READ_INVERT_ALPHA_SUPPORTED
PNG_EXTERN void png_do_read_invert_alpha PNGARG((png_row_infop row_info,
png_bytep row));
#endif
#ifdef PNG_WRITE_INVERT_ALPHA_SUPPORTED
PNG_EXTERN void png_do_write_invert_alpha PNGARG((png_row_infop row_info,
png_bytep row));
#endif
#if defined(PNG_WRITE_FILLER_SUPPORTED) || \
defined(PNG_READ_STRIP_ALPHA_SUPPORTED)
PNG_EXTERN void png_do_strip_filler PNGARG((png_row_infop row_info,
png_bytep row, png_uint_32 flags));
#endif
#if defined(PNG_READ_SWAP_SUPPORTED) || defined(PNG_WRITE_SWAP_SUPPORTED)
PNG_EXTERN void png_do_swap PNGARG((png_row_infop row_info, png_bytep row));
#endif
#if defined(PNG_READ_PACKSWAP_SUPPORTED) || \
defined(PNG_WRITE_PACKSWAP_SUPPORTED)
PNG_EXTERN void png_do_packswap PNGARG((png_row_infop row_info, png_bytep row));
#endif
#ifdef PNG_READ_RGB_TO_GRAY_SUPPORTED
PNG_EXTERN int png_do_rgb_to_gray PNGARG((png_structp png_ptr, png_row_infop
row_info, png_bytep row));
#endif
#ifdef PNG_READ_GRAY_TO_RGB_SUPPORTED
PNG_EXTERN void png_do_gray_to_rgb PNGARG((png_row_infop row_info,
png_bytep row));
#endif
#ifdef PNG_READ_PACK_SUPPORTED
PNG_EXTERN void png_do_unpack PNGARG((png_row_infop row_info, png_bytep row));
#endif
#ifdef PNG_READ_SHIFT_SUPPORTED
PNG_EXTERN void png_do_unshift PNGARG((png_row_infop row_info, png_bytep row,
png_color_8p sig_bits));
#endif
#if defined(PNG_READ_INVERT_SUPPORTED) || defined(PNG_WRITE_INVERT_SUPPORTED)
PNG_EXTERN void png_do_invert PNGARG((png_row_infop row_info, png_bytep row));
#endif
#ifdef PNG_READ_16_TO_8_SUPPORTED
PNG_EXTERN void png_do_chop PNGARG((png_row_infop row_info, png_bytep row));
#endif
#ifdef PNG_READ_QUANTIZE_SUPPORTED
PNG_EXTERN void png_do_quantize PNGARG((png_row_infop row_info,
png_bytep row, png_bytep palette_lookup, png_bytep quantize_lookup));
# ifdef PNG_CORRECT_PALETTE_SUPPORTED
PNG_EXTERN void png_correct_palette PNGARG((png_structp png_ptr,
png_colorp palette, int num_palette));
# endif
#endif
#if defined(PNG_READ_BGR_SUPPORTED) || defined(PNG_WRITE_BGR_SUPPORTED)
PNG_EXTERN void png_do_bgr PNGARG((png_row_infop row_info, png_bytep row));
#endif
#ifdef PNG_WRITE_PACK_SUPPORTED
PNG_EXTERN void png_do_pack PNGARG((png_row_infop row_info,
png_bytep row, png_uint_32 bit_depth));
#endif
#ifdef PNG_WRITE_SHIFT_SUPPORTED
PNG_EXTERN void png_do_shift PNGARG((png_row_infop row_info, png_bytep row,
png_color_8p bit_depth));
#endif
#ifdef PNG_READ_BACKGROUND_SUPPORTED
#ifdef PNG_READ_GAMMA_SUPPORTED
PNG_EXTERN void png_do_background PNGARG((png_row_infop row_info, png_bytep row,
png_color_16p trans_color, png_color_16p background,
png_color_16p background_1,
png_bytep gamma_table, png_bytep gamma_from_1, png_bytep gamma_to_1,
png_uint_16pp gamma_16, png_uint_16pp gamma_16_from_1,
png_uint_16pp gamma_16_to_1, int gamma_shift));
#else
PNG_EXTERN void png_do_background PNGARG((png_row_infop row_info, png_bytep row,
png_color_16p trans_color, png_color_16p background));
#endif
#endif
#ifdef PNG_READ_GAMMA_SUPPORTED
PNG_EXTERN void png_do_gamma PNGARG((png_row_infop row_info, png_bytep row,
png_bytep gamma_table, png_uint_16pp gamma_16_table,
int gamma_shift));
#endif
#ifdef PNG_READ_EXPAND_SUPPORTED
PNG_EXTERN void png_do_expand_palette PNGARG((png_row_infop row_info,
png_bytep row, png_colorp palette, png_bytep trans, int num_trans));
PNG_EXTERN void png_do_expand PNGARG((png_row_infop row_info,
png_bytep row, png_color_16p trans_value));
#endif
/* The following decodes the appropriate chunks, and does error correction,
* then calls the appropriate callback for the chunk if it is valid.
*/
/* Decode the IHDR chunk */
PNG_EXTERN void png_handle_IHDR PNGARG((png_structp png_ptr, png_infop info_ptr,
png_uint_32 length));
PNG_EXTERN void png_handle_PLTE PNGARG((png_structp png_ptr, png_infop info_ptr,
png_uint_32 length));
PNG_EXTERN void png_handle_IEND PNGARG((png_structp png_ptr, png_infop info_ptr,
png_uint_32 length));
#ifdef PNG_READ_bKGD_SUPPORTED
PNG_EXTERN void png_handle_bKGD PNGARG((png_structp png_ptr, png_infop info_ptr,
png_uint_32 length));
#endif
#ifdef PNG_READ_cHRM_SUPPORTED
PNG_EXTERN void png_handle_cHRM PNGARG((png_structp png_ptr, png_infop info_ptr,
png_uint_32 length));
#endif
#ifdef PNG_READ_gAMA_SUPPORTED
PNG_EXTERN void png_handle_gAMA PNGARG((png_structp png_ptr, png_infop info_ptr,
png_uint_32 length));
#endif
#ifdef PNG_READ_hIST_SUPPORTED
PNG_EXTERN void png_handle_hIST PNGARG((png_structp png_ptr, png_infop info_ptr,
png_uint_32 length));
#endif
#ifdef PNG_READ_iCCP_SUPPORTED
PNG_EXTERN void png_handle_iCCP PNGARG((png_structp png_ptr, png_infop info_ptr,
png_uint_32 length));
#endif /* PNG_READ_iCCP_SUPPORTED */
#ifdef PNG_READ_iTXt_SUPPORTED
PNG_EXTERN void png_handle_iTXt PNGARG((png_structp png_ptr, png_infop info_ptr,
png_uint_32 length));
#endif
#ifdef PNG_READ_oFFs_SUPPORTED
PNG_EXTERN void png_handle_oFFs PNGARG((png_structp png_ptr, png_infop info_ptr,
png_uint_32 length));
#endif
#ifdef PNG_READ_pCAL_SUPPORTED
PNG_EXTERN void png_handle_pCAL PNGARG((png_structp png_ptr, png_infop info_ptr,
png_uint_32 length));
#endif
#ifdef PNG_READ_pHYs_SUPPORTED
PNG_EXTERN void png_handle_pHYs PNGARG((png_structp png_ptr, png_infop info_ptr,
png_uint_32 length));
#endif
#ifdef PNG_READ_sBIT_SUPPORTED
PNG_EXTERN void png_handle_sBIT PNGARG((png_structp png_ptr, png_infop info_ptr,
png_uint_32 length));
#endif
#ifdef PNG_READ_sCAL_SUPPORTED
PNG_EXTERN void png_handle_sCAL PNGARG((png_structp png_ptr, png_infop info_ptr,
png_uint_32 length));
#endif
#ifdef PNG_READ_sPLT_SUPPORTED
PNG_EXTERN void png_handle_sPLT PNGARG((png_structp png_ptr, png_infop info_ptr,
png_uint_32 length));
#endif /* PNG_READ_sPLT_SUPPORTED */
#ifdef PNG_READ_sRGB_SUPPORTED
PNG_EXTERN void png_handle_sRGB PNGARG((png_structp png_ptr, png_infop info_ptr,
png_uint_32 length));
#endif
#ifdef PNG_READ_tEXt_SUPPORTED
PNG_EXTERN void png_handle_tEXt PNGARG((png_structp png_ptr, png_infop info_ptr,
png_uint_32 length));
#endif
#ifdef PNG_READ_tIME_SUPPORTED
PNG_EXTERN void png_handle_tIME PNGARG((png_structp png_ptr, png_infop info_ptr,
png_uint_32 length));
#endif
#ifdef PNG_READ_tRNS_SUPPORTED
PNG_EXTERN void png_handle_tRNS PNGARG((png_structp png_ptr, png_infop info_ptr,
png_uint_32 length));
#endif
#ifdef PNG_READ_zTXt_SUPPORTED
PNG_EXTERN void png_handle_zTXt PNGARG((png_structp png_ptr, png_infop info_ptr,
png_uint_32 length));
#endif
PNG_EXTERN void png_handle_unknown PNGARG((png_structp png_ptr,
png_infop info_ptr, png_uint_32 length));
PNG_EXTERN void png_check_chunk_name PNGARG((png_structp png_ptr,
png_bytep chunk_name));
/* Handle the transformations for reading and writing */
PNG_EXTERN void png_do_read_transformations PNGARG((png_structp png_ptr));
PNG_EXTERN void png_do_write_transformations PNGARG((png_structp png_ptr));
PNG_EXTERN void png_init_read_transformations PNGARG((png_structp png_ptr));
#ifdef PNG_PROGRESSIVE_READ_SUPPORTED
PNG_EXTERN void png_push_read_chunk PNGARG((png_structp png_ptr,
png_infop info_ptr));
PNG_EXTERN void png_push_read_sig PNGARG((png_structp png_ptr,
png_infop info_ptr));
PNG_EXTERN void png_push_check_crc PNGARG((png_structp png_ptr));
PNG_EXTERN void png_push_crc_skip PNGARG((png_structp png_ptr,
png_uint_32 length));
PNG_EXTERN void png_push_crc_finish PNGARG((png_structp png_ptr));
PNG_EXTERN void png_push_save_buffer PNGARG((png_structp png_ptr));
PNG_EXTERN void png_push_restore_buffer PNGARG((png_structp png_ptr,
png_bytep buffer, png_size_t buffer_length));
PNG_EXTERN void png_push_read_IDAT PNGARG((png_structp png_ptr));
PNG_EXTERN void png_process_IDAT_data PNGARG((png_structp png_ptr,
png_bytep buffer, png_size_t buffer_length));
PNG_EXTERN void png_push_process_row PNGARG((png_structp png_ptr));
PNG_EXTERN void png_push_handle_unknown PNGARG((png_structp png_ptr,
png_infop info_ptr, png_uint_32 length));
PNG_EXTERN void png_push_have_info PNGARG((png_structp png_ptr,
png_infop info_ptr));
PNG_EXTERN void png_push_have_end PNGARG((png_structp png_ptr,
png_infop info_ptr));
PNG_EXTERN void png_push_have_row PNGARG((png_structp png_ptr, png_bytep row));
PNG_EXTERN void png_push_read_end PNGARG((png_structp png_ptr,
png_infop info_ptr));
PNG_EXTERN void png_process_some_data PNGARG((png_structp png_ptr,
png_infop info_ptr));
PNG_EXTERN void png_read_push_finish_row PNGARG((png_structp png_ptr));
#ifdef PNG_READ_tEXt_SUPPORTED
PNG_EXTERN void png_push_handle_tEXt PNGARG((png_structp png_ptr,
png_infop info_ptr, png_uint_32 length));
PNG_EXTERN void png_push_read_tEXt PNGARG((png_structp png_ptr,
png_infop info_ptr));
#endif
#ifdef PNG_READ_zTXt_SUPPORTED
PNG_EXTERN void png_push_handle_zTXt PNGARG((png_structp png_ptr,
png_infop info_ptr, png_uint_32 length));
PNG_EXTERN void png_push_read_zTXt PNGARG((png_structp png_ptr,
png_infop info_ptr));
#endif
#ifdef PNG_READ_iTXt_SUPPORTED
PNG_EXTERN void png_push_handle_iTXt PNGARG((png_structp png_ptr,
png_infop info_ptr, png_uint_32 length));
PNG_EXTERN void png_push_read_iTXt PNGARG((png_structp png_ptr,
png_infop info_ptr));
#endif
#endif /* PNG_PROGRESSIVE_READ_SUPPORTED */
#ifdef PNG_MNG_FEATURES_SUPPORTED
PNG_EXTERN void png_do_read_intrapixel PNGARG((png_row_infop row_info,
png_bytep row));
PNG_EXTERN void png_do_write_intrapixel PNGARG((png_row_infop row_info,
png_bytep row));
#endif
/* Added at libpng version 1.4.0 */
#ifdef PNG_cHRM_SUPPORTED
PNG_EXTERN int png_check_cHRM_fixed PNGARG((png_structp png_ptr,
png_fixed_point int_white_x, png_fixed_point int_white_y,
png_fixed_point int_red_x, png_fixed_point int_red_y, png_fixed_point
int_green_x, png_fixed_point int_green_y, png_fixed_point int_blue_x,
png_fixed_point int_blue_y));
#endif
#ifdef PNG_cHRM_SUPPORTED
#ifdef PNG_CHECK_cHRM_SUPPORTED
/* Added at libpng version 1.2.34 and 1.4.0 */
PNG_EXTERN void png_64bit_product PNGARG((long v1, long v2,
unsigned long *hi_product, unsigned long *lo_product));
#endif
#endif
/* Added at libpng version 1.4.0 */
PNG_EXTERN void png_check_IHDR PNGARG((png_structp png_ptr,
png_uint_32 width, png_uint_32 height, int bit_depth,
int color_type, int interlace_type, int compression_type,
int filter_type));
/* Free all memory used by the read (old method - NOT DLL EXPORTED) */
PNG_EXTERN void png_read_destroy PNGARG((png_structp png_ptr, png_infop info_ptr,
png_infop end_info_ptr));
/* Free any memory used in png_ptr struct (old method - NOT DLL EXPORTED) */
PNG_EXTERN void png_write_destroy PNGARG((png_structp png_ptr));
#ifdef USE_FAR_KEYWORD /* memory model conversion function */
PNG_EXTERN void *png_far_to_near PNGARG((png_structp png_ptr,png_voidp ptr,
int check));
#endif /* USE_FAR_KEYWORD */
/* Define PNG_DEBUG at compile time for debugging information. Higher
* numbers for PNG_DEBUG mean more debugging information. This has
* only been added since version 0.95 so it is not implemented throughout
* libpng yet, but more support will be added as needed.
*/
#ifdef PNG_DEBUG
#if (PNG_DEBUG > 0)
#if !defined(PNG_DEBUG_FILE) && defined(_MSC_VER)
#include <crtdbg.h>
#if (PNG_DEBUG > 1)
#ifndef _DEBUG
# define _DEBUG
#endif
#ifndef png_debug
#define png_debug(l,m) _RPT0(_CRT_WARN,m PNG_STRING_NEWLINE)
#endif
#ifndef png_debug1
#define png_debug1(l,m,p1) _RPT1(_CRT_WARN,m PNG_STRING_NEWLINE,p1)
#endif
#ifndef png_debug2
#define png_debug2(l,m,p1,p2) _RPT2(_CRT_WARN,m PNG_STRING_NEWLINE,p1,p2)
#endif
#endif
#else /* PNG_DEBUG_FILE || !_MSC_VER */
#ifndef PNG_DEBUG_FILE
#define PNG_DEBUG_FILE stderr
#endif /* PNG_DEBUG_FILE */
#if (PNG_DEBUG > 1)
/* Note: ["%s"m PNG_STRING_NEWLINE] probably does not work on
* non-ISO compilers
*/
# ifdef __STDC__
# ifndef png_debug
# define png_debug(l,m) \
{ \
int num_tabs=l; \
fprintf(PNG_DEBUG_FILE,"%s"m PNG_STRING_NEWLINE,(num_tabs==1 ? "\t" : \
(num_tabs==2 ? "\t\t":(num_tabs>2 ? "\t\t\t":"")))); \
}
# endif
# ifndef png_debug1
# define png_debug1(l,m,p1) \
{ \
int num_tabs=l; \
fprintf(PNG_DEBUG_FILE,"%s"m PNG_STRING_NEWLINE,(num_tabs==1 ? "\t" : \
(num_tabs==2 ? "\t\t":(num_tabs>2 ? "\t\t\t":""))),p1); \
}
# endif
# ifndef png_debug2
# define png_debug2(l,m,p1,p2) \
{ \
int num_tabs=l; \
fprintf(PNG_DEBUG_FILE,"%s"m PNG_STRING_NEWLINE,(num_tabs==1 ? "\t" : \
(num_tabs==2 ? "\t\t":(num_tabs>2 ? "\t\t\t":""))),p1,p2); \
}
# endif
# else /* __STDC __ */
# ifndef png_debug
# define png_debug(l,m) \
{ \
int num_tabs=l; \
char format[256]; \
snprintf(format,256,"%s%s%s",(num_tabs==1 ? "\t" : \
(num_tabs==2 ? "\t\t":(num_tabs>2 ? "\t\t\t":""))), \
m,PNG_STRING_NEWLINE); \
fprintf(PNG_DEBUG_FILE,format); \
}
# endif
# ifndef png_debug1
# define png_debug1(l,m,p1) \
{ \
int num_tabs=l; \
char format[256]; \
snprintf(format,256,"%s%s%s",(num_tabs==1 ? "\t" : \
(num_tabs==2 ? "\t\t":(num_tabs>2 ? "\t\t\t":""))), \
m,PNG_STRING_NEWLINE); \
fprintf(PNG_DEBUG_FILE,format,p1); \
}
# endif
# ifndef png_debug2
# define png_debug2(l,m,p1,p2) \
{ \
int num_tabs=l; \
char format[256]; \
snprintf(format,256,"%s%s%s",(num_tabs==1 ? "\t" : \
(num_tabs==2 ? "\t\t":(num_tabs>2 ? "\t\t\t":""))), \
m,PNG_STRING_NEWLINE); \
fprintf(PNG_DEBUG_FILE,format,p1,p2); \
}
# endif
# endif /* __STDC __ */
#endif /* (PNG_DEBUG > 1) */
#endif /* _MSC_VER */
#endif /* (PNG_DEBUG > 0) */
#endif /* PNG_DEBUG */
#ifndef png_debug
#define png_debug(l, m)
#endif
#ifndef png_debug1
#define png_debug1(l, m, p1)
#endif
#ifndef png_debug2
#define png_debug2(l, m, p1, p2)
#endif
/* Maintainer: Put new private prototypes here ^ and in libpngpf.3 */
#ifdef __cplusplus
}
#endif
#endif /* PNG_VERSION_INFO_ONLY */
#endif /* PNGPRIV_H */

File diff suppressed because it is too large Load Diff

View File

@ -1,12 +1,15 @@
/* pngrio.c - functions for data input
*
* Last changed in libpng 1.2.30 [August 15, 2008]
* For conditions of distribution and use, see copyright notice in png.h
* Copyright (c) 1998-2008 Glenn Randers-Pehrson
* Last changed in libpng 1.4.1 [February 25, 2010]
* Copyright (c) 1998-2010 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.)
*
* This code is released under the libpng license.
* For conditions of distribution and use, see the disclaimer
* and license in png.h
*
* This file provides a location for all input. Users who need
* special handling are expected to write a function that has the same
* arguments as this and performs a similar function, but that possibly
@ -15,53 +18,52 @@
* libpng use it at run time with png_set_read_fn(...).
*/
#define PNG_INTERNAL
#define PNG_NO_PEDANTIC_WARNINGS
#include "png.h"
#if defined(PNG_READ_SUPPORTED)
#ifdef PNG_READ_SUPPORTED
#include "pngpriv.h"
/* Read the data from whatever input you are using. The default routine
reads from a file pointer. Note that this routine sometimes gets called
with very small lengths, so you should implement some kind of simple
buffering if you are using unbuffered reads. This should never be asked
to read more then 64K on a 16 bit machine. */
* reads from a file pointer. Note that this routine sometimes gets called
* with very small lengths, so you should implement some kind of simple
* buffering if you are using unbuffered reads. This should never be asked
* to read more then 64K on a 16 bit machine.
*/
void /* PRIVATE */
png_read_data(png_structp png_ptr, png_bytep data, png_size_t length)
{
png_debug1(4, "reading %d bytes", (int)length);
if (png_ptr->read_data_fn != NULL)
(*(png_ptr->read_data_fn))(png_ptr, data, length);
else
png_error(png_ptr, "Call to NULL read function");
}
#if !defined(PNG_NO_STDIO)
#ifdef PNG_STDIO_SUPPORTED
/* This is the function that does the actual reading of data. If you are
not reading from a standard C stream, you should create a replacement
read_data function and use it at run time with png_set_read_fn(), rather
than changing the library. */
* not reading from a standard C stream, you should create a replacement
* read_data function and use it at run time with png_set_read_fn(), rather
* than changing the library.
*/
#ifndef USE_FAR_KEYWORD
void PNGAPI
png_default_read_data(png_structp png_ptr, png_bytep data, png_size_t length)
{
png_size_t check;
if (png_ptr == NULL) return;
if (png_ptr == NULL)
return;
/* fread() returns 0 on error, so it is OK to store this in a png_size_t
* instead of an int, which is what fread() actually returns.
*/
#if defined(_WIN32_WCE)
if ( !ReadFile((HANDLE)(png_ptr->io_ptr), data, length, &check, NULL) )
check = 0;
#else
check = (png_size_t)fread(data, (png_size_t)1, length,
(png_FILE_p)png_ptr->io_ptr);
#endif
check = fread(data, 1, length, (png_FILE_p)png_ptr->io_ptr);
if (check != length)
png_error(png_ptr, "Read Error");
}
#else
/* this is the model-independent version. Since the standard I/O library
/* This is the model-independent version. Since the standard I/O library
can't handle far buffers in the medium and small models, we have to copy
the data.
*/
@ -72,22 +74,18 @@ png_default_read_data(png_structp png_ptr, png_bytep data, png_size_t length)
static void PNGAPI
png_default_read_data(png_structp png_ptr, png_bytep data, png_size_t length)
{
int check;
png_size_t check;
png_byte *n_data;
png_FILE_p io_ptr;
if (png_ptr == NULL) return;
if (png_ptr == NULL)
return;
/* Check if data really is near. If so, use usual code. */
n_data = (png_byte *)CVT_PTR_NOCHECK(data);
io_ptr = (png_FILE_p)CVT_PTR(png_ptr->io_ptr);
if ((png_bytep)n_data == data)
{
#if defined(_WIN32_WCE)
if ( !ReadFile((HANDLE)(png_ptr->io_ptr), data, length, &check, NULL) )
check = 0;
#else
check = fread(n_data, 1, length, io_ptr);
#endif
}
else
{
@ -98,12 +96,7 @@ png_default_read_data(png_structp png_ptr, png_bytep data, png_size_t length)
do
{
read = MIN(NEAR_BUF_SIZE, remaining);
#if defined(_WIN32_WCE)
if ( !ReadFile((HANDLE)(io_ptr), buf, read, &err, NULL) )
err = 0;
#else
err = fread(buf, (png_size_t)1, read, io_ptr);
#endif
err = fread(buf, 1, read, io_ptr);
png_memcpy(data, buf, read); /* copy far buffer to near buffer */
if (err != read)
break;
@ -121,26 +114,30 @@ png_default_read_data(png_structp png_ptr, png_bytep data, png_size_t length)
#endif
/* This function allows the application to supply a new input function
for libpng if standard C streams aren't being used.
This function takes as its arguments:
png_ptr - pointer to a png input data structure
io_ptr - pointer to user supplied structure containing info about
the input functions. May be NULL.
read_data_fn - pointer to a new input function that takes as its
arguments a pointer to a png_struct, a pointer to
a location where input data can be stored, and a 32-bit
unsigned int that is the number of bytes to be read.
To exit and output any fatal error messages the new write
function should call png_error(png_ptr, "Error msg"). */
* for libpng if standard C streams aren't being used.
*
* This function takes as its arguments:
* png_ptr - pointer to a png input data structure
* io_ptr - pointer to user supplied structure containing info about
* the input functions. May be NULL.
* read_data_fn - pointer to a new input function that takes as its
* arguments a pointer to a png_struct, a pointer to
* a location where input data can be stored, and a 32-bit
* unsigned int that is the number of bytes to be read.
* To exit and output any fatal error messages the new write
* function should call png_error(png_ptr, "Error msg").
* May be NULL, in which case libpng's default function will
* be used.
*/
void PNGAPI
png_set_read_fn(png_structp png_ptr, png_voidp io_ptr,
png_rw_ptr read_data_fn)
{
if (png_ptr == NULL) return;
if (png_ptr == NULL)
return;
png_ptr->io_ptr = io_ptr;
#if !defined(PNG_NO_STDIO)
#ifdef PNG_STDIO_SUPPORTED
if (read_data_fn != NULL)
png_ptr->read_data_fn = read_data_fn;
else
@ -156,10 +153,10 @@ png_set_read_fn(png_structp png_ptr, png_voidp io_ptr,
png_warning(png_ptr,
"It's an error to set both read_data_fn and write_data_fn in the ");
png_warning(png_ptr,
"same structure. Resetting write_data_fn to NULL.");
"same structure. Resetting write_data_fn to NULL");
}
#if defined(PNG_WRITE_FLUSH_SUPPORTED)
#ifdef PNG_WRITE_FLUSH_SUPPORTED
png_ptr->output_flush_fn = NULL;
#endif
}

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.4 KiB

After

Width:  |  Height:  |  Size: 8.4 KiB

View File

@ -1,47 +1,57 @@
/* pngtrans.c - transforms the data in a row (used by both readers and writers)
*
* Last changed in libpng 1.2.30 [August 15, 2008]
* For conditions of distribution and use, see copyright notice in png.h
* Copyright (c) 1998-2008 Glenn Randers-Pehrson
* Last changed in libpng 1.4.2 [April 29, 2010]
* Copyright (c) 1998-2010 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.)
*
* This code is released under the libpng license.
* For conditions of distribution and use, see the disclaimer
* and license in png.h
*/
#define PNG_INTERNAL
#define PNG_NO_PEDANTIC_WARNINGS
#include "png.h"
#if defined(PNG_READ_SUPPORTED) || defined(PNG_WRITE_SUPPORTED)
#include "pngpriv.h"
#if defined(PNG_READ_BGR_SUPPORTED) || defined(PNG_WRITE_BGR_SUPPORTED)
/* turn on BGR-to-RGB mapping */
/* Turn on BGR-to-RGB mapping */
void PNGAPI
png_set_bgr(png_structp png_ptr)
{
png_debug(1, "in png_set_bgr");
if (png_ptr == NULL) return;
if (png_ptr == NULL)
return;
png_ptr->transformations |= PNG_BGR;
}
#endif
#if defined(PNG_READ_SWAP_SUPPORTED) || defined(PNG_WRITE_SWAP_SUPPORTED)
/* turn on 16 bit byte swapping */
/* Turn on 16 bit byte swapping */
void PNGAPI
png_set_swap(png_structp png_ptr)
{
png_debug(1, "in png_set_swap");
if (png_ptr == NULL) return;
if (png_ptr == NULL)
return;
if (png_ptr->bit_depth == 16)
png_ptr->transformations |= PNG_SWAP_BYTES;
}
#endif
#if defined(PNG_READ_PACK_SUPPORTED) || defined(PNG_WRITE_PACK_SUPPORTED)
/* turn on pixel packing */
/* Turn on pixel packing */
void PNGAPI
png_set_packing(png_structp png_ptr)
{
png_debug(1, "in png_set_packing");
if (png_ptr == NULL) return;
if (png_ptr == NULL)
return;
if (png_ptr->bit_depth < 8)
{
png_ptr->transformations |= PNG_PACK;
@ -51,12 +61,14 @@ png_set_packing(png_structp png_ptr)
#endif
#if defined(PNG_READ_PACKSWAP_SUPPORTED)||defined(PNG_WRITE_PACKSWAP_SUPPORTED)
/* turn on packed pixel swapping */
/* Turn on packed pixel swapping */
void PNGAPI
png_set_packswap(png_structp png_ptr)
{
png_debug(1, "in png_set_packswap");
if (png_ptr == NULL) return;
if (png_ptr == NULL)
return;
if (png_ptr->bit_depth < 8)
png_ptr->transformations |= PNG_PACKSWAP;
}
@ -67,7 +79,9 @@ void PNGAPI
png_set_shift(png_structp png_ptr, png_color_8p true_bits)
{
png_debug(1, "in png_set_shift");
if (png_ptr == NULL) return;
if (png_ptr == NULL)
return;
png_ptr->transformations |= PNG_SHIFT;
png_ptr->shift = *true_bits;
}
@ -79,6 +93,7 @@ int PNGAPI
png_set_interlace_handling(png_structp png_ptr)
{
png_debug(1, "in png_set_interlace handling");
if (png_ptr && png_ptr->interlaced)
{
png_ptr->transformations |= PNG_INTERLACE;
@ -99,9 +114,11 @@ void PNGAPI
png_set_filler(png_structp png_ptr, png_uint_32 filler, int filler_loc)
{
png_debug(1, "in png_set_filler");
if (png_ptr == NULL) return;
if (png_ptr == NULL)
return;
png_ptr->transformations |= PNG_FILLER;
png_ptr->filler = (png_byte)filler;
png_ptr->filler = (png_uint_16)filler;
if (filler_loc == PNG_FILLER_AFTER)
png_ptr->flags |= PNG_FLAG_FILLER_AFTER;
else
@ -126,17 +143,17 @@ png_set_filler(png_structp png_ptr, png_uint_32 filler, int filler_loc)
}
}
#if !defined(PNG_1_0_X)
/* Added to libpng-1.2.7 */
void PNGAPI
png_set_add_alpha(png_structp png_ptr, png_uint_32 filler, int filler_loc)
{
png_debug(1, "in png_set_add_alpha");
if (png_ptr == NULL) return;
if (png_ptr == NULL)
return;
png_set_filler(png_ptr, filler, filler_loc);
png_ptr->transformations |= PNG_ADD_ALPHA;
}
#endif
#endif
@ -146,7 +163,9 @@ void PNGAPI
png_set_swap_alpha(png_structp png_ptr)
{
png_debug(1, "in png_set_swap_alpha");
if (png_ptr == NULL) return;
if (png_ptr == NULL)
return;
png_ptr->transformations |= PNG_SWAP_ALPHA;
}
#endif
@ -157,7 +176,9 @@ void PNGAPI
png_set_invert_alpha(png_structp png_ptr)
{
png_debug(1, "in png_set_invert_alpha");
if (png_ptr == NULL) return;
if (png_ptr == NULL)
return;
png_ptr->transformations |= PNG_INVERT_ALPHA;
}
#endif
@ -167,22 +188,21 @@ void PNGAPI
png_set_invert_mono(png_structp png_ptr)
{
png_debug(1, "in png_set_invert_mono");
if (png_ptr == NULL) return;
if (png_ptr == NULL)
return;
png_ptr->transformations |= PNG_INVERT_MONO;
}
/* invert monochrome grayscale data */
/* Invert monochrome grayscale data */
void /* PRIVATE */
png_do_invert(png_row_infop row_info, png_bytep row)
{
png_debug(1, "in png_do_invert");
/* This test removed from libpng version 1.0.13 and 1.2.0:
* if (row_info->bit_depth == 1 &&
*/
#if defined(PNG_USELESS_TESTS_SUPPORTED)
if (row == NULL || row_info == NULL)
return;
#endif
if (row_info->color_type == PNG_COLOR_TYPE_GRAY)
{
png_bytep rp = row;
@ -226,15 +246,13 @@ png_do_invert(png_row_infop row_info, png_bytep row)
#endif
#if defined(PNG_READ_SWAP_SUPPORTED) || defined(PNG_WRITE_SWAP_SUPPORTED)
/* swaps byte order on 16 bit depth images */
/* Swaps byte order on 16 bit depth images */
void /* PRIVATE */
png_do_swap(png_row_infop row_info, png_bytep row)
{
png_debug(1, "in png_do_swap");
if (
#if defined(PNG_USELESS_TESTS_SUPPORTED)
row != NULL && row_info != NULL &&
#endif
row_info->bit_depth == 16)
{
png_bytep rp = row;
@ -357,15 +375,13 @@ static PNG_CONST png_byte fourbppswaptable[256] = {
0x8F, 0x9F, 0xAF, 0xBF, 0xCF, 0xDF, 0xEF, 0xFF
};
/* swaps pixel packing order within bytes */
/* Swaps pixel packing order within bytes */
void /* PRIVATE */
png_do_packswap(png_row_infop row_info, png_bytep row)
{
png_debug(1, "in png_do_packswap");
if (
#if defined(PNG_USELESS_TESTS_SUPPORTED)
row != NULL && row_info != NULL &&
#endif
row_info->bit_depth < 8)
{
png_bytep rp, end, table;
@ -389,14 +405,12 @@ png_do_packswap(png_row_infop row_info, png_bytep row)
#if defined(PNG_WRITE_FILLER_SUPPORTED) || \
defined(PNG_READ_STRIP_ALPHA_SUPPORTED)
/* remove filler or alpha byte(s) */
/* Remove filler or alpha byte(s) */
void /* PRIVATE */
png_do_strip_filler(png_row_infop row_info, png_bytep row, png_uint_32 flags)
{
png_debug(1, "in png_do_strip_filler");
#if defined(PNG_USELESS_TESTS_SUPPORTED)
if (row != NULL && row_info != NULL)
#endif
{
png_bytep sp=row;
png_bytep dp=row;
@ -404,9 +418,9 @@ png_do_strip_filler(png_row_infop row_info, png_bytep row, png_uint_32 flags)
png_uint_32 i;
if ((row_info->color_type == PNG_COLOR_TYPE_RGB ||
(row_info->color_type == PNG_COLOR_TYPE_RGB_ALPHA &&
(flags & PNG_FLAG_STRIP_ALPHA))) &&
row_info->channels == 4)
(row_info->color_type == PNG_COLOR_TYPE_RGB_ALPHA &&
(flags & PNG_FLAG_STRIP_ALPHA))) &&
row_info->channels == 4)
{
if (row_info->bit_depth == 8)
{
@ -547,15 +561,13 @@ png_do_strip_filler(png_row_infop row_info, png_bytep row, png_uint_32 flags)
#endif
#if defined(PNG_READ_BGR_SUPPORTED) || defined(PNG_WRITE_BGR_SUPPORTED)
/* swaps red and blue bytes within a pixel */
/* Swaps red and blue bytes within a pixel */
void /* PRIVATE */
png_do_bgr(png_row_infop row_info, png_bytep row)
{
png_debug(1, "in png_do_bgr");
if (
#if defined(PNG_USELESS_TESTS_SUPPORTED)
row != NULL && row_info != NULL &&
#endif
(row_info->color_type & PNG_COLOR_MASK_COLOR))
{
png_uint_32 row_width = row_info->width;
@ -624,15 +636,16 @@ png_do_bgr(png_row_infop row_info, png_bytep row)
#endif /* PNG_READ_BGR_SUPPORTED or PNG_WRITE_BGR_SUPPORTED */
#if defined(PNG_READ_USER_TRANSFORM_SUPPORTED) || \
defined(PNG_WRITE_USER_TRANSFORM_SUPPORTED) || \
defined(PNG_LEGACY_SUPPORTED)
defined(PNG_WRITE_USER_TRANSFORM_SUPPORTED)
void PNGAPI
png_set_user_transform_info(png_structp png_ptr, png_voidp
user_transform_ptr, int user_transform_depth, int user_transform_channels)
{
png_debug(1, "in png_set_user_transform_info");
if (png_ptr == NULL) return;
#if defined(PNG_USER_TRANSFORM_PTR_SUPPORTED)
if (png_ptr == NULL)
return;
#ifdef PNG_USER_TRANSFORM_PTR_SUPPORTED
png_ptr->user_transform_ptr = user_transform_ptr;
png_ptr->user_transform_depth = (png_byte)user_transform_depth;
png_ptr->user_transform_channels = (png_byte)user_transform_channels;
@ -642,7 +655,6 @@ png_set_user_transform_info(png_structp png_ptr, png_voidp
"This version of libpng does not support user transform info");
#endif
}
#endif
/* This function returns a pointer to the user_transform_ptr associated with
* the user transform functions. The application should free any memory
@ -652,11 +664,14 @@ png_set_user_transform_info(png_structp png_ptr, png_voidp
png_voidp PNGAPI
png_get_user_transform_ptr(png_structp png_ptr)
{
if (png_ptr == NULL) return (NULL);
#if defined(PNG_USER_TRANSFORM_PTR_SUPPORTED)
if (png_ptr == NULL)
return (NULL);
#ifdef PNG_USER_TRANSFORM_PTR_SUPPORTED
return ((png_voidp)png_ptr->user_transform_ptr);
#else
return (NULL);
#endif
}
#endif /* PNG_READ_USER_TRANSFORM_SUPPORTED ||
PNG_WRITE_USER_TRANSFORM_SUPPORTED */
#endif /* PNG_READ_SUPPORTED || PNG_WRITE_SUPPORTED */

View File

@ -1 +0,0 @@
/* pnggvrd.c was removed from libpng-1.2.20. */

View File

@ -1,12 +1,15 @@
/* pngwio.c - functions for data output
*
* Last changed in libpng 1.2.30 [August 15, 2008]
* For conditions of distribution and use, see copyright notice in png.h
* Copyright (c) 1998-2008 Glenn Randers-Pehrson
* Last changed in libpng 1.4.0 [January 3, 2010]
* Copyright (c) 1998-2010 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.)
*
* This code is released under the libpng license.
* For conditions of distribution and use, see the disclaimer
* and license in png.h
*
* This file provides a location for all output. Users who need
* special handling are expected to write functions that have the same
* arguments as these and perform similar functions, but that possibly
@ -15,15 +18,17 @@
* them at run time with png_set_write_fn(...).
*/
#define PNG_INTERNAL
#define PNG_NO_PEDANTIC_WARNINGS
#include "png.h"
#ifdef PNG_WRITE_SUPPORTED
#include "pngpriv.h"
/* Write the data to whatever output you are using. The default routine
writes to a file pointer. Note that this routine sometimes gets called
with very small lengths, so you should implement some kind of simple
buffering if you are using unbuffered writes. This should never be asked
to write more than 64K on a 16 bit machine. */
* writes to a file pointer. Note that this routine sometimes gets called
* with very small lengths, so you should implement some kind of simple
* buffering if you are using unbuffered writes. This should never be asked
* to write more than 64K on a 16 bit machine.
*/
void /* PRIVATE */
png_write_data(png_structp png_ptr, png_bytep data, png_size_t length)
@ -34,32 +39,29 @@ png_write_data(png_structp png_ptr, png_bytep data, png_size_t length)
png_error(png_ptr, "Call to NULL write function");
}
#if !defined(PNG_NO_STDIO)
#ifdef PNG_STDIO_SUPPORTED
/* This is the function that does the actual writing of data. If you are
not writing to a standard C stream, you should create a replacement
write_data function and use it at run time with png_set_write_fn(), rather
than changing the library. */
* not writing to a standard C stream, you should create a replacement
* write_data function and use it at run time with png_set_write_fn(), rather
* than changing the library.
*/
#ifndef USE_FAR_KEYWORD
void PNGAPI
png_default_write_data(png_structp png_ptr, png_bytep data, png_size_t length)
{
png_uint_32 check;
if (png_ptr == NULL) return;
#if defined(_WIN32_WCE)
if ( !WriteFile((HANDLE)(png_ptr->io_ptr), data, length, &check, NULL) )
check = 0;
#else
if (png_ptr == NULL)
return;
check = fwrite(data, 1, length, (png_FILE_p)(png_ptr->io_ptr));
#endif
if (check != length)
png_error(png_ptr, "Write Error");
}
#else
/* this is the model-independent version. Since the standard I/O library
can't handle far buffers in the medium and small models, we have to copy
the data.
*/
/* This is the model-independent version. Since the standard I/O library
* can't handle far buffers in the medium and small models, we have to copy
* the data.
*/
#define NEAR_BUF_SIZE 1024
#define MIN(a,b) (a <= b ? a : b)
@ -71,18 +73,14 @@ png_default_write_data(png_structp png_ptr, png_bytep data, png_size_t length)
png_byte *near_data; /* Needs to be "png_byte *" instead of "png_bytep" */
png_FILE_p io_ptr;
if (png_ptr == NULL) return;
if (png_ptr == NULL)
return;
/* Check if data really is near. If so, use usual code. */
near_data = (png_byte *)CVT_PTR_NOCHECK(data);
io_ptr = (png_FILE_p)CVT_PTR(png_ptr->io_ptr);
if ((png_bytep)near_data == data)
{
#if defined(_WIN32_WCE)
if ( !WriteFile(io_ptr, near_data, length, &check, NULL) )
check = 0;
#else
check = fwrite(near_data, 1, length, io_ptr);
#endif
}
else
{
@ -93,17 +91,14 @@ png_default_write_data(png_structp png_ptr, png_bytep data, png_size_t length)
do
{
written = MIN(NEAR_BUF_SIZE, remaining);
png_memcpy(buf, data, written); /* copy far buffer to near buffer */
#if defined(_WIN32_WCE)
if ( !WriteFile(io_ptr, buf, written, &err, NULL) )
err = 0;
#else
png_memcpy(buf, data, written); /* Copy far buffer to near buffer */
err = fwrite(buf, 1, written, io_ptr);
#endif
if (err != written)
break;
else
check += err;
data += written;
remaining -= written;
}
@ -117,9 +112,10 @@ png_default_write_data(png_structp png_ptr, png_bytep data, png_size_t length)
#endif
/* This function is called to output any data pending writing (normally
to disk). After png_flush is called, there should be no data pending
writing in any buffers. */
#if defined(PNG_WRITE_FLUSH_SUPPORTED)
* to disk). After png_flush is called, there should be no data pending
* writing in any buffers.
*/
#ifdef PNG_WRITE_FLUSH_SUPPORTED
void /* PRIVATE */
png_flush(png_structp png_ptr)
{
@ -127,65 +123,72 @@ png_flush(png_structp png_ptr)
(*(png_ptr->output_flush_fn))(png_ptr);
}
#if !defined(PNG_NO_STDIO)
#ifdef PNG_STDIO_SUPPORTED
void PNGAPI
png_default_flush(png_structp png_ptr)
{
#if !defined(_WIN32_WCE)
png_FILE_p io_ptr;
#endif
if (png_ptr == NULL) return;
#if !defined(_WIN32_WCE)
if (png_ptr == NULL)
return;
io_ptr = (png_FILE_p)CVT_PTR((png_ptr->io_ptr));
if (io_ptr != NULL)
fflush(io_ptr);
#endif
fflush(io_ptr);
}
#endif
#endif
/* This function allows the application to supply new output functions for
libpng if standard C streams aren't being used.
This function takes as its arguments:
png_ptr - pointer to a png output data structure
io_ptr - pointer to user supplied structure containing info about
the output functions. May be NULL.
write_data_fn - pointer to a new output function that takes as its
arguments a pointer to a png_struct, a pointer to
data to be written, and a 32-bit unsigned int that is
the number of bytes to be written. The new write
function should call png_error(png_ptr, "Error msg")
to exit and output any fatal error messages.
flush_data_fn - pointer to a new flush function that takes as its
arguments a pointer to a png_struct. After a call to
the flush function, there should be no data in any buffers
or pending transmission. If the output method doesn't do
any buffering of ouput, a function prototype must still be
supplied although it doesn't have to do anything. If
PNG_WRITE_FLUSH_SUPPORTED is not defined at libpng compile
time, output_flush_fn will be ignored, although it must be
supplied for compatibility. */
* libpng if standard C streams aren't being used.
*
* This function takes as its arguments:
* png_ptr - pointer to a png output data structure
* io_ptr - pointer to user supplied structure containing info about
* the output functions. May be NULL.
* write_data_fn - pointer to a new output function that takes as its
* arguments a pointer to a png_struct, a pointer to
* data to be written, and a 32-bit unsigned int that is
* the number of bytes to be written. The new write
* function should call png_error(png_ptr, "Error msg")
* to exit and output any fatal error messages. May be
* NULL, in which case libpng's default function will
* be used.
* flush_data_fn - pointer to a new flush function that takes as its
* arguments a pointer to a png_struct. After a call to
* the flush function, there should be no data in any buffers
* or pending transmission. If the output method doesn't do
* any buffering of output, a function prototype must still be
* supplied although it doesn't have to do anything. If
* PNG_WRITE_FLUSH_SUPPORTED is not defined at libpng compile
* time, output_flush_fn will be ignored, although it must be
* supplied for compatibility. May be NULL, in which case
* libpng's default function will be used, if
* PNG_WRITE_FLUSH_SUPPORTED is defined. This is not
* a good idea if io_ptr does not point to a standard
* *FILE structure.
*/
void PNGAPI
png_set_write_fn(png_structp png_ptr, png_voidp io_ptr,
png_rw_ptr write_data_fn, png_flush_ptr output_flush_fn)
{
if (png_ptr == NULL) return;
if (png_ptr == NULL)
return;
png_ptr->io_ptr = io_ptr;
#if !defined(PNG_NO_STDIO)
#ifdef PNG_STDIO_SUPPORTED
if (write_data_fn != NULL)
png_ptr->write_data_fn = write_data_fn;
else
png_ptr->write_data_fn = png_default_write_data;
#else
png_ptr->write_data_fn = write_data_fn;
#endif
#if defined(PNG_WRITE_FLUSH_SUPPORTED)
#if !defined(PNG_NO_STDIO)
#ifdef PNG_WRITE_FLUSH_SUPPORTED
#ifdef PNG_STDIO_SUPPORTED
if (output_flush_fn != NULL)
png_ptr->output_flush_fn = output_flush_fn;
else
png_ptr->output_flush_fn = png_default_flush;
#else
@ -200,21 +203,23 @@ png_set_write_fn(png_structp png_ptr, png_voidp io_ptr,
png_warning(png_ptr,
"Attempted to set both read_data_fn and write_data_fn in");
png_warning(png_ptr,
"the same structure. Resetting read_data_fn to NULL.");
"the same structure. Resetting read_data_fn to NULL");
}
}
#if defined(USE_FAR_KEYWORD)
#if defined(_MSC_VER)
#ifdef USE_FAR_KEYWORD
#ifdef _MSC_VER
void *png_far_to_near(png_structp png_ptr, png_voidp ptr, int check)
{
void *near_ptr;
void FAR *far_ptr;
FP_OFF(near_ptr) = FP_OFF(ptr);
far_ptr = (void FAR *)near_ptr;
if (check != 0)
if (FP_SEG(ptr) != FP_SEG(far_ptr))
png_error(png_ptr, "segment lost in conversion");
return(near_ptr);
}
# else
@ -224,9 +229,11 @@ void *png_far_to_near(png_structp png_ptr, png_voidp ptr, int check)
void FAR *far_ptr;
near_ptr = (void FAR *)ptr;
far_ptr = (void FAR *)near_ptr;
if (check != 0)
if (far_ptr != ptr)
png_error(png_ptr, "segment lost in conversion");
return(near_ptr);
}
# endif

File diff suppressed because it is too large Load Diff

View File

@ -1,16 +1,20 @@
/* pngwtran.c - transforms the data in a row for PNG writers
*
* Last changed in libpng 1.2.9 April 14, 2006
* For conditions of distribution and use, see copyright notice in png.h
* Copyright (c) 1998-2006 Glenn Randers-Pehrson
* Last changed in libpng 1.4.1 [February 25, 2010]
* Copyright (c) 1998-2010 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.)
*
* This code is released under the libpng license.
* For conditions of distribution and use, see the disclaimer
* and license in png.h
*/
#define PNG_INTERNAL
#define PNG_NO_PEDANTIC_WARNINGS
#include "png.h"
#ifdef PNG_WRITE_SUPPORTED
#include "pngpriv.h"
/* Transform the data according to the user's wishes. The order of
* transformations is significant.
@ -23,10 +27,11 @@ png_do_write_transformations(png_structp png_ptr)
if (png_ptr == NULL)
return;
#if defined(PNG_WRITE_USER_TRANSFORM_SUPPORTED)
#ifdef PNG_WRITE_USER_TRANSFORM_SUPPORTED
if (png_ptr->transformations & PNG_USER_TRANSFORM)
if (png_ptr->write_user_transform_fn != NULL)
(*(png_ptr->write_user_transform_fn)) /* user write transform function */
(*(png_ptr->write_user_transform_fn)) /* User write transform
function */
(png_ptr, /* png_ptr */
&(png_ptr->row_info), /* row_info: */
/* png_uint_32 width; width of row */
@ -37,48 +42,48 @@ png_do_write_transformations(png_structp png_ptr)
/* png_byte pixel_depth; bits per pixel (depth*channels) */
png_ptr->row_buf + 1); /* start of pixel data for row */
#endif
#if defined(PNG_WRITE_FILLER_SUPPORTED)
#ifdef PNG_WRITE_FILLER_SUPPORTED
if (png_ptr->transformations & PNG_FILLER)
png_do_strip_filler(&(png_ptr->row_info), png_ptr->row_buf + 1,
png_ptr->flags);
#endif
#if defined(PNG_WRITE_PACKSWAP_SUPPORTED)
#ifdef PNG_WRITE_PACKSWAP_SUPPORTED
if (png_ptr->transformations & PNG_PACKSWAP)
png_do_packswap(&(png_ptr->row_info), png_ptr->row_buf + 1);
#endif
#if defined(PNG_WRITE_PACK_SUPPORTED)
#ifdef PNG_WRITE_PACK_SUPPORTED
if (png_ptr->transformations & PNG_PACK)
png_do_pack(&(png_ptr->row_info), png_ptr->row_buf + 1,
(png_uint_32)png_ptr->bit_depth);
#endif
#if defined(PNG_WRITE_SWAP_SUPPORTED)
#ifdef PNG_WRITE_SWAP_SUPPORTED
if (png_ptr->transformations & PNG_SWAP_BYTES)
png_do_swap(&(png_ptr->row_info), png_ptr->row_buf + 1);
#endif
#if defined(PNG_WRITE_SHIFT_SUPPORTED)
#ifdef PNG_WRITE_SHIFT_SUPPORTED
if (png_ptr->transformations & PNG_SHIFT)
png_do_shift(&(png_ptr->row_info), png_ptr->row_buf + 1,
&(png_ptr->shift));
#endif
#if defined(PNG_WRITE_SWAP_ALPHA_SUPPORTED)
#ifdef PNG_WRITE_SWAP_ALPHA_SUPPORTED
if (png_ptr->transformations & PNG_SWAP_ALPHA)
png_do_write_swap_alpha(&(png_ptr->row_info), png_ptr->row_buf + 1);
#endif
#if defined(PNG_WRITE_INVERT_ALPHA_SUPPORTED)
#ifdef PNG_WRITE_INVERT_ALPHA_SUPPORTED
if (png_ptr->transformations & PNG_INVERT_ALPHA)
png_do_write_invert_alpha(&(png_ptr->row_info), png_ptr->row_buf + 1);
#endif
#if defined(PNG_WRITE_BGR_SUPPORTED)
#ifdef PNG_WRITE_BGR_SUPPORTED
if (png_ptr->transformations & PNG_BGR)
png_do_bgr(&(png_ptr->row_info), png_ptr->row_buf + 1);
#endif
#if defined(PNG_WRITE_INVERT_SUPPORTED)
#ifdef PNG_WRITE_INVERT_SUPPORTED
if (png_ptr->transformations & PNG_INVERT_MONO)
png_do_invert(&(png_ptr->row_info), png_ptr->row_buf + 1);
#endif
}
#if defined(PNG_WRITE_PACK_SUPPORTED)
#ifdef PNG_WRITE_PACK_SUPPORTED
/* Pack pixels into bytes. Pass the true bit depth in bit_depth. The
* row_info bit depth should be 8 (one pixel per byte). The channels
* should be 1 (this only happens on grayscale and paletted images).
@ -87,10 +92,8 @@ void /* PRIVATE */
png_do_pack(png_row_infop row_info, png_bytep row, png_uint_32 bit_depth)
{
png_debug(1, "in png_do_pack");
if (row_info->bit_depth == 8 &&
#if defined(PNG_USELESS_TESTS_SUPPORTED)
row != NULL && row_info != NULL &&
#endif
row_info->channels == 1)
{
switch ((int)bit_depth)
@ -201,7 +204,7 @@ png_do_pack(png_row_infop row_info, png_bytep row, png_uint_32 bit_depth)
}
#endif
#if defined(PNG_WRITE_SHIFT_SUPPORTED)
#ifdef PNG_WRITE_SHIFT_SUPPORTED
/* Shift pixel values to take advantage of whole range. Pass the
* true number of bits in bit_depth. The row should be packed
* according to row_info->bit_depth. Thus, if you had a row of
@ -213,11 +216,8 @@ void /* PRIVATE */
png_do_shift(png_row_infop row_info, png_bytep row, png_color_8p bit_depth)
{
png_debug(1, "in png_do_shift");
#if defined(PNG_USELESS_TESTS_SUPPORTED)
if (row != NULL && row_info != NULL &&
#else
if (
#endif
row_info->color_type != PNG_COLOR_TYPE_PALETTE)
{
int shift_start[4], shift_dec[4];
@ -248,7 +248,7 @@ png_do_shift(png_row_infop row_info, png_bytep row, png_color_8p bit_depth)
channels++;
}
/* with low row depths, could only be grayscale, so one channel */
/* With low row depths, could only be grayscale, so one channel */
if (row_info->bit_depth < 8)
{
png_bytep bp = row;
@ -332,14 +332,12 @@ png_do_shift(png_row_infop row_info, png_bytep row, png_color_8p bit_depth)
}
#endif
#if defined(PNG_WRITE_SWAP_ALPHA_SUPPORTED)
#ifdef PNG_WRITE_SWAP_ALPHA_SUPPORTED
void /* PRIVATE */
png_do_write_swap_alpha(png_row_infop row_info, png_bytep row)
{
png_debug(1, "in png_do_write_swap_alpha");
#if defined(PNG_USELESS_TESTS_SUPPORTED)
if (row != NULL && row_info != NULL)
#endif
{
if (row_info->color_type == PNG_COLOR_TYPE_RGB_ALPHA)
{
@ -420,14 +418,12 @@ png_do_write_swap_alpha(png_row_infop row_info, png_bytep row)
}
#endif
#if defined(PNG_WRITE_INVERT_ALPHA_SUPPORTED)
#ifdef PNG_WRITE_INVERT_ALPHA_SUPPORTED
void /* PRIVATE */
png_do_write_invert_alpha(png_row_infop row_info, png_bytep row)
{
png_debug(1, "in png_do_write_invert_alpha");
#if defined(PNG_USELESS_TESTS_SUPPORTED)
if (row != NULL && row_info != NULL)
#endif
{
if (row_info->color_type == PNG_COLOR_TYPE_RGB_ALPHA)
{
@ -439,7 +435,7 @@ png_do_write_invert_alpha(png_row_infop row_info, png_bytep row)
png_uint_32 row_width = row_info->width;
for (i = 0, sp = dp = row; i < row_width; i++)
{
/* does nothing
/* Does nothing
*(dp++) = *(sp++);
*(dp++) = *(sp++);
*(dp++) = *(sp++);
@ -457,7 +453,7 @@ png_do_write_invert_alpha(png_row_infop row_info, png_bytep row)
for (i = 0, sp = dp = row; i < row_width; i++)
{
/* does nothing
/* Does nothing
*(dp++) = *(sp++);
*(dp++) = *(sp++);
*(dp++) = *(sp++);
@ -495,7 +491,7 @@ png_do_write_invert_alpha(png_row_infop row_info, png_bytep row)
for (i = 0, sp = dp = row; i < row_width; i++)
{
/* does nothing
/* Does nothing
*(dp++) = *(sp++);
*(dp++) = *(sp++);
*/
@ -509,16 +505,14 @@ png_do_write_invert_alpha(png_row_infop row_info, png_bytep row)
}
#endif
#if defined(PNG_MNG_FEATURES_SUPPORTED)
/* undoes intrapixel differencing */
#ifdef PNG_MNG_FEATURES_SUPPORTED
/* Undoes intrapixel differencing */
void /* PRIVATE */
png_do_write_intrapixel(png_row_infop row_info, png_bytep row)
{
png_debug(1, "in png_do_write_intrapixel");
if (
#if defined(PNG_USELESS_TESTS_SUPPORTED)
row != NULL && row_info != NULL &&
#endif
(row_info->color_type & PNG_COLOR_MASK_COLOR))
{
int bytes_per_pixel;

File diff suppressed because it is too large Load Diff

View File

@ -1,22 +0,0 @@
This project builds a shared library version of libpng on x86 BeOS.
It defines PNG_USE_PNGGCCRD, which activates the assembly code in
pnggccrd.c; this hasn't been extensively tested on BeOS.
To install:
1) build
Note: As of version 1.0.10, you'll get a fair number of warnings when
you compile pnggccrd.c. As far as I know, these are harmless,
but it would be better if someone fixed them.
2) copy and png.h, pngconf.h somewhere; /boot/home/config/include (which
you'll have to make) is a good choice
3) copy libpng.so to /boot/home/config/lib
4) build your libpng.so applications (remember to include libz.a as
well when you link)
- Chris Herborth, March 27, 2001

View File

@ -1,22 +0,0 @@
This project builds a static library version of libpng on x86 BeOS.
It defines PNG_USE_PNGGCCRD, which activates the assembly code in
pnggccrd.c; this hasn't been extensively tested on BeOS.
To install:
1) build
Note: As of version 1.0.10, you'll get a fair number of warnings when
you compile pnggccrd.c. As far as I know, these are harmless,
but it would be better if someone fixed them.
2) copy and png.h, pngconf.h somewhere; /boot/home/config/include (which
you'll have to make) is a good choice
3) copy libpng.a to /boot/home/config/lib
4) build your libpng.a applications (remember to include libz.a as
well when you link)
- Chris Herborth, March 27, 2001

View File

@ -1,22 +0,0 @@
USEUNIT("libpng.cpp");
USEUNIT("..\..\png.c");
USEUNIT("..\..\pngerror.c");
USEUNIT("..\..\pngget.c");
USEUNIT("..\..\pngmem.c");
USEUNIT("..\..\pngpread.c");
USEUNIT("..\..\pngread.c");
USEUNIT("..\..\pngrio.c");
USEUNIT("..\..\pngrtran.c");
USEUNIT("..\..\pngrutil.c");
USEUNIT("..\..\pngset.c");
USEUNIT("..\..\pngtrans.c");
USEUNIT("..\..\pngwio.c");
USEUNIT("..\..\pngwrite.c");
USEUNIT("..\..\pngwtran.c");
USEUNIT("..\..\pngwutil.c");
USELIB("..\..\..\zlib\zlib.lib");
//---------------------------------------------------------------------------
This file is used by the project manager only and should be treated like the project file
DllEntryPoint

View File

@ -1,25 +0,0 @@
#------------------------------------------------------------------------------
VERSION = BWS.01
#------------------------------------------------------------------------------
!ifndef ROOT
ROOT = $(MAKEDIR)\..
!endif
#------------------------------------------------------------------------------
MAKE = $(ROOT)\bin\make.exe -$(MAKEFLAGS) -f$**
DCC = $(ROOT)\bin\dcc32.exe $**
BRCC = $(ROOT)\bin\brcc32.exe $**
#------------------------------------------------------------------------------
PROJECTS = libpngstat.lib libpng.dll
#------------------------------------------------------------------------------
default: $(PROJECTS)
#------------------------------------------------------------------------------
libpngstat.lib: libpngstat.bpr
$(ROOT)\bin\bpr2mak -t$(ROOT)\bin\deflib.bmk $**
$(ROOT)\bin\make -$(MAKEFLAGS) -f$*.mak
libpng.dll: libpng.bpr
$(ROOT)\bin\bpr2mak $**
$(ROOT)\bin\make -$(MAKEFLAGS) -f$*.mak

View File

@ -1,157 +0,0 @@
<?xml version='1.0' encoding='utf-8' ?>
<!-- C++Builder XML Project -->
<PROJECT>
<MACROS>
<VERSION value="BCB.05.03"/>
<PROJECT value="libpng.dll"/>
<OBJFILES value="libpng.obj ..\..\pngwutil.obj ..\..\pngerror.obj ..\..\pngget.obj
..\..\pngmem.obj ..\..\pngpread.obj ..\..\pngread.obj ..\..\pngrio.obj
..\..\pngrtran.obj ..\..\pngrutil.obj ..\..\pngset.obj ..\..\pngtrans.obj
..\..\pngwio.obj ..\..\pngwrite.obj ..\..\pngwtran.obj ..\..\png.obj"/>
<RESFILES value=""/>
<DEFFILE value=""/>
<RESDEPEN value="$(RESFILES)"/>
<LIBFILES value="..\..\..\zlib\zlib.lib"/>
<LIBRARIES value="bcbsmp50.lib dclocx50.lib NMFast50.lib Tee50.lib Vclx50.lib Vcl50.lib"/>
<SPARELIBS value="Vcl50.lib Vclx50.lib Tee50.lib NMFast50.lib dclocx50.lib bcbsmp50.lib"/>
<PACKAGES value="Vcl50.bpi Vclx50.bpi bcbsmp50.bpi Qrpt50.bpi Vcldb50.bpi Vclbde50.bpi
ibsmp50.bpi vcldbx50.bpi TeeUI50.bpi TeeDB50.bpi Tee50.bpi TeeQR50.bpi
VCLIB50.bpi bcbie50.bpi vclie50.bpi Inetdb50.bpi Inet50.bpi NMFast50.bpi
dclocx50.bpi bcb97axserver50.bpi SIMULUSCOMPONENTS.bpi Simulus2.bpi"/>
<PATHCPP value=".;..\.."/>
<PATHPAS value=".;"/>
<PATHRC value=".;"/>
<PATHASM value=".;"/>
<DEBUGLIBPATH value="$(BCB)\lib\debug"/>
<RELEASELIBPATH value="$(BCB)\lib\release"/>
<LINKER value="tlink32"/>
<USERDEFINES value="PNG_BUILD_DLL;PNG_NO_MODULEDEF"/>
<SYSDEFINES value="NO_STRICT;_NO_VCL;_RTLDLL"/>
<MAINSOURCE value="libpng.bpf"/>
<INCLUDEPATH value="..\..;..\..\..\zlib;$(BCB)\include"/>
<LIBPATH value="..\..;$(BCB)\lib\obj;$(BCB)\lib"/>
<WARNINGS value="-w8092 -w8091 -w8090 -w8089 -w8087 -wprc -wucp -wstv -wstu -wsig -wpin
-wnod -wnak -wdef -wcln -wbbf -wasm -wamp -wamb"/>
</MACROS>
<OPTIONS>
<CFLAG1 value="-WD -O2 -w -Vx -Ve -x- -RT- -X- -a8 -5 -b- -d -k- -vi -tWD -tWM -c"/>
<PFLAGS value="-$Y- -$L- -$D- -$C- -v -JPHNE -M"/>
<RFLAGS value=""/>
<AFLAGS value="/mx /w2 /zn"/>
<LFLAGS value="-D&quot;&quot; -aa -Tpd -x -Gn -Gi -w"/>
</OPTIONS>
<LINKER>
<ALLOBJ value="c0d32.obj $(OBJFILES)"/>
<ALLRES value="$(RESFILES)"/>
<ALLLIB value="$(LIBFILES) $(LIBRARIES) import32.lib cw32mti.lib"/>
</LINKER>
<IDEOPTIONS>
[Version Info]
IncludeVerInfo=0
AutoIncBuild=0
MajorVer=1
MinorVer=0
Release=0
Build=0
Debug=0
PreRelease=0
Special=0
Private=0
DLL=1
Locale=2057
CodePage=1252
[Version Info Keys]
CompanyName=
FileDescription=
FileVersion=1.0.0.0
InternalName=
LegalCopyright=
LegalTrademarks=
OriginalFilename=
ProductName=
ProductVersion=
Comments=
[HistoryLists\hlIncludePath]
Count=18
Item0=..\..;..\..\..\zlib;$(BCB)\include
Item1=..\..;P:\My Documents\Source\PNG+ZLib\zlib;$(BCB)\include
Item2=..\..;..\Source\ThirdParty\PortableNetworkGraphics\external;..\Source\ThirdParty\PortableNetworkGraphics;..\Source\ThirdParty\ZLibCompression\external;$(BCB)\include
Item3=..\Source\ThirdParty\PortableNetworkGraphics\external;..\Source\ThirdParty\PortableNetworkGraphics;..\Source\ThirdParty\ZLibCompression\external;$(BCB)\include
Item4=..\Source\ThirdParty\PortableNetworkGraphics\external;..\Source\ThirdParty\PortableNetworkGraphics;..\Source\ThirdParty\ZLibCompression;$(BCB)\include
Item5=..\Source\ThirdParty\PortableNetworkGraphics;..\Source\ThirdParty\ZLibCompression;$(BCB)\include
Item6=..\Source\ThirdParty\PortableNetworkGraphics;P:\Development\Source\ThirdParty\ZLibCompression;$(BCB)\include
Item7=..\Source\ThirdParty\PortableNetworkGraphics;$(BCB)\include
Item8=$(BCB)\include
Item9=..\Source;..\Source\General\Templates;..\Source\SIMUtilities;$(BCB)\include;$(BCB)\include\vcl
Item10=P:\Development\Source\;P:\Development\Source\General\Templates\;P:\Development\Source\SIMUtilities\;$(BCB)\include;$(BCB)\include\vcl
Item11=P:\Development\Source;P:\Development\Source\General\Templates\;P:\Development\Source\SIMUtilities\;$(BCB)\include;$(BCB)\include\vcl
Item12=P:\Development\Source\General\Templates\;P:\Development\Source\SIMUtilities\;$(BCB)\include;$(BCB)\include\vcl
Item13=P:\Development\Source\General\Templates\;P:\Development\Source\SIMUtilities;$(BCB)\include;$(BCB)\include\vcl
Item14=P:\Development\Source\General\Templates\;$(BCB)\include;$(BCB)\include\vcl
Item15=P:\Development\Source\General\Templates;$(BCB)\include;$(BCB)\include\vcl
Item16=P:\Development\Source;$(BCB)\include;$(BCB)\include\vcl
Item17=$(BCB)\include;$(BCB)\include\vcl
[HistoryLists\hlLibraryPath]
Count=10
Item0=..\..;$(BCB)\lib\obj;$(BCB)\lib
Item1=..\..;..\Source\ThirdParty\PortableNetworkGraphics\external;..\Source\ThirdParty\PortableNetworkGraphics;$(BCB)\lib\obj;$(BCB)\lib
Item2=..\Source\ThirdParty\PortableNetworkGraphics\external;..\Source\ThirdParty\PortableNetworkGraphics;$(BCB)\lib\obj;$(BCB)\lib
Item3=..\Source\ThirdParty\PortableNetworkGraphics;$(BCB)\lib\obj;$(BCB)\lib
Item4=$(BCB)\lib\obj;$(BCB)\lib
Item5=..\Source\SIMUtilities;..\Source;$(BCB)\lib\obj;$(BCB)\lib
Item6=P:\Development\Source\SIMUtilities\;P:\Development\Source\;$(BCB)\lib\obj;$(BCB)\lib
Item7=P:\Development\Source\SIMUtilities;P:\Development\Source\;$(BCB)\lib\obj;$(BCB)\lib
Item8=P:\Development\Source\;$(BCB)\lib\obj;$(BCB)\lib
Item9=P:\Development\Source;$(BCB)\lib\obj;$(BCB)\lib
[HistoryLists\hlDebugSourcePath]
Count=1
Item0=$(BCB)\source\vcl
[HistoryLists\hlConditionals]
Count=20
Item0=ZLIB_DLL;Z_PREFIX;PNG_BUILD_DLL;PNG_NO_MODULEDEF
Item1=_DEBUG;ZLIB_DLL;Z_PREFIX;PNG_BUILD_DLL;PNG_NO_MODULEDEF
Item2=PNG_BUILD_DLL;ZLIB_DLL;_DEBUG;PNG_NO_MODULEDEF
Item3=PNG_BUILD_DLL;ZLIB_DLL;_DEBUG;PNG_DEBUG=5;PNG_NO_MODULEDEF;PNG_NO_GLOBAL_ARRAYS
Item4=PNG_BUILD_DLL;ZLIB_DLL;_DEBUG;PNG_DEBUG=5;PNG_NO_MODULEDEF;PNG_SETJMP_NOT_SUPPORTED;PNG_DEBUG_FILE=stderr
Item5=PNG_BUILD_DLL;ZLIB_DLL;_DEBUG;PNG_DEBUG;PNG_NO_MODULEDEF;PNG_SETJMP_NOT_SUPPORTED
Item6=PNG_BUILD_DLL;ZLIB_DLL;_DEBUG;PNG_DEBUG=5;PNG_NO_MODULEDEF;PNG_SETJMP_NOT_SUPPORTED
Item7=PNG_BUILD_DLL;ZLIB_DLL;_DEBUG;PNG_DEBUG=5;PNG_NO_MODULEDEF
Item8=PNG_BUILD_DLL;ZLIB_DLL;_DEBUG;PNG_DEBUG=5
Item9=PNG_BUILD_DLL;ZLIB_DLL;_DEBUG
Item10=PNG_BUILD_DLL;ZLIB_DLL
Item11=PNG_BUILD_DLL
Item12=PNG_DLL;PNG_BUILD_DLL;ZLIB_DLL
Item13=PNG_DLL;PNG_BUILD_DLL;PNG_NO_GLOBAL_ARRAYS;ZLIB_DLL
Item14=PNG_DLL;PNG_BUILD_DLL;PNG_NO_GLOBAL_ARRAYS
Item15=PNG_DLL;PNG_BUILD_DLL
Item16=PNG_DLL;PNG_BUILD_DLL;PNG_MODULEDEF
Item17=_HTML_FORM
Item18=_DEBUG;_HTML_FORM
Item19=_DEBUG
[HistoryLists\hlIntOutputDir]
Count=2
Item0=..\Obj
Item1=P:\Development\Obj
[Debugging]
DebugSourceDirs=
[Parameters]
RunParams=
HostApplication=P:\Development\Executables\LibPNGTestApp.exe
RemoteHost=
RemotePath=
RemoteDebug=0
[Compiler]
ShowInfoMsgs=0
LinkDebugVcl=0
LinkCGLIB=0
</IDEOPTIONS>
</PROJECT>

View File

@ -1,29 +0,0 @@
//---------------------------------------------------------------------------
#include <windows.h>
//---------------------------------------------------------------------------
// Important note about DLL memory management when your DLL uses the
// static version of the RunTime Library:
//
// If your DLL exports any functions that pass String objects (or structs/
// classes containing nested Strings) as parameter or function results,
// you will need to add the library MEMMGR.LIB to both the DLL project and
// any other projects that use the DLL. You will also need to use MEMMGR.LIB
// if any other projects which use the DLL will be performing new or delete
// operations on any non-TObject-derived classes which are exported from the
// DLL. Adding MEMMGR.LIB to your project will change the DLL and its calling
// EXE's to use the BORLNDMM.DLL as their memory manager. In these cases,
// the file BORLNDMM.DLL should be deployed along with your DLL.
//
// To avoid using BORLNDMM.DLL, pass string information using "char *" or
// ShortString parameters.
//
// If your DLL uses the dynamic version of the RTL, you do not need to
// explicitly add MEMMGR.LIB as this will be done implicitly for you
//---------------------------------------------------------------------------
int WINAPI DllEntryPoint(HINSTANCE, unsigned long, void*)
{
return 1;
}
//---------------------------------------------------------------------------

View File

@ -1,25 +0,0 @@
Project files to build libpng using Borland C++ Builder v5.0
In order to build and use libpng, please follow these steps:
1). Install zlib in a directory at the same level with libpng.
2). In a console window, go to the zlib directory and type:
make -f win32\Makefile.bor
After performing this step, you should have a file named
zlib.lib in the zlib directory.
3). Add the following conditional define to your project:
PNG_USE_DLL
4). Add libpng.lib or libpngstat.lib to the project.
Build the project.
5). If the build fails, add the paths to png.h and zlib.h to
your include path, and restart the build.
By default, the libpng project uses zlib as a static library. If
you wish to use zlib as a DLL, please read the important notes from
the zlib DLL FAQ, found inside the zlib distribution.
See the libpng documentation for instructions on how to use the code.

View File

@ -1,22 +0,0 @@
USEUNIT("..\..\png.c");
USEUNIT("..\..\pngerror.c");
USEUNIT("..\..\pngget.c");
USEUNIT("..\..\pngmem.c");
USEUNIT("..\..\pngpread.c");
USEUNIT("..\..\pngread.c");
USEUNIT("..\..\pngrio.c");
USEUNIT("..\..\pngrtran.c");
USEUNIT("..\..\pngrutil.c");
USEUNIT("..\..\pngset.c");
USEUNIT("..\..\pngtrans.c");
USEUNIT("..\..\pngwio.c");
USEUNIT("..\..\pngwrite.c");
USEUNIT("..\..\pngwtran.c");
USEUNIT("..\..\pngwutil.c");
USELIB("..\..\..\zlib\zlib.lib");
//---------------------------------------------------------------------------
#define Library
// To add a file to the library use the Project menu 'Add to Project'.

View File

@ -1,109 +0,0 @@
<?xml version='1.0' encoding='utf-8' ?>
<!-- C++Builder XML Project -->
<PROJECT>
<MACROS>
<VERSION value="BCB.05.03"/>
<PROJECT value="libpngstat.lib"/>
<OBJFILES value="..\..\pngerror.obj ..\..\png.obj ..\..\pngwutil.obj ..\..\pngmem.obj
..\..\pngpread.obj ..\..\pngread.obj ..\..\pngrio.obj ..\..\pngrtran.obj
..\..\pngrutil.obj ..\..\pngset.obj ..\..\pngtrans.obj ..\..\pngwio.obj
..\..\pngwrite.obj ..\..\pngwtran.obj ..\..\pngget.obj"/>
<RESFILES value=""/>
<DEFFILE value=""/>
<RESDEPEN value="$(RESFILES)"/>
<LIBFILES value="..\..\..\zlib\zlib.lib"/>
<LIBRARIES value=""/>
<PACKAGES value=""/>
<PATHCPP value=".;..\.."/>
<PATHPAS value=".;"/>
<PATHRC value=".;"/>
<PATHASM value=".;"/>
<LINKER value="TLib"/>
<USERDEFINES value=""/>
<SYSDEFINES value="_RTLDLL;NO_STRICT"/>
<MAINSOURCE value="libpngstat.bpf"/>
<INCLUDEPATH value="..\..;..\..\..\zlib;$(BCB)\include"/>
<LIBPATH value="..\..;$(BCB)\lib\obj;$(BCB)\lib"/>
<WARNINGS value="-w-par"/>
<LISTFILE value=""/>
</MACROS>
<OPTIONS>
<CFLAG1 value="-O2 -w -Vx -Ve -X- -a8 -5 -b- -d -k- -vi -c -tW -tWM"/>
<PFLAGS value="-$Y- -$L- -$D- -$C- -v -JPHNE -M"/>
<AFLAGS value="/mx /w2 /zn"/>
<LFLAGS value=""/>
</OPTIONS>
<LINKER>
<ALLOBJ value="$(OBJFILES)"/>
<ALLLIB value=""/>
</LINKER>
<IDEOPTIONS>
[Version Info]
IncludeVerInfo=0
AutoIncBuild=0
MajorVer=1
MinorVer=0
Release=0
Build=0
Debug=0
PreRelease=0
Special=0
Private=0
DLL=0
Locale=2057
CodePage=1252
[Version Info Keys]
CompanyName=
FileDescription=
FileVersion=1.0.0.0
InternalName=
LegalCopyright=
LegalTrademarks=
OriginalFilename=
ProductName=
ProductVersion=1.0.0.0
Comments=
[HistoryLists\hlIncludePath]
Count=2
Item0=..\..;P:\My Documents\Source\PNG+ZLib\zlib;$(BCB)\include
Item1=..\..;$(BCB)\include;$(BCB)\include\vcl
[HistoryLists\hlLibraryPath]
Count=1
Item0=..\..;$(BCB)\lib\obj;$(BCB)\lib
[HistoryLists\hlDebugSourcePath]
Count=1
Item0=$(BCB)\source\vcl
[HistoryLists\hlConditionals]
Count=1
Item0=_DEBUG
[HistoryLists\hlTlibPageSize]
Count=1
Item0=0x0010
[Debugging]
DebugSourceDirs=$(BCB)\source\vcl
[Parameters]
RunParams=
HostApplication=
RemoteHost=
RemotePath=
RemoteDebug=0
[Compiler]
ShowInfoMsgs=0
LinkDebugVcl=0
LinkCGLIB=0
[Language]
ActiveLang=
ProjectLang=
RootDir=
</IDEOPTIONS>
</PROJECT>

View File

@ -1,14 +0,0 @@
The project that builds libpng under Borland C++ Builder does not
explicitly build zlib. By taking this decision, there is no need
to update the libpng project each time when there is a change in
the list of zlib source files. After all, this list is private to
zlib, and applications (such as libpng) should not assume anything
about it.
If you wish to contribute a project that builds zlib under Borland
C++ Builder, please submit it to the zlib developers, not to the
libpng developers.
By default, the libpng project uses zlib as a static library. If
you wish to use zlib as a DLL, please read the important notes from
the zlib DLL FAQ, found inside the zlib distribution.

View File

@ -1,6 +0,0 @@
A set of project files is available for Netware. Get
libpng-1.2.5-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.5-project-netware.zip"

View File

@ -2,8 +2,12 @@ Microsoft Developer Studio Project File, Format Version 6.00 for libpng.
Copyright (C) 2000-2004 Simon-Pierre Cadieux.
Copyright (C) 2004 Cosmin Truta.
This code is released under the libpng license.
For conditions of distribution and use, see copyright notice in png.h
NOTE: This project will be removed from libpng-1.5.0. It has
been replaced with the "vstudio" project.
Assumptions:
* The libpng source files are in ..\..
@ -31,15 +35,11 @@ To use:
This project builds the libpng binaries as follows:
* Win32_DLL_Release\libpng13.dll DLL build
* Win32_DLL_Debug\libpng13d.dll DLL build (debug version)
* Win32_DLL_ASM_Release\libpng13.dll DLL build using ASM code
* Win32_DLL_ASM_Debug\libpng13d.dll DLL build using ASM (debug version)
* Win32_DLL_VB\libpng13vb.dll DLL build for Visual Basic, using stdcall
* Win32_DLL_Release\libpng14.dll DLL build
* Win32_DLL_Debug\libpng14d.dll DLL build (debug version)
* Win32_DLL_VB\libpng14vb.dll DLL build for Visual Basic, using stdcall
* Win32_LIB_Release\libpng.lib static build
* Win32_LIB_Debug\libpngd.lib static build (debug version)
* Win32_LIB_ASM_Release\libpng.lib static build using ASM code
* Win32_LIB_ASM_Debug\libpngd.lib static build using ASM (debug version)
Notes:

View File

@ -20,13 +20,9 @@ CFG=libpng - Win32 DLL Release
!MESSAGE
!MESSAGE "libpng - Win32 DLL Release" (based on "Win32 (x86) Dynamic-Link Library")
!MESSAGE "libpng - Win32 DLL Debug" (based on "Win32 (x86) Dynamic-Link Library")
!MESSAGE "libpng - Win32 DLL ASM Release" (based on "Win32 (x86) Dynamic-Link Library")
!MESSAGE "libpng - Win32 DLL ASM Debug" (based on "Win32 (x86) Dynamic-Link Library")
!MESSAGE "libpng - Win32 DLL VB" (based on "Win32 (x86) Dynamic-Link Library")
!MESSAGE "libpng - Win32 LIB Release" (based on "Win32 (x86) Static Library")
!MESSAGE "libpng - Win32 LIB Debug" (based on "Win32 (x86) Static Library")
!MESSAGE "libpng - Win32 LIB ASM Release" (based on "Win32 (x86) Static Library")
!MESSAGE "libpng - Win32 LIB ASM Debug" (based on "Win32 (x86) Static Library")
!MESSAGE
# Begin Project
@ -50,20 +46,20 @@ CFG=libpng - Win32 DLL Release
CPP=cl.exe
# ADD BASE CPP /nologo /MD /W3 /O2 /D "WIN32" /D "NDEBUG" /FD /c
# SUBTRACT BASE CPP /YX /Yc /Yu
# ADD CPP /nologo /MD /W3 /O2 /I "..\.." /I "..\..\..\zlib" /D "WIN32" /D "NDEBUG" /D "PNG_BUILD_DLL" /D "PNG_NO_MMX_CODE" /D "ZLIB_DLL" /D "_CRT_SECURE_NO_WARNINGS" /FD /c
# ADD CPP /nologo /MD /W3 /O2 /I "..\.." /I "..\..\..\zlib" /D "WIN32" /D "NDEBUG" /D "PNG_BUILD_DLL" /D "ZLIB_DLL" /FD /c
# SUBTRACT CPP /YX /Yc /Yu
MTL=midl.exe
# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32
# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32
RSC=rc.exe
# ADD BASE RSC /l 0x409 /d "NDEBUG"
# ADD RSC /l 0x409 /i "..\.." /d "NDEBUG"
# ADD BASE RSC /l 0x409 /d "PNG_NO_PEDANTIC_WARNINGS" /d "NDEBUG"
# ADD RSC /l 0x409 /i "..\.." /d "PNG_NO_PEDANTIC_WARNINGS" /d "NDEBUG"
BSC32=bscmake.exe
# ADD BASE BSC32 /nologo
# ADD BSC32 /nologo
LINK32=link.exe
# ADD BASE LINK32 /nologo /dll /machine:I386
# ADD LINK32 zlib1.lib /nologo /dll /machine:I386 /out:"Win32_DLL_Release\libpng13.dll" /libpath:"..\..\..\zlib\projects\visualc6\Win32_DLL_Release"
# ADD LINK32 zlib1.lib /nologo /dll /machine:I386 /out:"Win32_DLL_Release\libpng14.dll" /libpath:"..\..\..\zlib\projects\visualc6\Win32_DLL_Release"
!ELSEIF "$(CFG)" == "libpng - Win32 DLL Debug"
@ -81,82 +77,20 @@ LINK32=link.exe
CPP=cl.exe
# ADD BASE CPP /nologo /MDd /W3 /Gm /ZI /Od /D "WIN32" /D "_DEBUG" /FD /GZ /c
# SUBTRACT BASE CPP /YX /Yc /Yu
# ADD CPP /nologo /MDd /W3 /Gm /ZI /Od /I "..\.." /I "..\..\..\zlib" /D "WIN32" /D "_DEBUG" /D "DEBUG" /D "PNG_NO_MMX_CODE" /D PNG_DEBUG=1 /D "PNG_BUILD_DLL" /D "ZLIB_DLL" /D "_CRT_SECURE_NO_WARNINGS" /FD /GZ /c
# ADD CPP /nologo /MDd /W3 /Gm /ZI /Od /I "..\.." /I "..\..\..\zlib" /D "WIN32" /D "_DEBUG" /D "DEBUG" /D PNG_DEBUG=1 /D "PNG_BUILD_DLL" /D "ZLIB_DLL" /FD /GZ /c
# SUBTRACT CPP /YX /Yc /Yu
MTL=midl.exe
# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32
# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32
RSC=rc.exe
# ADD BASE RSC /l 0x409 /d "_DEBUG"
# ADD RSC /l 0x409 /i "..\.." /d "_DEBUG" /d PNG_DEBUG=1
# ADD BASE RSC /l 0x409 /d "PNG_NO_PEDANTIC_WARNINGS" /d "_DEBUG"
# ADD RSC /l 0x409 /i "..\.." /d "PNG_NO_PEDANTIC_WARNINGS" /d "_DEBUG" /d PNG_DEBUG=1
BSC32=bscmake.exe
# ADD BASE BSC32 /nologo
# ADD BSC32 /nologo
LINK32=link.exe
# ADD BASE LINK32 /nologo /dll /debug /machine:I386 /pdbtype:sept
# ADD LINK32 zlib1d.lib /nologo /dll /debug /machine:I386 /out:"Win32_DLL_Debug\libpng13d.dll" /libpath:"..\..\..\zlib\projects\visualc6\Win32_DLL_Debug"
!ELSEIF "$(CFG)" == "libpng - Win32 DLL ASM Release"
# PROP BASE Use_MFC 0
# PROP BASE Use_Debug_Libraries 0
# PROP BASE Output_Dir "libpng___Win32_DLL_ASM_Release"
# PROP BASE Intermediate_Dir "libpng___Win32_DLL_ASM_Release"
# PROP BASE Target_Dir ""
# PROP Use_MFC 0
# PROP Use_Debug_Libraries 0
# PROP Output_Dir "Win32_DLL_ASM_Release"
# PROP Intermediate_Dir "Win32_DLL_ASM_Release"
# PROP Ignore_Export_Lib 0
# PROP Target_Dir ""
CPP=cl.exe
# ADD BASE CPP /nologo /MD /W3 /O2 /D "WIN32" /D "NDEBUG" /FD /c
# SUBTRACT BASE CPP /YX /Yc /Yu
# ADD CPP /nologo /MD /W3 /O2 /I "..\.." /I "..\..\..\zlib" /D "WIN32" /D "NDEBUG" /D "PNG_USE_PNGVCRD" /D "PNG_BUILD_DLL" /D "ZLIB_DLL" /D "PNG_LIBPNG_SPECIALBUILD" /D "_CRT_SECURE_NO_WARNINGS" /FD /c
# SUBTRACT CPP /YX /Yc /Yu
MTL=midl.exe
# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32
# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32
RSC=rc.exe
# ADD BASE RSC /l 0x409 /d "NDEBUG"
# ADD RSC /l 0x409 /i "..\.." /d "NDEBUG" /d PNG_LIBPNG_SPECIALBUILD=""""Use MMX instructions""""
BSC32=bscmake.exe
# ADD BASE BSC32 /nologo
# ADD BSC32 /nologo
LINK32=link.exe
# ADD BASE LINK32 /nologo /dll /machine:I386
# ADD LINK32 zlib1.lib /nologo /dll /machine:I386 /out:"Win32_DLL_ASM_Release\libpng13.dll" /libpath:"..\..\..\zlib\projects\visualc6\Win32_DLL_ASM_Release"
!ELSEIF "$(CFG)" == "libpng - Win32 DLL ASM Debug"
# PROP BASE Use_MFC 0
# PROP BASE Use_Debug_Libraries 1
# PROP BASE Output_Dir "libpng___Win32_DLL_ASM_Debug"
# PROP BASE Intermediate_Dir "libpng___Win32_DLL_ASM_Debug"
# PROP BASE Target_Dir ""
# PROP Use_MFC 0
# PROP Use_Debug_Libraries 1
# PROP Output_Dir "Win32_DLL_ASM_Debug"
# PROP Intermediate_Dir "Win32_DLL_ASM_Debug"
# PROP Ignore_Export_Lib 0
# PROP Target_Dir ""
CPP=cl.exe
# ADD BASE CPP /nologo /MDd /W3 /Gm /ZI /Od /D "WIN32" /D "_DEBUG" /FD /GZ /c
# SUBTRACT BASE CPP /YX /Yc /Yu
# ADD CPP /nologo /MDd /W3 /Gm /ZI /Od /I "..\.." /I "..\..\..\zlib" /D "WIN32" /D "_DEBUG" /D "DEBUG" /D PNG_DEBUG=1 /D "PNG_USE_PNGVCRD" /D "PNG_BUILD_DLL" /D "ZLIB_DLL" /D "PNG_LIBPNG_SPECIALBUILD" /D "_CRT_SECURE_NO_WARNINGS" /FD /GZ /c
# SUBTRACT CPP /YX /Yc /Yu
MTL=midl.exe
# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32
# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32
RSC=rc.exe
# ADD BASE RSC /l 0x409 /d "_DEBUG"
# ADD RSC /l 0x409 /i "..\.." /d "_DEBUG" /d PNG_DEBUG=1 /d PNG_LIBPNG_SPECIALBUILD=""""Use MMX instructions""""
BSC32=bscmake.exe
# ADD BASE BSC32 /nologo
# ADD BSC32 /nologo
LINK32=link.exe
# ADD BASE LINK32 /nologo /dll /debug /machine:I386 /pdbtype:sept
# ADD LINK32 zlib1d.lib /nologo /dll /debug /machine:I386 /out:"Win32_DLL_ASM_Debug\libpng13d.dll" /libpath:"..\..\..\zlib\projects\visualc6\Win32_DLL_ASM_Debug"
# ADD LINK32 zlib1d.lib /nologo /dll /debug /machine:I386 /out:"Win32_DLL_Debug\libpng14d.dll" /libpath:"..\..\..\zlib\projects\visualc6\Win32_DLL_Debug"
!ELSEIF "$(CFG)" == "libpng - Win32 DLL VB"
@ -174,23 +108,23 @@ LINK32=link.exe
CPP=cl.exe
# ADD BASE CPP /nologo /MD /W3 /O2 /D "WIN32" /D "NDEBUG" /FD /c
# SUBTRACT BASE CPP /YX /Yc /Yu
# ADD CPP /nologo /MD /W3 /O2 /I "..\.." /I "..\..\..\zlib" /D "WIN32" /D "NDEBUG" /D "PNG_BUILD_DLL" /D "ZLIB_DLL" /D PNGAPI=__stdcall /D "PNG_NO_MODULEDEF" /D "PNG_LIBPNG_SPECIALBUILD" /D "_CRT_SECURE_NO_WARNINGS" /FD /c
# ADD CPP /nologo /MD /W3 /O2 /I "..\.." /I "..\..\..\zlib" /D "WIN32" /D "NDEBUG" /D "PNG_BUILD_DLL" /D "ZLIB_DLL" /D PNGAPI=__stdcall /D "PNG_NO_MODULEDEF" /D "PNG_LIBPNG_SPECIALBUILD" /FD /c
# SUBTRACT CPP /YX /Yc /Yu
MTL=midl.exe
# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32
# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32
RSC=rc.exe
# ADD BASE RSC /l 0x409 /d "NDEBUG"
# ADD RSC /l 0x409 /i "..\.." /d "NDEBUG" /dPNG_LIBPNG_DLLFNAME_POSTFIX=""""VB"""" /dPNG_LIBPNG_SPECIALBUILD=""""__stdcall calling convention used for exported functions""""
# ADD BASE RSC /l 0x409 /d "PNG_NO_PEDANTIC_WARNINGS" /d "NDEBUG"
# ADD RSC /l 0x409 /i "..\.." /d "PNG_NO_PEDANTIC_WARNINGS" /d "NDEBUG" /dPNG_LIBPNG_DLLFNAME_POSTFIX=""""VB"""" /dPNG_LIBPNG_SPECIALBUILD=""""__stdcall calling convention used for exported functions""""
BSC32=bscmake.exe
# ADD BASE BSC32 /nologo
# ADD BSC32 /nologo
LINK32=link.exe
# ADD BASE LINK32 /nologo /dll /machine:I386
# ADD LINK32 zlib1.lib /nologo /dll /machine:I386 /out:"Win32_DLL_VB\libpng13vb.dll" /libpath:"..\..\..\zlib\projects\visualc6\Win32_DLL_Release"
# ADD LINK32 zlib1.lib /nologo /dll /machine:I386 /out:"Win32_DLL_VB\libpng14vb.dll" /libpath:"..\..\..\zlib\projects\visualc6\Win32_DLL_Release"
# Begin Special Build Tool
OutDir=.\Win32_DLL_VB
TargetName=libpng13vb
TargetName=libpng14vb
SOURCE="$(InputPath)"
PostBuild_Cmds=echo Deleting $(targetname) import library and export file (Not required for VB projects) del $(outdir)\$(targetname).lib del $(outdir)\$(targetname).exp
# End Special Build Tool
@ -210,11 +144,11 @@ PostBuild_Cmds=echo Deleting $(targetname) import library and export file (No
CPP=cl.exe
# ADD BASE CPP /nologo /MD /W3 /O2 /D "WIN32" /D "NDEBUG" /FD /c
# SUBTRACT BASE CPP /YX /Yc /Yu
# ADD CPP /nologo /MD /W3 /O2 /I "..\.." /I "..\..\..\zlib" /D "PNG_NO_MMX_CODE" /D "WIN32" /D "NDEBUG" /D "_CRT_SECURE_NO_WARNINGS" /FD /c
# ADD CPP /nologo /MD /W3 /O2 /I "..\.." /I "..\..\..\zlib" /D "WIN32" /D "NDEBUG" /FD /c
# SUBTRACT CPP /YX /Yc /Yu
RSC=rc.exe
# ADD BASE RSC /l 0x409 /d "NDEBUG"
# ADD RSC /l 0x409 /i "..\.." /d "NDEBUG"
# ADD BASE RSC /l 0x409 /d "PNG_NO_PEDANTIC_WARNINGS" /d "NDEBUG"
# ADD RSC /l 0x409 /i "..\.." /d "PNG_NO_PEDANTIC_WARNINGS" /d "NDEBUG"
BSC32=bscmake.exe
# ADD BASE BSC32 /nologo
# ADD BSC32 /nologo
@ -237,11 +171,11 @@ LIB32=link.exe -lib
CPP=cl.exe
# ADD BASE CPP /nologo /MDd /W3 /Gm /ZI /Od /D "WIN32" /D "_DEBUG" /FD /GZ /c
# SUBTRACT BASE CPP /YX /Yc /Yu
# ADD CPP /nologo /MDd /W3 /Gm /ZI /Od /I "..\.." /I "..\..\..\zlib" /D "WIN32" /D "_DEBUG" /D "DEBUG" /D "PNG_NO_MMX_CODE" /D PNG_DEBUG=1 /D "_CRT_SECURE_NO_WARNINGS" /FD /GZ /c
# ADD CPP /nologo /MDd /W3 /Gm /ZI /Od /I "..\.." /I "..\..\..\zlib" /D "WIN32" /D "_DEBUG" /D "DEBUG" /D PNG_DEBUG=1 /FD /GZ /c
# SUBTRACT CPP /YX /Yc /Yu
RSC=rc.exe
# ADD BASE RSC /l 0x409 /d "_DEBUG"
# ADD RSC /l 0x409 /d "_DEBUG"
# ADD BASE RSC /l 0x409 /d "PNG_NO_PEDANTIC_WARNINGS" /d "_DEBUG"
# ADD RSC /l 0x409 /d "PNG_NO_PEDANTIC_WARNINGS" /d "_DEBUG"
BSC32=bscmake.exe
# ADD BASE BSC32 /nologo
# ADD BSC32 /nologo
@ -249,73 +183,15 @@ LIB32=link.exe -lib
# ADD BASE LIB32 /nologo
# ADD LIB32 /nologo /out:"Win32_LIB_Debug\libpngd.lib"
!ELSEIF "$(CFG)" == "libpng - Win32 LIB ASM Release"
# PROP BASE Use_MFC 0
# PROP BASE Use_Debug_Libraries 0
# PROP BASE Output_Dir "libpng___Win32_LIB_ASM_Release"
# PROP BASE Intermediate_Dir "libpng___Win32_LIB_ASM_Release"
# PROP BASE Target_Dir ""
# PROP Use_MFC 0
# PROP Use_Debug_Libraries 0
# PROP Output_Dir "Win32_LIB_ASM_Release"
# PROP Intermediate_Dir "Win32_LIB_ASM_Release"
# PROP Target_Dir ""
CPP=cl.exe
# ADD BASE CPP /nologo /MD /W3 /O2 /D "WIN32" /D "NDEBUG" /FD /c
# SUBTRACT BASE CPP /YX /Yc /Yu
# ADD CPP /nologo /MD /W3 /O2 /I "..\.." /I "..\..\..\zlib" /D "WIN32" /D "NDEBUG" /D "PNG_USE_PNGVCRD" /D "PNG_LIBPNG_SPECIALBUILD" /D "_CRT_SECURE_NO_WARNINGS" /FD /c
# SUBTRACT CPP /YX /Yc /Yu
RSC=rc.exe
# ADD BASE RSC /l 0x409 /d "NDEBUG"
# ADD RSC /l 0x409 /i "..\.." /d "NDEBUG"
BSC32=bscmake.exe
# ADD BASE BSC32 /nologo
# ADD BSC32 /nologo
LIB32=link.exe -lib
# ADD BASE LIB32 /nologo
# ADD LIB32 /nologo
!ELSEIF "$(CFG)" == "libpng - Win32 LIB ASM Debug"
# PROP BASE Use_MFC 0
# PROP BASE Use_Debug_Libraries 1
# PROP BASE Output_Dir "libpng___Win32_LIB_ASM_Debug"
# PROP BASE Intermediate_Dir "libpng___Win32_LIB_ASM_Debug"
# PROP BASE Target_Dir ""
# PROP Use_MFC 0
# PROP Use_Debug_Libraries 1
# PROP Output_Dir "Win32_LIB_ASM_Debug"
# PROP Intermediate_Dir "Win32_LIB_ASM_Debug"
# PROP Target_Dir ""
CPP=cl.exe
# ADD BASE CPP /nologo /MDd /W3 /Gm /ZI /Od /D "WIN32" /D "_DEBUG" /FD /GZ /c
# SUBTRACT BASE CPP /YX /Yc /Yu
# ADD CPP /nologo /MDd /W3 /Gm /ZI /Od /I "..\.." /I "..\..\..\zlib" /D "WIN32" /D "_DEBUG" /D "DEBUG" /D PNG_DEBUG=1 /D "PNG_USE_PNGVCRD" /D "PNG_LIBPNG_SPECIALBUILD" /D "_CRT_SECURE_NO_WARNINGS" /FD /GZ /c
# SUBTRACT CPP /YX /Yc /Yu
RSC=rc.exe
# ADD BASE RSC /l 0x409 /d "_DEBUG"
# ADD RSC /l 0x409 /d "_DEBUG"
BSC32=bscmake.exe
# ADD BASE BSC32 /nologo
# ADD BSC32 /nologo
LIB32=link.exe -lib
# ADD BASE LIB32 /nologo
# ADD LIB32 /nologo /out:"Win32_LIB_ASM_Debug\libpngd.lib"
!ENDIF
!ENDIF
# Begin Target
# Name "libpng - Win32 DLL Release"
# Name "libpng - Win32 DLL Debug"
# Name "libpng - Win32 DLL ASM Release"
# Name "libpng - Win32 DLL ASM Debug"
# Name "libpng - Win32 DLL VB"
# Name "libpng - Win32 LIB Release"
# Name "libpng - Win32 LIB Debug"
# Name "libpng - Win32 LIB ASM Release"
# Name "libpng - Win32 LIB ASM Debug"
# Begin Group "Source Files"
# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
@ -365,16 +241,12 @@ SOURCE=..\..\pngtrans.c
# End Source File
# Begin Source File
SOURCE=..\..\scripts\pngw32.def
SOURCE=..\..\scripts\pngwin.def
!IF "$(CFG)" == "libpng - Win32 DLL Release"
!ELSEIF "$(CFG)" == "libpng - Win32 DLL Debug"
!ELSEIF "$(CFG)" == "libpng - Win32 DLL ASM Release"
!ELSEIF "$(CFG)" == "libpng - Win32 DLL ASM Debug"
!ELSEIF "$(CFG)" == "libpng - Win32 DLL VB"
# PROP Exclude_From_Build 1
@ -387,15 +259,7 @@ SOURCE=..\..\scripts\pngw32.def
# PROP Exclude_From_Build 1
!ELSEIF "$(CFG)" == "libpng - Win32 LIB ASM Release"
# PROP Exclude_From_Build 1
!ELSEIF "$(CFG)" == "libpng - Win32 LIB ASM Debug"
# PROP Exclude_From_Build 1
!ENDIF
!ENDIF
# End Source File
# Begin Source File
@ -426,22 +290,22 @@ SOURCE=..\..\png.h
SOURCE=..\..\pngconf.h
# End Source File
# Begin Source File
SOURCE=..\..\pngpriv.h
# End Source File
# End Group
# Begin Group "Resource Files"
# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
# Begin Source File
SOURCE=..\..\scripts\pngw32.rc
SOURCE=..\..\scripts\pngwin.rc
!IF "$(CFG)" == "libpng - Win32 DLL Release"
!ELSEIF "$(CFG)" == "libpng - Win32 DLL Debug"
!ELSEIF "$(CFG)" == "libpng - Win32 DLL ASM Release"
!ELSEIF "$(CFG)" == "libpng - Win32 DLL ASM Debug"
!ELSEIF "$(CFG)" == "libpng - Win32 DLL VB"
!ELSEIF "$(CFG)" == "libpng - Win32 LIB Release"
@ -452,15 +316,7 @@ SOURCE=..\..\scripts\pngw32.rc
# PROP Exclude_From_Build 1
!ELSEIF "$(CFG)" == "libpng - Win32 LIB ASM Release"
# PROP Exclude_From_Build 1
!ELSEIF "$(CFG)" == "libpng - Win32 LIB ASM Debug"
# PROP Exclude_From_Build 1
!ENDIF
!ENDIF
# End Source File
# End Group

View File

@ -19,12 +19,8 @@ CFG=pngtest - Win32 DLL Release
!MESSAGE
!MESSAGE "pngtest - Win32 DLL Release" (based on "Win32 (x86) Console Application")
!MESSAGE "pngtest - Win32 DLL Debug" (based on "Win32 (x86) Console Application")
!MESSAGE "pngtest - Win32 DLL ASM Release" (based on "Win32 (x86) Console Application")
!MESSAGE "pngtest - Win32 DLL ASM Debug" (based on "Win32 (x86) Console Application")
!MESSAGE "pngtest - Win32 LIB Release" (based on "Win32 (x86) Console Application")
!MESSAGE "pngtest - Win32 LIB Debug" (based on "Win32 (x86) Console Application")
!MESSAGE "pngtest - Win32 LIB ASM Release" (based on "Win32 (x86) Console Application")
!MESSAGE "pngtest - Win32 LIB ASM Debug" (based on "Win32 (x86) Console Application")
!MESSAGE
# Begin Project
@ -49,7 +45,7 @@ RSC=rc.exe
# PROP Target_Dir ""
# ADD BASE CPP /nologo /W3 /O2 /D "WIN32" /D "NDEBUG" /FD /c
# SUBTRACT BASE CPP /YX
# ADD CPP /nologo /MD /W3 /O2 /I "..\..\..\zlib" /D "WIN32" /D "NDEBUG" /D "PNG_DLL" /D "PNG_NO_STDIO" /D "PNG_NO_GLOBAL_ARRAYS" /FD /c
# ADD CPP /nologo /MD /W3 /O2 /I "..\..\..\zlib" /D "WIN32" /D "NDEBUG" /D "PNG_DLL" /D "PNG_NO_STDIO" /FD /c
# SUBTRACT CPP /YX
# ADD BASE RSC /l 0x409 /d "NDEBUG"
# ADD RSC /l 0x409 /d "NDEBUG"
@ -58,7 +54,7 @@ BSC32=bscmake.exe
# ADD BSC32 /nologo
LINK32=link.exe
# ADD BASE LINK32 /nologo /subsystem:console /machine:I386
# ADD LINK32 Win32_DLL_Release\libpng13.lib ..\..\..\zlib\projects\visualc6\Win32_DLL_Release\zlib1.lib /nologo /subsystem:console /machine:I386
# ADD LINK32 Win32_DLL_Release\libpng14.lib ..\..\..\zlib\projects\visualc6\Win32_DLL_Release\zlib1.lib /nologo /subsystem:console /machine:I386
# Begin Special Build Tool
OutDir=.\Win32_DLL_Release
SOURCE="$(InputPath)"
@ -81,7 +77,7 @@ PostBuild_Cmds=set path=$(outdir);..\..\..\zlib\projects\visualc6\Win32_DLL_Rele
# PROP Target_Dir ""
# ADD BASE CPP /nologo /W3 /Gm /ZI /Od /D "WIN32" /D "_DEBUG" /FD /GZ /c
# SUBTRACT BASE CPP /YX
# ADD CPP /nologo /MDd /W3 /Gm /ZI /Od /I "..\..\..\zlib" /D "WIN32" /D "_DEBUG" /D "PNG_DLL" /D "PNG_NO_STDIO" /D "PNG_NO_GLOBAL_ARRAYS" /FD /GZ /c
# ADD CPP /nologo /MDd /W3 /Gm /ZI /Od /I "..\..\..\zlib" /D "WIN32" /D "_DEBUG" /D "PNG_DLL" /D "PNG_NO_STDIO" /FD /GZ /c
# SUBTRACT CPP /YX
# ADD BASE RSC /l 0x409 /d "_DEBUG"
# ADD RSC /l 0x409 /d "_DEBUG"
@ -90,7 +86,7 @@ BSC32=bscmake.exe
# ADD BSC32 /nologo
LINK32=link.exe
# ADD BASE LINK32 /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
# ADD LINK32 Win32_DLL_Debug\libpng13d.lib ..\..\..\zlib\projects\visualc6\Win32_DLL_Debug\zlib1d.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
# ADD LINK32 Win32_DLL_Debug\libpng14d.lib ..\..\..\zlib\projects\visualc6\Win32_DLL_Debug\zlib1d.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
# Begin Special Build Tool
OutDir=.\Win32_DLL_Debug
SOURCE="$(InputPath)"
@ -98,70 +94,6 @@ PostBuild_Desc=[Run Test]
PostBuild_Cmds=set path=$(outdir);..\..\..\zlib\projects\visualc6\Win32_DLL_Debug; $(outdir)\pngtest.exe ..\..\pngtest.png
# End Special Build Tool
!ELSEIF "$(CFG)" == "pngtest - Win32 DLL ASM Release"
# PROP BASE Use_MFC 0
# PROP BASE Use_Debug_Libraries 0
# PROP BASE Output_Dir "pngtest___Win32_DLL_ASM_Release"
# PROP BASE Intermediate_Dir "pngtest___Win32_DLL_ASM_Release"
# PROP BASE Target_Dir ""
# PROP Use_MFC 0
# PROP Use_Debug_Libraries 0
# PROP Output_Dir "Win32_DLL_ASM_Release"
# PROP Intermediate_Dir "Win32_DLL_ASM_Release"
# PROP Ignore_Export_Lib 0
# PROP Target_Dir ""
# ADD BASE CPP /nologo /W3 /O2 /D "WIN32" /D "NDEBUG" /FD /c
# SUBTRACT BASE CPP /YX
# ADD CPP /nologo /MD /W3 /O2 /I "..\..\..\zlib" /D "WIN32" /D "NDEBUG" /D "PNG_DLL" /D "PNG_NO_STDIO" /D "PNG_NO_GLOBAL_ARRAYS" /FD /c
# SUBTRACT CPP /YX
# ADD BASE RSC /l 0x409 /d "NDEBUG"
# ADD RSC /l 0x409 /d "NDEBUG"
BSC32=bscmake.exe
# ADD BASE BSC32 /nologo
# ADD BSC32 /nologo
LINK32=link.exe
# ADD BASE LINK32 /nologo /subsystem:console /machine:I386
# ADD LINK32 Win32_DLL_ASM_Release\libpng13.lib ..\..\..\zlib\projects\visualc6\Win32_DLL_ASM_Release\zlib1.lib /nologo /subsystem:console /machine:I386
# Begin Special Build Tool
OutDir=.\Win32_DLL_ASM_Release
SOURCE="$(InputPath)"
PostBuild_Desc=[Run Test]
PostBuild_Cmds=set path=$(outdir);..\..\..\zlib\projects\visualc6\Win32_DLL_ASM_Release; $(outdir)\pngtest.exe ..\..\pngtest.png
# End Special Build Tool
!ELSEIF "$(CFG)" == "pngtest - Win32 DLL ASM Debug"
# PROP BASE Use_MFC 0
# PROP BASE Use_Debug_Libraries 1
# PROP BASE Output_Dir "pngtest___Win32_DLL_ASM_Debug"
# PROP BASE Intermediate_Dir "pngtest___Win32_DLL_ASM_Debug"
# PROP BASE Target_Dir ""
# PROP Use_MFC 0
# PROP Use_Debug_Libraries 1
# PROP Output_Dir "Win32_DLL_ASM_Debug"
# PROP Intermediate_Dir "Win32_DLL_ASM_Debug"
# PROP Ignore_Export_Lib 0
# PROP Target_Dir ""
# ADD BASE CPP /nologo /W3 /Gm /ZI /Od /D "WIN32" /D "_DEBUG" /FD /GZ /c
# SUBTRACT BASE CPP /YX
# ADD CPP /nologo /MDd /W3 /Gm /ZI /Od /I "..\..\..\zlib" /D "WIN32" /D "_DEBUG" /D "PNG_DLL" /D "PNG_NO_STDIO" /D "PNG_NO_GLOBAL_ARRAYS" /FD /GZ /c
# SUBTRACT CPP /YX
# ADD BASE RSC /l 0x409 /d "_DEBUG"
# ADD RSC /l 0x409 /d "_DEBUG"
BSC32=bscmake.exe
# ADD BASE BSC32 /nologo
# ADD BSC32 /nologo
LINK32=link.exe
# ADD BASE LINK32 /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
# ADD LINK32 Win32_DLL_ASM_Debug\libpng13d.lib ..\..\..\zlib\projects\visualc6\Win32_DLL_ASM_Debug\zlib1d.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
# Begin Special Build Tool
OutDir=.\Win32_DLL_ASM_Debug
SOURCE="$(InputPath)"
PostBuild_Desc=[Run Test]
PostBuild_Cmds=set path=$(outdir);..\..\..\zlib\projects\visualc6\Win32_DLL_ASM_Debug; $(outdir)\pngtest.exe ..\..\pngtest.png
# End Special Build Tool
!ELSEIF "$(CFG)" == "pngtest - Win32 LIB Release"
# PROP BASE Use_MFC 0
@ -226,82 +158,14 @@ PostBuild_Desc=[Run Test]
PostBuild_Cmds=$(outdir)\pngtest.exe ..\..\pngtest.png
# End Special Build Tool
!ELSEIF "$(CFG)" == "pngtest - Win32 LIB ASM Release"
# PROP BASE Use_MFC 0
# PROP BASE Use_Debug_Libraries 0
# PROP BASE Output_Dir "pngtest___Win32_LIB_ASM_Release"
# PROP BASE Intermediate_Dir "pngtest___Win32_LIB_ASM_Release"
# PROP BASE Target_Dir ""
# PROP Use_MFC 0
# PROP Use_Debug_Libraries 0
# PROP Output_Dir "Win32_LIB_ASM_Release"
# PROP Intermediate_Dir "Win32_LIB_ASM_Release"
# PROP Ignore_Export_Lib 0
# PROP Target_Dir ""
# ADD BASE CPP /nologo /W3 /O2 /D "WIN32" /D "NDEBUG" /FD /c
# SUBTRACT BASE CPP /YX
# ADD CPP /nologo /MD /W3 /O2 /I "..\..\..\zlib" /D "WIN32" /D "NDEBUG" /FD /c
# SUBTRACT CPP /YX
# ADD BASE RSC /l 0x409 /d "NDEBUG"
# ADD RSC /l 0x409 /d "NDEBUG"
BSC32=bscmake.exe
# ADD BASE BSC32 /nologo
# ADD BSC32 /nologo
LINK32=link.exe
# ADD BASE LINK32 /nologo /subsystem:console /machine:I386
# ADD LINK32 Win32_LIB_ASM_Release\libpng.lib ..\..\..\zlib\projects\visualc6\Win32_LIB_ASM_Release\zlib.lib /nologo /subsystem:console /machine:I386
# Begin Special Build Tool
OutDir=.\Win32_LIB_ASM_Release
SOURCE="$(InputPath)"
PostBuild_Desc=[Run Test]
PostBuild_Cmds=$(outdir)\pngtest.exe ..\..\pngtest.png
# End Special Build Tool
!ELSEIF "$(CFG)" == "pngtest - Win32 LIB ASM Debug"
# PROP BASE Use_MFC 0
# PROP BASE Use_Debug_Libraries 1
# PROP BASE Output_Dir "pngtest___Win32_LIB_ASM_Debug"
# PROP BASE Intermediate_Dir "pngtest___Win32_LIB_ASM_Debug"
# PROP BASE Target_Dir ""
# PROP Use_MFC 0
# PROP Use_Debug_Libraries 1
# PROP Output_Dir "Win32_LIB_ASM_Debug"
# PROP Intermediate_Dir "Win32_LIB_ASM_Debug"
# PROP Ignore_Export_Lib 0
# PROP Target_Dir ""
# ADD BASE CPP /nologo /W3 /Gm /ZI /Od /D "WIN32" /D "_DEBUG" /FD /GZ /c
# SUBTRACT BASE CPP /YX
# ADD CPP /nologo /MDd /W3 /Gm /ZI /Od /I "..\..\..\zlib" /D "WIN32" /D "_DEBUG" /FD /GZ /c
# SUBTRACT CPP /YX
# ADD BASE RSC /l 0x409 /d "_DEBUG"
# ADD RSC /l 0x409 /d "_DEBUG"
BSC32=bscmake.exe
# ADD BASE BSC32 /nologo
# ADD BSC32 /nologo
LINK32=link.exe
# ADD BASE LINK32 /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
# ADD LINK32 Win32_LIB_ASM_Debug\libpngd.lib ..\..\..\zlib\projects\visualc6\Win32_LIB_ASM_Debug\zlibd.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
# Begin Special Build Tool
OutDir=.\Win32_LIB_ASM_Debug
SOURCE="$(InputPath)"
PostBuild_Desc=[Run Test]
PostBuild_Cmds=$(outdir)\pngtest.exe ..\..\pngtest.png
# End Special Build Tool
!ENDIF
# Begin Target
# Name "pngtest - Win32 DLL Release"
# Name "pngtest - Win32 DLL Debug"
# Name "pngtest - Win32 DLL ASM Release"
# Name "pngtest - Win32 DLL ASM Debug"
# Name "pngtest - Win32 LIB Release"
# Name "pngtest - Win32 LIB Debug"
# Name "pngtest - Win32 LIB ASM Release"
# Name "pngtest - Win32 LIB ASM Debug"
# Begin Group "Source Files"
# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"

View File

@ -1,5 +1,5 @@
# Prevent "Cannot find missing dependency..." warnings while compiling
# pngw32.rc (PRJ0041).
# pngwin.rc (PRJ0041).
all: $(IntDir)\alloc.h \
$(IntDir)\fp.h \

View File

@ -1,8 +1,13 @@
Microsoft Developer Studio Project File, Format Version 7.10 for libpng.
Copyright (C) 2004 Simon-Pierre Cadieux.
This code is released under the libpng license.
For conditions of distribution and use, see copyright notice in png.h
NOTE: This project will be removed from libpng-1.5.0. It has
been replaced with the "vstudio" project.
Assumptions:
* The libpng source files are in ..\..
* The zlib source files are in ..\..\..\zlib
@ -32,15 +37,11 @@ To use:
This project builds the libpng binaries as follows:
* Win32_DLL_Release\libpng13.dll DLL build
* Win32_DLL_Debug\libpng13d.dll DLL build (debug version)
* Win32_DLL_ASM_Release\libpng13.dll DLL build using ASM code
* Win32_DLL_ASM_Debug\libpng13d.dll DLL build using ASM (debug version)
* Win32_DLL_VB\libpng13vb.dll DLL build for Visual Basic, using stdcall
* Win32_DLL_Release\libpng14.dll DLL build
* Win32_DLL_Debug\libpng14d.dll DLL build (debug version)
* Win32_DLL_VB\libpng14vb.dll DLL build for Visual Basic, using stdcall
* Win32_LIB_Release\libpng.lib static build
* Win32_LIB_Debug\libpngd.lib static build (debug version)
* Win32_LIB_ASM_Release\libpng.lib static build using ASM code
* Win32_LIB_ASM_Debug\libpngd.lib static build using ASM (debug version)
Notes:

View File

@ -6,8 +6,12 @@ Microsoft Developer Studio Project File, Format Version 7.10 for zlib.
Copyright (C) 2004 Simon-Pierre Cadieux.
Copyright (C) 2004 Cosmin Truta.
This code is released under the libpng license.
For conditions of distribution and use, see copyright notice in zlib.h.
NOTE: This project will be removed from libpng-1.5.0. It has
been replaced with the "vstudio" project.
To use:
@ -35,10 +39,6 @@ This project builds the zlib binaries as follows:
* Win32_DLL_Release\zlib1.dll DLL build
* Win32_DLL_Debug\zlib1d.dll DLL build (debug version)
* Win32_DLL_ASM_Release\zlib1.dll DLL build using ASM code
* Win32_DLL_ASM_Debug\zlib1d.dll DLL build using ASM code (debug version)
* Win32_LIB_Release\zlib.lib static build
* Win32_LIB_Debug\zlibd.lib static build (debug version)
* Win32_LIB_ASM_Release\zlib.lib static build using ASM code
* Win32_LIB_ASM_Debug\zlibd.lib static build using ASM code (debug version)

View File

@ -15,67 +15,39 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "zlib", "zlib.vcproj", "{2D4
EndProject
Global
GlobalSection(SolutionConfiguration) = preSolution
DLL ASM Debug = DLL ASM Debug
DLL ASM Release = DLL ASM Release
DLL Debug = DLL Debug
DLL Release = DLL Release
DLL VB = DLL VB
LIB ASM Debug = LIB ASM Debug
LIB ASM Release = LIB ASM Release
LIB Debug = LIB Debug
LIB Release = LIB Release
EndGlobalSection
GlobalSection(ProjectConfiguration) = postSolution
{0008960E-E0DD-41A6-8265-00B31DDB4C21}.DLL ASM Debug.ActiveCfg = DLL ASM Debug|Win32
{0008960E-E0DD-41A6-8265-00B31DDB4C21}.DLL ASM Debug.Build.0 = DLL ASM Debug|Win32
{0008960E-E0DD-41A6-8265-00B31DDB4C21}.DLL ASM Release.ActiveCfg = DLL ASM Release|Win32
{0008960E-E0DD-41A6-8265-00B31DDB4C21}.DLL ASM Release.Build.0 = DLL ASM Release|Win32
{0008960E-E0DD-41A6-8265-00B31DDB4C21}.DLL Debug.ActiveCfg = DLL Debug|Win32
{0008960E-E0DD-41A6-8265-00B31DDB4C21}.DLL Debug.Build.0 = DLL Debug|Win32
{0008960E-E0DD-41A6-8265-00B31DDB4C21}.DLL Release.ActiveCfg = DLL Release|Win32
{0008960E-E0DD-41A6-8265-00B31DDB4C21}.DLL Release.Build.0 = DLL Release|Win32
{0008960E-E0DD-41A6-8265-00B31DDB4C21}.DLL VB.ActiveCfg = DLL VB|Win32
{0008960E-E0DD-41A6-8265-00B31DDB4C21}.DLL VB.Build.0 = DLL VB|Win32
{0008960E-E0DD-41A6-8265-00B31DDB4C21}.LIB ASM Debug.ActiveCfg = LIB ASM Debug|Win32
{0008960E-E0DD-41A6-8265-00B31DDB4C21}.LIB ASM Debug.Build.0 = LIB ASM Debug|Win32
{0008960E-E0DD-41A6-8265-00B31DDB4C21}.LIB ASM Release.ActiveCfg = LIB ASM Release|Win32
{0008960E-E0DD-41A6-8265-00B31DDB4C21}.LIB ASM Release.Build.0 = LIB ASM Release|Win32
{0008960E-E0DD-41A6-8265-00B31DDB4C21}.LIB Debug.ActiveCfg = LIB Debug|Win32
{0008960E-E0DD-41A6-8265-00B31DDB4C21}.LIB Debug.Build.0 = LIB Debug|Win32
{0008960E-E0DD-41A6-8265-00B31DDB4C21}.LIB Release.ActiveCfg = LIB Release|Win32
{0008960E-E0DD-41A6-8265-00B31DDB4C21}.LIB Release.Build.0 = LIB Release|Win32
{FD1C2F86-9EEF-47BD-95A4-530917E17FDA}.DLL ASM Debug.ActiveCfg = DLL ASM Debug|Win32
{FD1C2F86-9EEF-47BD-95A4-530917E17FDA}.DLL ASM Debug.Build.0 = DLL ASM Debug|Win32
{FD1C2F86-9EEF-47BD-95A4-530917E17FDA}.DLL ASM Release.ActiveCfg = DLL ASM Release|Win32
{FD1C2F86-9EEF-47BD-95A4-530917E17FDA}.DLL ASM Release.Build.0 = DLL ASM Release|Win32
{FD1C2F86-9EEF-47BD-95A4-530917E17FDA}.DLL Debug.ActiveCfg = DLL Debug|Win32
{FD1C2F86-9EEF-47BD-95A4-530917E17FDA}.DLL Debug.Build.0 = DLL Debug|Win32
{FD1C2F86-9EEF-47BD-95A4-530917E17FDA}.DLL Release.ActiveCfg = DLL Release|Win32
{FD1C2F86-9EEF-47BD-95A4-530917E17FDA}.DLL Release.Build.0 = DLL Release|Win32
{FD1C2F86-9EEF-47BD-95A4-530917E17FDA}.DLL VB.ActiveCfg = DLL VB|Win32
{FD1C2F86-9EEF-47BD-95A4-530917E17FDA}.DLL VB.Build.0 = DLL VB|Win32
{FD1C2F86-9EEF-47BD-95A4-530917E17FDA}.LIB ASM Debug.ActiveCfg = LIB ASM Debug|Win32
{FD1C2F86-9EEF-47BD-95A4-530917E17FDA}.LIB ASM Debug.Build.0 = LIB ASM Debug|Win32
{FD1C2F86-9EEF-47BD-95A4-530917E17FDA}.LIB ASM Release.ActiveCfg = LIB ASM Release|Win32
{FD1C2F86-9EEF-47BD-95A4-530917E17FDA}.LIB ASM Release.Build.0 = LIB ASM Release|Win32
{FD1C2F86-9EEF-47BD-95A4-530917E17FDA}.LIB Debug.ActiveCfg = LIB Debug|Win32
{FD1C2F86-9EEF-47BD-95A4-530917E17FDA}.LIB Debug.Build.0 = LIB Debug|Win32
{FD1C2F86-9EEF-47BD-95A4-530917E17FDA}.LIB Release.ActiveCfg = LIB Release|Win32
{FD1C2F86-9EEF-47BD-95A4-530917E17FDA}.LIB Release.Build.0 = LIB Release|Win32
{2D4F8105-7D21-454C-9932-B47CAB71A5C0}.DLL ASM Debug.ActiveCfg = DLL ASM Debug|Win32
{2D4F8105-7D21-454C-9932-B47CAB71A5C0}.DLL ASM Debug.Build.0 = DLL ASM Debug|Win32
{2D4F8105-7D21-454C-9932-B47CAB71A5C0}.DLL ASM Release.ActiveCfg = DLL ASM Release|Win32
{2D4F8105-7D21-454C-9932-B47CAB71A5C0}.DLL ASM Release.Build.0 = DLL ASM Release|Win32
{2D4F8105-7D21-454C-9932-B47CAB71A5C0}.DLL Debug.ActiveCfg = DLL Debug|Win32
{2D4F8105-7D21-454C-9932-B47CAB71A5C0}.DLL Debug.Build.0 = DLL Debug|Win32
{2D4F8105-7D21-454C-9932-B47CAB71A5C0}.DLL Release.ActiveCfg = DLL Release|Win32
{2D4F8105-7D21-454C-9932-B47CAB71A5C0}.DLL Release.Build.0 = DLL Release|Win32
{2D4F8105-7D21-454C-9932-B47CAB71A5C0}.DLL VB.ActiveCfg = DLL Release|Win32
{2D4F8105-7D21-454C-9932-B47CAB71A5C0}.DLL VB.Build.0 = DLL Release|Win32
{2D4F8105-7D21-454C-9932-B47CAB71A5C0}.LIB ASM Debug.ActiveCfg = LIB ASM Debug|Win32
{2D4F8105-7D21-454C-9932-B47CAB71A5C0}.LIB ASM Debug.Build.0 = LIB ASM Debug|Win32
{2D4F8105-7D21-454C-9932-B47CAB71A5C0}.LIB ASM Release.ActiveCfg = LIB ASM Release|Win32
{2D4F8105-7D21-454C-9932-B47CAB71A5C0}.LIB ASM Release.Build.0 = LIB ASM Release|Win32
{2D4F8105-7D21-454C-9932-B47CAB71A5C0}.LIB Debug.ActiveCfg = LIB Debug|Win32
{2D4F8105-7D21-454C-9932-B47CAB71A5C0}.LIB Debug.Build.0 = LIB Debug|Win32
{2D4F8105-7D21-454C-9932-B47CAB71A5C0}.LIB Release.ActiveCfg = LIB Release|Win32

View File

@ -17,8 +17,8 @@
<Tool
Name="VCCLCompilerTool"
InlineFunctionExpansion="1"
AdditionalIncludeDirectories="..\..;..\..\..\zlib"
PreprocessorDefinitions="WIN32;PNG_NO_MMX_CODE;NDEBUG;PNG_BUILD_DLL;ZLIB_DLL;_CRT_SECURE_NO_WARNINGS"
AdditionalIncludeDirectories="..\..;..\..\scripts;..\..\..\zlib"
PreprocessorDefinitions="WIN32;NDEBUG;PNG_BUILD_DLL;ZLIB_DLL;_CRT_SECURE_NO_WARNINGS"
StringPooling="TRUE"
RuntimeLibrary="2"
EnableFunctionLevelLinking="TRUE"
@ -30,9 +30,9 @@
Name="VCCustomBuildTool"/>
<Tool
Name="VCLinkerTool"
OutputFile="$(OutDir)/libpng13.dll"
OutputFile="$(OutDir)/libpng14.dll"
LinkIncremental="1"
ModuleDefinitionFile="..\..\scripts\pngw32.def"/>
ModuleDefinitionFile="..\..\scripts\pngwin.def"/>
<Tool
Name="VCMIDLTool"/>
<Tool
@ -43,9 +43,9 @@
Name="VCPreLinkEventTool"/>
<Tool
Name="VCResourceCompilerTool"
PreprocessorDefinitions="NDEBUG;_CRT_SECURE_NO_WARNINGS"
PreprocessorDefinitions="NDEBUG"
Culture="1033"
AdditionalIncludeDirectories="..\..;..\..\..\zlib;$(IntDir)"/>
AdditionalIncludeDirectories="..\..;..\..\scripts;..\..\..\zlib;$(IntDir)"/>
<Tool
Name="VCWebServiceProxyGeneratorTool"/>
<Tool
@ -65,8 +65,8 @@
<Tool
Name="VCCLCompilerTool"
Optimization="0"
AdditionalIncludeDirectories="..\..;..\..\..\zlib"
PreprocessorDefinitions="WIN32;_DEBUG;DEBUG;PNG_NO_MMX_CODE;PNG_DEBUG=1;PNG_BUILD_DLL;ZLIB_DLL;_CRT_SECURE_NO_WARNINGS"
AdditionalIncludeDirectories="..\..;..\..\scripts;..\..\..\zlib"
PreprocessorDefinitions="WIN32;_DEBUG;DEBUG;PNG_DEBUG=1;PNG_BUILD_DLL;ZLIB_DLL;_CRT_SECURE_NO_WARNINGS"
BasicRuntimeChecks="3"
RuntimeLibrary="3"
UsePrecompiledHeader="3"
@ -78,8 +78,8 @@
Name="VCCustomBuildTool"/>
<Tool
Name="VCLinkerTool"
OutputFile="$(OutDir)/libpng13d.dll"
ModuleDefinitionFile="..\..\scripts\pngw32.def"
OutputFile="$(OutDir)/libpng14d.dll"
ModuleDefinitionFile="..\..\scripts\pngwin.def"
GenerateDebugInformation="TRUE"/>
<Tool
Name="VCMIDLTool"/>
@ -91,107 +91,9 @@
Name="VCPreLinkEventTool"/>
<Tool
Name="VCResourceCompilerTool"
PreprocessorDefinitions="_DEBUG,PNG_DEBUG=1;_CRT_SECURE_NO_WARNINGS"
PreprocessorDefinitions="_DEBUG,PNG_DEBUG=1"
Culture="1033"
AdditionalIncludeDirectories="..\..;..\..\..\zlib;$(IntDir)"/>
<Tool
Name="VCWebServiceProxyGeneratorTool"/>
<Tool
Name="VCXMLDataGeneratorTool"/>
<Tool
Name="VCWebDeploymentTool"/>
<Tool
Name="VCManagedWrapperGeneratorTool"/>
<Tool
Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
</Configuration>
<Configuration
Name="DLL ASM Release|Win32"
OutputDirectory=".\Win32_DLL_ASM_Release"
IntermediateDirectory=".\Win32_DLL_ASM_Release"
ConfigurationType="2">
<Tool
Name="VCCLCompilerTool"
InlineFunctionExpansion="1"
AdditionalIncludeDirectories="..\..;..\..\..\zlib"
PreprocessorDefinitions="WIN32;NDEBUG;PNG_USE_PNGVCRD;PNG_BUILD_DLL;ZLIB_DLL;PNG_LIBPNG_SPECIALBUILD;_CRT_SECURE_NO_WARNINGS"
StringPooling="TRUE"
RuntimeLibrary="2"
EnableFunctionLevelLinking="TRUE"
UsePrecompiledHeader="3"
PrecompiledHeaderThrough="png.h"
WarningLevel="3"
CompileAs="0"/>
<Tool
Name="VCCustomBuildTool"/>
<Tool
Name="VCLinkerTool"
OutputFile="$(OutDir)/libpng13.dll"
LinkIncremental="1"
ModuleDefinitionFile="..\..\scripts\pngw32.def"/>
<Tool
Name="VCMIDLTool"/>
<Tool
Name="VCPostBuildEventTool"/>
<Tool
Name="VCPreBuildEventTool"/>
<Tool
Name="VCPreLinkEventTool"/>
<Tool
Name="VCResourceCompilerTool"
AdditionalOptions="/d PNG_LIBPNG_SPECIALBUILD=&quot;&quot;&quot;&quot;Use MMX instructions&quot;&quot;&quot;&quot;"
PreprocessorDefinitions="NDEBUG;_CRT_SECURE_NO_WARNINGS"
Culture="1033"
AdditionalIncludeDirectories="..\..;..\..\..\zlib;$(IntDir)"/>
<Tool
Name="VCWebServiceProxyGeneratorTool"/>
<Tool
Name="VCXMLDataGeneratorTool"/>
<Tool
Name="VCWebDeploymentTool"/>
<Tool
Name="VCManagedWrapperGeneratorTool"/>
<Tool
Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
</Configuration>
<Configuration
Name="DLL ASM Debug|Win32"
OutputDirectory=".\Win32_DLL_ASM_Debug"
IntermediateDirectory=".\Win32_DLL_ASM_Debug"
ConfigurationType="2">
<Tool
Name="VCCLCompilerTool"
Optimization="0"
AdditionalIncludeDirectories="..\..;..\..\..\zlib"
PreprocessorDefinitions="WIN32;_DEBUG;DEBUG;PNG_DEBUG=1;PNG_USE_PNGVCRD;PNG_BUILD_DLL;ZLIB_DLL;PNG_LIBPNG_SPECIALBUILD;_CRT_SECURE_NO_WARNINGS"
BasicRuntimeChecks="3"
RuntimeLibrary="3"
UsePrecompiledHeader="3"
PrecompiledHeaderThrough="png.h"
WarningLevel="3"
DebugInformationFormat="4"
CompileAs="0"/>
<Tool
Name="VCCustomBuildTool"/>
<Tool
Name="VCLinkerTool"
OutputFile="$(OutDir)/libpng13d.dll"
ModuleDefinitionFile="..\..\scripts\pngw32.def"
GenerateDebugInformation="TRUE"/>
<Tool
Name="VCMIDLTool"/>
<Tool
Name="VCPostBuildEventTool"/>
<Tool
Name="VCPreBuildEventTool"/>
<Tool
Name="VCPreLinkEventTool"/>
<Tool
Name="VCResourceCompilerTool"
AdditionalOptions="/d PNG_LIBPNG_SPECIALBUILD=&quot;&quot;&quot;&quot;Use MMX instructions&quot;&quot;&quot;&quot;"
PreprocessorDefinitions="_DEBUG,PNG_DEBUG=1;_CRT_SECURE_NO_WARNINGS"
Culture="1033"
AdditionalIncludeDirectories="..\..;..\..\..\zlib;$(IntDir)"/>
AdditionalIncludeDirectories="..\..;..\..\scripts;..\..\..\zlib;$(IntDir)"/>
<Tool
Name="VCWebServiceProxyGeneratorTool"/>
<Tool
@ -211,8 +113,8 @@
<Tool
Name="VCCLCompilerTool"
InlineFunctionExpansion="1"
AdditionalIncludeDirectories="..\..;..\..\..\zlib"
PreprocessorDefinitions="WIN32;NDEBUG;PNG_BUILD_DLL;ZLIB_DLL;PNGAPI=__stdcall;PNG_NO_MMX_CODE;PNG_NO_MODULEDEF;PNG_LIBPNG_SPECIALBUILD;_CRT_SECURE_NO_WARNINGS"
AdditionalIncludeDirectories="..\..;..\..\scripts;..\..\..\zlib"
PreprocessorDefinitions="WIN32;NDEBUG;PNG_BUILD_DLL;ZLIB_DLL;PNGAPI=__stdcall;PNG_NO_MODULEDEF;PNG_LIBPNG_SPECIALBUILD;PNG_USER_PRIVATEBUILD;_CRT_SECURE_NO_WARNINGS"
StringPooling="TRUE"
RuntimeLibrary="2"
EnableFunctionLevelLinking="TRUE"
@ -224,7 +126,7 @@
Name="VCCustomBuildTool"/>
<Tool
Name="VCLinkerTool"
OutputFile="$(OutDir)/libpng13vb.dll"
OutputFile="$(OutDir)/libpng14vb.dll"
LinkIncremental="1"/>
<Tool
Name="VCMIDLTool"/>
@ -236,10 +138,10 @@
Name="VCPreLinkEventTool"/>
<Tool
Name="VCResourceCompilerTool"
AdditionalOptions="/d PNG_LIBPNG_DLLFNAME_POSTFIX=&quot;&quot;&quot;&quot;VB&quot;&quot;&quot;&quot; /d PNG_LIBPNG_SPECIALBUILD=&quot;&quot;&quot;&quot;__stdcall calling convention used for exported functions&quot;&quot;&quot;&quot;"
PreprocessorDefinitions="NDEBUG;_CRT_SECURE_NO_WARNINGS"
AdditionalOptions="/d PNG_NO_PEDANTIC_WARNINGS /d PNG_LIBPNG_DLLFNAME_POSTFIX=&quot;&quot;&quot;&quot;VB&quot;&quot;&quot;&quot; /d PNG_LIBPNG_SPECIALBUILD=&quot;&quot;&quot;&quot;__stdcall calling convention used for exported functions&quot;&quot;&quot;&quot;"
PreprocessorDefinitions="NDEBUG"
Culture="1033"
AdditionalIncludeDirectories="..\..;..\..\..\zlib;$(IntDir)"/>
AdditionalIncludeDirectories="..\..;..\..\scripts;..\..\..\zlib;$(IntDir)"/>
<Tool
Name="VCWebServiceProxyGeneratorTool"/>
<Tool
@ -259,10 +161,10 @@
<Tool
Name="VCCLCompilerTool"
InlineFunctionExpansion="1"
AdditionalIncludeDirectories="..\..;..\..\..\zlib"
PreprocessorDefinitions="PNG_NO_MMX_CODE;WIN32;NDEBUG;_CRT_SECURE_NO_WARNINGS"
AdditionalIncludeDirectories="..\..;..\..\scripts;..\..\..\zlib"
PreprocessorDefinitions="WIN32;NDEBUG;_CRT_SECURE_NO_WARNINGS"
StringPooling="TRUE"
RuntimeLibrary="2"
RuntimeLibrary="0"
EnableFunctionLevelLinking="TRUE"
UsePrecompiledHeader="3"
PrecompiledHeaderThrough="png.h"
@ -300,92 +202,10 @@
<Tool
Name="VCCLCompilerTool"
Optimization="0"
AdditionalIncludeDirectories="..\..;..\..\..\zlib"
PreprocessorDefinitions="WIN32;_DEBUG;DEBUG;PNG_NO_MMX_CODE;PNG_DEBUG=1;_CRT_SECURE_NO_WARNINGS"
AdditionalIncludeDirectories="..\..;..\..\scripts;..\..\..\zlib"
PreprocessorDefinitions="WIN32;_DEBUG;DEBUG;PNG_DEBUG=1;_CRT_SECURE_NO_WARNINGS"
BasicRuntimeChecks="3"
RuntimeLibrary="3"
UsePrecompiledHeader="3"
PrecompiledHeaderThrough="png.h"
WarningLevel="3"
DebugInformationFormat="4"
CompileAs="0"/>
<Tool
Name="VCCustomBuildTool"/>
<Tool
Name="VCLibrarianTool"
OutputFile="$(OutDir)/libpngd.lib"/>
<Tool
Name="VCMIDLTool"/>
<Tool
Name="VCPostBuildEventTool"/>
<Tool
Name="VCPreBuildEventTool"/>
<Tool
Name="VCPreLinkEventTool"/>
<Tool
Name="VCResourceCompilerTool"/>
<Tool
Name="VCWebServiceProxyGeneratorTool"/>
<Tool
Name="VCXMLDataGeneratorTool"/>
<Tool
Name="VCManagedWrapperGeneratorTool"/>
<Tool
Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
</Configuration>
<Configuration
Name="LIB ASM Release|Win32"
OutputDirectory=".\Win32_LIB_ASM_Release"
IntermediateDirectory=".\Win32_LIB_ASM_Release"
ConfigurationType="4">
<Tool
Name="VCCLCompilerTool"
InlineFunctionExpansion="1"
AdditionalIncludeDirectories="..\..,..\..\..\zlib"
PreprocessorDefinitions="WIN32;NDEBUG;PNG_USE_PNGVCRD;PNG_LIBPNG_SPECIALBUILD;_CRT_SECURE_NO_WARNINGS"
StringPooling="TRUE"
RuntimeLibrary="2"
EnableFunctionLevelLinking="TRUE"
UsePrecompiledHeader="3"
PrecompiledHeaderThrough="png.h"
WarningLevel="3"
CompileAs="0"/>
<Tool
Name="VCCustomBuildTool"/>
<Tool
Name="VCLibrarianTool"
OutputFile="$(OutDir)/libpng.lib"/>
<Tool
Name="VCMIDLTool"/>
<Tool
Name="VCPostBuildEventTool"/>
<Tool
Name="VCPreBuildEventTool"/>
<Tool
Name="VCPreLinkEventTool"/>
<Tool
Name="VCResourceCompilerTool"/>
<Tool
Name="VCWebServiceProxyGeneratorTool"/>
<Tool
Name="VCXMLDataGeneratorTool"/>
<Tool
Name="VCManagedWrapperGeneratorTool"/>
<Tool
Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
</Configuration>
<Configuration
Name="LIB ASM Debug|Win32"
OutputDirectory=".\Win32_LIB_ASM_Debug"
IntermediateDirectory=".\Win32_LIB_ASM_Debug"
ConfigurationType="4">
<Tool
Name="VCCLCompilerTool"
Optimization="0"
AdditionalIncludeDirectories="..\..,..\..\..\zlib"
PreprocessorDefinitions="WIN32;_DEBUG;DEBUG;PNG_DEBUG=1;PNG_USE_PNGVCRD;PNG_LIBPNG_SPECIALBUILD;_CRT_SECURE_NO_WARNINGS"
BasicRuntimeChecks="3"
RuntimeLibrary="3"
RuntimeLibrary="1"
UsePrecompiledHeader="3"
PrecompiledHeaderThrough="png.h"
WarningLevel="3"
@ -436,18 +256,6 @@
Name="VCCLCompilerTool"
UsePrecompiledHeader="0"/>
</FileConfiguration>
<FileConfiguration
Name="DLL ASM Release|Win32">
<Tool
Name="VCCLCompilerTool"
UsePrecompiledHeader="0"/>
</FileConfiguration>
<FileConfiguration
Name="DLL ASM Debug|Win32">
<Tool
Name="VCCLCompilerTool"
UsePrecompiledHeader="0"/>
</FileConfiguration>
<FileConfiguration
Name="DLL VB|Win32">
<Tool
@ -466,18 +274,6 @@
Name="VCCLCompilerTool"
UsePrecompiledHeader="0"/>
</FileConfiguration>
<FileConfiguration
Name="LIB ASM Release|Win32">
<Tool
Name="VCCLCompilerTool"
UsePrecompiledHeader="0"/>
</FileConfiguration>
<FileConfiguration
Name="LIB ASM Debug|Win32">
<Tool
Name="VCCLCompilerTool"
UsePrecompiledHeader="0"/>
</FileConfiguration>
</File>
<File
RelativePath="..\..\pngerror.c">
@ -493,18 +289,6 @@
Name="VCCLCompilerTool"
UsePrecompiledHeader="1"/>
</FileConfiguration>
<FileConfiguration
Name="DLL ASM Release|Win32">
<Tool
Name="VCCLCompilerTool"
UsePrecompiledHeader="1"/>
</FileConfiguration>
<FileConfiguration
Name="DLL ASM Debug|Win32">
<Tool
Name="VCCLCompilerTool"
UsePrecompiledHeader="1"/>
</FileConfiguration>
<FileConfiguration
Name="DLL VB|Win32">
<Tool
@ -523,18 +307,6 @@
Name="VCCLCompilerTool"
UsePrecompiledHeader="1"/>
</FileConfiguration>
<FileConfiguration
Name="LIB ASM Release|Win32">
<Tool
Name="VCCLCompilerTool"
UsePrecompiledHeader="1"/>
</FileConfiguration>
<FileConfiguration
Name="LIB ASM Debug|Win32">
<Tool
Name="VCCLCompilerTool"
UsePrecompiledHeader="1"/>
</FileConfiguration>
</File>
<File
RelativePath="..\..\pngget.c">
@ -564,7 +336,7 @@
RelativePath="..\..\pngtrans.c">
</File>
<File
RelativePath="..\..\scripts\pngw32.def">
RelativePath="..\..\scripts\pngwin.def">
<FileConfiguration
Name="DLL VB|Win32"
ExcludedFromBuild="TRUE">
@ -583,18 +355,6 @@
<Tool
Name="VCCustomBuildTool"/>
</FileConfiguration>
<FileConfiguration
Name="LIB ASM Release|Win32"
ExcludedFromBuild="TRUE">
<Tool
Name="VCCustomBuildTool"/>
</FileConfiguration>
<FileConfiguration
Name="LIB ASM Debug|Win32"
ExcludedFromBuild="TRUE">
<Tool
Name="VCCustomBuildTool"/>
</FileConfiguration>
</File>
<File
RelativePath="..\..\pngwio.c">
@ -618,12 +378,15 @@
<File
RelativePath="..\..\pngconf.h">
</File>
<File
RelativePath="..\..\pngpriv.h">
</File>
</Filter>
<Filter
Name="Resource Files"
Filter="ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe">
<File
RelativePath="..\..\scripts\pngw32.rc">
RelativePath="..\..\scripts\pngwin.rc">
<FileConfiguration
Name="LIB Release|Win32"
ExcludedFromBuild="TRUE">
@ -636,18 +399,6 @@
<Tool
Name="VCResourceCompilerTool"/>
</FileConfiguration>
<FileConfiguration
Name="LIB ASM Release|Win32"
ExcludedFromBuild="TRUE">
<Tool
Name="VCResourceCompilerTool"/>
</FileConfiguration>
<FileConfiguration
Name="LIB ASM Debug|Win32"
ExcludedFromBuild="TRUE">
<Tool
Name="VCResourceCompilerTool"/>
</FileConfiguration>
</File>
</Filter>
<File
@ -668,22 +419,6 @@
CommandLine="nmake -f PRJ0041.mak IntDir=$(IntDir)"
Outputs="$(IntDir)\alloc.h;$(IntDir)\fp.h;$(IntDir)\m68881.h;$(IntDir)\mem.h;$(IntDir)\pngusr.h;$(IntDir)\strings.h;$(IntDir)\unistd.h;$(IntDir)\unixio.h"/>
</FileConfiguration>
<FileConfiguration
Name="DLL ASM Release|Win32">
<Tool
Name="VCCustomBuildTool"
Description="Create dummy include files to prevent &quot;Cannot find missing dependency...&quot; warnings."
CommandLine="nmake -f PRJ0041.mak IntDir=$(IntDir)"
Outputs="$(IntDir)\alloc.h;$(IntDir)\fp.h;$(IntDir)\m68881.h;$(IntDir)\mem.h;$(IntDir)\pngusr.h;$(IntDir)\strings.h;$(IntDir)\unistd.h;$(IntDir)\unixio.h"/>
</FileConfiguration>
<FileConfiguration
Name="DLL ASM Debug|Win32">
<Tool
Name="VCCustomBuildTool"
Description="Create dummy include files to prevent &quot;Cannot find missing dependency...&quot; warnings."
CommandLine="nmake -f PRJ0041.mak IntDir=$(IntDir)"
Outputs="$(IntDir)\alloc.h;$(IntDir)\fp.h;$(IntDir)\m68881.h;$(IntDir)\mem.h;$(IntDir)\pngusr.h;$(IntDir)\strings.h;$(IntDir)\unistd.h;$(IntDir)\unixio.h"/>
</FileConfiguration>
<FileConfiguration
Name="DLL VB|Win32">
<Tool

View File

@ -17,8 +17,8 @@
<Tool
Name="VCCLCompilerTool"
InlineFunctionExpansion="1"
AdditionalIncludeDirectories="..\..\..\zlib"
PreprocessorDefinitions="WIN32;NDEBUG;PNG_DLL;PNG_NO_STDIO;PNG_NO_GLOBAL_ARRAYS"
AdditionalIncludeDirectories="..\..\scripts;..\..\..\zlib"
PreprocessorDefinitions="WIN32;NDEBUG;PNG_DLL;PNG_NO_STDIO;_CRT_SECURE_NO_WARNINGS"
StringPooling="TRUE"
RuntimeLibrary="2"
EnableFunctionLevelLinking="TRUE"
@ -64,104 +64,8 @@ $(TargetPath) ..\..\pngtest.png $(IntDir)\pngout.png"
<Tool
Name="VCCLCompilerTool"
Optimization="0"
AdditionalIncludeDirectories="..\..\..\zlib"
PreprocessorDefinitions="WIN32;_DEBUG;PNG_DLL;PNG_NO_STDIO;PNG_NO_GLOBAL_ARRAYS"
BasicRuntimeChecks="3"
RuntimeLibrary="3"
WarningLevel="3"
DebugInformationFormat="4"
CompileAs="0"/>
<Tool
Name="VCCustomBuildTool"
Description="Testing..."
CommandLine="set path=$(OutDir)\..;$(OutDir)\..\ZLib
$(TargetPath) ..\..\pngtest.png $(IntDir)\pngout.png"
Outputs="$(IntDir)\pngout.png"/>
<Tool
Name="VCLinkerTool"
OutputFile="$(OutDir)/pngtest.exe"
GenerateDebugInformation="TRUE"
SubSystem="1"
TargetMachine="1"/>
<Tool
Name="VCMIDLTool"/>
<Tool
Name="VCPostBuildEventTool"/>
<Tool
Name="VCPreBuildEventTool"/>
<Tool
Name="VCPreLinkEventTool"/>
<Tool
Name="VCResourceCompilerTool"/>
<Tool
Name="VCWebServiceProxyGeneratorTool"/>
<Tool
Name="VCXMLDataGeneratorTool"/>
<Tool
Name="VCWebDeploymentTool"/>
<Tool
Name="VCManagedWrapperGeneratorTool"/>
<Tool
Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
</Configuration>
<Configuration
Name="DLL ASM Release|Win32"
OutputDirectory=".\Win32_DLL_ASM_Release\Test"
IntermediateDirectory=".\Win32_DLL_ASM_Release\Test"
ConfigurationType="1">
<Tool
Name="VCCLCompilerTool"
InlineFunctionExpansion="1"
AdditionalIncludeDirectories="..\..\..\zlib"
PreprocessorDefinitions="WIN32;NDEBUG;PNG_DLL;PNG_NO_STDIO;PNG_NO_GLOBAL_ARRAYS"
StringPooling="TRUE"
RuntimeLibrary="2"
EnableFunctionLevelLinking="TRUE"
WarningLevel="3"
CompileAs="0"/>
<Tool
Name="VCCustomBuildTool"
Description="Testing..."
CommandLine="set path=$(OutDir)\..;$(OutDir)\..\ZLib
$(TargetPath) ..\..\pngtest.png $(IntDir)\pngout.png"
Outputs="$(IntDir)\pngout.png"/>
<Tool
Name="VCLinkerTool"
OutputFile="$(OutDir)/pngtest.exe"
LinkIncremental="1"
SubSystem="1"
TargetMachine="1"/>
<Tool
Name="VCMIDLTool"/>
<Tool
Name="VCPostBuildEventTool"/>
<Tool
Name="VCPreBuildEventTool"/>
<Tool
Name="VCPreLinkEventTool"/>
<Tool
Name="VCResourceCompilerTool"/>
<Tool
Name="VCWebServiceProxyGeneratorTool"/>
<Tool
Name="VCXMLDataGeneratorTool"/>
<Tool
Name="VCWebDeploymentTool"/>
<Tool
Name="VCManagedWrapperGeneratorTool"/>
<Tool
Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
</Configuration>
<Configuration
Name="DLL ASM Debug|Win32"
OutputDirectory=".\Win32_DLL_ASM_Debug\Test"
IntermediateDirectory=".\Win32_DLL_ASM_Debug\Test"
ConfigurationType="1">
<Tool
Name="VCCLCompilerTool"
Optimization="0"
AdditionalIncludeDirectories="..\..\..\zlib"
PreprocessorDefinitions="WIN32;_DEBUG;PNG_DLL;PNG_NO_STDIO;PNG_NO_GLOBAL_ARRAYS"
AdditionalIncludeDirectories="..\..\scripts;..\..\..\zlib"
PreprocessorDefinitions="WIN32;_DEBUG;PNG_DLL;PNG_NO_STDIO;_CRT_SECURE_NO_WARNINGS"
BasicRuntimeChecks="3"
RuntimeLibrary="3"
WarningLevel="3"
@ -208,8 +112,8 @@ $(TargetPath) ..\..\pngtest.png $(IntDir)\pngout.png"
<Tool
Name="VCCLCompilerTool"
InlineFunctionExpansion="1"
AdditionalIncludeDirectories="..\..\..\zlib"
PreprocessorDefinitions="WIN32;NDEBUG;PNG_DLL;PNG_NO_STDIO;PNG_NO_GLOBAL_ARRAYS;PNGAPI=__stdcall"
AdditionalIncludeDirectories="..\..\scripts;..\..\..\zlib"
PreprocessorDefinitions="WIN32;NDEBUG;PNG_DLL;PNG_NO_STDIO;PNGAPI=__stdcall;PNG_USER_PRIVATEBUILD;_CRT_SECURE_NO_WARNINGS"
StringPooling="TRUE"
RuntimeLibrary="2"
EnableFunctionLevelLinking="TRUE"
@ -226,7 +130,7 @@ $(TargetPath) ..\..\pngtest.png $(IntDir)\pngout.png"
Name="VCLinkerTool"
OutputFile="$(OutDir)/pngtest.exe"
LinkIncremental="1"
IgnoreDefaultLibraryNames="$(IntDir)\libpng13vb.lib"
IgnoreDefaultLibraryNames="$(IntDir)\libpng14b.lib"
SubSystem="1"
TargetMachine="1"/>
<Tool
@ -258,10 +162,10 @@ $(TargetPath) ..\..\pngtest.png $(IntDir)\pngout.png"
<Tool
Name="VCCLCompilerTool"
InlineFunctionExpansion="1"
AdditionalIncludeDirectories="..\..\..\zlib"
PreprocessorDefinitions="WIN32;_DEBUG;PNG_NO_GLOBAL_ARRAYS"
AdditionalIncludeDirectories="..\..\scripts;..\..\..\zlib"
PreprocessorDefinitions="WIN32;_DEBUG;_CRT_SECURE_NO_WARNINGS"
StringPooling="TRUE"
RuntimeLibrary="2"
RuntimeLibrary="0"
EnableFunctionLevelLinking="TRUE"
WarningLevel="3"
CompileAs="0"/>
@ -306,106 +210,10 @@ $(TargetPath) ..\..\pngtest.png $(IntDir)\pngout.png"
<Tool
Name="VCCLCompilerTool"
Optimization="0"
AdditionalIncludeDirectories="..\..\..\zlib"
PreprocessorDefinitions="WIN32;_DEBUG;PNG_NO_GLOBAL_ARRAYS"
AdditionalIncludeDirectories="..\..\scripts;..\..\..\zlib"
PreprocessorDefinitions="WIN32;_DEBUG;_CRT_SECURE_NO_WARNINGS"
BasicRuntimeChecks="3"
RuntimeLibrary="3"
WarningLevel="3"
DebugInformationFormat="4"
CompileAs="0"/>
<Tool
Name="VCCustomBuildTool"
Description="Testing..."
CommandLine="set path=$(OutDir)\..;$(OutDir)\..\ZLib
$(TargetPath) ..\..\pngtest.png $(IntDir)\pngout.png"
Outputs="$(IntDir)\pngout.png"/>
<Tool
Name="VCLinkerTool"
OutputFile="$(OutDir)/pngtest.exe"
GenerateDebugInformation="TRUE"
SubSystem="1"
TargetMachine="1"/>
<Tool
Name="VCMIDLTool"/>
<Tool
Name="VCPostBuildEventTool"/>
<Tool
Name="VCPreBuildEventTool"/>
<Tool
Name="VCPreLinkEventTool"/>
<Tool
Name="VCResourceCompilerTool"/>
<Tool
Name="VCWebServiceProxyGeneratorTool"/>
<Tool
Name="VCXMLDataGeneratorTool"/>
<Tool
Name="VCWebDeploymentTool"/>
<Tool
Name="VCManagedWrapperGeneratorTool"/>
<Tool
Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
</Configuration>
<Configuration
Name="LIB ASM Release|Win32"
OutputDirectory=".\Win32_LIB_ASM_Release\Test"
IntermediateDirectory=".\Win32_LIB_ASM_Release\Test"
ConfigurationType="1">
<Tool
Name="VCCLCompilerTool"
InlineFunctionExpansion="1"
AdditionalIncludeDirectories="..\..\..\zlib"
PreprocessorDefinitions="WIN32;NDEBUG;PNG_NO_GLOBAL_ARRAYS"
StringPooling="TRUE"
RuntimeLibrary="2"
EnableFunctionLevelLinking="TRUE"
WarningLevel="3"
CompileAs="0"/>
<Tool
Name="VCCustomBuildTool"
Description="Testing..."
CommandLine="set path=$(OutDir)\..;$(OutDir)\..\ZLib
$(TargetPath) ..\..\pngtest.png $(IntDir)\pngout.png"
Outputs="$(IntDir)\pngout.png"/>
<Tool
Name="VCLinkerTool"
OutputFile="$(OutDir)/pngtest.exe"
LinkIncremental="1"
SubSystem="1"
TargetMachine="1"/>
<Tool
Name="VCMIDLTool"/>
<Tool
Name="VCPostBuildEventTool"/>
<Tool
Name="VCPreBuildEventTool"/>
<Tool
Name="VCPreLinkEventTool"/>
<Tool
Name="VCResourceCompilerTool"/>
<Tool
Name="VCWebServiceProxyGeneratorTool"/>
<Tool
Name="VCXMLDataGeneratorTool"/>
<Tool
Name="VCWebDeploymentTool"/>
<Tool
Name="VCManagedWrapperGeneratorTool"/>
<Tool
Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
</Configuration>
<Configuration
Name="LIB ASM Debug|Win32"
OutputDirectory=".\Win32_LIB_ASM_Debug\Test"
IntermediateDirectory=".\Win32_LIB_ASM_Debug\Test"
ConfigurationType="1">
<Tool
Name="VCCLCompilerTool"
Optimization="0"
AdditionalIncludeDirectories="..\..\..\zlib"
PreprocessorDefinitions="WIN32;_DEBUG;PNG_NO_GLOBAL_ARRAYS"
BasicRuntimeChecks="3"
RuntimeLibrary="3"
RuntimeLibrary="1"
WarningLevel="3"
DebugInformationFormat="4"
CompileAs="0"/>

View File

@ -17,7 +17,7 @@
Name="VCCLCompilerTool"
InlineFunctionExpansion="1"
AdditionalIncludeDirectories="..\..\..\zlib"
PreprocessorDefinitions="WIN32;NDEBUG"
PreprocessorDefinitions="WIN32;NDEBUG;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_WARNINGS"
StringPooling="TRUE"
RuntimeLibrary="2"
EnableFunctionLevelLinking="TRUE"
@ -62,97 +62,7 @@
Name="VCCLCompilerTool"
Optimization="0"
AdditionalIncludeDirectories="..\..\..\zlib"
PreprocessorDefinitions="WIN32;_DEBUG"
BasicRuntimeChecks="3"
RuntimeLibrary="3"
WarningLevel="3"
DebugInformationFormat="4"
CompileAs="1"/>
<Tool
Name="VCCustomBuildTool"/>
<Tool
Name="VCLinkerTool"
OutputFile="$(OutDir)\zlib1d.dll"
ModuleDefinitionFile="..\..\..\zlib\win32\zlib.def"
GenerateDebugInformation="TRUE"/>
<Tool
Name="VCMIDLTool"/>
<Tool
Name="VCPostBuildEventTool"/>
<Tool
Name="VCPreBuildEventTool"/>
<Tool
Name="VCPreLinkEventTool"/>
<Tool
Name="VCResourceCompilerTool"
PreprocessorDefinitions="_DEBUG"
Culture="1033"/>
<Tool
Name="VCWebServiceProxyGeneratorTool"/>
<Tool
Name="VCXMLDataGeneratorTool"/>
<Tool
Name="VCWebDeploymentTool"/>
<Tool
Name="VCManagedWrapperGeneratorTool"/>
<Tool
Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
</Configuration>
<Configuration
Name="DLL ASM Release|Win32"
OutputDirectory=".\Win32_DLL_ASM_Release\ZLib"
IntermediateDirectory=".\Win32_DLL_ASM_Release\ZLib"
ConfigurationType="2">
<Tool
Name="VCCLCompilerTool"
InlineFunctionExpansion="1"
AdditionalIncludeDirectories="..\..\..\zlib"
PreprocessorDefinitions="WIN32;NDEBUG;ASMV;ASMINF"
StringPooling="TRUE"
RuntimeLibrary="2"
EnableFunctionLevelLinking="TRUE"
WarningLevel="3"
CompileAs="1"/>
<Tool
Name="VCCustomBuildTool"/>
<Tool
Name="VCLinkerTool"
OutputFile="$(OutDir)\zlib1.dll"
LinkIncremental="1"
ModuleDefinitionFile="..\..\..\zlib\win32\zlib.def"/>
<Tool
Name="VCMIDLTool"/>
<Tool
Name="VCPostBuildEventTool"/>
<Tool
Name="VCPreBuildEventTool"/>
<Tool
Name="VCPreLinkEventTool"/>
<Tool
Name="VCResourceCompilerTool"
PreprocessorDefinitions="NDEBUG"
Culture="1033"/>
<Tool
Name="VCWebServiceProxyGeneratorTool"/>
<Tool
Name="VCXMLDataGeneratorTool"/>
<Tool
Name="VCWebDeploymentTool"/>
<Tool
Name="VCManagedWrapperGeneratorTool"/>
<Tool
Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
</Configuration>
<Configuration
Name="DLL ASM Debug|Win32"
OutputDirectory=".\Win32_DLL_ASM_Debug\ZLib"
IntermediateDirectory=".\Win32_DLL_ASM_Debug\ZLib"
ConfigurationType="2">
<Tool
Name="VCCLCompilerTool"
Optimization="0"
AdditionalIncludeDirectories="..\..\..\zlib"
PreprocessorDefinitions="WIN32;_DEBUG;ASMV;ASMINF"
PreprocessorDefinitions="WIN32;_DEBUG;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_WARNINGS"
BasicRuntimeChecks="3"
RuntimeLibrary="3"
WarningLevel="3"
@ -197,9 +107,9 @@
Name="VCCLCompilerTool"
InlineFunctionExpansion="1"
AdditionalIncludeDirectories="..\..\..\zlib"
PreprocessorDefinitions="WIN32;NDEBUG"
PreprocessorDefinitions="WIN32;NDEBUG;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_WARNINGS"
StringPooling="TRUE"
RuntimeLibrary="2"
RuntimeLibrary="0"
EnableFunctionLevelLinking="TRUE"
WarningLevel="3"
CompileAs="1"/>
@ -236,87 +146,9 @@
Name="VCCLCompilerTool"
Optimization="0"
AdditionalIncludeDirectories="..\..\..\zlib"
PreprocessorDefinitions="WIN32;_DEBUG"
PreprocessorDefinitions="WIN32;_DEBUG;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_WARNINGS"
BasicRuntimeChecks="3"
RuntimeLibrary="3"
WarningLevel="3"
DebugInformationFormat="4"
CompileAs="1"/>
<Tool
Name="VCCustomBuildTool"/>
<Tool
Name="VCLibrarianTool"
OutputFile="$(OutDir)\zlibd.lib"/>
<Tool
Name="VCMIDLTool"/>
<Tool
Name="VCPostBuildEventTool"/>
<Tool
Name="VCPreBuildEventTool"/>
<Tool
Name="VCPreLinkEventTool"/>
<Tool
Name="VCResourceCompilerTool"/>
<Tool
Name="VCWebServiceProxyGeneratorTool"/>
<Tool
Name="VCXMLDataGeneratorTool"/>
<Tool
Name="VCManagedWrapperGeneratorTool"/>
<Tool
Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
</Configuration>
<Configuration
Name="LIB ASM Release|Win32"
OutputDirectory=".\Win32_LIB_ASM_Release\ZLib"
IntermediateDirectory=".\Win32_LIB_ASM_Release\ZLib"
ConfigurationType="4">
<Tool
Name="VCCLCompilerTool"
InlineFunctionExpansion="1"
AdditionalIncludeDirectories="..\..\..\zlib"
PreprocessorDefinitions="WIN32;NDEBUG;ASMV;ASMINF"
StringPooling="TRUE"
RuntimeLibrary="2"
EnableFunctionLevelLinking="TRUE"
WarningLevel="3"
CompileAs="1"/>
<Tool
Name="VCCustomBuildTool"/>
<Tool
Name="VCLibrarianTool"
OutputFile="$(OutDir)\zlib.lib"/>
<Tool
Name="VCMIDLTool"/>
<Tool
Name="VCPostBuildEventTool"/>
<Tool
Name="VCPreBuildEventTool"/>
<Tool
Name="VCPreLinkEventTool"/>
<Tool
Name="VCResourceCompilerTool"/>
<Tool
Name="VCWebServiceProxyGeneratorTool"/>
<Tool
Name="VCXMLDataGeneratorTool"/>
<Tool
Name="VCManagedWrapperGeneratorTool"/>
<Tool
Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
</Configuration>
<Configuration
Name="LIB ASM Debug|Win32"
OutputDirectory=".\Win32_LIB_ASM_Debug\ZLib"
IntermediateDirectory=".\Win32_LIB_ASM_Debug\ZLib"
ConfigurationType="4">
<Tool
Name="VCCLCompilerTool"
Optimization="0"
AdditionalIncludeDirectories="..\..\..\zlib"
PreprocessorDefinitions="WIN32;_DEBUG;ASMV;ASMINF"
BasicRuntimeChecks="3"
RuntimeLibrary="3"
RuntimeLibrary="1"
WarningLevel="3"
DebugInformationFormat="4"
CompileAs="1"/>
@ -364,7 +196,16 @@
RelativePath="..\..\..\zlib\deflate.c">
</File>
<File
RelativePath="..\..\..\zlib\gzio.c">
RelativePath="..\..\..\zlib\gzlib.c">
</File>
<File
RelativePath="..\..\..\zlib\gzclose.c">
</File>
<File
RelativePath="..\..\..\zlib\gzread.c">
</File>
<File
RelativePath="..\..\..\zlib\gzwrite.c">
</File>
<File
RelativePath="..\..\..\zlib\infback.c">
@ -398,18 +239,6 @@
<Tool
Name="VCCustomBuildTool"/>
</FileConfiguration>
<FileConfiguration
Name="LIB ASM Release|Win32"
ExcludedFromBuild="TRUE">
<Tool
Name="VCCustomBuildTool"/>
</FileConfiguration>
<FileConfiguration
Name="LIB ASM Debug|Win32"
ExcludedFromBuild="TRUE">
<Tool
Name="VCCustomBuildTool"/>
</FileConfiguration>
</File>
<File
RelativePath="..\..\..\zlib\zutil.c">
@ -466,18 +295,6 @@
<Tool
Name="VCResourceCompilerTool"/>
</FileConfiguration>
<FileConfiguration
Name="LIB ASM Release|Win32"
ExcludedFromBuild="TRUE">
<Tool
Name="VCResourceCompilerTool"/>
</FileConfiguration>
<FileConfiguration
Name="LIB ASM Debug|Win32"
ExcludedFromBuild="TRUE">
<Tool
Name="VCResourceCompilerTool"/>
</FileConfiguration>
</File>
</Filter>
<Filter
@ -497,24 +314,6 @@
<Tool
Name="VCCustomBuildTool"/>
</FileConfiguration>
<FileConfiguration
Name="DLL ASM Release|Win32">
<Tool
Name="VCCustomBuildTool"
Description="Assembling..."
CommandLine="ml /nologo /c /Cx /coff /Fo&quot;$(IntDir)\$(InputName).obj&quot; &quot;$(InputPath)&quot;
"
Outputs="$(IntDir)\$(InputName).obj"/>
</FileConfiguration>
<FileConfiguration
Name="DLL ASM Debug|Win32">
<Tool
Name="VCCustomBuildTool"
Description="Assembling..."
CommandLine="ml /nologo /c /Cx /coff /Zi /Fo&quot;$(IntDir)\$(InputName).obj&quot; &quot;$(InputPath)&quot;
"
Outputs="$(IntDir)\$(InputName).obj"/>
</FileConfiguration>
<FileConfiguration
Name="LIB Release|Win32"
ExcludedFromBuild="TRUE">
@ -527,24 +326,6 @@
<Tool
Name="VCCustomBuildTool"/>
</FileConfiguration>
<FileConfiguration
Name="LIB ASM Release|Win32">
<Tool
Name="VCCustomBuildTool"
Description="Assembling..."
CommandLine="ml /nologo /c /Cx /coff /Fo&quot;$(IntDir)\$(InputName).obj&quot; &quot;$(InputPath)&quot;
"
Outputs="$(IntDir)\$(InputName).obj"/>
</FileConfiguration>
<FileConfiguration
Name="LIB ASM Debug|Win32">
<Tool
Name="VCCustomBuildTool"
Description="Assembling..."
CommandLine="ml /nologo /c /Cx /coff /Zi /Fo&quot;$(IntDir)\$(InputName).obj&quot; &quot;$(InputPath)&quot;
"
Outputs="$(IntDir)\$(InputName).obj"/>
</FileConfiguration>
</File>
<File
RelativePath="..\..\..\zlib\contrib\masmx86\gvmat32c.c">
@ -560,18 +341,6 @@
<Tool
Name="VCCLCompilerTool"/>
</FileConfiguration>
<FileConfiguration
Name="DLL ASM Release|Win32">
<Tool
Name="VCCLCompilerTool"
AdditionalIncludeDirectories="..\.."/>
</FileConfiguration>
<FileConfiguration
Name="DLL ASM Debug|Win32">
<Tool
Name="VCCLCompilerTool"
AdditionalIncludeDirectories="..\.."/>
</FileConfiguration>
<FileConfiguration
Name="LIB Release|Win32"
ExcludedFromBuild="TRUE">
@ -584,18 +353,6 @@
<Tool
Name="VCCLCompilerTool"/>
</FileConfiguration>
<FileConfiguration
Name="LIB ASM Release|Win32">
<Tool
Name="VCCLCompilerTool"
AdditionalIncludeDirectories="..\.."/>
</FileConfiguration>
<FileConfiguration
Name="LIB ASM Debug|Win32">
<Tool
Name="VCCLCompilerTool"
AdditionalIncludeDirectories="..\.."/>
</FileConfiguration>
</File>
<File
RelativePath="..\..\..\zlib\contrib\masmx86\inffas32.asm">
@ -611,24 +368,6 @@
<Tool
Name="VCCustomBuildTool"/>
</FileConfiguration>
<FileConfiguration
Name="DLL ASM Release|Win32">
<Tool
Name="VCCustomBuildTool"
Description="Assembling..."
CommandLine="ml /nologo /c /Cx /coff /Fo&quot;$(IntDir)\$(InputName).obj&quot; &quot;$(InputPath)&quot;
"
Outputs="$(IntDir)\$(InputName).obj"/>
</FileConfiguration>
<FileConfiguration
Name="DLL ASM Debug|Win32">
<Tool
Name="VCCustomBuildTool"
Description="Assembling..."
CommandLine="ml /nologo /c /Cx /coff /Zi /Fo&quot;$(IntDir)\$(InputName).obj&quot; &quot;$(InputPath)&quot;
"
Outputs="$(IntDir)\$(InputName).obj"/>
</FileConfiguration>
<FileConfiguration
Name="LIB Release|Win32"
ExcludedFromBuild="TRUE">
@ -641,24 +380,6 @@
<Tool
Name="VCCustomBuildTool"/>
</FileConfiguration>
<FileConfiguration
Name="LIB ASM Release|Win32">
<Tool
Name="VCCustomBuildTool"
Description="Assembling..."
CommandLine="ml /nologo /c /Cx /coff /Fo&quot;$(IntDir)\$(InputName).obj&quot; &quot;$(InputPath)&quot;
"
Outputs="$(IntDir)\$(InputName).obj"/>
</FileConfiguration>
<FileConfiguration
Name="LIB ASM Debug|Win32">
<Tool
Name="VCCustomBuildTool"
Description="Assembling..."
CommandLine="ml /nologo /c /Cx /coff /Zi /Fo&quot;$(IntDir)\$(InputName).obj&quot; &quot;$(InputPath)&quot;
"
Outputs="$(IntDir)\$(InputName).obj"/>
</FileConfiguration>
</File>
</Filter>
<File

View File

@ -0,0 +1,233 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug Library|Win32">
<Configuration>Debug Library</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Debug|Win32">
<Configuration>Debug</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release Library|Win32">
<Configuration>Release Library</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|Win32">
<Configuration>Release</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
</ItemGroup>
<PropertyGroup Label="Globals">
<ProjectGuid>{D6973076-9317-4EF2-A0B8-B7A18AC0713E}</ProjectGuid>
<Keyword>Win32Proj</Keyword>
<RootNamespace>libpng</RootNamespace>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<Import Project="$(SolutionDir)\zlib.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<CharacterSet>MultiByte</CharacterSet>
<WholeProgramOptimization>true</WholeProgramOptimization>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug Library|Win32'" Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType>
<CharacterSet>MultiByte</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>MultiByte</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release Library|Win32'" Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType>
<CharacterSet>MultiByte</CharacterSet>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug Library|Win32'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" />
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release Library|Win32'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" />
</ImportGroup>
<PropertyGroup Label="UserMacros" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<LinkIncremental>false</LinkIncremental>
<CustomBuildBeforeTargets>
</CustomBuildBeforeTargets>
<TargetName>$(ProjectName)14</TargetName>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug Library|Win32'">
<LinkIncremental>false</LinkIncremental>
<CustomBuildBeforeTargets />
<TargetName>$(ProjectName)14</TargetName>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<LinkIncremental>false</LinkIncremental>
<CustomBuildBeforeTargets>
</CustomBuildBeforeTargets>
<TargetName>$(ProjectName)14</TargetName>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release Library|Win32'">
<LinkIncremental>false</LinkIncremental>
<CustomBuildBeforeTargets />
<TargetName>$(ProjectName)14</TargetName>
</PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<ClCompile>
<PrecompiledHeader>NotUsing</PrecompiledHeader>
<WarningLevel>Level4</WarningLevel>
<MinimalRebuild>false</MinimalRebuild>
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
<PreprocessorDefinitions>WIN32;PNG_BUILD_DLL;PNG_NO_MODULEDEF;_DEBUG;_WINDOWS;_USRDLL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<IntrinsicFunctions>true</IntrinsicFunctions>
<FunctionLevelLinking>true</FunctionLevelLinking>
<FloatingPointExceptions>false</FloatingPointExceptions>
<TreatWChar_tAsBuiltInType>false</TreatWChar_tAsBuiltInType>
<PrecompiledHeaderFile>png.h</PrecompiledHeaderFile>
<BrowseInformation>true</BrowseInformation>
<CompileAs>CompileAsC</CompileAs>
<StringPooling>true</StringPooling>
<DisableSpecificWarnings>4996;4127</DisableSpecificWarnings>
<AdditionalIncludeDirectories>$(ZLibSrcDir);..\..\..\scripts;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<TreatWarningAsError>true</TreatWarningAsError>
<Optimization>Disabled</Optimization>
</ClCompile>
<Link>
<SubSystem>Windows</SubSystem>
<GenerateDebugInformation>true</GenerateDebugInformation>
<AdditionalDependencies>zlib.lib;msvcrtd.lib;kernel32.lib</AdditionalDependencies>
<IgnoreAllDefaultLibraries>true</IgnoreAllDefaultLibraries>
<Version>14</Version>
<AdditionalLibraryDirectories>$(OutDir)</AdditionalLibraryDirectories>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug Library|Win32'">
<ClCompile>
<PrecompiledHeader>NotUsing</PrecompiledHeader>
<WarningLevel>Level4</WarningLevel>
<MinimalRebuild>false</MinimalRebuild>
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
<Optimization>Disabled</Optimization>
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
<PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;_USRDLL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<IntrinsicFunctions>true</IntrinsicFunctions>
<FunctionLevelLinking>true</FunctionLevelLinking>
<FloatingPointExceptions>false</FloatingPointExceptions>
<TreatWChar_tAsBuiltInType>false</TreatWChar_tAsBuiltInType>
<PrecompiledHeaderFile>png.h</PrecompiledHeaderFile>
<BrowseInformation>true</BrowseInformation>
<CompileAs>CompileAsC</CompileAs>
<StringPooling>true</StringPooling>
<DisableSpecificWarnings>4996;4127</DisableSpecificWarnings>
<AdditionalIncludeDirectories>$(ZLibSrcDir);..\..\..\scripts;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<TreatWarningAsError>true</TreatWarningAsError>
</ClCompile>
<Link>
<SubSystem>Windows</SubSystem>
<GenerateDebugInformation>true</GenerateDebugInformation>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<ClCompile>
<WarningLevel>Level4</WarningLevel>
<PrecompiledHeader>NotUsing</PrecompiledHeader>
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
<FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions>
<PreprocessorDefinitions>WIN32;PNG_BUILD_DLL;PNG_NO_MODULEDEF;NDEBUG;_WINDOWS;_USRDLL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<FloatingPointExceptions>false</FloatingPointExceptions>
<TreatWChar_tAsBuiltInType>false</TreatWChar_tAsBuiltInType>
<PrecompiledHeaderFile>png.h</PrecompiledHeaderFile>
<BrowseInformation>true</BrowseInformation>
<CompileAs>CompileAsC</CompileAs>
<StringPooling>true</StringPooling>
<MinimalRebuild>false</MinimalRebuild>
<DisableSpecificWarnings>4996;4127</DisableSpecificWarnings>
<AdditionalIncludeDirectories>$(ZLib1Dir);..\..\..\scripts;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<TreatWarningAsError>true</TreatWarningAsError>
<Optimization>Full</Optimization>
</ClCompile>
<Link>
<SubSystem>Windows</SubSystem>
<GenerateDebugInformation>true</GenerateDebugInformation>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<OptimizeReferences>true</OptimizeReferences>
<AdditionalDependencies>zdll.lib;msvcrt.lib;kernel32.lib</AdditionalDependencies>
<IgnoreAllDefaultLibraries>true</IgnoreAllDefaultLibraries>
<Version>14</Version>
<AdditionalLibraryDirectories>$(ZLib1Dir)</AdditionalLibraryDirectories>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release Library|Win32'">
<ClCompile>
<WarningLevel>Level4</WarningLevel>
<PrecompiledHeader>NotUsing</PrecompiledHeader>
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
<FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions>
<PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_USRDLL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<FloatingPointExceptions>false</FloatingPointExceptions>
<TreatWChar_tAsBuiltInType>false</TreatWChar_tAsBuiltInType>
<PrecompiledHeaderFile>png.h</PrecompiledHeaderFile>
<BrowseInformation>true</BrowseInformation>
<CompileAs>CompileAsC</CompileAs>
<StringPooling>true</StringPooling>
<MinimalRebuild>false</MinimalRebuild>
<DisableSpecificWarnings>4996;4127</DisableSpecificWarnings>
<AdditionalIncludeDirectories>$(ZLib1Dir);..\..\..\scripts;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<TreatWarningAsError>true</TreatWarningAsError>
<Optimization>Full</Optimization>
</ClCompile>
<Link>
<SubSystem>Windows</SubSystem>
<GenerateDebugInformation>true</GenerateDebugInformation>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<OptimizeReferences>true</OptimizeReferences>
</Link>
</ItemDefinitionGroup>
<ItemGroup>
<ClCompile Include="..\..\..\png.c">
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Create</PrecompiledHeader>
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug Library|Win32'">Create</PrecompiledHeader>
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Create</PrecompiledHeader>
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release Library|Win32'">Create</PrecompiledHeader>
</ClCompile>
<ClCompile Include="..\..\..\pngerror.c" />
<ClCompile Include="..\..\..\pngget.c" />
<ClCompile Include="..\..\..\pngmem.c" />
<ClCompile Include="..\..\..\pngpread.c" />
<ClCompile Include="..\..\..\pngread.c" />
<ClCompile Include="..\..\..\pngrio.c" />
<ClCompile Include="..\..\..\pngrtran.c" />
<ClCompile Include="..\..\..\pngrutil.c" />
<ClCompile Include="..\..\..\pngset.c" />
<ClCompile Include="..\..\..\pngtrans.c" />
<ClCompile Include="..\..\..\pngwio.c" />
<ClCompile Include="..\..\..\pngwrite.c" />
<ClCompile Include="..\..\..\pngwtran.c" />
<ClCompile Include="..\..\..\pngwutil.c" />
</ItemGroup>
<ItemGroup>
<ResourceCompile Include="..\..\..\scripts\pngwin.rc">
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug Library|Win32'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release Library|Win32'">true</ExcludedFromBuild>
</ResourceCompile>
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
</Project>

View File

@ -0,0 +1,217 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug Library|Win32">
<Configuration>Debug Library</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Debug|Win32">
<Configuration>Debug</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release Library|Win32">
<Configuration>Release Library</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|Win32">
<Configuration>Release</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
</ItemGroup>
<PropertyGroup Label="Globals">
<ProjectGuid>{228BA965-50D5-42B2-8BCF-AFCC227E3C1D}</ProjectGuid>
<Keyword>Win32Proj</Keyword>
<RootNamespace>pngtest</RootNamespace>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<Import Project="$(SolutionDir)\zlib.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug Library|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release Library|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug Library|Win32'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" />
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release Library|Win32'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" />
</ImportGroup>
<PropertyGroup Label="UserMacros" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<LinkIncremental>false</LinkIncremental>
<CustomBuildAfterTargets />
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug Library|Win32'">
<LinkIncremental>false</LinkIncremental>
<CustomBuildAfterTargets />
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<LinkIncremental>false</LinkIncremental>
<CustomBuildAfterTargets />
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release Library|Win32'">
<LinkIncremental>false</LinkIncremental>
<CustomBuildAfterTargets />
</PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<ClCompile>
<PrecompiledHeader>NotUsing</PrecompiledHeader>
<WarningLevel>Level4</WarningLevel>
<MinimalRebuild>false</MinimalRebuild>
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
<Optimization>Disabled</Optimization>
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
<PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<AdditionalIncludeDirectories>$(ZLibSrcDir);..\..\..\scripts;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<DisableSpecificWarnings>4996</DisableSpecificWarnings>
<CompileAsManaged>false</CompileAsManaged>
<TreatWarningAsError>true</TreatWarningAsError>
<IntrinsicFunctions>true</IntrinsicFunctions>
<StringPooling>true</StringPooling>
<FunctionLevelLinking>false</FunctionLevelLinking>
<BrowseInformation>true</BrowseInformation>
</ClCompile>
<Link>
<SubSystem>Console</SubSystem>
<GenerateDebugInformation>true</GenerateDebugInformation>
<AdditionalDependencies>libpng14.lib;zlib.lib;msvcrtd.lib;kernel32.lib</AdditionalDependencies>
<IgnoreAllDefaultLibraries>true</IgnoreAllDefaultLibraries>
<AdditionalLibraryDirectories>$(OutDir)</AdditionalLibraryDirectories>
</Link>
<CustomBuildStep>
<Message>Executing PNG test program</Message>
<Command>"$(OutDir)pngtest.exe" ..\..\..\pngtest.png "$(IntDir)pngout.png"</Command>
<Outputs>$(IntDir)pngout.png</Outputs>
<Inputs>..\..\..\pngtest.png;$(OutDir)pngtest.exe</Inputs>
</CustomBuildStep>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug Library|Win32'">
<ClCompile>
<PrecompiledHeader>NotUsing</PrecompiledHeader>
<WarningLevel>Level4</WarningLevel>
<MinimalRebuild>false</MinimalRebuild>
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
<Optimization>Disabled</Optimization>
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
<PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<AdditionalIncludeDirectories>$(ZLibSrcDir);..\..\..\scripts;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<DisableSpecificWarnings>4996</DisableSpecificWarnings>
<CompileAsManaged>false</CompileAsManaged>
<TreatWarningAsError>true</TreatWarningAsError>
<IntrinsicFunctions>true</IntrinsicFunctions>
<StringPooling>true</StringPooling>
<FunctionLevelLinking>false</FunctionLevelLinking>
<BrowseInformation>true</BrowseInformation>
</ClCompile>
<Link>
<SubSystem>Console</SubSystem>
<GenerateDebugInformation>true</GenerateDebugInformation>
<AdditionalDependencies>libpng14.lib;zlib.lib;msvcrtd.lib;kernel32.lib</AdditionalDependencies>
<IgnoreAllDefaultLibraries>true</IgnoreAllDefaultLibraries>
<AdditionalLibraryDirectories>$(OutDir)</AdditionalLibraryDirectories>
</Link>
<CustomBuildStep>
<Message>Executing PNG test program</Message>
<Command>"$(OutDir)pngtest.exe" ..\..\..\pngtest.png "$(IntDir)pngout.png"</Command>
<Outputs>$(IntDir)pngout.png</Outputs>
<Inputs>..\..\..\pngtest.png;$(OutDir)pngtest.exe</Inputs>
</CustomBuildStep>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<ClCompile>
<WarningLevel>Level4</WarningLevel>
<PrecompiledHeader>NotUsing</PrecompiledHeader>
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
<Optimization>Full</Optimization>
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
<FunctionLevelLinking>false</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions>
<PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<AdditionalIncludeDirectories>$(ZLib1Dir);..\..\..\scripts;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<DisableSpecificWarnings>4996</DisableSpecificWarnings>
<CompileAsManaged>false</CompileAsManaged>
<TreatWarningAsError>true</TreatWarningAsError>
<StringPooling>true</StringPooling>
<MinimalRebuild>false</MinimalRebuild>
<BrowseInformation>true</BrowseInformation>
</ClCompile>
<Link>
<SubSystem>Console</SubSystem>
<GenerateDebugInformation>true</GenerateDebugInformation>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<OptimizeReferences>true</OptimizeReferences>
<AdditionalDependencies>libpng14.lib;msvcrt.lib;kernel32.lib</AdditionalDependencies>
<IgnoreAllDefaultLibraries>true</IgnoreAllDefaultLibraries>
<AdditionalLibraryDirectories>$(OutDir)</AdditionalLibraryDirectories>
</Link>
<CustomBuildStep>
<Message>Executing PNG test program</Message>
<Command>"$(OutDir)pngtest.exe" ..\..\..\pngtest.png "$(IntDir)pngout.png"</Command>
<Outputs>$(IntDir)pngout.png</Outputs>
<Inputs>..\..\..\pngtest.png;$(OutDir)pngtest.exe</Inputs>
</CustomBuildStep>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release Library|Win32'">
<ClCompile>
<WarningLevel>Level4</WarningLevel>
<PrecompiledHeader>NotUsing</PrecompiledHeader>
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
<Optimization>Full</Optimization>
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
<FunctionLevelLinking>false</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions>
<PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<AdditionalIncludeDirectories>$(ZLib1Dir);..\..\..\scripts;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<DisableSpecificWarnings>4996</DisableSpecificWarnings>
<CompileAsManaged>false</CompileAsManaged>
<TreatWarningAsError>true</TreatWarningAsError>
<StringPooling>true</StringPooling>
<MinimalRebuild>false</MinimalRebuild>
<BrowseInformation>true</BrowseInformation>
</ClCompile>
<Link>
<SubSystem>Console</SubSystem>
<GenerateDebugInformation>true</GenerateDebugInformation>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<OptimizeReferences>true</OptimizeReferences>
<AdditionalDependencies>libpng14.lib;zlib.lib;msvcrt.lib;kernel32.lib</AdditionalDependencies>
<IgnoreAllDefaultLibraries>true</IgnoreAllDefaultLibraries>
<AdditionalLibraryDirectories>$(OutDir);$(ZLib1Dir)</AdditionalLibraryDirectories>
</Link>
<CustomBuildStep>
<Message>Executing PNG test program</Message>
<Command>$(OutDir)pngtest.exe ..\..\..\pngtest.png $(IntDir)pngout.png</Command>
<Command>"$(OutDir)pngtest.exe" ..\..\..\pngtest.png "$(IntDir)pngout.png"</Command>
<Outputs>$(IntDir)pngout.png</Outputs>
<Inputs>..\..\..\pngtest.png;$(OutDir)pngtest.exe</Inputs>
</CustomBuildStep>
</ItemDefinitionGroup>
<ItemGroup>
<ClCompile Include="..\..\..\pngtest.c" />
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
</Project>

View File

@ -0,0 +1,93 @@
VisualStudio instructions
libpng version 1.4.4 - September 23, 2010
Copyright (c) 1998-2010 Glenn Randers-Pehrson
This code is released under the libpng license.
For conditions of distribution and use, see the disclaimer
and license in png.h
This directory contains support for building libpng under MicroSoft
VisualStudio 2010. It may also work under later versions of VisualStudio.
You should be familiar with VisualStudio before using this directory.
This is a slightly modified copy of the 'vstudio' solution from libpng
1.5; it is intended to provide compatibility for libpng 1.4 with later
releases of zlib (from 1.2.4) and to provide a migration aid for 1.5.
A 'VB' DLL is no longer produced - use the standard 'Release' DLL.
Initial preparations
====================
You should install the 'official' build of zlib on your system - follow the
instructions provided on http://www.zlib.net. When a new release is being
made of zlib the instructions disappear for a while until the new official
build is available. You will have to wait.
You must enter some information in zlib.props before attempting to build
with this 'solution'. Please read and edit zlib.props first. You will
probably not be familiar with the contents of zlib.props - do not worry,
it is mostly harmless.
Make sure that your official build layout matches the requirements listed
in zlib.props. Prior to zlib-1.2.4 the official build (1.2.3) placed
include and library files in different directories - if you find this
has happened just put them all in the same directory.
This is all you need to do to build the 'release' and 'release library'
configurations.
Debugging
=========
The release configurations default to /Ox optimization. Full debugging
information is produced (in the .pdb), but if you encounter a problem the
optimization may make it difficult to debug. Simply rebuild with a lower
optimization level (e.g. /Od.)
Stop reading here
=================
You have enough information to build a working application.
Debug versions have limited support
===================================
This solution includes limited support for debug versions of libpng. You
do not need these unless your own solution itself uses debug builds (it is
far more effective to debug on the release builds, there is no point building
a special debug build.)
If, despite the previous paragraph, you still feel you need a debug build you
will have to download the zlib source as well (http://www.zlib.net) and include
the directory where you unpack it in zlib.props. This solution will then be
able to build a minimal zlib sufficient for libpng. This build is only
suitable for making a debug libpng.
The debug build of libpng is minimally supported. Support for debug builds of
zlib is also minimal. You really don't want to do this.
This solution only supports the Multi-Threaded DLL C Runtime
============================================================
If you examine the solution you will find that it very deliberately lists
exactly which MicroSoft DLLs it is linking against. It explicitly links
against msvcrt.lib. The debug version links against msvcrtd.lib (this is
why it is a debug version - it's nothing to do with having any special
debug support, it doesn't).
These versions of the MicroSoft C runtime correspond to the compiler flags
/MD (release) and /MDd (debug) - the "Multi-Threaded DLL" implementation of the
C runtime library.
If you need to change this then you will have to make sure that both the
compiler flags and the ".lib" in the linker dependences match up. Fortunately
neither zlib nor libpng require libraries other than a C runtime and
kernel32.
You cannot pass (FILE*) objects from a different runtime (including msvcrtd
to msvcrt) to libpng. If you do then your program will crash within libpng
when it first makes a file read or write call.
It is likely if you have read this far that you have found you can't avoid
having multiple C runtimes in your program. This is OK, it does work, but
you will have to implement the libpng file read/write callbacks rather than
using the internal libpng default. This is easy.

View File

@ -0,0 +1,49 @@
Microsoft Visual Studio Solution File, Format Version 11.00
# Visual C++ Express 2010
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libpng", "libpng\libpng.vcxproj", "{D6973076-9317-4EF2-A0B8-B7A18AC0713E}"
ProjectSection(ProjectDependencies) = postProject
{18040998-CC22-2BAE-FE7A-C0A3038F1D5C} = {18040998-CC22-2BAE-FE7A-C0A3038F1D5C}
EndProjectSection
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "pngtest", "pngtest\pngtest.vcxproj", "{228BA965-50D5-42B2-8BCF-AFCC227E3C1D}"
ProjectSection(ProjectDependencies) = postProject
{D6973076-9317-4EF2-A0B8-B7A18AC0713E} = {D6973076-9317-4EF2-A0B8-B7A18AC0713E}
EndProjectSection
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "zlib", "zlib\zlib.vcxproj", "{18040998-CC22-2BAE-FE7A-C0A3038F1D5C}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug Library|Win32 = Debug Library|Win32
Debug|Win32 = Debug|Win32
Release Library|Win32 = Release Library|Win32
Release|Win32 = Release|Win32
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{D6973076-9317-4EF2-A0B8-B7A18AC0713E}.Debug Library|Win32.ActiveCfg = Debug Library|Win32
{D6973076-9317-4EF2-A0B8-B7A18AC0713E}.Debug Library|Win32.Build.0 = Debug Library|Win32
{D6973076-9317-4EF2-A0B8-B7A18AC0713E}.Debug|Win32.ActiveCfg = Debug|Win32
{D6973076-9317-4EF2-A0B8-B7A18AC0713E}.Debug|Win32.Build.0 = Debug|Win32
{D6973076-9317-4EF2-A0B8-B7A18AC0713E}.Release Library|Win32.ActiveCfg = Release Library|Win32
{D6973076-9317-4EF2-A0B8-B7A18AC0713E}.Release Library|Win32.Build.0 = Release Library|Win32
{D6973076-9317-4EF2-A0B8-B7A18AC0713E}.Release|Win32.ActiveCfg = Release|Win32
{D6973076-9317-4EF2-A0B8-B7A18AC0713E}.Release|Win32.Build.0 = Release|Win32
{228BA965-50D5-42B2-8BCF-AFCC227E3C1D}.Debug Library|Win32.ActiveCfg = Debug Library|Win32
{228BA965-50D5-42B2-8BCF-AFCC227E3C1D}.Debug Library|Win32.Build.0 = Debug Library|Win32
{228BA965-50D5-42B2-8BCF-AFCC227E3C1D}.Debug|Win32.ActiveCfg = Debug|Win32
{228BA965-50D5-42B2-8BCF-AFCC227E3C1D}.Debug|Win32.Build.0 = Debug|Win32
{228BA965-50D5-42B2-8BCF-AFCC227E3C1D}.Release Library|Win32.ActiveCfg = Release Library|Win32
{228BA965-50D5-42B2-8BCF-AFCC227E3C1D}.Release Library|Win32.Build.0 = Release Library|Win32
{228BA965-50D5-42B2-8BCF-AFCC227E3C1D}.Release|Win32.ActiveCfg = Release|Win32
{228BA965-50D5-42B2-8BCF-AFCC227E3C1D}.Release|Win32.Build.0 = Release|Win32
{18040998-CC22-2BAE-FE7A-C0A3038F1D5C}.Debug Library|Win32.ActiveCfg = Debug Library|Win32
{18040998-CC22-2BAE-FE7A-C0A3038F1D5C}.Debug Library|Win32.Build.0 = Debug Library|Win32
{18040998-CC22-2BAE-FE7A-C0A3038F1D5C}.Debug|Win32.ActiveCfg = Debug|Win32
{18040998-CC22-2BAE-FE7A-C0A3038F1D5C}.Debug|Win32.Build.0 = Debug|Win32
{18040998-CC22-2BAE-FE7A-C0A3038F1D5C}.Release Library|Win32.ActiveCfg = Debug|Win32
{18040998-CC22-2BAE-FE7A-C0A3038F1D5C}.Release|Win32.ActiveCfg = Debug|Win32
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
EndGlobal

View File

@ -0,0 +1,43 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
* zlib.props - location of zlib source and build
*
* libpng version 1.4.4 - September 23, 2010
*
* Copyright (c) 1998-2010 Glenn Randers-Pehrson
*
* This code is released under the libpng license.
* For conditions of distribution and use, see the disclaimer
* and license in png.h
* You must edit this file to record the location of the zlib
* official and debug builds unless they are in the default
* directories:
* official: zlib1
* debug: zlib debug
-->
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup Label="Globals">
<!-- Place the name of the directory containing the official
build of zlib and the corresponding header files in this
property. The directory is expected to contain at least:
zdll.lib # The DLL import library
zlib.lib # The static library
zlib.h # The header file
zconf.h # Another header file included by zlib.h
-->
<ZLib1Dir>..\..\..\..\zlib124-dll\zlib-1.2.4</ZLib1Dir>
<!-- Place the name of the directory containing the source of
zlib used for debugging in this property.
The directory need only contain the '.c' and '.h' files
from the source. For your own sanity make sure that the
'.h' files in the source match those from the 'official'
build above.
-->
<ZLibSrcDir>..\..\..\..\zlib-1.2.4</ZLibSrcDir>
</PropertyGroup>
</Project>

View File

@ -0,0 +1,112 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug Library|Win32">
<Configuration>Debug Library</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Debug|Win32">
<Configuration>Debug</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
</ItemGroup>
<ItemGroup>
<ClCompile Include="$(ZLibSrcDir)\adler32.c" />
<ClCompile Include="$(ZLibSrcDir)\compress.c" />
<ClCompile Include="$(ZLibSrcDir)\crc32.c" />
<ClCompile Include="$(ZLibSrcDir)\deflate.c" />
<ClCompile Include="$(ZLibSrcDir)\infback.c" />
<ClCompile Include="$(ZLibSrcDir)\inffast.c" />
<ClCompile Include="$(ZLibSrcDir)\inflate.c" />
<ClCompile Include="$(ZLibSrcDir)\inftrees.c" />
<ClCompile Include="$(ZLibSrcDir)\trees.c" />
<ClCompile Include="$(ZLibSrcDir)\uncompr.c" />
<ClCompile Include="$(ZLibSrcDir)\zutil.c" />
</ItemGroup>
<PropertyGroup Label="Globals">
<Keyword>Win32Proj</Keyword>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<Import Project="$(SolutionDir)\zlib.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<WholeProgramOptimization>true</WholeProgramOptimization>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug Library|Win32'" Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug Library|Win32'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" />
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<PropertyGroup Label="UserMacros" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<LinkIncremental>false</LinkIncremental>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug Library|Win32'">
<LinkIncremental>true</LinkIncremental>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<LinkIncremental>true</LinkIncremental>
</PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<ClCompile>
<PreprocessorDefinitions>WIN32;ZLIB_DLL;_DEBUG;_WINDOWS;_USRDLL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
<WarningLevel>Level3</WarningLevel>
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
<Optimization>Disabled</Optimization>
<IntrinsicFunctions>true</IntrinsicFunctions>
</ClCompile>
<Link>
<GenerateDebugInformation>true</GenerateDebugInformation>
<SubSystem>Windows</SubSystem>
<Version>1</Version>
<AdditionalDependencies>msvcrtd.lib;kernel32.lib</AdditionalDependencies>
<IgnoreAllDefaultLibraries>true</IgnoreAllDefaultLibraries>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug Library|Win32'">
<ClCompile>
<PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;_USRDLL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
<WarningLevel>Level3</WarningLevel>
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
<Optimization>Disabled</Optimization>
</ClCompile>
<Link>
<TargetMachine>MachineX86</TargetMachine>
<GenerateDebugInformation>true</GenerateDebugInformation>
<SubSystem>Windows</SubSystem>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<ClCompile>
<PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_USRDLL;DEBUGZLIB_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
<WarningLevel>Level3</WarningLevel>
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
</ClCompile>
<Link>
<TargetMachine>MachineX86</TargetMachine>
<GenerateDebugInformation>true</GenerateDebugInformation>
<SubSystem>Windows</SubSystem>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<OptimizeReferences>true</OptimizeReferences>
</Link>
</ItemDefinitionGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
</Project>

View File

@ -1,6 +0,0 @@
A set of project files is available for WinCE. Get
libpng-1.2.5-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.5-project-wince.zip"

View File

@ -0,0 +1,3 @@
1 September 2010: Philippe Hausler updated the xcode project to work
with libpng-1.4.x and added iOS targets for simulator and device.

View File

@ -0,0 +1,2 @@
*.mode1*
*.pbxuser

View File

@ -0,0 +1,805 @@
// !$*UTF8*$!
{
archiveVersion = 1;
classes = {
};
objectVersion = 45;
objects = {
/* Begin PBXAggregateTarget section */
5BF3B110122B1C860092AE4E /* libpng */ = {
isa = PBXAggregateTarget;
buildConfigurationList = 5BF3B11B122B1CD80092AE4E /* Build configuration list for PBXAggregateTarget "libpng" */;
buildPhases = (
);
dependencies = (
5BF3B114122B1C9B0092AE4E /* PBXTargetDependency */,
5BF3B116122B1C9B0092AE4E /* PBXTargetDependency */,
);
name = libpng;
productName = "libpng (iOS)";
};
5BF3B148122DE51E0092AE4E /* Configure */ = {
isa = PBXAggregateTarget;
buildConfigurationList = 5BF3B14B122DE5430092AE4E /* Build configuration list for PBXAggregateTarget "Configure" */;
buildPhases = (
5BF3B147122DE51E0092AE4E /* Configure */,
);
dependencies = (
);
name = Configure;
productName = Configure;
};
/* End PBXAggregateTarget section */
/* Begin PBXBuildFile section */
5BF3B0C9122B1BEE0092AE4E /* pngpriv.h in Headers */ = {isa = PBXBuildFile; fileRef = 5BF3B0B5122B1BEE0092AE4E /* pngpriv.h */; };
5BF3B0CA122B1BEE0092AE4E /* png.c in Sources */ = {isa = PBXBuildFile; fileRef = 5BF3B0B6122B1BEE0092AE4E /* png.c */; };
5BF3B0CB122B1BEE0092AE4E /* png.h in Headers */ = {isa = PBXBuildFile; fileRef = 5BF3B0B7122B1BEE0092AE4E /* png.h */; };
5BF3B0CC122B1BEE0092AE4E /* pngconf.h in Headers */ = {isa = PBXBuildFile; fileRef = 5BF3B0B8122B1BEE0092AE4E /* pngconf.h */; };
5BF3B0CD122B1BEE0092AE4E /* pngerror.c in Sources */ = {isa = PBXBuildFile; fileRef = 5BF3B0B9122B1BEE0092AE4E /* pngerror.c */; };
5BF3B0CF122B1BEE0092AE4E /* pngget.c in Sources */ = {isa = PBXBuildFile; fileRef = 5BF3B0BB122B1BEE0092AE4E /* pngget.c */; };
5BF3B0D0122B1BEE0092AE4E /* pngmem.c in Sources */ = {isa = PBXBuildFile; fileRef = 5BF3B0BC122B1BEE0092AE4E /* pngmem.c */; };
5BF3B0D1122B1BEE0092AE4E /* pngpread.c in Sources */ = {isa = PBXBuildFile; fileRef = 5BF3B0BD122B1BEE0092AE4E /* pngpread.c */; };
5BF3B0D2122B1BEE0092AE4E /* pngread.c in Sources */ = {isa = PBXBuildFile; fileRef = 5BF3B0BE122B1BEE0092AE4E /* pngread.c */; };
5BF3B0D3122B1BEE0092AE4E /* pngrio.c in Sources */ = {isa = PBXBuildFile; fileRef = 5BF3B0BF122B1BEE0092AE4E /* pngrio.c */; };
5BF3B0D4122B1BEE0092AE4E /* pngrtran.c in Sources */ = {isa = PBXBuildFile; fileRef = 5BF3B0C0122B1BEE0092AE4E /* pngrtran.c */; };
5BF3B0D5122B1BEE0092AE4E /* pngrutil.c in Sources */ = {isa = PBXBuildFile; fileRef = 5BF3B0C1122B1BEE0092AE4E /* pngrutil.c */; };
5BF3B0D6122B1BEE0092AE4E /* pngset.c in Sources */ = {isa = PBXBuildFile; fileRef = 5BF3B0C2122B1BEE0092AE4E /* pngset.c */; };
5BF3B0D7122B1BEE0092AE4E /* pngtrans.c in Sources */ = {isa = PBXBuildFile; fileRef = 5BF3B0C3122B1BEE0092AE4E /* pngtrans.c */; };
5BF3B0D9122B1BEE0092AE4E /* pngwio.c in Sources */ = {isa = PBXBuildFile; fileRef = 5BF3B0C5122B1BEE0092AE4E /* pngwio.c */; };
5BF3B0DA122B1BEE0092AE4E /* pngwrite.c in Sources */ = {isa = PBXBuildFile; fileRef = 5BF3B0C6122B1BEE0092AE4E /* pngwrite.c */; };
5BF3B0DB122B1BEE0092AE4E /* pngwtran.c in Sources */ = {isa = PBXBuildFile; fileRef = 5BF3B0C7122B1BEE0092AE4E /* pngwtran.c */; };
5BF3B0DC122B1BEE0092AE4E /* pngwutil.c in Sources */ = {isa = PBXBuildFile; fileRef = 5BF3B0C8122B1BEE0092AE4E /* pngwutil.c */; };
5BF3B0DD122B1BEE0092AE4E /* pngpriv.h in Headers */ = {isa = PBXBuildFile; fileRef = 5BF3B0B5122B1BEE0092AE4E /* pngpriv.h */; };
5BF3B0DE122B1BEE0092AE4E /* png.c in Sources */ = {isa = PBXBuildFile; fileRef = 5BF3B0B6122B1BEE0092AE4E /* png.c */; };
5BF3B0DF122B1BEE0092AE4E /* png.h in Headers */ = {isa = PBXBuildFile; fileRef = 5BF3B0B7122B1BEE0092AE4E /* png.h */; };
5BF3B0E0122B1BEE0092AE4E /* pngconf.h in Headers */ = {isa = PBXBuildFile; fileRef = 5BF3B0B8122B1BEE0092AE4E /* pngconf.h */; };
5BF3B0E1122B1BEE0092AE4E /* pngerror.c in Sources */ = {isa = PBXBuildFile; fileRef = 5BF3B0B9122B1BEE0092AE4E /* pngerror.c */; };
5BF3B0E3122B1BEE0092AE4E /* pngget.c in Sources */ = {isa = PBXBuildFile; fileRef = 5BF3B0BB122B1BEE0092AE4E /* pngget.c */; };
5BF3B0E4122B1BEE0092AE4E /* pngmem.c in Sources */ = {isa = PBXBuildFile; fileRef = 5BF3B0BC122B1BEE0092AE4E /* pngmem.c */; };
5BF3B0E5122B1BEE0092AE4E /* pngpread.c in Sources */ = {isa = PBXBuildFile; fileRef = 5BF3B0BD122B1BEE0092AE4E /* pngpread.c */; };
5BF3B0E6122B1BEE0092AE4E /* pngread.c in Sources */ = {isa = PBXBuildFile; fileRef = 5BF3B0BE122B1BEE0092AE4E /* pngread.c */; };
5BF3B0E7122B1BEE0092AE4E /* pngrio.c in Sources */ = {isa = PBXBuildFile; fileRef = 5BF3B0BF122B1BEE0092AE4E /* pngrio.c */; };
5BF3B0E8122B1BEE0092AE4E /* pngrtran.c in Sources */ = {isa = PBXBuildFile; fileRef = 5BF3B0C0122B1BEE0092AE4E /* pngrtran.c */; };
5BF3B0E9122B1BEE0092AE4E /* pngrutil.c in Sources */ = {isa = PBXBuildFile; fileRef = 5BF3B0C1122B1BEE0092AE4E /* pngrutil.c */; };
5BF3B0EA122B1BEE0092AE4E /* pngset.c in Sources */ = {isa = PBXBuildFile; fileRef = 5BF3B0C2122B1BEE0092AE4E /* pngset.c */; };
5BF3B0EB122B1BEE0092AE4E /* pngtrans.c in Sources */ = {isa = PBXBuildFile; fileRef = 5BF3B0C3122B1BEE0092AE4E /* pngtrans.c */; };
5BF3B0ED122B1BEE0092AE4E /* pngwio.c in Sources */ = {isa = PBXBuildFile; fileRef = 5BF3B0C5122B1BEE0092AE4E /* pngwio.c */; };
5BF3B0EE122B1BEE0092AE4E /* pngwrite.c in Sources */ = {isa = PBXBuildFile; fileRef = 5BF3B0C6122B1BEE0092AE4E /* pngwrite.c */; };
5BF3B0EF122B1BEE0092AE4E /* pngwtran.c in Sources */ = {isa = PBXBuildFile; fileRef = 5BF3B0C7122B1BEE0092AE4E /* pngwtran.c */; };
5BF3B0F0122B1BEE0092AE4E /* pngwutil.c in Sources */ = {isa = PBXBuildFile; fileRef = 5BF3B0C8122B1BEE0092AE4E /* pngwutil.c */; };
5BF3B0F1122B1BEE0092AE4E /* pngpriv.h in Headers */ = {isa = PBXBuildFile; fileRef = 5BF3B0B5122B1BEE0092AE4E /* pngpriv.h */; };
5BF3B0F2122B1BEE0092AE4E /* png.c in Sources */ = {isa = PBXBuildFile; fileRef = 5BF3B0B6122B1BEE0092AE4E /* png.c */; };
5BF3B0F3122B1BEE0092AE4E /* png.h in Headers */ = {isa = PBXBuildFile; fileRef = 5BF3B0B7122B1BEE0092AE4E /* png.h */; };
5BF3B0F4122B1BEE0092AE4E /* pngconf.h in Headers */ = {isa = PBXBuildFile; fileRef = 5BF3B0B8122B1BEE0092AE4E /* pngconf.h */; };
5BF3B0F5122B1BEE0092AE4E /* pngerror.c in Sources */ = {isa = PBXBuildFile; fileRef = 5BF3B0B9122B1BEE0092AE4E /* pngerror.c */; };
5BF3B0F7122B1BEE0092AE4E /* pngget.c in Sources */ = {isa = PBXBuildFile; fileRef = 5BF3B0BB122B1BEE0092AE4E /* pngget.c */; };
5BF3B0F8122B1BEE0092AE4E /* pngmem.c in Sources */ = {isa = PBXBuildFile; fileRef = 5BF3B0BC122B1BEE0092AE4E /* pngmem.c */; };
5BF3B0F9122B1BEE0092AE4E /* pngpread.c in Sources */ = {isa = PBXBuildFile; fileRef = 5BF3B0BD122B1BEE0092AE4E /* pngpread.c */; };
5BF3B0FA122B1BEE0092AE4E /* pngread.c in Sources */ = {isa = PBXBuildFile; fileRef = 5BF3B0BE122B1BEE0092AE4E /* pngread.c */; };
5BF3B0FB122B1BEE0092AE4E /* pngrio.c in Sources */ = {isa = PBXBuildFile; fileRef = 5BF3B0BF122B1BEE0092AE4E /* pngrio.c */; };
5BF3B0FC122B1BEE0092AE4E /* pngrtran.c in Sources */ = {isa = PBXBuildFile; fileRef = 5BF3B0C0122B1BEE0092AE4E /* pngrtran.c */; };
5BF3B0FD122B1BEE0092AE4E /* pngrutil.c in Sources */ = {isa = PBXBuildFile; fileRef = 5BF3B0C1122B1BEE0092AE4E /* pngrutil.c */; };
5BF3B0FE122B1BEE0092AE4E /* pngset.c in Sources */ = {isa = PBXBuildFile; fileRef = 5BF3B0C2122B1BEE0092AE4E /* pngset.c */; };
5BF3B0FF122B1BEE0092AE4E /* pngtrans.c in Sources */ = {isa = PBXBuildFile; fileRef = 5BF3B0C3122B1BEE0092AE4E /* pngtrans.c */; };
5BF3B101122B1BEE0092AE4E /* pngwio.c in Sources */ = {isa = PBXBuildFile; fileRef = 5BF3B0C5122B1BEE0092AE4E /* pngwio.c */; };
5BF3B102122B1BEE0092AE4E /* pngwrite.c in Sources */ = {isa = PBXBuildFile; fileRef = 5BF3B0C6122B1BEE0092AE4E /* pngwrite.c */; };
5BF3B103122B1BEE0092AE4E /* pngwtran.c in Sources */ = {isa = PBXBuildFile; fileRef = 5BF3B0C7122B1BEE0092AE4E /* pngwtran.c */; };
5BF3B104122B1BEE0092AE4E /* pngwutil.c in Sources */ = {isa = PBXBuildFile; fileRef = 5BF3B0C8122B1BEE0092AE4E /* pngwutil.c */; };
5BF3B135122DE3AA0092AE4E /* libz.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 5BF3B134122DE3AA0092AE4E /* libz.dylib */; };
/* End PBXBuildFile section */
/* Begin PBXContainerItemProxy section */
5BF3B113122B1C9B0092AE4E /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = 08FB7793FE84155DC02AAC07 /* Project object */;
proxyType = 1;
remoteGlobalIDString = 5BF3B08B122B1B6A0092AE4E /* libpng dynamic (Mac OS X) */;
remoteInfo = "libpng dynamic (Mac OS X)";
};
5BF3B115122B1C9B0092AE4E /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = 08FB7793FE84155DC02AAC07 /* Project object */;
proxyType = 1;
remoteGlobalIDString = 5BF3B10B122B1C070092AE4E /* libpng static (iOS Simulator & Device) */;
remoteInfo = "libpng static (iOS Simulator & Device)";
};
5BF3B117122B1CA50092AE4E /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = 08FB7793FE84155DC02AAC07 /* Project object */;
proxyType = 1;
remoteGlobalIDString = D2AAC045055464E500DB518D /* libpng static (Mac OS X) */;
remoteInfo = "libpng static (Mac OS X)";
};
5BF3B119122B1CA50092AE4E /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = 08FB7793FE84155DC02AAC07 /* Project object */;
proxyType = 1;
remoteGlobalIDString = 5BF3B093122B1B9B0092AE4E /* libpng static (iOS) */;
remoteInfo = "libpng static (iOS)";
};
5BF3B158122DE5CC0092AE4E /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = 08FB7793FE84155DC02AAC07 /* Project object */;
proxyType = 1;
remoteGlobalIDString = 5BF3B148122DE51E0092AE4E /* Configure */;
remoteInfo = Configure;
};
5BF3B15A122DE5D20092AE4E /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = 08FB7793FE84155DC02AAC07 /* Project object */;
proxyType = 1;
remoteGlobalIDString = 5BF3B148122DE51E0092AE4E /* Configure */;
remoteInfo = Configure;
};
5BF3B15C122DE5D80092AE4E /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = 08FB7793FE84155DC02AAC07 /* Project object */;
proxyType = 1;
remoteGlobalIDString = 5BF3B148122DE51E0092AE4E /* Configure */;
remoteInfo = Configure;
};
/* End PBXContainerItemProxy section */
/* Begin PBXFileReference section */
5BF3B08C122B1B6A0092AE4E /* libpng.dylib */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.dylib"; includeInIndex = 0; path = libpng.dylib; sourceTree = BUILT_PRODUCTS_DIR; };
5BF3B094122B1B9B0092AE4E /* libpng.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libpng.a; sourceTree = BUILT_PRODUCTS_DIR; };
5BF3B0B3122B1BDA0092AE4E /* README.txt */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = README.txt; sourceTree = "<group>"; };
5BF3B0B5122B1BEE0092AE4E /* pngpriv.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = pngpriv.h; path = ../../pngpriv.h; sourceTree = SOURCE_ROOT; };
5BF3B0B6122B1BEE0092AE4E /* png.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = png.c; path = ../../png.c; sourceTree = SOURCE_ROOT; };
5BF3B0B7122B1BEE0092AE4E /* png.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = png.h; path = ../../png.h; sourceTree = SOURCE_ROOT; };
5BF3B0B8122B1BEE0092AE4E /* pngconf.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = pngconf.h; path = ../../pngconf.h; sourceTree = SOURCE_ROOT; };
5BF3B0B9122B1BEE0092AE4E /* pngerror.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = pngerror.c; path = ../../pngerror.c; sourceTree = SOURCE_ROOT; };
5BF3B0BB122B1BEE0092AE4E /* pngget.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = pngget.c; path = ../../pngget.c; sourceTree = SOURCE_ROOT; };
5BF3B0BC122B1BEE0092AE4E /* pngmem.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = pngmem.c; path = ../../pngmem.c; sourceTree = SOURCE_ROOT; };
5BF3B0BD122B1BEE0092AE4E /* pngpread.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = pngpread.c; path = ../../pngpread.c; sourceTree = SOURCE_ROOT; };
5BF3B0BE122B1BEE0092AE4E /* pngread.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = pngread.c; path = ../../pngread.c; sourceTree = SOURCE_ROOT; };
5BF3B0BF122B1BEE0092AE4E /* pngrio.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = pngrio.c; path = ../../pngrio.c; sourceTree = SOURCE_ROOT; };
5BF3B0C0122B1BEE0092AE4E /* pngrtran.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = pngrtran.c; path = ../../pngrtran.c; sourceTree = SOURCE_ROOT; };
5BF3B0C1122B1BEE0092AE4E /* pngrutil.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = pngrutil.c; path = ../../pngrutil.c; sourceTree = SOURCE_ROOT; };
5BF3B0C2122B1BEE0092AE4E /* pngset.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = pngset.c; path = ../../pngset.c; sourceTree = SOURCE_ROOT; };
5BF3B0C3122B1BEE0092AE4E /* pngtrans.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = pngtrans.c; path = ../../pngtrans.c; sourceTree = SOURCE_ROOT; };
5BF3B0C5122B1BEE0092AE4E /* pngwio.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = pngwio.c; path = ../../pngwio.c; sourceTree = SOURCE_ROOT; };
5BF3B0C6122B1BEE0092AE4E /* pngwrite.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = pngwrite.c; path = ../../pngwrite.c; sourceTree = SOURCE_ROOT; };
5BF3B0C7122B1BEE0092AE4E /* pngwtran.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = pngwtran.c; path = ../../pngwtran.c; sourceTree = SOURCE_ROOT; };
5BF3B0C8122B1BEE0092AE4E /* pngwutil.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = pngwutil.c; path = ../../pngwutil.c; sourceTree = SOURCE_ROOT; };
5BF3B10C122B1C070092AE4E /* libpng.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libpng.a; sourceTree = BUILT_PRODUCTS_DIR; };
5BF3B134122DE3AA0092AE4E /* libz.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = libz.dylib; path = usr/lib/libz.dylib; sourceTree = SDKROOT; };
D2AAC046055464E500DB518D /* libpng.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libpng.a; sourceTree = BUILT_PRODUCTS_DIR; };
/* End PBXFileReference section */
/* Begin PBXFrameworksBuildPhase section */
5BF3B08A122B1B6A0092AE4E /* Frameworks */ = {
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
5BF3B135122DE3AA0092AE4E /* libz.dylib in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
5BF3B092122B1B9B0092AE4E /* Frameworks */ = {
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
);
runOnlyForDeploymentPostprocessing = 0;
};
D289987405E68DCB004EDB86 /* Frameworks */ = {
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXFrameworksBuildPhase section */
/* Begin PBXGroup section */
08FB7794FE84155DC02AAC07 /* png */ = {
isa = PBXGroup;
children = (
5BF3B0B3122B1BDA0092AE4E /* README.txt */,
08FB7795FE84155DC02AAC07 /* Source */,
5BF3B143122DE4620092AE4E /* Libraries */,
1AB674ADFE9D54B511CA2CBB /* Products */,
);
name = png;
sourceTree = "<group>";
};
08FB7795FE84155DC02AAC07 /* Source */ = {
isa = PBXGroup;
children = (
5BF3B0B5122B1BEE0092AE4E /* pngpriv.h */,
5BF3B0B6122B1BEE0092AE4E /* png.c */,
5BF3B0B7122B1BEE0092AE4E /* png.h */,
5BF3B0B8122B1BEE0092AE4E /* pngconf.h */,
5BF3B0B9122B1BEE0092AE4E /* pngerror.c */,
5BF3B0BB122B1BEE0092AE4E /* pngget.c */,
5BF3B0BC122B1BEE0092AE4E /* pngmem.c */,
5BF3B0BD122B1BEE0092AE4E /* pngpread.c */,
5BF3B0BE122B1BEE0092AE4E /* pngread.c */,
5BF3B0BF122B1BEE0092AE4E /* pngrio.c */,
5BF3B0C0122B1BEE0092AE4E /* pngrtran.c */,
5BF3B0C1122B1BEE0092AE4E /* pngrutil.c */,
5BF3B0C2122B1BEE0092AE4E /* pngset.c */,
5BF3B0C3122B1BEE0092AE4E /* pngtrans.c */,
5BF3B0C5122B1BEE0092AE4E /* pngwio.c */,
5BF3B0C6122B1BEE0092AE4E /* pngwrite.c */,
5BF3B0C7122B1BEE0092AE4E /* pngwtran.c */,
5BF3B0C8122B1BEE0092AE4E /* pngwutil.c */,
);
name = Source;
sourceTree = "<group>";
};
1AB674ADFE9D54B511CA2CBB /* Products */ = {
isa = PBXGroup;
children = (
D2AAC046055464E500DB518D /* libpng.a */,
5BF3B08C122B1B6A0092AE4E /* libpng.dylib */,
5BF3B094122B1B9B0092AE4E /* libpng.a */,
5BF3B10C122B1C070092AE4E /* libpng.a */,
);
name = Products;
sourceTree = "<group>";
};
5BF3B143122DE4620092AE4E /* Libraries */ = {
isa = PBXGroup;
children = (
5BF3B134122DE3AA0092AE4E /* libz.dylib */,
);
name = Libraries;
sourceTree = "<group>";
};
/* End PBXGroup section */
/* Begin PBXHeadersBuildPhase section */
5BF3B088122B1B6A0092AE4E /* Headers */ = {
isa = PBXHeadersBuildPhase;
buildActionMask = 2147483647;
files = (
5BF3B0DD122B1BEE0092AE4E /* pngpriv.h in Headers */,
5BF3B0DF122B1BEE0092AE4E /* png.h in Headers */,
5BF3B0E0122B1BEE0092AE4E /* pngconf.h in Headers */,
);
runOnlyForDeploymentPostprocessing = 0;
};
5BF3B090122B1B9B0092AE4E /* Headers */ = {
isa = PBXHeadersBuildPhase;
buildActionMask = 2147483647;
files = (
5BF3B0F1122B1BEE0092AE4E /* pngpriv.h in Headers */,
5BF3B0F3122B1BEE0092AE4E /* png.h in Headers */,
5BF3B0F4122B1BEE0092AE4E /* pngconf.h in Headers */,
);
runOnlyForDeploymentPostprocessing = 0;
};
D2AAC043055464E500DB518D /* Headers */ = {
isa = PBXHeadersBuildPhase;
buildActionMask = 2147483647;
files = (
5BF3B0C9122B1BEE0092AE4E /* pngpriv.h in Headers */,
5BF3B0CB122B1BEE0092AE4E /* png.h in Headers */,
5BF3B0CC122B1BEE0092AE4E /* pngconf.h in Headers */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXHeadersBuildPhase section */
/* Begin PBXNativeTarget section */
5BF3B08B122B1B6A0092AE4E /* libpng dynamic (Mac OS X) */ = {
isa = PBXNativeTarget;
buildConfigurationList = 5BF3B08F122B1B980092AE4E /* Build configuration list for PBXNativeTarget "libpng dynamic (Mac OS X)" */;
buildPhases = (
5BF3B088122B1B6A0092AE4E /* Headers */,
5BF3B089122B1B6A0092AE4E /* Sources */,
5BF3B08A122B1B6A0092AE4E /* Frameworks */,
);
buildRules = (
);
dependencies = (
5BF3B15B122DE5D20092AE4E /* PBXTargetDependency */,
);
name = "libpng dynamic (Mac OS X)";
productName = png;
productReference = 5BF3B08C122B1B6A0092AE4E /* libpng.dylib */;
productType = "com.apple.product-type.library.dynamic";
};
5BF3B093122B1B9B0092AE4E /* libpng static (iOS) */ = {
isa = PBXNativeTarget;
buildConfigurationList = 5BF3B09A122B1B9F0092AE4E /* Build configuration list for PBXNativeTarget "libpng static (iOS)" */;
buildPhases = (
5BF3B090122B1B9B0092AE4E /* Headers */,
5BF3B091122B1B9B0092AE4E /* Sources */,
5BF3B092122B1B9B0092AE4E /* Frameworks */,
);
buildRules = (
);
dependencies = (
5BF3B15D122DE5D80092AE4E /* PBXTargetDependency */,
);
name = "libpng static (iOS)";
productName = png;
productReference = 5BF3B094122B1B9B0092AE4E /* libpng.a */;
productType = "com.apple.product-type.library.static";
};
5BF3B10B122B1C070092AE4E /* libpng static (iOS Simulator & Device) */ = {
isa = PBXNativeTarget;
buildConfigurationList = 5BF3B10F122B1C3A0092AE4E /* Build configuration list for PBXNativeTarget "libpng static (iOS Simulator & Device)" */;
buildPhases = (
5BF3B11D122B1D170092AE4E /* Generate Universal Binary */,
);
buildRules = (
);
dependencies = (
5BF3B118122B1CA50092AE4E /* PBXTargetDependency */,
5BF3B11A122B1CA50092AE4E /* PBXTargetDependency */,
);
name = "libpng static (iOS Simulator & Device)";
productName = png;
productReference = 5BF3B10C122B1C070092AE4E /* libpng.a */;
productType = "com.apple.product-type.library.static";
};
D2AAC045055464E500DB518D /* libpng static (Mac OS X) */ = {
isa = PBXNativeTarget;
buildConfigurationList = 1DEB91EB08733DB70010E9CD /* Build configuration list for PBXNativeTarget "libpng static (Mac OS X)" */;
buildPhases = (
D2AAC043055464E500DB518D /* Headers */,
D2AAC044055464E500DB518D /* Sources */,
D289987405E68DCB004EDB86 /* Frameworks */,
);
buildRules = (
);
dependencies = (
5BF3B159122DE5CC0092AE4E /* PBXTargetDependency */,
);
name = "libpng static (Mac OS X)";
productName = png;
productReference = D2AAC046055464E500DB518D /* libpng.a */;
productType = "com.apple.product-type.library.static";
};
/* End PBXNativeTarget section */
/* Begin PBXProject section */
08FB7793FE84155DC02AAC07 /* Project object */ = {
isa = PBXProject;
buildConfigurationList = 1DEB91EF08733DB70010E9CD /* Build configuration list for PBXProject "libpng" */;
compatibilityVersion = "Xcode 3.1";
hasScannedForEncodings = 1;
mainGroup = 08FB7794FE84155DC02AAC07 /* png */;
projectDirPath = "";
projectRoot = "";
targets = (
5BF3B110122B1C860092AE4E /* libpng */,
5BF3B148122DE51E0092AE4E /* Configure */,
D2AAC045055464E500DB518D /* libpng static (Mac OS X) */,
5BF3B08B122B1B6A0092AE4E /* libpng dynamic (Mac OS X) */,
5BF3B093122B1B9B0092AE4E /* libpng static (iOS) */,
5BF3B10B122B1C070092AE4E /* libpng static (iOS Simulator & Device) */,
);
};
/* End PBXProject section */
/* Begin PBXShellScriptBuildPhase section */
5BF3B11D122B1D170092AE4E /* Generate Universal Binary */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
);
inputPaths = (
);
name = "Generate Universal Binary";
outputPaths = (
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "lipo $BUILD_DIR/$CONFIGURATION/iphoneos/$EXECUTABLE_NAME $BUILD_DIR/$CONFIGURATION/macosx/$EXECUTABLE_NAME -create -output $BUILD_DIR/$CONFIGURATION/$EXECUTABLE_NAME";
};
5BF3B147122DE51E0092AE4E /* Configure */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
);
inputPaths = (
);
name = Configure;
outputPaths = (
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "if [ -e $PROJECT_DIR/../../configure.h ]; then\n\t$PROJECT_DIR/../../configure\nfi\nexit 0\n";
};
/* End PBXShellScriptBuildPhase section */
/* Begin PBXSourcesBuildPhase section */
5BF3B089122B1B6A0092AE4E /* Sources */ = {
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
5BF3B0DE122B1BEE0092AE4E /* png.c in Sources */,
5BF3B0E1122B1BEE0092AE4E /* pngerror.c in Sources */,
5BF3B0E3122B1BEE0092AE4E /* pngget.c in Sources */,
5BF3B0E4122B1BEE0092AE4E /* pngmem.c in Sources */,
5BF3B0E5122B1BEE0092AE4E /* pngpread.c in Sources */,
5BF3B0E6122B1BEE0092AE4E /* pngread.c in Sources */,
5BF3B0E7122B1BEE0092AE4E /* pngrio.c in Sources */,
5BF3B0E8122B1BEE0092AE4E /* pngrtran.c in Sources */,
5BF3B0E9122B1BEE0092AE4E /* pngrutil.c in Sources */,
5BF3B0EA122B1BEE0092AE4E /* pngset.c in Sources */,
5BF3B0EB122B1BEE0092AE4E /* pngtrans.c in Sources */,
5BF3B0ED122B1BEE0092AE4E /* pngwio.c in Sources */,
5BF3B0EE122B1BEE0092AE4E /* pngwrite.c in Sources */,
5BF3B0EF122B1BEE0092AE4E /* pngwtran.c in Sources */,
5BF3B0F0122B1BEE0092AE4E /* pngwutil.c in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
5BF3B091122B1B9B0092AE4E /* Sources */ = {
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
5BF3B0F2122B1BEE0092AE4E /* png.c in Sources */,
5BF3B0F5122B1BEE0092AE4E /* pngerror.c in Sources */,
5BF3B0F7122B1BEE0092AE4E /* pngget.c in Sources */,
5BF3B0F8122B1BEE0092AE4E /* pngmem.c in Sources */,
5BF3B0F9122B1BEE0092AE4E /* pngpread.c in Sources */,
5BF3B0FA122B1BEE0092AE4E /* pngread.c in Sources */,
5BF3B0FB122B1BEE0092AE4E /* pngrio.c in Sources */,
5BF3B0FC122B1BEE0092AE4E /* pngrtran.c in Sources */,
5BF3B0FD122B1BEE0092AE4E /* pngrutil.c in Sources */,
5BF3B0FE122B1BEE0092AE4E /* pngset.c in Sources */,
5BF3B0FF122B1BEE0092AE4E /* pngtrans.c in Sources */,
5BF3B101122B1BEE0092AE4E /* pngwio.c in Sources */,
5BF3B102122B1BEE0092AE4E /* pngwrite.c in Sources */,
5BF3B103122B1BEE0092AE4E /* pngwtran.c in Sources */,
5BF3B104122B1BEE0092AE4E /* pngwutil.c in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
D2AAC044055464E500DB518D /* Sources */ = {
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
5BF3B0CA122B1BEE0092AE4E /* png.c in Sources */,
5BF3B0CD122B1BEE0092AE4E /* pngerror.c in Sources */,
5BF3B0CF122B1BEE0092AE4E /* pngget.c in Sources */,
5BF3B0D0122B1BEE0092AE4E /* pngmem.c in Sources */,
5BF3B0D1122B1BEE0092AE4E /* pngpread.c in Sources */,
5BF3B0D2122B1BEE0092AE4E /* pngread.c in Sources */,
5BF3B0D3122B1BEE0092AE4E /* pngrio.c in Sources */,
5BF3B0D4122B1BEE0092AE4E /* pngrtran.c in Sources */,
5BF3B0D5122B1BEE0092AE4E /* pngrutil.c in Sources */,
5BF3B0D6122B1BEE0092AE4E /* pngset.c in Sources */,
5BF3B0D7122B1BEE0092AE4E /* pngtrans.c in Sources */,
5BF3B0D9122B1BEE0092AE4E /* pngwio.c in Sources */,
5BF3B0DA122B1BEE0092AE4E /* pngwrite.c in Sources */,
5BF3B0DB122B1BEE0092AE4E /* pngwtran.c in Sources */,
5BF3B0DC122B1BEE0092AE4E /* pngwutil.c in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXSourcesBuildPhase section */
/* Begin PBXTargetDependency section */
5BF3B114122B1C9B0092AE4E /* PBXTargetDependency */ = {
isa = PBXTargetDependency;
target = 5BF3B08B122B1B6A0092AE4E /* libpng dynamic (Mac OS X) */;
targetProxy = 5BF3B113122B1C9B0092AE4E /* PBXContainerItemProxy */;
};
5BF3B116122B1C9B0092AE4E /* PBXTargetDependency */ = {
isa = PBXTargetDependency;
target = 5BF3B10B122B1C070092AE4E /* libpng static (iOS Simulator & Device) */;
targetProxy = 5BF3B115122B1C9B0092AE4E /* PBXContainerItemProxy */;
};
5BF3B118122B1CA50092AE4E /* PBXTargetDependency */ = {
isa = PBXTargetDependency;
target = D2AAC045055464E500DB518D /* libpng static (Mac OS X) */;
targetProxy = 5BF3B117122B1CA50092AE4E /* PBXContainerItemProxy */;
};
5BF3B11A122B1CA50092AE4E /* PBXTargetDependency */ = {
isa = PBXTargetDependency;
target = 5BF3B093122B1B9B0092AE4E /* libpng static (iOS) */;
targetProxy = 5BF3B119122B1CA50092AE4E /* PBXContainerItemProxy */;
};
5BF3B159122DE5CC0092AE4E /* PBXTargetDependency */ = {
isa = PBXTargetDependency;
target = 5BF3B148122DE51E0092AE4E /* Configure */;
targetProxy = 5BF3B158122DE5CC0092AE4E /* PBXContainerItemProxy */;
};
5BF3B15B122DE5D20092AE4E /* PBXTargetDependency */ = {
isa = PBXTargetDependency;
target = 5BF3B148122DE51E0092AE4E /* Configure */;
targetProxy = 5BF3B15A122DE5D20092AE4E /* PBXContainerItemProxy */;
};
5BF3B15D122DE5D80092AE4E /* PBXTargetDependency */ = {
isa = PBXTargetDependency;
target = 5BF3B148122DE51E0092AE4E /* Configure */;
targetProxy = 5BF3B15C122DE5D80092AE4E /* PBXContainerItemProxy */;
};
/* End PBXTargetDependency section */
/* Begin XCBuildConfiguration section */
1DEB91EC08733DB70010E9CD /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
CONFIGURATION_BUILD_DIR = "$(BUILD_DIR)/$(CONFIGURATION)/$(PLATFORM_NAME)";
COPY_PHASE_STRIP = NO;
GCC_DYNAMIC_NO_PIC = NO;
GCC_ENABLE_FIX_AND_CONTINUE = YES;
GCC_MODEL_TUNING = G5;
GCC_OPTIMIZATION_LEVEL = 0;
INSTALL_PATH = /usr/local/lib;
ONLY_ACTIVE_ARCH = NO;
OTHER_CFLAGS = "-DHAVE_CONFIG_H";
PRODUCT_NAME = png;
};
name = Debug;
};
1DEB91ED08733DB70010E9CD /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
CONFIGURATION_BUILD_DIR = "$(BUILD_DIR)/$(CONFIGURATION)/$(PLATFORM_NAME)";
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
GCC_MODEL_TUNING = G5;
INSTALL_PATH = /usr/local/lib;
ONLY_ACTIVE_ARCH = NO;
OTHER_CFLAGS = "-DHAVE_CONFIG_H";
PRODUCT_NAME = png;
};
name = Release;
};
1DEB91F008733DB70010E9CD /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
ARCHS = "$(ARCHS_STANDARD_32_64_BIT)";
GCC_C_LANGUAGE_STANDARD = gnu99;
GCC_OPTIMIZATION_LEVEL = 0;
GCC_WARN_ABOUT_RETURN_TYPE = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
ONLY_ACTIVE_ARCH = YES;
PREBINDING = NO;
SDKROOT = macosx10.6;
};
name = Debug;
};
1DEB91F108733DB70010E9CD /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
ARCHS = "$(ARCHS_STANDARD_32_64_BIT)";
GCC_C_LANGUAGE_STANDARD = gnu99;
GCC_WARN_ABOUT_RETURN_TYPE = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
PREBINDING = NO;
SDKROOT = macosx10.6;
};
name = Release;
};
5BF3B08D122B1B6A0092AE4E /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
CONFIGURATION_BUILD_DIR = "$(BUILD_DIR)/$(CONFIGURATION)/$(PLATFORM_NAME)";
CONFIGURATION_TEMP_DIR = "$(PROJECT_TEMP_DIR)/$(CONFIGURATION)/$(PLATFORM_NAME)";
COPY_PHASE_STRIP = NO;
DYLIB_COMPATIBILITY_VERSION = 1;
DYLIB_CURRENT_VERSION = 1;
EXECUTABLE_PREFIX = lib;
GCC_DYNAMIC_NO_PIC = NO;
GCC_ENABLE_FIX_AND_CONTINUE = YES;
GCC_MODEL_TUNING = G5;
GCC_OPTIMIZATION_LEVEL = 0;
GCC_PRECOMPILE_PREFIX_HEADER = YES;
GCC_PREFIX_HEADER = "";
INSTALL_PATH = /usr/local/lib;
ONLY_ACTIVE_ARCH = NO;
OTHER_CFLAGS = "-DHAVE_CONFIG_H";
OTHER_LDFLAGS = "";
PREBINDING = NO;
PRODUCT_NAME = png;
};
name = Debug;
};
5BF3B08E122B1B6A0092AE4E /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
CONFIGURATION_BUILD_DIR = "$(BUILD_DIR)/$(CONFIGURATION)/$(PLATFORM_NAME)";
CONFIGURATION_TEMP_DIR = "$(PROJECT_TEMP_DIR)/$(CONFIGURATION)/$(PLATFORM_NAME)";
COPY_PHASE_STRIP = YES;
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
DYLIB_COMPATIBILITY_VERSION = 1;
DYLIB_CURRENT_VERSION = 1;
EXECUTABLE_PREFIX = lib;
GCC_ENABLE_FIX_AND_CONTINUE = NO;
GCC_MODEL_TUNING = G5;
GCC_PRECOMPILE_PREFIX_HEADER = YES;
GCC_PREFIX_HEADER = "";
INSTALL_PATH = /usr/local/lib;
ONLY_ACTIVE_ARCH = NO;
OTHER_CFLAGS = "-DHAVE_CONFIG_H";
OTHER_LDFLAGS = "";
PREBINDING = NO;
PRODUCT_NAME = png;
ZERO_LINK = NO;
};
name = Release;
};
5BF3B095122B1B9B0092AE4E /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
ARCHS = "$(ARCHS_STANDARD_32_BIT)";
CONFIGURATION_BUILD_DIR = "$(BUILD_DIR)/$(CONFIGURATION)/$(PLATFORM_NAME)";
CONFIGURATION_TEMP_DIR = "$(PROJECT_TEMP_DIR)/$(CONFIGURATION)/$(PLATFORM_NAME)";
COPY_PHASE_STRIP = NO;
GCC_DYNAMIC_NO_PIC = NO;
GCC_OPTIMIZATION_LEVEL = 0;
ONLY_ACTIVE_ARCH = NO;
OTHER_CFLAGS = "-DHAVE_CONFIG_H";
PREBINDING = NO;
PRODUCT_NAME = png;
SDKROOT = iphoneos4.0;
};
name = Debug;
};
5BF3B096122B1B9B0092AE4E /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
ARCHS = "$(ARCHS_STANDARD_32_BIT)";
CONFIGURATION_BUILD_DIR = "$(BUILD_DIR)/$(CONFIGURATION)/$(PLATFORM_NAME)";
CONFIGURATION_TEMP_DIR = "$(PROJECT_TEMP_DIR)/$(CONFIGURATION)/$(PLATFORM_NAME)";
COPY_PHASE_STRIP = YES;
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
GCC_ENABLE_FIX_AND_CONTINUE = NO;
ONLY_ACTIVE_ARCH = NO;
OTHER_CFLAGS = "-DHAVE_CONFIG_H";
PREBINDING = NO;
PRODUCT_NAME = png;
SDKROOT = iphoneos4.0;
ZERO_LINK = NO;
};
name = Release;
};
5BF3B10D122B1C070092AE4E /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
CONFIGURATION_BUILD_DIR = "$(BUILD_DIR)/$(CONFIGURATION)";
CONFIGURATION_TEMP_DIR = "$(PROJECT_TEMP_DIR)/$(CONFIGURATION)";
COPY_PHASE_STRIP = NO;
GCC_DYNAMIC_NO_PIC = NO;
GCC_OPTIMIZATION_LEVEL = 0;
PREBINDING = NO;
PRODUCT_NAME = png;
};
name = Debug;
};
5BF3B10E122B1C070092AE4E /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
CONFIGURATION_BUILD_DIR = "$(BUILD_DIR)/$(CONFIGURATION)";
CONFIGURATION_TEMP_DIR = "$(PROJECT_TEMP_DIR)/$(CONFIGURATION)";
COPY_PHASE_STRIP = YES;
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
GCC_ENABLE_FIX_AND_CONTINUE = NO;
PREBINDING = NO;
PRODUCT_NAME = png;
ZERO_LINK = NO;
};
name = Release;
};
5BF3B111122B1C860092AE4E /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
COPY_PHASE_STRIP = NO;
GCC_DYNAMIC_NO_PIC = NO;
GCC_OPTIMIZATION_LEVEL = 0;
PRODUCT_NAME = "libpng (iOS)";
};
name = Debug;
};
5BF3B112122B1C860092AE4E /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
COPY_PHASE_STRIP = YES;
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
GCC_ENABLE_FIX_AND_CONTINUE = NO;
PRODUCT_NAME = "libpng (iOS)";
ZERO_LINK = NO;
};
name = Release;
};
5BF3B149122DE51F0092AE4E /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
COPY_PHASE_STRIP = NO;
GCC_DYNAMIC_NO_PIC = NO;
GCC_OPTIMIZATION_LEVEL = 0;
PRODUCT_NAME = Configure;
};
name = Debug;
};
5BF3B14A122DE51F0092AE4E /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
COPY_PHASE_STRIP = YES;
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
GCC_ENABLE_FIX_AND_CONTINUE = NO;
PRODUCT_NAME = Configure;
ZERO_LINK = NO;
};
name = Release;
};
/* End XCBuildConfiguration section */
/* Begin XCConfigurationList section */
1DEB91EB08733DB70010E9CD /* Build configuration list for PBXNativeTarget "libpng static (Mac OS X)" */ = {
isa = XCConfigurationList;
buildConfigurations = (
1DEB91EC08733DB70010E9CD /* Debug */,
1DEB91ED08733DB70010E9CD /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
1DEB91EF08733DB70010E9CD /* Build configuration list for PBXProject "libpng" */ = {
isa = XCConfigurationList;
buildConfigurations = (
1DEB91F008733DB70010E9CD /* Debug */,
1DEB91F108733DB70010E9CD /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
5BF3B08F122B1B980092AE4E /* Build configuration list for PBXNativeTarget "libpng dynamic (Mac OS X)" */ = {
isa = XCConfigurationList;
buildConfigurations = (
5BF3B08D122B1B6A0092AE4E /* Debug */,
5BF3B08E122B1B6A0092AE4E /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
5BF3B09A122B1B9F0092AE4E /* Build configuration list for PBXNativeTarget "libpng static (iOS)" */ = {
isa = XCConfigurationList;
buildConfigurations = (
5BF3B095122B1B9B0092AE4E /* Debug */,
5BF3B096122B1B9B0092AE4E /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
5BF3B10F122B1C3A0092AE4E /* Build configuration list for PBXNativeTarget "libpng static (iOS Simulator & Device)" */ = {
isa = XCConfigurationList;
buildConfigurations = (
5BF3B10D122B1C070092AE4E /* Debug */,
5BF3B10E122B1C070092AE4E /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
5BF3B11B122B1CD80092AE4E /* Build configuration list for PBXAggregateTarget "libpng" */ = {
isa = XCConfigurationList;
buildConfigurations = (
5BF3B111122B1C860092AE4E /* Debug */,
5BF3B112122B1C860092AE4E /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
5BF3B14B122DE5430092AE4E /* Build configuration list for PBXAggregateTarget "Configure" */ = {
isa = XCConfigurationList;
buildConfigurations = (
5BF3B149122DE51F0092AE4E /* Debug */,
5BF3B14A122DE51F0092AE4E /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
/* End XCConfigurationList section */
};
rootObject = 08FB7793FE84155DC02AAC07 /* Project object */;
}

View File

@ -1,210 +0,0 @@
project(PNG)
# Copyright (C) 2007 Glenn Randers-Pehrson
# For conditions of distribution and use, see copyright notice in png.h
set(PNGLIB_MAJOR 1)
set(PNGLIB_MINOR 2)
set(PNGLIB_RELEASE 34)
set(PNGLIB_NAME libpng${PNGLIB_MAJOR}${PNGLIB_MINOR})
set(PNGLIB_VERSION ${PNGLIB_MAJOR}.${PNGLIB_MINOR}.${PNGLIB_RELEASE})
# needed packages
find_package(ZLIB REQUIRED)
if(NOT WIN32)
find_library(M_LIBRARY
NAMES m
PATHS /usr/lib /usr/local/lib
)
if(NOT M_LIBRARY)
message(STATUS
"math library 'libm' not found - floating point support disabled")
endif(NOT M_LIBRARY)
else(NOT WIN32)
# not needed on windows
set(M_LIBRARY "")
endif(NOT WIN32)
# COMMAND LINE OPTIONS
option(PNG_SHARED "Build shared lib" YES)
option(PNG_STATIC "Build static lib" YES)
if(MINGW)
option(PNG_TESTS "Build pngtest" NO)
else(MINGW)
option(PNG_TESTS "Build pngtest" YES)
endif(MINGW)
option(PNG_NO_CONSOLE_IO "FIXME" YES)
option(PNG_NO_STDIO "FIXME" YES)
option(PNG_DEBUG "Build with debug output" YES)
option(PNGARG "FIXME" YES)
#TODO:
# PNG_CONSOLE_IO_SUPPORTED
# maybe needs improving, but currently I don't know when we can enable what :)
set(png_asm_tmp "OFF")
if(NOT WIN32)
find_program(uname_executable NAMES uname PATHS /bin /usr/bin /usr/local/bin)
if(uname_executable)
EXEC_PROGRAM(${uname_executable} ARGS --machine OUTPUT_VARIABLE uname_output)
if("uname_output" MATCHES "^.*i[1-9]86.*$")
set(png_asm_tmp "ON")
else("uname_output" MATCHES "^.*i[1-9]86.*$")
set(png_asm_tmp "OFF")
endif("uname_output" MATCHES "^.*i[1-9]86.*$")
endif(uname_executable)
else(NOT WIN32)
# this env var is normally only set on win64
SET(TEXT "ProgramFiles(x86)")
if("$ENV{${TEXT}}" STREQUAL "")
set(png_asm_tmp "ON")
endif("$ENV{${TEXT}}" STREQUAL "")
endif(NOT WIN32)
# SET LIBNAME
# msvc does not append 'lib' - do it here to have consistent name
if(MSVC)
set(PNG_LIB_NAME lib)
endif(MSVC)
set(PNG_LIB_NAME ${PNG_LIB_NAME}png${PNGLIB_MAJOR}${PNGLIB_MINOR})
# to distinguish between debug and release lib
set(CMAKE_DEBUG_POSTFIX "d")
# OUR SOURCES
set(libpng_sources
png.h
pngconf.h
png.c
pngerror.c
pngget.c
pngmem.c
pngpread.c
pngread.c
pngrio.c
pngrtran.c
pngrutil.c
pngset.c
pngtrans.c
pngwio.c
pngwrite.c
pngwtran.c
pngwutil.c
)
set(pngtest_sources
pngtest.c
)
# SOME NEEDED DEFINITIONS
if(MSVC)
add_definitions(-DPNG_NO_MODULEDEF -D_CRT_SECURE_NO_DEPRECATE)
endif(MSVC)
add_definitions(-DZLIB_DLL)
add_definitions(-DLIBPNG_NO_MMX)
add_definitions(-DPNG_NO_MMX_CODE)
if(PNG_CONSOLE_IO_SUPPORTED)
add_definitions(-DPNG_CONSOLE_IO_SUPPORTED)
endif(PNG_CONSOLE_IO_SUPPORTED)
if(PNG_NO_CONSOLE_IO)
add_definitions(-DPNG_NO_CONSOLE_IO)
endif(PNG_NO_CONSOLE_IO)
if(PNG_NO_STDIO)
add_definitions(-DPNG_NO_STDIO)
endif(PNG_NO_STDIO)
if(PNG_DEBUG)
add_definitions(-DPNG_DEBUG)
endif(PNG_DEBUG)
if(NOT M_LIBRARY AND NOT WIN32)
add_definitions(-DPNG_NO_FLOATING_POINT_SUPPORTED)
endif(NOT M_LIBRARY AND NOT WIN32)
# NOW BUILD OUR TARGET
include_directories(${PNG_SOURCE_DIR} ${ZLIB_INCLUDE_DIR})
if(PNG_SHARED)
add_library(${PNG_LIB_NAME} SHARED ${libpng_sources})
target_link_libraries(${PNG_LIB_NAME} ${ZLIB_LIBRARY} ${M_LIBRARY})
endif(PNG_SHARED)
if(PNG_STATIC)
# does not work without changing name
set(PNG_LIB_NAME_STATIC ${PNG_LIB_NAME}_static)
add_library(${PNG_LIB_NAME_STATIC} STATIC ${libpng_sources})
endif(PNG_STATIC)
if(PNG_SHARED AND WIN32)
set_target_properties(${PNG_LIB_NAME} PROPERTIES DEFINE_SYMBOL PNG_BUILD_DLL)
endif(PNG_SHARED AND WIN32)
if(PNG_TESTS)
# does not work with msvc due to png_lib_ver issue
add_executable(pngtest ${pngtest_sources})
target_link_libraries(pngtest ${PNG_LIB_NAME})
# add_test(pngtest ${PNG_SOURCE_DIR}/pngtest.png)
endif(PNG_TESTS)
# CREATE PKGCONFIG FILES
# we use the same files like ./configure, so we have to set its vars
set(prefix ${CMAKE_INSTALL_PREFIX})
set(exec_prefix ${CMAKE_INSTALL_PREFIX})
set(libdir ${CMAKE_INSTALL_PREFIX}/lib)
set(includedir ${CMAKE_INSTALL_PREFIX}/include)
configure_file(${PNG_SOURCE_DIR}/scripts/libpng.pc.in
${PNG_BINARY_DIR}/libpng.pc)
configure_file(${PNG_SOURCE_DIR}/scripts/libpng-config.in
${PNG_BINARY_DIR}/libpng-config)
configure_file(${PNG_SOURCE_DIR}/scripts/libpng.pc.in
${PNG_BINARY_DIR}/${PNGLIB_NAME}.pc)
configure_file(${PNG_SOURCE_DIR}/scripts/libpng-config.in
${PNG_BINARY_DIR}/${PNGLIB_NAME}-config)
# SET UP LINKS
set_target_properties(${PNG_LIB_NAME} PROPERTIES
# VERSION 0.${PNGLIB_RELEASE}.1.2.34
VERSION 0.${PNGLIB_RELEASE}.0
SOVERSION 0
CLEAN_DIRECT_OUTPUT 1)
if(NOT WIN32)
# that's uncool on win32 - it overwrites our static import lib...
set_target_properties(${PNG_LIB_NAME_STATIC} PROPERTIES
OUTPUT_NAME ${PNG_LIB_NAME}
CLEAN_DIRECT_OUTPUT 1)
endif(NOT WIN32)
# INSTALL
install_targets(/lib ${PNG_LIB_NAME})
if(PNG_STATIC)
install_targets(/lib ${PNG_LIB_NAME_STATIC})
endif(PNG_STATIC)
install(FILES png.h pngconf.h DESTINATION include)
install(FILES png.h pngconf.h DESTINATION include/${PNGLIB_NAME})
install(FILES libpng.3 libpngpf.3 DESTINATION man/man3)
install(FILES png.5 DESTINATION man/man5)
install(FILES ${PNG_BINARY_DIR}/libpng.pc DESTINATION lib/pkgconfig)
install(FILES ${PNG_BINARY_DIR}/libpng-config DESTINATION bin)
install(FILES ${PNG_BINARY_DIR}/${PNGLIB_NAME}.pc DESTINATION lib/pkgconfig)
install(FILES ${PNG_BINARY_DIR}/${PNGLIB_NAME}-config DESTINATION bin)
# what's with libpng.txt and all the extra files?
# UNINSTALL
# do we need this?
# DIST
# do we need this?
# to create msvc import lib for mingw compiled shared lib
# pexports libpng.dll > libpng.def
# lib /def:libpng.def /machine:x86

View File

@ -0,0 +1,67 @@
Makefiles for libpng version 1.4.4 - September 23, 2010
makefile.linux => Linux/ELF makefile
(gcc, creates libpng14.so.14.1.4.4)
makefile.gcc => Generic makefile (gcc, creates static libpng.a)
makefile.knr => Archaic UNIX Makefile that converts files with
ansi2knr (Requires ansi2knr.c from
ftp://ftp.cs.wisc.edu/ghost)
makefile.acorn => Acorn makefile
makefile.aix => AIX/gcc makefile
makefile.amiga => Amiga makefile
makefile.atari => Atari makefile
makefile.bc32 => 32-bit Borland C++ (all modules compiled in C mode)
makefile.beos => beos makefile
makefile.bor => Borland makefile (uses bcc)
makefile.cegcc => minge32ce for Windows CE makefile
makefile.cygwin => Cygwin/gcc makefile
makefile.darwin => Darwin makefile, can use on MacosX
makefile.dec => DEC Alpha UNIX makefile
makefile.dj2 => DJGPP 2 makefile
makefile.elf => Linux/ELF makefile symbol versioning,
(gcc, creates libpng14.so.14.1.4.4)
makefile.freebsd => FreeBSD makefile
makefile.gcc => Generic gcc makefile
makefile.hpgcc => HPUX makefile using gcc
makefile.hpux => HPUX (10.20 and 11.00) makefile
makefile.hp64 => HPUX (10.20 and 11.00) makefile, 64-bit
makefile.ibmc => IBM C/C++ version 3.x for Win32 and OS/2 (static)
makefile.intel => Intel C/C++ version 4.0 and later
makefile.mingw => Mingw makefile
makefile.mips => MIPS makefile
makefile.msc => Microsoft C makefile
makefile.netbsd => NetBSD/cc makefile, makes libpng.so.
makefile.openbsd => OpenBSD makefile
makefile.os2 => OS/2 Makefile (gcc and emx, requires pngos2.def)
makefile.sco => For SCO OSr5 ELF and Unixware 7 with Native cc
makefile.sggcc => Silicon Graphics (gcc,
creates libpng14.so.14.1.4.4)
makefile.sgi => Silicon Graphics IRIX makefile (cc, creates static lib)
makefile.solaris => Solaris 2.X makefile (gcc,
creates libpng14.so.14.1.4.4)
makefile.so9 => Solaris 9 makefile (gcc,
creates libpng14.so.14.1.4.4)
makefile.std => Generic UNIX makefile (cc, creates static libpng.a)
makefile.sunos => Sun makefile
makefile.32sunu => Sun Ultra 32-bit makefile
makefile.64sunu => Sun Ultra 64-bit makefile
makefile.tc3 => Turbo C 3.0 makefile
makefile.vcwin32 => makefile for Microsoft Visual C++ 4.0 and later
makefile.watcom => Watcom 10a+ Makefile, 32-bit flat memory model
makevms.com => VMS build script
smakefile.ppc => AMIGA smakefile for SAS C V6.58/7.00 PPC compiler
(Requires SCOPTIONS, copied from scripts/SCOPTIONS.ppc)
Other supporting scripts:
descrip.mms => VMS makefile for MMS or MMK
libpng-config-body.in => used by several makefiles to create libpng-config
libpng-config-head.in => used by several makefiles to create libpng-config
libpng.pc.in => Used by several makefiles to create libpng.pc
pngos2.def => OS/2 module definition file used by makefile.os2
pngwin.def => Module definitions for makefile.cygwin and mingw
png32ce.def => Module definition file used by makefile.cegcc
pngwin.rc => Used by the visualc6 and visualc71 projects.
SCOPTIONS.ppc => Used with smakefile.ppc
Further information can be found in comments in the individual makefiles.

View File

@ -1,6 +1,6 @@
cc_defs = /inc=$(ZLIBSRC)
c_deb =
c_deb =
.ifdef __DECC__
pref = /prefix=all
@ -29,24 +29,24 @@ test : pngtest.exe
run pngtest
clean :
delete *.obj;*,*.exe;*
delete *.obj;*,*.exe;
# Other dependencies.
png.obj : png.h, pngconf.h
pngpread.obj : png.h, pngconf.h
pngset.obj : png.h, pngconf.h
pngget.obj : png.h, pngconf.h
pngread.obj : png.h, pngconf.h
pngrtran.obj : png.h, pngconf.h
pngrutil.obj : png.h, pngconf.h
pngerror.obj : png.h, pngconf.h
pngmem.obj : png.h, pngconf.h
pngrio.obj : png.h, pngconf.h
pngwio.obj : png.h, pngconf.h
pngtest.obj : png.h, pngconf.h
pngtrans.obj : png.h, pngconf.h
pngwrite.obj : png.h, pngconf.h
pngwtran.obj : png.h, pngconf.h
pngwutil.obj : png.h, pngconf.h
png.obj : png.h, pngconf.h, pngpriv.h
pngpread.obj : png.h, pngconf.h, pngpriv.h
pngset.obj : png.h, pngconf.h, pngpriv.h
pngget.obj : png.h, pngconf.h, pngpriv.h
pngread.obj : png.h, pngconf.h, pngpriv.h
pngrtran.obj : png.h, pngconf.h, pngpriv.h
pngrutil.obj : png.h, pngconf.h, pngpriv.h
pngerror.obj : png.h, pngconf.h, pngpriv.h
pngmem.obj : png.h, pngconf.h, pngpriv.h
pngrio.obj : png.h, pngconf.h, pngpriv.h
pngwio.obj : png.h, pngconf.h, pngpriv.h
pngtrans.obj : png.h, pngconf.h, pngpriv.h
pngwrite.obj : png.h, pngconf.h, pngpriv.h
pngwtran.obj : png.h, pngconf.h, pngpriv.h
pngwutil.obj : png.h, pngconf.h, pngpriv.h
pngtest.obj : png.h, pngconf.h

View File

@ -4,11 +4,14 @@
# provides configuration info for libpng.
# Copyright (C) 2002 Glenn Randers-Pehrson
# For conditions of distribution and use, see copyright notice in png.h
# This code is released under the libpng license.
# For conditions of distribution and use, see the disclaimer
# and license in png.h
# Modeled after libxml-config.
version=1.2.34
version=1.4.4
prefix=""
libdir=""
libs=""

View File

@ -1,44 +0,0 @@
// Project file for libpng (static)
// IBM VisualAge/C++ version 4.0 or later
// Copyright (C) 2000 Cosmin Truta
// For conditions of distribution and use, see copyright notice in png.h
// Notes:
// All modules are compiled in C mode
// Tested with IBM VAC++ 4.0 under Win32
// Expected to work with IBM VAC++ 4.0 or later under OS/2 and Win32
// Can be easily adapted for IBM VAC++ 4.0 or later under AIX
// For conditions of distribution and use, see copyright notice in png.h
option incl(searchpath, "../zlib"), opt(level, "2"),
link(libsearchpath, "../zlib")
{
target type(lib) "libpng.lib"
{
source type(c) "png.c"
source type(c) "pngerror.c"
source type(c) "pngget.c"
source type(c) "pngmem.c"
source type(c) "pngpread.c"
source type(c) "pngread.c"
source type(c) "pngrio.c"
source type(c) "pngrtran.c"
source type(c) "pngrutil.c"
source type(c) "pngset.c"
source type(c) "pngtrans.c"
source type(c) "pngwio.c"
source type(c) "pngwrite.c"
source type(c) "pngwtran.c"
source type(c) "pngwutil.c"
}
}
option incl(searchpath, "../zlib"), opt(level, "2"),
link(libsearchpath, "../zlib")
{
target type(exe) "pngtest.exe"
{
source type(c) "pngtest.c"
source type(lib) "libpng.lib"
source type(lib) "zlib.lib"
}
}

View File

@ -1,10 +1,10 @@
prefix=@prefix@
exec_prefix=@exec_prefix@
libdir=@libdir@
includedir=@includedir@/libpng12
includedir=@includedir@/libpng14
Name: libpng
Description: Loads and saves PNG files
Version: 1.2.34
Libs: -L${libdir} -lpng12
Version: 1.4.4
Libs: -L${libdir} -lpng14
Cflags: -I${includedir}

Some files were not shown because too many files have changed in this diff Show More