Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Third Party Libpng
提交
5e5c1e1f
T
Third Party Libpng
项目概览
OpenHarmony
/
Third Party Libpng
1 年多 前同步成功
通知
4
Star
22
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
T
Third Party Libpng
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
5e5c1e1f
编写于
24年前
作者:
G
Glenn Randers-Pehrson
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Imported from libpng-1.0.9beta1.tar
上级
32fc5ceb
变更
71
展开全部
隐藏空白更改
内联
并排
Showing
71 changed file
with
6751 addition
and
4028 deletion
+6751
-4028
ANNOUNCE
ANNOUNCE
+22
-17
CHANGES
CHANGES
+23
-3
INSTALL
INSTALL
+12
-10
KNOWNBUG
KNOWNBUG
+25
-8
LICENSE
LICENSE
+6
-2
README
README
+11
-9
Y2KINFO
Y2KINFO
+2
-2
configure
configure
+1
-1
contrib/gregbook/makevms.com
contrib/gregbook/makevms.com
+18
-5
contrib/msvctest/README.txt
contrib/msvctest/README.txt
+2
-2
contrib/msvctest/msvctest.dsp
contrib/msvctest/msvctest.dsp
+10
-10
contrib/pngminus/makevms.com
contrib/pngminus/makevms.com
+3
-3
contrib/pngminus/png2pnm.c
contrib/pngminus/png2pnm.c
+9
-4
contrib/visupng/README.txt
contrib/visupng/README.txt
+2
-2
contrib/visupng/VisualPng.dsp
contrib/visupng/VisualPng.dsp
+8
-8
dll/msvc/README.txt
dll/msvc/README.txt
+3
-3
dll/msvc/libpng.dsp
dll/msvc/libpng.dsp
+29
-29
dll/msvc/libpng.dsw
dll/msvc/libpng.dsw
+0
-0
dll/msvc/png.rc
dll/msvc/png.rc
+3
-0
dll/msvc/png32ms.def
dll/msvc/png32ms.def
+1
-1
dll/msvc/zlib.def
dll/msvc/zlib.def
+0
-0
dll/msvc/zlib.dsp
dll/msvc/zlib.dsp
+31
-31
dll/wince/READMEE.WCE
dll/wince/READMEE.WCE
+6
-6
dll/wince/READMEJ.WCE
dll/wince/READMEJ.WCE
+1
-1
dll/wince/READMEZE.WCE
dll/wince/READMEZE.WCE
+0
-0
dll/wince/READMEZJ.WCE
dll/wince/READMEZJ.WCE
+0
-0
dll/wince/lpngce.dsp
dll/wince/lpngce.dsp
+1430
-1430
dll/wince/lpngce.dsw
dll/wince/lpngce.dsw
+0
-0
dll/wince/png32ce.def
dll/wince/png32ce.def
+1
-1
dll/wince/pngtest.dsp
dll/wince/pngtest.dsp
+112
-112
dll/wince/pngtest.dsw
dll/wince/pngtest.dsw
+0
-0
dll/wince/winmain.c
dll/wince/winmain.c
+0
-0
dll/wince/zlib.diff
dll/wince/zlib.diff
+2168
-0
dll/wince/zlibce.def
dll/wince/zlibce.def
+0
-0
dll/wince/zlibce.dsp
dll/wince/zlibce.dsp
+1033
-1033
libpng.3
libpng.3
+20
-18
libpng.txt
libpng.txt
+5
-7
libpngpf.3
libpngpf.3
+2
-2
png.5
png.5
+2
-2
png.c
png.c
+18
-16
png.h
png.h
+50
-32
pngasmrd.h
pngasmrd.h
+1
-1
pngconf.h
pngconf.h
+16
-3
pngerror.c
pngerror.c
+1
-1
pnggccrd.c
pnggccrd.c
+1470
-1116
pngget.c
pngget.c
+1
-1
pngmem.c
pngmem.c
+1
-1
pngpread.c
pngpread.c
+9
-8
pngread.c
pngread.c
+6
-3
pngrio.c
pngrio.c
+1
-1
pngrtran.c
pngrtran.c
+6
-1
pngrutil.c
pngrutil.c
+27
-5
pngset.c
pngset.c
+20
-3
pngtest.c
pngtest.c
+7
-6
pngtrans.c
pngtrans.c
+1
-1
pngvcrd.c
pngvcrd.c
+6
-4
pngwio.c
pngwio.c
+1
-1
pngwrite.c
pngwrite.c
+1
-2
pngwtran.c
pngwtran.c
+1
-1
pngwutil.c
pngwutil.c
+9
-7
scripts/makefile.beos
scripts/makefile.beos
+1
-1
scripts/makefile.cygwin
scripts/makefile.cygwin
+44
-25
scripts/makefile.dec
scripts/makefile.dec
+15
-13
scripts/makefile.gcmmx
scripts/makefile.gcmmx
+14
-3
scripts/makefile.hpux
scripts/makefile.hpux
+2
-2
scripts/makefile.linux
scripts/makefile.linux
+1
-1
scripts/makefile.sco
scripts/makefile.sco
+1
-1
scripts/makefile.sggcc
scripts/makefile.sggcc
+2
-2
scripts/makefile.solaris
scripts/makefile.solaris
+1
-1
scripts/makevms.com
scripts/makevms.com
+14
-1
scripts/pngdef.pas
scripts/pngdef.pas
+2
-2
未找到文件。
ANNOUNCE
浏览文件 @
5e5c1e1f
Libpng 1.0.
8 - July 24
, 2000
Libpng 1.0.
9beta1 - November 10
, 2000
This is a public release of libpng, intended for use in production codes.
Changes since the last public release (1.0.
7
):
Changes since the last public release (1.0.
8
):
Added png_free(png_ptr, key) two places in pngpread.c to stop memory leaks.
Changed PNG_NO_STDIO to PNG_NO_CONSOLE_IO, several places in pngrutil.c and
pngwutil.c.
Changed PNG_EXPORT_VAR to use PNG_IMPEXP, in pngconf.h.
Removed unused "#include <assert.h>" from png.c
Added WindowsCE support.
Revised pnggccrd.c to work with gcc-2.95.2 and in the Cygwin environment.
Only set the PNG_FLAG_FREE_TRNS or PNG_FREE_TRNS flag in png_handle_tRNS()
for indexed-color input files to avoid potential double-freeing trans array
under some unusual conditions; problem was introduced in version 1.0.7.
Added the files pngbar.png and pngbar.jpg to the distribution.
Added cygwin subdirectory, makefile.cygwin, and cygwin support in pngconf.h
Added PNG_NO_ZALLOC_ZERO macro (makes png_zalloc skip zeroing memory)
Revised png_debug() macros and statements to eliminate compiler warnings.
Updated makefile.hpux to build a shared library.
Fixed typo in scripts/makefile.hpux
Fixed seqence-point bug in contrib/pngminus/png2pnm (Martin Zinser)
Updated makevms.com in scripts and contrib/* and contrib/* (Martin Zinser)
Changed "cdrom.com" in documentation to "libpng.org"
Revised pnggccrd.c to get it all working, and updated makefile.gcmmx (Greg).
Changed type of "params" from voidp to png_voidp in png_read|write_png().
Added MNG_EXTENSIONS_SUPPORTED macro and support for some proposed MNG
features, for testing purposes.
Make sure PNGAPI and PNG_IMPEXP are defined in pngconf.h.
Revised the 3 instances of WRITEFILE in pngtest.c.
Relocated "msvc" and "wince" project subdirectories into "dll" subdirectory.
Updated png.rc in dll/msvc project
Revised makefile.dec to define and use LIBPATH and INCPATH
Increased size of global png_libpng_ver[] array from 12 to 18 chars.
Made global png_libpng_ver[], png_sig[] and png_pass_*[] arrays const.
Removed duplicate png_crc_finish() from png_handle_bKGD() function.
Added a warning when application calls png_read_update_info() multiple times.
Revised makefile.cygwin
Fixed bugs in iCCP support in pngrutil.c and pngwutil.c.
Replaced png_set_empty_plte_permitted() with png_permit_mng_features().
Send comments/corrections/commendations to
png-implement@ccrc.wustl.edu or to randeg@alum.rpi.edu
...
...
This diff is collapsed.
Click to expand it.
CHANGES
浏览文件 @
5e5c1e1f
...
...
@@ -778,7 +778,8 @@ version 1.0.7beta16 [June 4, 2000]
Added a check for overlength PLTE chunk in pngrutil.c.
Added PNG_NO_POINTER_INDEXING macro to use array-indexing instead of pointer
indexing in pngrutil.c and pngwutil.c to accommodate a buggy compiler.
Added a warning in png_decompress_chunk() when it runs out of data.
Added a warning in png_decompress_chunk() when it runs out of data, e.g.
when it tries to read an erroneous PhotoShop iCCP chunk.
Added PNG_USE_DLL macro.
Revised the copyright/disclaimer/license notice.
Added contrib/msvctest directory
...
...
@@ -797,7 +798,7 @@ version 1.0.7rc2 [June 28, 2000]
Fixed "DJBPP" typo in pnggccrd.c introduced in beta18.
version 1.0.7 [July 1, 2000]
Revised the definition of "trans_values" in libpng.3/libpng.txt
version 1.0.
8 [July 24
, 2000]
version 1.0.
9beta1 [November 10
, 2000]
version 1.0.8beta1 [July 8, 2000]
Added png_free(png_ptr, key) two places in pngpread.c to stop memory leaks.
Changed PNG_NO_STDIO to PNG_NO_CONSOLE_IO, several places in pngrutil.c and
...
...
@@ -816,13 +817,32 @@ version 1.0.8beta3 [July 11, 2000]
Further revisions to pngtest.c and files in the wince subdirectory.
version 1.0.8beta4 [July 14, 2000]
Added the files pngbar.png and pngbar.jpg to the distribution.
Added
cygwin subdirectory,
makefile.cygwin, and cygwin support in pngconf.h
Added makefile.cygwin, and cygwin support in pngconf.h
Added PNG_NO_ZALLOC_ZERO macro (makes png_zalloc skip zeroing memory)
version 1.0.8rc1 [July 16, 2000]
Revised png_debug() macros and statements to eliminate compiler warnings.
version 1.0.8 [July 24, 2000]
Added png_flush() in pngwrite.c, after png_write_IEND().
Updated makefile.hpux to build a shared library.
version 1.0.9beta1 [November 10, 2000]
Fixed typo in scripts/makefile.hpux
Updated makevms.com in scripts and contrib/* and contrib/* (Martin Zinser)
Fixed seqence-point bug in contrib/pngminus/png2pnm (Martin Zinser)
Changed "cdrom.com" in documentation to "libpng.org"
Revised pnggccrd.c to get it all working, and updated makefile.gcmmx (Greg).
Changed type of "params" from voidp to png_voidp in png_read|write_png().
Make sure PNGAPI and PNG_IMPEXP are defined in pngconf.h.
Revised the 3 instances of WRITEFILE in pngtest.c.
Relocated "msvc" and "wince" project subdirectories into "dll" subdirectory.
Updated png.rc in dll/msvc project
Revised makefile.dec to define and use LIBPATH and INCPATH
Increased size of global png_libpng_ver[] array from 12 to 18 chars.
Made global png_libpng_ver[], png_sig[] and png_pass_*[] arrays const.
Removed duplicate png_crc_finish() from png_handle_bKGD() function.
Added a warning when application calls png_read_update_info() multiple times.
Revised makefile.cygwin
Fixed bugs in iCCP support in pngrutil.c and pngwutil.c.
Replaced png_set_empty_plte_permitted() with png_permit_mng_features().
Send comments/corrections/commendations to
png-implement@ccrc.wustl.edu or to randeg@alum.rpi.edu
...
...
This diff is collapsed.
Click to expand it.
INSTALL
浏览文件 @
5e5c1e1f
Installing libpng version 1.0.
8 - July 24
, 2000
Installing libpng version 1.0.
9beta1 - November 10
, 2000
Before installing libpng, you must first install zlib. zlib
can usually be found wherever you got libpng. zlib can be
...
...
@@ -10,7 +10,7 @@ zlib.h and zconf.h include files that correspond to the
version of zlib that's installed.
You can rename the directories that you downloaded (they
might be called "libpng-1.0.
8" or "lpng107
" and "zlib-1.1.3"
might be called "libpng-1.0.
9beta1" or "lpng109
" and "zlib-1.1.3"
or "zlib113") so that you have directories called "zlib" and "libpng".
Your directory structure should look like this:
...
...
@@ -27,11 +27,12 @@ Your directory structure should look like this:
pngminus
pngsuite
visupng
msvc
dll
msvc
wince
scripts
makefile.*
pngtest.png
wince
etc.
zlib
README
...
...
@@ -57,22 +58,23 @@ The files that are presently available in the scripts directory
include
makefile.std => Generic UNIX makefile (cc, creates static libpng.a)
makefile.linux => Linux/ELF makefile (gcc, creates libpng.so.2.1.0.
8
)
makefile.gcmmx => Linux/ELF makefile (gcc, creates libpng.so.2.1.0.
8
,
makefile.linux => Linux/ELF makefile (gcc, creates libpng.so.2.1.0.
9beta1
)
makefile.gcmmx => Linux/ELF makefile (gcc, creates libpng.so.2.1.0.
9beta1
,
uses assembler code tuned for Intel MMX platform)
makefile.gcc => Generic makefile (gcc, creates static libpng.a)
makefile.knr => Archaic UNIX Makefile that converts files with
ansi2knr (Requires ansi2knr.c from
ftp://ftp.cs.wisc.edu/ghost)
makefile.cygwin => Cygwin/gcc makefile
makefile.dec => DEC Alpha UNIX makefile
makefile.hpux => HPUX (10.20 and 11.00) makefile
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.sgi => Silicon Graphics IRIX makefile (cc, creates static lib)
makefile.sggcc => Silicon Graphics (gcc, creates libpng.so.2.1.0.
8
)
makefile.sggcc => Silicon Graphics (gcc, creates libpng.so.2.1.0.
9beta1
)
makefile.sunos => Sun makefile
makefile.solaris => Solaris 2.X makefile (gcc, creates libpng.so.2.1.0.
8
)
makefile.solaris => Solaris 2.X makefile (gcc, creates libpng.so.2.1.0.
9beta1
)
makefile.sco => For SCO OSr5 ELF and Unixware 7 with Native cc
makefile.mips => MIPS makefile
makefile.acorn => Acorn makefile
...
...
@@ -125,5 +127,5 @@ put the library in its final resting place (if you want to
do that, run "make install" in the zlib directory first if necessary).
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.
files, in the individual makefiles, in png.h,
in the README files in
subdirectories of the dll directory, and the manual pages
libpng.3 and png.5.
This diff is collapsed.
Click to expand it.
KNOWNBUG
浏览文件 @
5e5c1e1f
Known bugs and suggested enhancements in libpng-1.0.8
1. July 2, 2000 -- BUG -- pnggccrd.c
0: November 3, 2000 -- BUG -- incorrect iCCP chunk is written
The png_read_filter() function has still not been fully converted and
The compression_type byte in the iCCP chunk written by libpng is
usually incorrect.
Status: Fixed in libpng-1.0.9beta1
1. October 12, 2000 -- BUG -- pngtest fails
The three WRITEFILE calls in pngtest.c are incorrect. They must be
changed to read
WRITEFILE((png_FILE_p)png_ptr->io_ptr, data, length, check);
WRITEFILE(io_ptr, near_data, length, check);
WRITEFILE(io_ptr, buf, written, err);
2. August 28, 2000 -- BUG -- pnggccrd.c
The interlacing() function has still not been fully converted and
will not compile under gcc-2.95.2; it is currently ifdef'ed out.
STATUS: Under investigation. Experts on MMX assembler code are
invited to help with the debugging. Note that pngvcrd.c works fine.
STATUS: Fixed in libpng-1.0.9. There were also bugs in pngvcrd.c
which have been fixed. The replacement files are available at the
PNG web site (http://www.libpng.org/pub/png).
2
. March 15, 1998 -- OPTIMIZATION -- Kevin Bracey
3
. March 15, 1998 -- OPTIMIZATION -- Kevin Bracey
Loops need to be optimized everywhere
...
...
@@ -24,7 +41,7 @@ Known bugs and suggested enhancements in libpng-1.0.8
libpng-2.0.0. About 160 loops will be turned around
in libpng-2.0.x betaxx, for testing.
3
. July 4, 1998 -- ENHANCEMENT -- Glenn R-P
4
. July 4, 1998 -- ENHANCEMENT -- Glenn R-P
libpng-1.0.5 and earlier transform colors to gamma=1.0 space for
merging with background, and then back to the image's gamma. The
...
...
@@ -36,9 +53,9 @@ Known bugs and suggested enhancements in libpng-1.0.8
STATUS: under development.
4
. September 1999 -- ENHANCEMENT --
5
. September 1999 -- ENHANCEMENT --
It should be possible to use libpng without floating-point aritmetic.
It should be possible to use libpng without floating-point arit
h
metic.
STATUS: Under investigation, implementation postponed until after
libpng-2.0.0.
...
...
This diff is collapsed.
Click to expand it.
LICENSE
浏览文件 @
5e5c1e1f
This copy of the libpng notices is provided for your convenience. In case of
any discrepancy between this copy and the notices in the file png.h that is
included in the libpng distribution, the latter shall prevail.
COPYRIGHT NOTICE, DISCLAIMER, and LICENSE:
If you modify libpng you may insert additional notices immediately following
this sentence.
libpng versions 1.0.7, July 1, 2000, through 1.0.
8, July 24
, 2000, are
libpng versions 1.0.7, July 1, 2000, through 1.0.
9beta1, November 10
, 2000, are
Copyright (c) 2000 Glenn Randers-Pehrson
and are distributed according to the same disclaimer and license as libpng-1.0.6
with the following individuals added to the list of Contributing Authors
...
...
@@ -95,4 +99,4 @@ certification mark of the Open Source Initiative.
Glenn Randers-Pehrson
randeg@alum.rpi.edu
July 24
, 2000
November 10
, 2000
This diff is collapsed.
Click to expand it.
README
浏览文件 @
5e5c1e1f
README for libpng 1.0.
8 - July 24
, 2000 (shared library 2.1)
README for libpng 1.0.
9beta1 - November 10
, 2000 (shared library 2.1)
See the note about version numbers near the top of png.h
See INSTALL for instructions on how to install libpng.
...
...
@@ -171,30 +171,34 @@ Files in this distribution:
pngminus => Simple pnm2png and png2pnm programs
pngsuite => Test images
visupng => Contains a MSVC workspace for VisualPng
msvc => Contains a Microsoft Visual C++ (MSVC) workspace
for building libpng and zlib
dll => Contains project files and workspaces for building DLL
msvc => Contains a Microsoft Visual C++ (MSVC) workspace
for building libpng and zlib
wince => Contains a Microsoft Visual C++ (Windows CD Toolkit)
workspace for building libpng and zlib on WindowsCE
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.linux => Linux/ELF makefile
(gcc, creates libpng.so.2.1.0.
8
)
(gcc, creates libpng.so.2.1.0.
9beta1
)
makefile.gcmmx => Linux/ELF makefile (gcc, creates
libpng.so.2.1.0.
8
, uses assembler code
libpng.so.2.1.0.
9beta1
, uses assembler code
tuned for Intel MMX platform)
makefile.gcc => Generic makefile (gcc, creates static libpng.a)
makefile.knr => Archaic UNIX Makefile that converts files with
ansi2knr (Requires ansi2knr.c from
ftp://ftp.cs.wisc.edu/ghost)
makefile.cygwin => Cygwin/gcc makefile
makefile.dec => DEC Alpha UNIX makefile
makefile.hpux => HPUX (10.20 and 11.00) makefile
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.sgi => Silicon Graphics IRIX (cc, creates static lib)
makefile.sggcc => Silicon Graphics (gcc, creates libpng.so.2.1.0.
8
)
makefile.sggcc => Silicon Graphics (gcc, creates libpng.so.2.1.0.
9beta1
)
makefile.sunos => Sun makefile
makefile.solaris => Solaris 2.X makefile
(gcc, creates libpng.so.2.1.0.
8
)
(gcc, creates libpng.so.2.1.0.
9beta1
)
makefile.sco => For SCO OSr5 ELF and Unixware 7 with Native cc
makefile.mips => MIPS makefile
makefile.acorn => Acorn makefile
...
...
@@ -221,8 +225,6 @@ Files in this distribution:
makevms.com => VMS build script
pngdef.pas => Defines for a png32bd.dll with Borland C++ 4.5
SCOPTIONS.ppc => Used with smakefile.ppc
wince => Contains a Microsoft Visual C++ (Windows CD Toolkit)
workspace for building libpng and zlib on WindowsCE
Good luck, and happy coding.
...
...
This diff is collapsed.
Click to expand it.
Y2KINFO
浏览文件 @
5e5c1e1f
Y2K compliance in libpng:
=========================
July 24
, 2000
November 10
, 2000
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.0.
8
are Y2K compliant. It is my belief that earlier
upward through 1.0.
9beta1
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
...
...
This diff is collapsed.
Click to expand it.
configure
浏览文件 @
5e5c1e1f
echo "
There is no \"configure\" script for Libpng-1.0.
8
. Instead, please
There is no \"configure\" script for Libpng-1.0.
9beta1
. Instead, please
copy the appropriate makefile for your system from the \"scripts\"
directory. Read the INSTALL file for more details.
"
...
...
This diff is collapsed.
Click to expand it.
contrib/gregbook/makevms.com
浏览文件 @
5e5c1e1f
...
...
@@ -7,12 +7,25 @@ $!
$!
$! Set locations where zlib and libpng sources live.
$!
$ zpath = "[-.zlib]"
$ pngpath = "[-.libpng]"
$ zpath = ""
$ pngpath = ""
$ if f$search("[-.zlib]zlib.h").nes."" then zpath = "[-.zlib]"
$ if f$search("[-.libpng]png.h").nes."" then pngpath = "[-.libpng]"
$!
$! USE THESE INSTEAD if building from libpng's [.contrib.gregbook] directory:
$! zpath = "[---.zlib]"
$! pngpath = "[--]"
$ if f$search("[---.zlib]zlib.h").nes."" then zpath = "[---.zlib]"
$ if f$search("[--]png.h").nes."" then pngpath = "[--]"
$!
$ if zpath .eqs. ""
$ then
$ write sys$output "Zlib include not found. Exiting..."
$ exit 2
$ endif
$!
$ if pngpath .eqs. ""
$ then
$ write sys$output "Libpng include not found. Exiting..."
$ exit 2
$ endif
$!
$! Look for the compiler used.
$!
...
...
This diff is collapsed.
Click to expand it.
contrib/msvctest/README.txt
浏览文件 @
5e5c1e1f
Microsoft Developer Studio Build File, Format Version 6.00 for
msvctest
Assumes that libpng DLLs and LIBs are in ..\..\msvc\win32\libpng
Assumes that zlib DLLs and LIBs are in ..\..\msvc\win32\zlib
Assumes that libpng DLLs and LIBs are in ..\..\
dll\
msvc\win32\libpng
Assumes that zlib DLLs and LIBs are in ..\..\
dll\
msvc\win32\zlib
To build:
...
...
This diff is collapsed.
Click to expand it.
contrib/msvctest/msvctest.dsp
浏览文件 @
5e5c1e1f
...
...
@@ -54,12 +54,12 @@ BSC32=bscmake.exe
# ADD BSC32 /nologo
LINK32=link.exe
# ADD BASE LINK32 /nologo /subsystem:console /machine:I386
# ADD LINK32 ..\..\msvc\win32\libpng\dll\libpng1.lib /nologo /subsystem:console /machine:I386
# ADD LINK32 ..\..\
dll\
msvc\win32\libpng\dll\libpng1.lib /nologo /subsystem:console /machine:I386
# Begin Special Build Tool
OutDir=.\dll
SOURCE="$(InputPath)"
PostBuild_Desc=[Run Test]
PostBuild_Cmds=set path=..\..\
msvc\win32\libpng\dll;..\..
\msvc\win32\zlib\dll; $(outdir)\msvctest.exe ..\..\pngtest.png
PostBuild_Cmds=set path=..\..\
dll\msvc\win32\libpng\dll;..\..\dll
\msvc\win32\zlib\dll; $(outdir)\msvctest.exe ..\..\pngtest.png
# End Special Build Tool
!ELSEIF "$(CFG)" == "msvctest - Win32 Debug DLL"
...
...
@@ -84,12 +84,12 @@ BSC32=bscmake.exe
# ADD BSC32 /nologo
LINK32=link.exe
# ADD BASE LINK32 /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
# ADD LINK32 ..\..\msvc\win32\libpng\dll_dbg\libpng1d.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
# ADD LINK32 ..\..\
dll\
msvc\win32\libpng\dll_dbg\libpng1d.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
# Begin Special Build Tool
OutDir=.\dll_dbg
SOURCE="$(InputPath)"
PostBuild_Desc=[Run Test]
PostBuild_Cmds=set path=..\..\
msvc\win32\libpng\dll_dbg;..\..
\msvc\win32\zlib\dll_dbg; $(outdir)\msvctest.exe ..\..\pngtest.png
PostBuild_Cmds=set path=..\..\
dll\msvc\win32\libpng\dll_dbg;..\..\dll
\msvc\win32\zlib\dll_dbg; $(outdir)\msvctest.exe ..\..\pngtest.png
# End Special Build Tool
!ELSEIF "$(CFG)" == "msvctest - Win32 ASM DLL"
...
...
@@ -114,12 +114,12 @@ BSC32=bscmake.exe
# ADD BSC32 /nologo
LINK32=link.exe
# ADD BASE LINK32 /nologo /subsystem:console /machine:I386
# ADD LINK32 ..\..\msvc\win32\libpng\dll_asm\libpng1a.lib /nologo /subsystem:console /machine:I386
# ADD LINK32 ..\..\
dll\
msvc\win32\libpng\dll_asm\libpng1a.lib /nologo /subsystem:console /machine:I386
# Begin Special Build Tool
OutDir=.\dll_asm
SOURCE="$(InputPath)"
PostBuild_Desc=[Run Test]
PostBuild_Cmds=set path=..\..\
msvc\win32\libpng\dll_asm;..\..
\msvc\win32\zlib\dll_asm; $(outdir)\msvctest.exe ..\..\pngtest.png
PostBuild_Cmds=set path=..\..\
dll\msvc\win32\libpng\dll_asm;..\..\dll
\msvc\win32\zlib\dll_asm; $(outdir)\msvctest.exe ..\..\pngtest.png
# End Special Build Tool
!ELSEIF "$(CFG)" == "msvctest - Win32 Debug ASM DLL"
...
...
@@ -144,12 +144,12 @@ BSC32=bscmake.exe
# ADD BSC32 /nologo
LINK32=link.exe
# ADD BASE LINK32 /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
# ADD LINK32 ..\..\msvc\win32\libpng\dll_dbga\libpng1b.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
# ADD LINK32 ..\..\
dll\
msvc\win32\libpng\dll_dbga\libpng1b.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
# Begin Special Build Tool
OutDir=.\dll_dbga
SOURCE="$(InputPath)"
PostBuild_Desc=[Run Test]
PostBuild_Cmds=set path=..\..\
msvc\win32\libpng\dll_dbga;..\..
\msvc\win32\zlib\dll_dbga; $(outdir)\msvctest.exe ..\..\pngtest.png
PostBuild_Cmds=set path=..\..\
dll\msvc\win32\libpng\dll_dbga;..\..\dll
\msvc\win32\zlib\dll_dbga; $(outdir)\msvctest.exe ..\..\pngtest.png
# End Special Build Tool
!ELSEIF "$(CFG)" == "msvctest - Win32 LIB"
...
...
@@ -174,7 +174,7 @@ BSC32=bscmake.exe
# ADD BSC32 /nologo
LINK32=link.exe
# ADD BASE LINK32 /nologo /subsystem:console /machine:I386
# ADD LINK32 ..\..\msvc\win32\libpng\lib\libpng.lib /nologo /subsystem:console /machine:I386
# ADD LINK32 ..\..\
dll\
msvc\win32\libpng\lib\libpng.lib /nologo /subsystem:console /machine:I386
# Begin Special Build Tool
OutDir=.\lib
SOURCE="$(InputPath)"
...
...
@@ -204,7 +204,7 @@ BSC32=bscmake.exe
# ADD BSC32 /nologo
LINK32=link.exe
# ADD BASE LINK32 /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
# ADD LINK32 ..\..\msvc\win32\libpng\lib_dbg\libpng.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
# ADD LINK32 ..\..\
dll\
msvc\win32\libpng\lib_dbg\libpng.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
# Begin Special Build Tool
OutDir=.\lib_dbg
SOURCE="$(InputPath)"
...
...
This diff is collapsed.
Click to expand it.
contrib/pngminus/makevms.com
浏览文件 @
5e5c1e1f
...
...
@@ -45,9 +45,9 @@ $ call make pnm2png.exe -
$ write sys$output "Building png2pnm..."
$ CALL MAKE png2pnm.OBJ "cc ''CCOPT' png2pnm" -
png2pnm.c
$ call make pn
m2png
.exe -
"LINK pn
m2png
,lib.opt/opt" -
pn
m2png
.obj
$ call make pn
g2pnm
.exe -
"LINK pn
g2pnm
,lib.opt/opt" -
pn
g2pnm
.obj
$ exit
$!
$!
...
...
This diff is collapsed.
Click to expand it.
contrib/pngminus/png2pnm.c
浏览文件 @
5e5c1e1f
...
...
@@ -204,6 +204,7 @@ BOOL png2pnm (FILE *png_file, FILE *pnm_file, FILE *alpha_file, BOOL raw, BOOL a
int
row
,
col
;
int
ret
;
int
i
;
long
dep_16
;
/* read and check signature in PNG file */
ret
=
fread
(
buf
,
1
,
8
,
png_file
);
...
...
@@ -379,8 +380,10 @@ BOOL png2pnm (FILE *png_file, FILE *pnm_file, FILE *alpha_file, BOOL raw, BOOL a
if
(
raw
)
fputc
((
int
)
*
pix_ptr
++
,
pnm_file
);
else
if
(
bit_depth
==
16
)
fprintf
(
pnm_file
,
"%ld "
,
((
long
)
*
pix_ptr
++
<<
8
)
+
(
long
)
*
pix_ptr
++
);
if
(
bit_depth
==
16
){
dep_16
=
(
long
)
*
pix_ptr
++
;
fprintf
(
pnm_file
,
"%ld "
,
(
dep_16
<<
8
)
+
((
long
)
*
pix_ptr
++
));
}
else
fprintf
(
pnm_file
,
"%ld "
,
(
long
)
*
pix_ptr
++
);
}
...
...
@@ -397,8 +400,10 @@ BOOL png2pnm (FILE *png_file, FILE *pnm_file, FILE *alpha_file, BOOL raw, BOOL a
if
(
raw
)
fputc
((
int
)
*
pix_ptr
++
,
alpha_file
);
else
if
(
bit_depth
==
16
)
fprintf
(
alpha_file
,
"%ld "
,
((
long
)
*
pix_ptr
++
<<
8
)
+
(
long
)
*
pix_ptr
++
);
if
(
bit_depth
==
16
){
dep_16
=
(
long
)
*
pix_ptr
++
;
fprintf
(
alpha_file
,
"%ld "
,
(
dep_16
<<
8
)
+
(
long
)
*
pix_ptr
++
);
}
else
fprintf
(
alpha_file
,
"%ld "
,
(
long
)
*
pix_ptr
++
);
}
...
...
This diff is collapsed.
Click to expand it.
contrib/visupng/README.txt
浏览文件 @
5e5c1e1f
...
...
@@ -13,8 +13,8 @@ binaries, go to "http://www.schaik.com/png/visualpng.html".
Assumes that
libpng DLLs and LIBs are in ..\..\msvc\win32\libpng
zlib DLLs and LIBs are in ..\..\msvc\win32\zlib
libpng DLLs and LIBs are in ..\..\
dll\
msvc\win32\libpng
zlib DLLs and LIBs are in ..\..\
dll\
msvc\win32\zlib
libpng header files are in ..\..\..\libpng
zlib header files are in ..\..\..\zlib
the pngsuite images are in ..\pngsuite
...
...
This diff is collapsed.
Click to expand it.
contrib/visupng/VisualPng.dsp
浏览文件 @
5e5c1e1f
...
...
@@ -60,11 +60,11 @@ BSC32=bscmake.exe
# ADD BSC32 /nologo
LINK32=link.exe
# ADD BASE LINK32 libpng1.lib zlibd.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /machine:I386 /libpath:"libpng" /libpath:"zlib"
# ADD LINK32 libpng1.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /machine:I386 /libpath:"..\..\msvc\win32\libpng\dll"
# ADD LINK32 libpng1.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /machine:I386 /libpath:"..\..\
dll\
msvc\win32\libpng\dll"
# Begin Special Build Tool
OutDir=.\dll
SOURCE="$(InputPath)"
PostBuild_Cmds=set path=..\..\
msvc\win32\libpng\dll;..\..
\msvc\win32\zlib\dll; $(outdir)\VisualPng.exe ..\..\contrib\pngsuite\basn6a16.png
PostBuild_Cmds=set path=..\..\
dll\msvc\win32\libpng\dll;..\..\dll
\msvc\win32\zlib\dll; $(outdir)\VisualPng.exe ..\..\contrib\pngsuite\basn6a16.png
# End Special Build Tool
!ELSEIF "$(CFG)" == "VisualPng - Win32 Debug DLL"
...
...
@@ -94,12 +94,12 @@ BSC32=bscmake.exe
LINK32=link.exe
# ADD BASE LINK32 libpng1.lib zlibd.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /debug /machine:I386 /nodefaultlib:"libc" /pdbtype:sept /libpath:"libpng" /libpath:"zlib"
# SUBTRACT BASE LINK32 /nodefaultlib
# ADD LINK32 libpng1d.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /debug /machine:I386 /nodefaultlib:"libc" /pdbtype:sept /libpath:"..\..\msvc\win32\libpng\dll_dbg"
# ADD LINK32 libpng1d.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /debug /machine:I386 /nodefaultlib:"libc" /pdbtype:sept /libpath:"..\..\
dll\
msvc\win32\libpng\dll_dbg"
# SUBTRACT LINK32 /nodefaultlib
# Begin Special Build Tool
OutDir=.\dll_dbg
SOURCE="$(InputPath)"
PostBuild_Cmds=set path=..\..\
msvc\win32\libpng\dll_dbg;..\..
\msvc\win32\zlib\dll_dbg; $(outdir)\VisualPng.exe ..\..\contrib\pngsuite\basn6a16.png
PostBuild_Cmds=set path=..\..\
dll\msvc\win32\libpng\dll_dbg;..\..\dll
\msvc\win32\zlib\dll_dbg; $(outdir)\VisualPng.exe ..\..\contrib\pngsuite\basn6a16.png
# End Special Build Tool
!ELSEIF "$(CFG)" == "VisualPng - Win32 LIB"
...
...
@@ -128,8 +128,8 @@ BSC32=bscmake.exe
# ADD BASE BSC32 /nologo
# ADD BSC32 /nologo
LINK32=link.exe
# ADD BASE LINK32 libpng1.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /machine:I386 /libpath:"..\..\msvc\win32\libpng\dll"
# ADD LINK32 libpng.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /machine:I386 /libpath:"..\..\msvc\win32\libpng\lib"
# ADD BASE LINK32 libpng1.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /machine:I386 /libpath:"..\..\
dll\
msvc\win32\libpng\dll"
# ADD LINK32 libpng.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /machine:I386 /libpath:"..\..\
dll\
msvc\win32\libpng\lib"
# Begin Special Build Tool
OutDir=.\lib
SOURCE="$(InputPath)"
...
...
@@ -161,9 +161,9 @@ BSC32=bscmake.exe
# ADD BASE BSC32 /nologo
# ADD BSC32 /nologo
LINK32=link.exe
# ADD BASE LINK32 libpng1d.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /debug /machine:I386 /nodefaultlib:"libc" /pdbtype:sept /libpath:"..\..\msvc\win32\libpng\dll_dbg"
# ADD BASE LINK32 libpng1d.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /debug /machine:I386 /nodefaultlib:"libc" /pdbtype:sept /libpath:"..\..\
dll\
msvc\win32\libpng\dll_dbg"
# SUBTRACT BASE LINK32 /nodefaultlib
# ADD LINK32 libpng.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /debug /machine:I386 /nodefaultlib:"libc" /pdbtype:sept /libpath:"..\..\msvc\win32\libpng\lib_dbg"
# ADD LINK32 libpng.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /debug /machine:I386 /nodefaultlib:"libc" /pdbtype:sept /libpath:"..\..\
dll\
msvc\win32\libpng\lib_dbg"
# SUBTRACT LINK32 /nodefaultlib
# Begin Special Build Tool
OutDir=.\lib_dbg
...
...
This diff is collapsed.
Click to expand it.
msvc/README.txt
→
dll/
msvc/README.txt
浏览文件 @
5e5c1e1f
Microsoft Developer Studio Build File, Format Version 6.00 for
libpng 1.0.
8 (July 24
, 2000) and zlib
libpng 1.0.
9beta1 (November 10
, 2000) and zlib
Copyright (C) 2000 Simon-Pierre Cadieux
For conditions of distribution and use, see copyright notice in png.h
Assumes that libpng sources are in ..
Assumes that zlib sources have been copied to ..\..\zlib
Assumes that libpng sources are in ..
\..
Assumes that zlib sources have been copied to ..\..\
..\
zlib
To build:
...
...
This diff is collapsed.
Click to expand it.
msvc/libpng.dsp
→
dll/
msvc/libpng.dsp
浏览文件 @
5e5c1e1f
...
...
@@ -46,11 +46,11 @@ CFG=libpng - Win32 DLL
# PROP Target_Dir ""
CPP=cl.exe
# ADD BASE CPP /nologo /MD /W3 /O1 /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "_USRDLL" /FD /c
# ADD CPP /nologo /MD /W3 /O1 /I "..
" /I "
..\..\zlib" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "PNG_BUILD_DLL" /D "ZLIB_DLL" /Yu"png.h" /FD /c
# ADD CPP /nologo /MD /W3 /O1 /I "..
\.." /I "..\
..\..\zlib" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "PNG_BUILD_DLL" /D "ZLIB_DLL" /Yu"png.h" /FD /c
MTL=midl.exe
RSC=rc.exe
# ADD BASE RSC /l 0x409 /d "NDEBUG"
# ADD RSC /l 0x409 /i ".." /d "NDEBUG"
# ADD RSC /l 0x409 /i "..
\..
" /d "NDEBUG"
BSC32=bscmake.exe
# ADD BASE BSC32 /nologo
# ADD BSC32 /nologo
...
...
@@ -74,11 +74,11 @@ LINK32=link.exe
# PROP Target_Dir ""
CPP=cl.exe
# ADD BASE CPP /nologo /MDd /W3 /Zi /Od /D "_DEBUG" /D "WIN32" /D "_WINDOWS" /D "_USRDLL" /FD /GZ /c
# ADD CPP /nologo /MDd /W3 /Zi /Od /I "..
" /I "
..\..\zlib" /D "DEBUG" /D "_DEBUG" /D PNG_DEBUG=1 /D "WIN32" /D "_WINDOWS" /D "PNG_BUILD_DLL" /D "ZLIB_DLL" /Yu"png.h" /FD /GZ /c
# ADD CPP /nologo /MDd /W3 /Zi /Od /I "..
\.." /I "..\
..\..\zlib" /D "DEBUG" /D "_DEBUG" /D PNG_DEBUG=1 /D "WIN32" /D "_WINDOWS" /D "PNG_BUILD_DLL" /D "ZLIB_DLL" /Yu"png.h" /FD /GZ /c
MTL=midl.exe
RSC=rc.exe
# ADD BASE RSC /l 0x409 /d "_DEBUG"
# ADD RSC /l 0x409 /i ".." /d "_DEBUG" /d PNG_DEBUG=1
# ADD RSC /l 0x409 /i "..
\..
" /d "_DEBUG" /d PNG_DEBUG=1
BSC32=bscmake.exe
# ADD BASE BSC32 /nologo
# ADD BSC32 /nologo
...
...
@@ -101,11 +101,11 @@ LINK32=link.exe
# PROP Target_Dir ""
CPP=cl.exe
# ADD BASE CPP /nologo /MD /W3 /O1 /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "_USRDLL" /FD /c
# ADD CPP /nologo /MD /W3 /O1 /I "..
" /I "
..\..\zlib" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "PNG_USE_PNGVCRD" /D "PNG_BUILD_DLL" /D "ZLIB_DLL" /Yu"png.h" /FD /c
# ADD CPP /nologo /MD /W3 /O1 /I "..
\.." /I "..\
..\..\zlib" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "PNG_USE_PNGVCRD" /D "PNG_BUILD_DLL" /D "ZLIB_DLL" /Yu"png.h" /FD /c
MTL=midl.exe
RSC=rc.exe
# ADD BASE RSC /l 0x409 /d "NDEBUG"
# ADD RSC /l 0x409 /i ".." /d "NDEBUG" /d "PNG_USE_PNGVCRD"
# ADD RSC /l 0x409 /i "..
\..
" /d "NDEBUG" /d "PNG_USE_PNGVCRD"
BSC32=bscmake.exe
# ADD BASE BSC32 /nologo
# ADD BSC32 /nologo
...
...
@@ -129,11 +129,11 @@ LINK32=link.exe
# PROP Target_Dir ""
CPP=cl.exe
# ADD BASE CPP /nologo /MDd /W3 /Zi /Od /D "_DEBUG" /D "WIN32" /D "_WINDOWS" /D "_USRDLL" /FD /GZ /c
# ADD CPP /nologo /MDd /W3 /Zi /Od /I "..
" /I "
..\..\zlib" /D "DEBUG" /D "_DEBUG" /D PNG_DEBUG=1 /D "WIN32" /D "_WINDOWS" /D "PNG_USE_PNGVCRD" /D "PNG_BUILD_DLL" /D "ZLIB_DLL" /Yu"png.h" /FD /GZ /c
# ADD CPP /nologo /MDd /W3 /Zi /Od /I "..
\.." /I "..\
..\..\zlib" /D "DEBUG" /D "_DEBUG" /D PNG_DEBUG=1 /D "WIN32" /D "_WINDOWS" /D "PNG_USE_PNGVCRD" /D "PNG_BUILD_DLL" /D "ZLIB_DLL" /Yu"png.h" /FD /GZ /c
MTL=midl.exe
RSC=rc.exe
# ADD BASE RSC /l 0x409 /d "_DEBUG"
# ADD RSC /l 0x409 /i ".." /d "_DEBUG" /d PNG_DEBUG=1 /d "PNG_USE_PNGVCRD"
# ADD RSC /l 0x409 /i "..
\..
" /d "_DEBUG" /d PNG_DEBUG=1 /d "PNG_USE_PNGVCRD"
BSC32=bscmake.exe
# ADD BASE BSC32 /nologo
# ADD BSC32 /nologo
...
...
@@ -156,10 +156,10 @@ LINK32=link.exe
MTL=midl.exe
CPP=cl.exe
# ADD BASE CPP /nologo /W3 /O1 /D "WIN32" /D "NDEBUG" /D "_LIB" /FD /c
# ADD CPP /nologo /W3 /O1 /I "..
" /I "
..\..\zlib" /D "WIN32" /D "NDEBUG" /Yu"png.h" /FD /c
# ADD CPP /nologo /W3 /O1 /I "..
\.." /I "..\
..\..\zlib" /D "WIN32" /D "NDEBUG" /Yu"png.h" /FD /c
RSC=rc.exe
# ADD BASE RSC /l 0x409 /d "NDEBUG"
# ADD RSC /l 0x409 /i ".." /d "NDEBUG"
# ADD RSC /l 0x409 /i "..
\..
" /d "NDEBUG"
BSC32=bscmake.exe
# ADD BASE BSC32 /nologo
# ADD BSC32 /nologo
...
...
@@ -182,7 +182,7 @@ LIB32=link.exe -lib
MTL=midl.exe
CPP=cl.exe
# ADD BASE CPP /nologo /W3 /Zi /Od /D "_DEBUG" /D "WIN32" /D "_LIB" /FD /GZ /c
# ADD CPP /nologo /W3 /Zi /Od /I "..
" /I "
..\..\zlib" /D "DEBUG" /D "_DEBUG" /D PNG_DEBUG=1 /D "WIN32" /Yu"png.h" /FD /GZ /c
# ADD CPP /nologo /W3 /Zi /Od /I "..
\.." /I "..\
..\..\zlib" /D "DEBUG" /D "_DEBUG" /D PNG_DEBUG=1 /D "WIN32" /Yu"png.h" /FD /GZ /c
RSC=rc.exe
# ADD BASE RSC /l 0x409 /d "_DEBUG"
# ADD RSC /l 0x409 /d "_DEBUG"
...
...
@@ -208,7 +208,7 @@ LIB32=link.exe -lib
# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
# Begin Source File
SOURCE=..\png.c
SOURCE=..\
..\
png.c
# SUBTRACT CPP /YX /Yc /Yu
# End Source File
# Begin Source File
...
...
@@ -259,48 +259,48 @@ SOURCE=.\png32ms.def
# End Source File
# Begin Source File
SOURCE=..\pngerror.c
SOURCE=..\
..\
pngerror.c
# ADD CPP /Yc"png.h"
# End Source File
# Begin Source File
SOURCE=..\pngget.c
SOURCE=..\
..\
pngget.c
# End Source File
# Begin Source File
SOURCE=..\pngmem.c
SOURCE=..\
..\
pngmem.c
# End Source File
# Begin Source File
SOURCE=..\pngpread.c
SOURCE=..\
..\
pngpread.c
# End Source File
# Begin Source File
SOURCE=..\pngread.c
SOURCE=..\
..\
pngread.c
# End Source File
# Begin Source File
SOURCE=..\pngrio.c
SOURCE=..\
..\
pngrio.c
# End Source File
# Begin Source File
SOURCE=..\pngrtran.c
SOURCE=..\
..\
pngrtran.c
# End Source File
# Begin Source File
SOURCE=..\pngrutil.c
SOURCE=..\
..\
pngrutil.c
# End Source File
# Begin Source File
SOURCE=..\pngset.c
SOURCE=..\
..\
pngset.c
# End Source File
# Begin Source File
SOURCE=..\pngtrans.c
SOURCE=..\
..\
pngtrans.c
# End Source File
# Begin Source File
SOURCE=..\pngvcrd.c
SOURCE=..\
..\
pngvcrd.c
!IF "$(CFG)" == "libpng - Win32 DLL"
...
...
@@ -327,19 +327,19 @@ SOURCE=..\pngvcrd.c
# End Source File
# Begin Source File
SOURCE=..\pngwio.c
SOURCE=..\
..\
pngwio.c
# End Source File
# Begin Source File
SOURCE=..\pngwrite.c
SOURCE=..\
..\
pngwrite.c
# End Source File
# Begin Source File
SOURCE=..\pngwtran.c
SOURCE=..\
..\
pngwtran.c
# End Source File
# Begin Source File
SOURCE=..\pngwutil.c
SOURCE=..\
..\
pngwutil.c
# End Source File
# End Group
# Begin Group "Header Files"
...
...
@@ -347,11 +347,11 @@ SOURCE=..\pngwutil.c
# PROP Default_Filter "h;hpp;hxx;hm;inl"
# Begin Source File
SOURCE=..\png.h
SOURCE=..\
..\
png.h
# End Source File
# Begin Source File
SOURCE=..\pngconf.h
SOURCE=..\
..\
pngconf.h
# End Source File
# End Group
# Begin Group "Resource Files"
...
...
This diff is collapsed.
Click to expand it.
msvc/libpng.dsw
→
dll/
msvc/libpng.dsw
浏览文件 @
5e5c1e1f
文件已移动
This diff is collapsed.
Click to expand it.
msvc/png.rc
→
dll/
msvc/png.rc
浏览文件 @
5e5c1e1f
...
...
@@ -18,6 +18,9 @@
# else
# define DLLFNAME_POSTFIX "A"
# endif /* !defined(DLLFNAME_POSTFIX)... */
# if !defined(SPECIALBUILD)
# define SPECIALBUILD "Use MMX instructions"
# endif /* SPECIALBUILD */
#endif
#if defined(PNG_DEBUG) && (PNG_DEBUG > 0)
...
...
This diff is collapsed.
Click to expand it.
msvc/png32ms.def
→
dll/
msvc/png32ms.def
浏览文件 @
5e5c1e1f
...
...
@@ -6,7 +6,7 @@ LIBRARY
DESCRIPTION "PNG image compression library for Windows"
EXPORTS
;Version 1.0.
8
;Version 1.0.
9beta1
png_build_grayscale_palette @1
png_check_sig @2
png_chunk_error @3
...
...
This diff is collapsed.
Click to expand it.
msvc/zlib.def
→
dll/
msvc/zlib.def
浏览文件 @
5e5c1e1f
文件已移动
This diff is collapsed.
Click to expand it.
msvc/zlib.dsp
→
dll/
msvc/zlib.dsp
浏览文件 @
5e5c1e1f
...
...
@@ -101,11 +101,11 @@ LINK32=link.exe
# PROP Target_Dir ""
CPP=cl.exe
# ADD BASE CPP /nologo /MD /W3 /O1 /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "_USRDLL" /FD /c
# ADD CPP /nologo /MD /W3 /O1 /I "..\..\zlib" /D "NDEBUG" /D "WIN32" /D "_WIN32" /D "_WINDOWS" /D "ZLIB_DLL" /D "DYNAMIC_CRC_TABLE" /D "ASMV" /FAcs /FD /c
# ADD CPP /nologo /MD /W3 /O1 /I "..\..\
..\
zlib" /D "NDEBUG" /D "WIN32" /D "_WIN32" /D "_WINDOWS" /D "ZLIB_DLL" /D "DYNAMIC_CRC_TABLE" /D "ASMV" /FAcs /FD /c
MTL=midl.exe
RSC=rc.exe
# ADD BASE RSC /l 0x409 /d "NDEBUG"
# ADD RSC /l 0x409 /i ".." /d "NDEBUG"
# ADD RSC /l 0x409 /i "..
\..
" /d "NDEBUG"
BSC32=bscmake.exe
# ADD BASE BSC32 /nologo
# ADD BSC32 /nologo
...
...
@@ -129,11 +129,11 @@ LINK32=link.exe
# PROP Target_Dir ""
CPP=cl.exe
# ADD BASE CPP /nologo /MDd /W3 /Zi /Od /D "_DEBUG" /D "WIN32" /D "_WINDOWS" /D "_USRDLL" /FD /GZ /c
# ADD CPP /nologo /MDd /W3 /Zi /Od /I "..\..\zlib" /D "_DEBUG" /D "WIN32" /D "_WIN32" /D "_WINDOWS" /D "ZLIB_DLL" /D "DYNAMIC_CRC_TABLE" /D "ASMV" /FAcs /FD /GZ /c
# ADD CPP /nologo /MDd /W3 /Zi /Od /I "..\..\
..\
zlib" /D "_DEBUG" /D "WIN32" /D "_WIN32" /D "_WINDOWS" /D "ZLIB_DLL" /D "DYNAMIC_CRC_TABLE" /D "ASMV" /FAcs /FD /GZ /c
MTL=midl.exe
RSC=rc.exe
# ADD BASE RSC /l 0x409 /d "_DEBUG"
# ADD RSC /l 0x409 /i ".." /d "_DEBUG"
# ADD RSC /l 0x409 /i "..
\..
" /d "_DEBUG"
BSC32=bscmake.exe
# ADD BASE BSC32 /nologo
# ADD BSC32 /nologo
...
...
@@ -208,23 +208,23 @@ LIB32=link.exe -lib
# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
# Begin Source File
SOURCE=..\..\zlib\adler32.c
SOURCE=..\..\
..\
zlib\adler32.c
# End Source File
# Begin Source File
SOURCE=..\..\zlib\compress.c
SOURCE=..\..\
..\
zlib\compress.c
# End Source File
# Begin Source File
SOURCE=..\..\zlib\crc32.c
SOURCE=..\..\
..\
zlib\crc32.c
# End Source File
# Begin Source File
SOURCE=..\..\zlib\deflate.c
SOURCE=..\..\
..\
zlib\deflate.c
# End Source File
# Begin Source File
SOURCE=..\..\zlib\contrib\asm386\gvmat32c.c
SOURCE=..\..\
..\
zlib\contrib\asm386\gvmat32c.c
!IF "$(CFG)" == "zlib - Win32 DLL"
...
...
@@ -251,46 +251,46 @@ SOURCE=..\..\zlib\contrib\asm386\gvmat32c.c
# End Source File
# Begin Source File
SOURCE=..\..\zlib\gzio.c
SOURCE=..\..\
..\
zlib\gzio.c
# ADD CPP /Yc"zutil.h"
# End Source File
# Begin Source File
SOURCE=..\..\zlib\infblock.c
SOURCE=..\..\
..\
zlib\infblock.c
# ADD CPP /Yu"zutil.h"
# End Source File
# Begin Source File
SOURCE=..\..\zlib\infcodes.c
SOURCE=..\..\
..\
zlib\infcodes.c
# ADD CPP /Yu"zutil.h"
# End Source File
# Begin Source File
SOURCE=..\..\zlib\inffast.c
SOURCE=..\..\
..\
zlib\inffast.c
# ADD CPP /Yu"zutil.h"
# End Source File
# Begin Source File
SOURCE=..\..\zlib\inflate.c
SOURCE=..\..\
..\
zlib\inflate.c
# ADD CPP /Yu"zutil.h"
# End Source File
# Begin Source File
SOURCE=..\..\zlib\inftrees.c
SOURCE=..\..\
..\
zlib\inftrees.c
# ADD CPP /Yu"zutil.h"
# End Source File
# Begin Source File
SOURCE=..\..\zlib\infutil.c
SOURCE=..\..\
..\
zlib\infutil.c
# ADD CPP /Yu"zutil.h"
# End Source File
# Begin Source File
SOURCE=..\..\zlib\trees.c
SOURCE=..\..\
..\
zlib\trees.c
# End Source File
# Begin Source File
SOURCE=..\..\zlib\uncompr.c
SOURCE=..\..\
..\
zlib\uncompr.c
# End Source File
# Begin Source File
...
...
@@ -317,7 +317,7 @@ SOURCE=.\zlib.def
# End Source File
# Begin Source File
SOURCE=..\..\zlib\msdos\zlib.rc
SOURCE=..\..\
..\
zlib\msdos\zlib.rc
!IF "$(CFG)" == "zlib - Win32 DLL"
...
...
@@ -340,7 +340,7 @@ SOURCE=..\..\zlib\msdos\zlib.rc
# End Source File
# Begin Source File
SOURCE=..\..\zlib\zutil.c
SOURCE=..\..\
..\
zlib\zutil.c
# ADD CPP /Yu"zutil.h"
# End Source File
# End Group
...
...
@@ -349,47 +349,47 @@ SOURCE=..\..\zlib\zutil.c
# PROP Default_Filter "h;hpp;hxx;hm;inl"
# Begin Source File
SOURCE=..\..\zlib\deflate.h
SOURCE=..\..\
..\
zlib\deflate.h
# End Source File
# Begin Source File
SOURCE=..\..\zlib\infblock.h
SOURCE=..\..\
..\
zlib\infblock.h
# End Source File
# Begin Source File
SOURCE=..\..\zlib\infcodes.h
SOURCE=..\..\
..\
zlib\infcodes.h
# End Source File
# Begin Source File
SOURCE=..\..\zlib\inffast.h
SOURCE=..\..\
..\
zlib\inffast.h
# End Source File
# Begin Source File
SOURCE=..\..\zlib\inffixed.h
SOURCE=..\..\
..\
zlib\inffixed.h
# End Source File
# Begin Source File
SOURCE=..\..\zlib\inftrees.h
SOURCE=..\..\
..\
zlib\inftrees.h
# End Source File
# Begin Source File
SOURCE=..\..\zlib\infutil.h
SOURCE=..\..\
..\
zlib\infutil.h
# End Source File
# Begin Source File
SOURCE=..\..\zlib\trees.h
SOURCE=..\..\
..\
zlib\trees.h
# End Source File
# Begin Source File
SOURCE=..\..\zlib\zconf.h
SOURCE=..\..\
..\
zlib\zconf.h
# End Source File
# Begin Source File
SOURCE=..\..\zlib\zlib.h
SOURCE=..\..\
..\
zlib\zlib.h
# End Source File
# Begin Source File
SOURCE=..\..\zlib\zutil.h
SOURCE=..\..\
..\
zlib\zutil.h
# End Source File
# End Group
# Begin Group "Resource Files"
...
...
This diff is collapsed.
Click to expand it.
wince/READMEE.WCE
→
dll/
wince/READMEE.WCE
浏览文件 @
5e5c1e1f
...
...
@@ -8,9 +8,9 @@ libpng for WindowsCE Rel.1.0
Introduction
============
This is libpng 1.0.
7
ported to WindowsCE 2.0 and 2.11.
libpng 1.0.
7
is a PNG reference library.
See README, a document of original libpng 1.0.
7
.
This is libpng 1.0.
9beta1
ported to WindowsCE 2.0 and 2.11.
libpng 1.0.
9beta1
is a PNG reference library.
See README, a document of original libpng 1.0.
9beta1
.
zlib for WindowsCE
==================
...
...
@@ -23,7 +23,7 @@ This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
arising from the use of this software.
See README and LICENSE, documents of original libpng 1.0.
7
, for conditions
See README and LICENSE, documents of original libpng 1.0.
9beta1
, for conditions
of use and distribution.
Files
...
...
@@ -33,8 +33,8 @@ Files
READMEJ.WCE - this file(in Japanese)
png32ce.def - module definition file to make DLLs
Sample programs(../
pngtest.c and ../contrib/*) can build on WindowsCE 2.11.
WindowsCE 2.0 and below do not support 'console' functions.
Sample programs(../
../pngtest.c and ../../contrib/*) can build on WindowsCE
2.11.
WindowsCE 2.0 and below do not support 'console' functions.
Author
======
...
...
This diff is collapsed.
Click to expand it.
wince/READMEJ.WCE
→
dll/
wince/READMEJ.WCE
浏览文件 @
5e5c1e1f
...
...
@@ -24,7 +24,7 @@ libpng
になったいかなる被害についても、作者、配布者、その他利用者以外の人物、
団体に責任をとる義務はないものとします。
その他、このソフトウェアの利用条件については、原版である libpng 1.0.
7
に
その他、このソフトウェアの利用条件については、原版である libpng 1.0.
9beta1
に
準拠するものとします。詳しくは、付属の README,LICENSE をお読みください。
収録内容
...
...
This diff is collapsed.
Click to expand it.
wince/READMEZE.WCE
→
dll/
wince/READMEZE.WCE
浏览文件 @
5e5c1e1f
文件已移动
This diff is collapsed.
Click to expand it.
wince/READMEZJ.WCE
→
dll/
wince/READMEZJ.WCE
浏览文件 @
5e5c1e1f
文件已移动
This diff is collapsed.
Click to expand it.
wince/lpngce.dsp
→
dll/
wince/lpngce.dsp
浏览文件 @
5e5c1e1f
此差异已折叠。
点击以展开。
wince/lpngce.dsw
→
dll/
wince/lpngce.dsw
浏览文件 @
5e5c1e1f
文件已移动
This diff is collapsed.
Click to expand it.
wince/png32ce.def
→
dll/
wince/png32ce.def
浏览文件 @
5e5c1e1f
...
...
@@ -5,7 +5,7 @@
LIBRARY lpngce
EXPORTS
;Version 1.0.
7
;Version 1.0.
9beta1
png_build_grayscale_palette @1
png_check_sig @2
png_chunk_error @3
...
...
This diff is collapsed.
Click to expand it.
wince/pngtest.dsp
→
dll/
wince/pngtest.dsp
浏览文件 @
5e5c1e1f
此差异已折叠。
点击以展开。
wince/pngtest.dsw
→
dll/
wince/pngtest.dsw
浏览文件 @
5e5c1e1f
文件已移动
This diff is collapsed.
Click to expand it.
wince/winmain.c
→
dll/
wince/winmain.c
浏览文件 @
5e5c1e1f
文件已移动
This diff is collapsed.
Click to expand it.
dll/wince/zlib.diff
0 → 100644
浏览文件 @
5e5c1e1f
此差异已折叠。
点击以展开。
wince/zlibce.def
→
dll/
wince/zlibce.def
浏览文件 @
5e5c1e1f
文件已移动
This diff is collapsed.
Click to expand it.
wince/zlibce.dsp
→
dll/
wince/zlibce.dsp
浏览文件 @
5e5c1e1f
此差异已折叠。
点击以展开。
libpng.3
浏览文件 @
5e5c1e1f
.TH LIBPNG 3 "
July 24
, 2000"
.TH LIBPNG 3 "
November 10
, 2000"
.SH NAME
libpng \- Portable Network Graphics (PNG) Reference Library 1.0.
8
libpng \- Portable Network Graphics (PNG) Reference Library 1.0.
9beta1
.SH SYNOPSIS
\fI\fB
...
...
@@ -40,7 +40,7 @@ libpng \- Portable Network Graphics (PNG) Reference Library 1.0.8
\fI\fB
\fBpng_structp png_create_read_struct (png_const_charp \fP\fIuser_png_ver\fP\fB, voidp \fP\fIerror_ptr\fP\fB, png_error_ptr \fP\fIerror_fn\fP\fB, png_error_ptr \fIwarn_fn\fP\fB);\fP
\fBpng_structp png_create_read_struct (png_const_charp \fP\fIuser_png_ver\fP\fB,
png_
voidp \fP\fIerror_ptr\fP\fB, png_error_ptr \fP\fIerror_fn\fP\fB, png_error_ptr \fIwarn_fn\fP\fB);\fP
\fI\fB
...
...
@@ -48,7 +48,7 @@ libpng \- Portable Network Graphics (PNG) Reference Library 1.0.8
\fI\fB
\fBpng_structp png_create_write_struct (png_const_charp \fP\fIuser_png_ver\fP\fB, voidp \fP\fIerror_ptr\fP\fB, png_error_ptr \fP\fIerror_fn\fP\fB, png_error_ptr \fIwarn_fn\fP\fB);\fP
\fBpng_structp png_create_write_struct (png_const_charp \fP\fIuser_png_ver\fP\fB,
png_
voidp \fP\fIerror_ptr\fP\fB, png_error_ptr \fP\fIerror_fn\fP\fB, png_error_ptr \fIwarn_fn\fP\fB);\fP
\fI\fB
...
...
@@ -368,7 +368,7 @@ libpng \- Portable Network Graphics (PNG) Reference Library 1.0.8
\fI\fB
\fBvoid png_read_png (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fP\fIinfo_ptr\fP\fB, int \fP\fItransforms\fP\fB, voidp \fIparams\fP\fB);\fP
\fBvoid png_read_png (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fP\fIinfo_ptr\fP\fB, int \fP\fItransforms\fP\fB,
png_
voidp \fIparams\fP\fB);\fP
\fI\fB
...
...
@@ -724,7 +724,7 @@ libpng \- Portable Network Graphics (PNG) Reference Library 1.0.8
\fI\fB
\fBvoid png_write_png (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fP\fIinfo_ptr\fP\fB, int \fP\fItransforms\fP\fB, voidp \fIparams\fP\fB);\fP
\fBvoid png_write_png (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fP\fIinfo_ptr\fP\fB, int \fP\fItransforms\fP\fB,
png_
voidp \fIparams\fP\fB);\fP
\fI\fB
...
...
@@ -747,7 +747,7 @@ Following is a copy of the libpng.txt file that accompanies libpng.
.SH LIBPNG.TXT
libpng.txt - A description on how to use and modify libpng
libpng version 1.0.
8 - July 24
, 2000
libpng version 1.0.
9beta1 - November 10
, 2000
Updated and distributed by Glenn Randers-Pehrson
<randeg@alum.rpi.edu>
Copyright (c) 1998, 1999, 2000 Glenn Randers-Pehrson
...
...
@@ -784,8 +784,7 @@ Libpng was written as a companion to the PNG specification, as a way
of reducing the amount of time and effort it takes to support the PNG
file format in application programs.
The PNG-1.2 specification is available at <http://www.cdrom.com/pub/png>
(will be moving to <http://www.libpng.org>)
The PNG-1.2 specification is available at <http://www.libpng.org/pub/png>
and at <ftp://ftp.uu.net/graphics/png/documents/>.
The PNG-1.0 specification is available
...
...
@@ -796,8 +795,7 @@ documents at <ftp://ftp.uu.net/graphics/png/documents/>.
Other information
about PNG, and the latest version of libpng, can be found at the PNG home
page, <http://www.cdrom.com/pub/png/> (will be moving to
<http://www.libpng.org>)
page, <http://www.libpng.org/pub/png/>
and at <ftp://ftp.uu.net/graphics/png/>.
Most users will not have to modify the library significantly; advanced
...
...
@@ -3381,13 +3379,13 @@ application:
.SH VII. Y2K Compliance in libpng
July 24
, 2000
November 10
, 2000
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.0.
8
are Y2K compliant. It is my belief that earlier
upward through 1.0.
9beta1
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
...
...
@@ -3488,7 +3486,7 @@ libpngpf(3), png(5)
.IR libpng :
.IP
ftp://ftp.uu.net/graphics/png
http://www.
cdrom.com
/pub/png
http://www.
libpng.org
/pub/png
.LP
.IR zlib :
...
...
@@ -3499,7 +3497,7 @@ or at
.br
ftp://ftp.uu.net/pub/archiving/zip/zlib
.br
ftp://ftp.
freesoftware.com
/pub/infozip/zlib
ftp://ftp.
info-zip.org
/pub/infozip/zlib
.LP
.IR PNG specification: RFC 2083
...
...
@@ -3528,7 +3526,7 @@ possible without all of you.
Thanks to Frank J. T. Wojcik for helping with the documentation.
Libpng version 1.0.
8 - July 24
, 2000:
Libpng version 1.0.
9beta1 - November 10
, 2000:
Initially created in 1995 by Guy Eric Schalnat, then of Group 42, Inc.
Currently maintained by Glenn Randers-Pehrson (randeg@alum.rpi.edu).
...
...
@@ -3538,10 +3536,14 @@ Supported by the PNG development group
.SH COPYRIGHT NOTICE, DISCLAIMER, and LICENSE:
(This copy of the libpng notices is provided for your convenience. In case of
any discrepancy between this copy and the notices in the file png.h that is
included in the libpng distribution, the latter shall prevail.)
If you modify libpng you may insert additional notices immediately following
this sentence.
libpng versions 1.0.7, July 1, 2000, through 1.0.
8, July 24
, 2000, are
libpng versions 1.0.7, July 1, 2000, through 1.0.
9beta1, November 10
, 2000, are
Copyright (c) 2000 Glenn Randers-Pehrson, and are
distributed according to the same disclaimer and license as libpng-1.0.6
with the following individuals added to the list of Contributing Authors
...
...
@@ -3632,7 +3634,7 @@ certification mark of the Open Source Initiative.
Glenn Randers-Pehrson
randeg@alum.rpi.edu
July 24
, 2000
November 10
, 2000
.\" end of man page
This diff is collapsed.
Click to expand it.
libpng.txt
浏览文件 @
5e5c1e1f
libpng.txt - A description on how to use and modify libpng
libpng version 1.0.
8 - July 24
, 2000
libpng version 1.0.
9beta1 - November 10
, 2000
Updated and distributed by Glenn Randers-Pehrson
<randeg@alum.rpi.edu>
Copyright (c) 1998, 1999, 2000 Glenn Randers-Pehrson
...
...
@@ -37,8 +37,7 @@ Libpng was written as a companion to the PNG specification, as a way
of reducing the amount of time and effort it takes to support the PNG
file format in application programs.
The PNG-1.2 specification is available at <http://www.cdrom.com/pub/png>
(will be moving to <http://www.libpng.org>)
The PNG-1.2 specification is available at <http://www.libpng.org/pub/png>
and at <ftp://ftp.uu.net/graphics/png/documents/>.
The PNG-1.0 specification is available
...
...
@@ -49,8 +48,7 @@ documents at <ftp://ftp.uu.net/graphics/png/documents/>.
Other information
about PNG, and the latest version of libpng, can be found at the PNG home
page, <http://www.cdrom.com/pub/png/> (will be moving to
<http://www.libpng.org>)
page, <http://www.libpng.org/pub/png/>
and at <ftp://ftp.uu.net/graphics/png/>.
Most users will not have to modify the library significantly; advanced
...
...
@@ -2634,13 +2632,13 @@ application:
VII. Y2K Compliance in libpng
July 24
, 2000
November 10
, 2000
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.0.
8
are Y2K compliant. It is my belief that earlier
upward through 1.0.
9beta1
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
...
...
This diff is collapsed.
Click to expand it.
libpngpf.3
浏览文件 @
5e5c1e1f
.TH LIBPNGPF 3 "
July 24
, 2000"
.TH LIBPNGPF 3 "
November 10
, 2000"
.SH NAME
libpng \- Portable Network Graphics (PNG) Reference Library 1.0.
8
libpng \- Portable Network Graphics (PNG) Reference Library 1.0.
9beta1
(private functions)
.SH SYNOPSIS
\fB#include <png.h>\fP
...
...
This diff is collapsed.
Click to expand it.
png.5
浏览文件 @
5e5c1e1f
.TH PNG 5 "
July 24
, 2000"
.TH PNG 5 "
November 10
, 2000"
.SH NAME
png \- Portable Network Graphics (PNG) format
.SH DESCRIPTION
...
...
@@ -23,7 +23,7 @@ platforms.
PNG 1.2 specification, July 1999:
.IP
.br
http://www.
cdrom.com/pub/png (moving to http://www.libpng.org)
http://www.
libpng.org/pub/png
.br
or ftp://ftp.uu.net/graphics/png/documents
.LP
...
...
This diff is collapsed.
Click to expand it.
png.c
浏览文件 @
5e5c1e1f
/* png.c - location for general purpose libpng functions
*
* libpng version 1.0.
8 - July 24
, 2000
* libpng version 1.0.
9beta1 - November 10
, 2000
* Copyright (c) 1998, 1999, 2000 Glenn Randers-Pehrson
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
* (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
...
...
@@ -13,18 +13,18 @@
#include "png.h"
/* Generate a compiler error if there is an old png.h in the search path. */
typedef
version_1_0_
8
Your_png_h_is_not_version_1_0_8
;
typedef
version_1_0_
9beta1
Your_png_h_is_not_version_1_0_9beta1
;
/* Version information for C files. This had better match the version
* string defined in png.h. */
#ifdef PNG_USE_GLOBAL_ARRAYS
/* png_libpng_ver was changed to a function in version 1.0.5c */
c
har
png_libpng_ver
[
12
]
=
"1.0.8
"
;
c
onst
char
png_libpng_ver
[
18
]
=
"1.0.9beta1
"
;
/* png_sig was changed to a function in version 1.0.5c */
/* Place to hold the signature string for a PNG file. */
png_byte
FARDATA
png_sig
[
8
]
=
{
137
,
80
,
78
,
71
,
13
,
10
,
26
,
10
};
const
png_byte
FARDATA
png_sig
[
8
]
=
{
137
,
80
,
78
,
71
,
13
,
10
,
26
,
10
};
/* Invoke global declarations for constant strings for known chunk types */
PNG_IHDR
;
...
...
@@ -52,32 +52,33 @@ PNG_zTXt;
/* arrays to facilitate easy interlacing - use pass (0 - 6) as index */
/* start of interlace block */
int
FARDATA
png_pass_start
[]
=
{
0
,
4
,
0
,
2
,
0
,
1
,
0
};
const
int
FARDATA
png_pass_start
[]
=
{
0
,
4
,
0
,
2
,
0
,
1
,
0
};
/* offset to next interlace block */
int
FARDATA
png_pass_inc
[]
=
{
8
,
8
,
4
,
4
,
2
,
2
,
1
};
const
int
FARDATA
png_pass_inc
[]
=
{
8
,
8
,
4
,
4
,
2
,
2
,
1
};
/* start of interlace block in the y direction */
int
FARDATA
png_pass_ystart
[]
=
{
0
,
0
,
4
,
0
,
2
,
0
,
1
};
const
int
FARDATA
png_pass_ystart
[]
=
{
0
,
0
,
4
,
0
,
2
,
0
,
1
};
/* offset to next interlace block in the y direction */
int
FARDATA
png_pass_yinc
[]
=
{
8
,
8
,
8
,
4
,
4
,
2
,
2
};
const
int
FARDATA
png_pass_yinc
[]
=
{
8
,
8
,
8
,
4
,
4
,
2
,
2
};
/* width of interlace block (used in assembler routines only) */
#ifdef PNG_HAVE_ASSEMBLER_COMBINE_ROW
int
FARDATA
png_pass_width
[]
=
{
8
,
4
,
4
,
2
,
2
,
1
,
1
};
const
int
FARDATA
png_pass_width
[]
=
{
8
,
4
,
4
,
2
,
2
,
1
,
1
};
#endif
/* Height of interlace block. This is not currently used - if you need
* it, uncomment it here and in png.h
int FARDATA png_pass_height[] = {8, 8, 4, 4, 2, 2, 1};
const
int FARDATA png_pass_height[] = {8, 8, 4, 4, 2, 2, 1};
*/
/* Mask to determine which pixels are valid in a pass */
int
FARDATA
png_pass_mask
[]
=
{
0x80
,
0x08
,
0x88
,
0x22
,
0xaa
,
0x55
,
0xff
};
const
int
FARDATA
png_pass_mask
[]
=
{
0x80
,
0x08
,
0x88
,
0x22
,
0xaa
,
0x55
,
0xff
};
/* Mask to determine which pixels to overwrite while displaying */
int
FARDATA
png_pass_dsp_mask
[]
=
{
0xff
,
0x0f
,
0xff
,
0x33
,
0xff
,
0x55
,
0xff
};
const
int
FARDATA
png_pass_dsp_mask
[]
=
{
0xff
,
0x0f
,
0xff
,
0x33
,
0xff
,
0x55
,
0xff
};
#endif
...
...
@@ -625,7 +626,7 @@ png_charp PNGAPI
png_get_copyright
(
png_structp
png_ptr
)
{
if
(
png_ptr
!=
NULL
||
png_ptr
==
NULL
)
/* silence compiler warning */
return
((
png_charp
)
"
\n
libpng version 1.0.
8 - July 24
, 2000
\n
\
return
((
png_charp
)
"
\n
libpng version 1.0.
9beta1 - November 10
, 2000
\n
\
Copyright (c) 1998-2000 Glenn Randers-Pehrson
\n
\
Copyright (c) 1996, 1997 Andreas Dilger
\n
\
Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.
\n
"
);
...
...
@@ -643,8 +644,8 @@ png_get_libpng_ver(png_structp png_ptr)
{
/* Version of *.c files used when building libpng */
if
(
png_ptr
!=
NULL
)
/* silence compiler warning about unused png_ptr */
return
((
png_charp
)
"1.0.
8
"
);
return
((
png_charp
)
"1.0.
8
"
);
return
((
png_charp
)
"1.0.
9beta1
"
);
return
((
png_charp
)
"1.0.
9beta1
"
);
}
png_charp
PNGAPI
...
...
@@ -689,9 +690,10 @@ png_reset_zstream(png_structp png_ptr)
return
(
inflateReset
(
&
png_ptr
->
zstream
));
}
/* This function was added to libpng-1.0.7 */
png_uint_32
PNGAPI
png_access_version_number
(
void
)
{
/* Version of *.c files used when building libpng */
return
((
png_uint_32
)
1000
8
L
);
return
((
png_uint_32
)
1000
9
L
);
}
This diff is collapsed.
Click to expand it.
png.h
浏览文件 @
5e5c1e1f
/* png.h - header file for PNG reference library
*
* libpng version 1.0.
8 - July 24
, 2000
* libpng version 1.0.
9beta1 - November 10
, 2000
* Copyright (c) 1998, 1999, 2000 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.)
...
...
@@ -9,7 +9,7 @@
* Authors and maintainers:
* libpng versions 0.71, May 1995, through 0.88, January 1996: Guy Schalnat
* libpng versions 0.89c, June 1996, through 0.96, May 1997: Andreas Dilger
* libpng versions 0.97, January 1998, through 1.0.
8 - July 24
, 2000: Glenn
* libpng versions 0.97, January 1998, through 1.0.
9beta1 - November 10
, 2000: Glenn
* See also "Contributing Authors", below.
*
* Note about libpng version numbers:
...
...
@@ -58,6 +58,7 @@
* 1.0.8beta1-4 10008 2.1.0.8beta1-4
* 1.0.8rc1 10008 2.1.0.8rc1
* 1.0.8 10008 2.1.0.8
* 1.0.9beta1 10009 2.1.0.9
*
* Henceforth the source version will match the shared-library major
* and minor numbers; the shared-library major version number will be
...
...
@@ -84,7 +85,7 @@
* If you modify libpng you may insert additional notices immediately following
* this sentence.
*
* libpng versions 1.0.7, July 1, 2000, through 1.0.
8, July 24
, 2000, are
* libpng versions 1.0.7, July 1, 2000, through 1.0.
9beta1, November 10
, 2000, are
* Copyright (c) 2000 Glenn Randers-Pehrson, and are
* distributed according to the same disclaimer and license as libpng-1.0.6
* with the following individuals added to the list of Contributing Authors
...
...
@@ -189,13 +190,13 @@
* Y2K compliance in libpng:
* =========================
*
*
July 24
, 2000
*
November 10
, 2000
*
* 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.0.
8
are Y2K compliant. It is my belief that earlier
* upward through 1.0.
9beta1
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
...
...
@@ -251,24 +252,24 @@
*/
/* Version information for png.h - this should match the version in png.c */
#define PNG_LIBPNG_VER_STRING "1.0.
8
"
#define PNG_LIBPNG_VER_STRING "1.0.
9beta1
"
#define PNG_LIBPNG_VER_SONUM 2
/* These should match the first 3 components of PNG_LIBPNG_VER_STRING: */
#define PNG_LIBPNG_VER_MAJOR 1
#define PNG_LIBPNG_VER_MINOR 0
#define PNG_LIBPNG_VER_RELEASE
8
#define PNG_LIBPNG_VER_RELEASE
9
/* This should match the numeric part of the final component of
* PNG_LIBPNG_VER_STRING, omitting any leading zero: */
#define PNG_LIBPNG_VER_BUILD
0
#define PNG_LIBPNG_VER_BUILD
1
/* Careful here. At one time, Guy wanted to use 082, but that would be octal.
* We must not include leading zeros.
* Versions 0.7 through 1.0.0 were in the range 0 to 100 here (only
* version 1.0.0 was mis-numbered 100 instead of 10000). From
* version 1.0.1 it's xxyyzz, where x=major, y=minor, z=release */
#define PNG_LIBPNG_VER 1000
8
/* 1.0.8
*/
#define PNG_LIBPNG_VER 1000
9
/* 1.0.9
*/
/* Note to maintainer: update this number in scripts/pngdef.pas as well */
...
...
@@ -302,8 +303,8 @@ extern "C" {
* the version above.
*/
#ifdef PNG_USE_GLOBAL_ARRAYS
PNG_EXPORT_VAR
(
c
har
)
png_libpng_ver
[
12
];
/* need room for 99.99.99-patch-aa0*/
/*
Note to maintainer: increase to 18 at the next opportunity
*/
PNG_EXPORT_VAR
(
c
onst
char
)
png_libpng_ver
[
18
];
/*
need room for 99.99.99beta99z
*/
#else
#define png_libpng_ver png_get_header_ver(NULL)
#endif
...
...
@@ -311,17 +312,17 @@ PNG_EXPORT_VAR (char) png_libpng_ver[12]; /* need room for 99.99.99-patch-aa0*/
#ifdef PNG_USE_GLOBAL_ARRAYS
/* This was removed in version 1.0.5c */
/* Structures to facilitate easy interlacing. See png.c for more details */
PNG_EXPORT_VAR
(
int
FARDATA
)
png_pass_start
[
7
];
PNG_EXPORT_VAR
(
int
FARDATA
)
png_pass_inc
[
7
];
PNG_EXPORT_VAR
(
int
FARDATA
)
png_pass_ystart
[
7
];
PNG_EXPORT_VAR
(
int
FARDATA
)
png_pass_yinc
[
7
];
PNG_EXPORT_VAR
(
int
FARDATA
)
png_pass_mask
[
7
];
PNG_EXPORT_VAR
(
int
FARDATA
)
png_pass_dsp_mask
[
7
];
PNG_EXPORT_VAR
(
const
int
FARDATA
)
png_pass_start
[
7
];
PNG_EXPORT_VAR
(
const
int
FARDATA
)
png_pass_inc
[
7
];
PNG_EXPORT_VAR
(
const
int
FARDATA
)
png_pass_ystart
[
7
];
PNG_EXPORT_VAR
(
const
int
FARDATA
)
png_pass_yinc
[
7
];
PNG_EXPORT_VAR
(
const
int
FARDATA
)
png_pass_mask
[
7
];
PNG_EXPORT_VAR
(
const
int
FARDATA
)
png_pass_dsp_mask
[
7
];
#ifdef PNG_HAVE_ASSEMBLER_COMBINE_ROW
extern
int
FARDATA
png_pass_width
[
7
];
/* now used in pngvcrd.c, pnggccrd.c */
PNG_EXPORT_VAR
(
const
int
FARDATA
)
png_pass_width
[
7
];
#endif
/* This isn't currently used. If you need it, see png.c for more details.
extern int FARDATA
png_pass_height[7];
PNG_EXPORT_VAR (const int FARDATA)
png_pass_height[7];
*/
#endif
...
...
@@ -523,6 +524,7 @@ typedef struct png_info_struct
png_uint_16
num_trans
;
/* number of transparent palette color (tRNS) */
png_byte
bit_depth
;
/* 1, 2, 4, 8, or 16 bits/channel (from IHDR) */
png_byte
color_type
;
/* see PNG_COLOR_TYPE_ below (from IHDR) */
/* The following three should have been named *_method not *_type */
png_byte
compression_type
;
/* must be PNG_COMPRESSION_TYPE_BASE (IHDR) */
png_byte
filter_type
;
/* must be PNG_FILTER_TYPE_BASE (from IHDR) */
png_byte
interlace_type
;
/* One of PNG_INTERLACE_NONE, PNG_INTERLACE_ADAM7 */
...
...
@@ -764,6 +766,9 @@ typedef png_info FAR * FAR * png_infopp;
#define PNG_COLOR_TYPE_RGB (PNG_COLOR_MASK_COLOR)
#define PNG_COLOR_TYPE_RGB_ALPHA (PNG_COLOR_MASK_COLOR | PNG_COLOR_MASK_ALPHA)
#define PNG_COLOR_TYPE_GRAY_ALPHA (PNG_COLOR_MASK_ALPHA)
/* aliases */
#define PNG_COLOR_TYPE_RGBA PNG_COLOR_TYPE_RGB_ALPHA
#define PNG_COLOR_TYPE_GA PNG_COLOR_TYPE_GRAY_ALPHA
/* This is for compression type. PNG 1.0-1.2 only define the single type. */
#define PNG_COMPRESSION_TYPE_BASE 0
/* Deflate method 8, 32K window */
...
...
@@ -904,6 +909,10 @@ typedef void (PNGAPI *png_unknown_chunk_ptr) PNGARG((png_structp));
#define PNG_TRANSFORM_INVERT_ALPHA 0x0400
/* read and write */
#define PNG_TRANSFORM_STRIP_FILLER 0x0800
/* WRITE only */
/* Flags for MNG supported features */
#define PNG_FLAG_MNG_EMPTY_PLTE 0x01
#define PNG_ALL_MNG_FEATURES 0x01
typedef
png_voidp
(
*
png_malloc_ptr
)
PNGARG
((
png_structp
,
png_size_t
));
typedef
void
(
*
png_free_ptr
)
PNGARG
((
png_structp
,
png_voidp
));
...
...
@@ -1137,9 +1146,11 @@ struct png_struct_def
png_uint_16
rgb_to_gray_blue_coeff
;
#endif
#if defined(PNG_READ_EMPTY_PLTE_SUPPORTED) || \
#if defined(PNG_MNG_FEATURES_SUPPORTED) || \
defined(PNG_READ_EMPTY_PLTE_SUPPORTED) || \
defined(PNG_WRITE_EMPTY_PLTE_SUPPORTED)
png_byte
empty_plte_permitted
;
/* Note to maintainer: change this to png_uint_32 at next opportunity */
png_byte
mng_features_permitted
;
#endif
#if defined(PNG_READ_GAMMA_SUPPORTED) || defined(PNG_READ_BACKGROUND_SUPPORTED)
...
...
@@ -1149,9 +1160,9 @@ struct png_struct_def
};
/* This prevents a compiler error in png_get_copyright() in png.c if png.c
and png.h are both at * version 1.0.
8
and png.h are both at * version 1.0.
9beta1
*/
typedef
png_structp
version_1_0_
8
;
typedef
png_structp
version_1_0_
9beta1
;
typedef
png_struct
FAR
*
FAR
*
png_structpp
;
...
...
@@ -1387,6 +1398,7 @@ extern PNG_EXPORT(void,png_set_gamma) PNGARG((png_structp png_ptr,
#if defined(PNG_READ_EMPTY_PLTE_SUPPORTED) || \
defined(PNG_WRITE_EMPTY_PLTE_SUPPORTED)
/* Permit or disallow empty PLTE (0: not permitted, 1: permitted) */
/* Deprecated and will be removed. Use png_permit_mng_features() instead. */
extern
PNG_EXPORT
(
void
,
png_permit_empty_plte
)
PNGARG
((
png_structp
png_ptr
,
int
empty_plte_permitted
));
#endif
...
...
@@ -1928,12 +1940,13 @@ extern PNG_EXPORT(void,png_set_hIST) PNGARG((png_structp png_ptr,
extern
PNG_EXPORT
(
png_uint_32
,
png_get_IHDR
)
PNGARG
((
png_structp
png_ptr
,
png_infop
info_ptr
,
png_uint_32
*
width
,
png_uint_32
*
height
,
int
*
bit_depth
,
int
*
color_type
,
int
*
interlace_
type
,
int
*
compression_
type
,
int
*
filter_type
));
int
*
bit_depth
,
int
*
color_type
,
int
*
interlace_
method
,
int
*
compression_
method
,
int
*
filter_method
));
extern
PNG_EXPORT
(
void
,
png_set_IHDR
)
PNGARG
((
png_structp
png_ptr
,
png_infop
info_ptr
,
png_uint_32
width
,
png_uint_32
height
,
int
bit_depth
,
int
color_type
,
int
interlace_type
,
int
compression_type
,
int
filter_type
));
int
color_type
,
int
interlace_method
,
int
compression_method
,
int
filter_method
));
#if defined(PNG_READ_oFFs_SUPPORTED)
extern
PNG_EXPORT
(
png_uint_32
,
png_get_oFFs
)
PNGARG
((
png_structp
png_ptr
,
...
...
@@ -2117,11 +2130,11 @@ extern PNG_EXPORT(void, png_set_invalid) PNGARG((png_structp png_ptr,
extern
PNG_EXPORT
(
void
,
png_read_png
)
PNGARG
((
png_structp
png_ptr
,
png_infop
info_ptr
,
int
transforms
,
voidp
params
));
png_
voidp
params
));
extern
PNG_EXPORT
(
void
,
png_write_png
)
PNGARG
((
png_structp
png_ptr
,
png_infop
info_ptr
,
int
transforms
,
voidp
params
));
png_
voidp
params
));
#endif
/* Define PNG_DEBUG at compile time for debugging information. Higher
...
...
@@ -2182,8 +2195,13 @@ extern PNG_EXPORT(png_charp,png_get_header_ver) PNGARG((png_structp png_ptr));
extern
PNG_EXPORT
(
png_charp
,
png_get_header_version
)
PNGARG
((
png_structp
png_ptr
));
extern
PNG_EXPORT
(
png_charp
,
png_get_libpng_ver
)
PNGARG
((
png_structp
png_ptr
));
#ifdef PNG_MNG_FEATURES_SUPPORTED
extern
PNG_EXPORT
(
png_uint_32
,
png_permit_mng_features
)
PNGARG
((
png_structp
png_ptr
,
png_uint_32
mng_features_permitted
));
#endif
#define PNG_HEADER_VERSION_STRING \
" libpng version 1.0.
8 - July 24
, 2000 (header)\n"
" libpng version 1.0.
9beta1 - November 10
, 2000 (header)\n"
#ifdef PNG_READ_COMPOSITE_NODIV_SUPPORTED
/* With these routines we avoid an integer divide, which will be slower on
...
...
@@ -2330,7 +2348,7 @@ extern PNG_EXPORT(png_charp,png_get_libpng_ver) PNGARG((png_structp png_ptr));
#if !defined(PNG_NO_EXTERN) || defined(PNG_ALWAYS_EXTERN)
/* place to hold the signature string for a PNG file. */
#ifdef PNG_USE_GLOBAL_ARRAYS
PNG_EXPORT_VAR
(
png_byte
FARDATA
)
png_sig
[
8
];
PNG_EXPORT_VAR
(
const
png_byte
FARDATA
)
png_sig
[
8
];
#else
#define png_sig png_sig_bytes(NULL)
#endif
...
...
@@ -2516,8 +2534,8 @@ PNG_EXTERN void png_write_sig PNGARG((png_structp png_ptr));
*/
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_
type
,
int
filter_type
,
int
interlace_
type
));
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
));
...
...
This diff is collapsed.
Click to expand it.
pngasmrd.h
浏览文件 @
5e5c1e1f
/* pngasmrd.h - assembler version of utilities to read a PNG file
*
* libpng 1.0.
8 - July 24
, 2000
* libpng 1.0.
9beta1 - November 10
, 2000
* For conditions of distribution and use, see copyright notice in png.h
* Copyright (c) 1999, 2000 Glenn Randers-Pehrson
*
...
...
This diff is collapsed.
Click to expand it.
pngconf.h
浏览文件 @
5e5c1e1f
/* pngconf.h - machine configurable file for libpng
*
* libpng 1.0.
8 - July 24
, 2000
* libpng 1.0.
9beta1 - November 10
, 2000
* For conditions of distribution and use, see copyright notice in png.h
* Copyright (c) 1998, 1999, 2000 Glenn Randers-Pehrson
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
...
...
@@ -398,6 +398,7 @@
#define PNG_NO_WRITE_USER_TRANSFORM
#define PNG_NO_USER_MEM
#define PNG_NO_READ_EMPTY_PLTE
#define PNG_NO_MNG_FEATURES
#define PNG_NO_FIXED_POINT_SUPPORTED
#endif
...
...
@@ -490,8 +491,12 @@
#endif
#endif
#ifndef PNG_NO_MNG_FEATURES
#define PNG_MNG_FEATURES_SUPPORTED
/* Useful for MNG applications */
#endif
/* Deprecated, will be removed */
#ifndef PNG_NO_READ_EMPTY_PLTE
#define PNG_READ_EMPTY_PLTE_SUPPORTED
/* useful for MNG applications */
#define PNG_READ_EMPTY_PLTE_SUPPORTED
#endif
#ifdef PNG_WRITE_TRANSFORMS_SUPPORTED
...
...
@@ -547,8 +552,9 @@ defined(PNG_WRITE_USER_TRANSFORM_SUPPORTED)
#define PNG_WRITE_FLUSH_SUPPORTED
#endif
/* Deprecated, see PNG_MNG_FEATURES_SUPPORTED, above */
#ifndef PNG_NO_WRITE_EMPTY_PLTE
#define PNG_WRITE_EMPTY_PLTE_SUPPORTED
/* useful for MNG applications */
#define PNG_WRITE_EMPTY_PLTE_SUPPORTED
#endif
#ifndef PNG_NO_STDIO
...
...
@@ -1132,6 +1138,13 @@ typedef z_stream FAR * png_zstreamp;
#endif
#endif
#ifndef PNGAPI
# define PNGAPI
#endif
#ifndef PNG_IMPEXP
# define PNG_IMPEXP
#endif
#ifndef PNG_EXPORT
# define PNG_EXPORT(type,symbol) PNG_IMPEXP type PNGAPI symbol
#endif
...
...
This diff is collapsed.
Click to expand it.
pngerror.c
浏览文件 @
5e5c1e1f
/* pngerror.c - stub functions for i/o and memory allocation
*
* libpng 1.0.
8 - July 24
, 2000
* libpng 1.0.
9beta1 - November 10
, 2000
* For conditions of distribution and use, see copyright notice in png.h
* Copyright (c) 1998, 1999, 2000 Glenn Randers-Pehrson
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
...
...
This diff is collapsed.
Click to expand it.
pnggccrd.c
浏览文件 @
5e5c1e1f
此差异已折叠。
点击以展开。
pngget.c
浏览文件 @
5e5c1e1f
/* pngget.c - retrieval of values from info struct
*
* libpng 1.0.
8 - July 24
, 2000
* libpng 1.0.
9beta1 - November 10
, 2000
* For conditions of distribution and use, see copyright notice in png.h
* Copyright (c) 1998, 1999, 2000 Glenn Randers-Pehrson
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
...
...
This diff is collapsed.
Click to expand it.
pngmem.c
浏览文件 @
5e5c1e1f
/* pngmem.c - stub functions for memory allocation
*
* libpng 1.0.
8 - July 24
, 2000
* libpng 1.0.
9beta1 - November 10
, 2000
* For conditions of distribution and use, see copyright notice in png.h
* Copyright (c) 1998, 1999, 2000 Glenn Randers-Pehrson
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
...
...
This diff is collapsed.
Click to expand it.
pngpread.c
浏览文件 @
5e5c1e1f
/* pngpread.c - read a png file in push mode
*
* libpng 1.0.
8 - July 24
, 2000
* libpng 1.0.
9beta1 - November 10
, 2000
* For conditions of distribution and use, see copyright notice in png.h
* Copyright (c) 1998, 1999, 2000 Glenn Randers-Pehrson
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
...
...
@@ -894,25 +894,25 @@ png_read_push_finish_row(png_structp png_ptr)
/* arrays to facilitate easy interlacing - use pass (0 - 6) as index */
/* start of interlace block */
const
int
png_pass_start
[]
=
{
0
,
4
,
0
,
2
,
0
,
1
,
0
};
const
int
FARDATA
png_pass_start
[]
=
{
0
,
4
,
0
,
2
,
0
,
1
,
0
};
/* offset to next interlace block */
const
int
png_pass_inc
[]
=
{
8
,
8
,
4
,
4
,
2
,
2
,
1
};
const
int
FARDATA
png_pass_inc
[]
=
{
8
,
8
,
4
,
4
,
2
,
2
,
1
};
/* start of interlace block in the y direction */
const
int
png_pass_ystart
[]
=
{
0
,
0
,
4
,
0
,
2
,
0
,
1
};
const
int
FARDATA
png_pass_ystart
[]
=
{
0
,
0
,
4
,
0
,
2
,
0
,
1
};
/* offset to next interlace block in the y direction */
const
int
png_pass_yinc
[]
=
{
8
,
8
,
8
,
4
,
4
,
2
,
2
};
const
int
FARDATA
png_pass_yinc
[]
=
{
8
,
8
,
8
,
4
,
4
,
2
,
2
};
/* Width of interlace block. This is not currently used - if you need
* it, uncomment it here and in png.h
const int png_pass_width[] = {8, 4, 4, 2, 2, 1, 1};
const int
FARDATA
png_pass_width[] = {8, 4, 4, 2, 2, 1, 1};
*/
/* Height of interlace block. This is not currently used - if you need
* it, uncomment it here and in png.h
const int png_pass_height[] = {8, 8, 4, 4, 2, 2, 1};
const int
FARDATA
png_pass_height[] = {8, 8, 4, 4, 2, 2, 1};
*/
#endif
...
...
@@ -1429,7 +1429,8 @@ png_progressive_combine_row (png_structp png_ptr,
png_bytep
old_row
,
png_bytep
new_row
)
{
#ifdef PNG_USE_LOCAL_ARRAYS
const
int
png_pass_dsp_mask
[
7
]
=
{
0xff
,
0x0f
,
0xff
,
0x33
,
0xff
,
0x55
,
0xff
};
const
int
FARDATA
png_pass_dsp_mask
[
7
]
=
{
0xff
,
0x0f
,
0xff
,
0x33
,
0xff
,
0x55
,
0xff
};
#endif
if
(
new_row
!=
NULL
)
/* new_row must == png_ptr->row_buf here. */
png_combine_row
(
png_ptr
,
old_row
,
png_pass_dsp_mask
[
png_ptr
->
pass
]);
...
...
This diff is collapsed.
Click to expand it.
pngread.c
浏览文件 @
5e5c1e1f
/* pngread.c - read a PNG file
*
* libpng 1.0.
8 - July 24
, 2000
* libpng 1.0.
9beta1 - November 10
, 2000
* For conditions of distribution and use, see copyright notice in png.h
* Copyright (c) 1998, 1999, 2000 Glenn Randers-Pehrson
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
...
...
@@ -440,6 +440,9 @@ png_read_update_info(png_structp png_ptr, png_infop info_ptr)
/* save jump buffer and error functions */
if
(
!
(
png_ptr
->
flags
&
PNG_FLAG_ROW_INIT
))
png_read_start_row
(
png_ptr
);
else
png_warning
(
png_ptr
,
"Ignoring extra png_read_update_info() call; row buffer not reallocated"
);
png_read_transform_info
(
png_ptr
,
info_ptr
);
}
...
...
@@ -698,7 +701,7 @@ png_read_row(png_structp png_ptr, png_bytep row, png_bytep dsp_row)
* not called png_set_interlace_handling(), the display_row buffer will
* be ignored, so pass NULL to it.
*
* [*] png_handle_alpha() does not exist yet, as of libpng version 1.0.
8
* [*] png_handle_alpha() does not exist yet, as of libpng version 1.0.
9beta1
*/
void
PNGAPI
...
...
@@ -747,7 +750,7 @@ png_read_rows(png_structp png_ptr, png_bytepp row,
* only call this function once. If you desire to have an image for
* each pass of a interlaced image, use png_read_rows() instead.
*
* [*] png_handle_alpha() does not exist yet, as of libpng version 1.0.
8
* [*] png_handle_alpha() does not exist yet, as of libpng version 1.0.
9beta1
*/
void
PNGAPI
png_read_image
(
png_structp
png_ptr
,
png_bytepp
image
)
...
...
This diff is collapsed.
Click to expand it.
pngrio.c
浏览文件 @
5e5c1e1f
/* pngrio.c - functions for data input
*
* libpng 1.0.
8 - July 24
, 2000
* libpng 1.0.
9beta1 - November 10
, 2000
* For conditions of distribution and use, see copyright notice in png.h
* Copyright (c) 1998, 1999, 2000 Glenn Randers-Pehrson
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
...
...
This diff is collapsed.
Click to expand it.
pngrtran.c
浏览文件 @
5e5c1e1f
/* pngrtran.c - transforms the data in a row for PNG readers
*
* libpng 1.0.
8 - July 24
, 2000
* libpng 1.0.
9beta1 - November 10
, 2000
* For conditions of distribution and use, see copyright notice in png.h
* Copyright (c) 1998, 1999, 2000 Glenn Randers-Pehrson
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
...
...
@@ -1090,7 +1090,12 @@ png_read_transform_info(png_structp png_ptr, png_infop info_ptr)
if
((
png_ptr
->
transformations
&
PNG_FILLER
)
&&
((
info_ptr
->
color_type
==
PNG_COLOR_TYPE_RGB
)
||
(
info_ptr
->
color_type
==
PNG_COLOR_TYPE_GRAY
)))
{
info_ptr
->
channels
++
;
#if 0 /* if adding a true alpha channel not just filler */
info_ptr->color_type |= PNG_COLOR_MASK_ALPHA;
#endif
}
#endif
#if defined(PNG_USER_TRANSFORM_PTR_SUPPORTED) && \
...
...
This diff is collapsed.
Click to expand it.
pngrutil.c
浏览文件 @
5e5c1e1f
/* pngrutil.c - utilities to read a PNG file
*
* libpng 1.0.
8 - July 24
, 2000
* libpng 1.0.
9beta1 - November 10
, 2000
* For conditions of distribution and use, see copyright notice in png.h
* Copyright (c) 1998, 1999, 2000 Glenn Randers-Pehrson
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
...
...
@@ -976,6 +976,8 @@ png_handle_iCCP(png_structp png_ptr, png_infop info_ptr, png_uint_32 length)
png_byte
compression_type
;
png_charp
profile
;
png_uint_32
skip
=
0
;
png_uint_32
profile_size
=
0
;
png_uint_32
profile_length
=
0
;
png_size_t
slength
,
prefix_length
,
data_length
;
png_debug
(
1
,
"in png_handle_iCCP
\n
"
);
...
...
@@ -1027,22 +1029,43 @@ png_handle_iCCP(png_structp png_ptr, png_infop info_ptr, png_uint_32 length)
/* there should be at least one zero (the compression type byte)
following the separator, and we should be on it */
if
(
*
profile
||
profile
>=
chunkdata
+
slength
)
if
(
profile
>=
chunkdata
+
slength
)
{
png_free
(
png_ptr
,
chunkdata
);
png_warning
(
png_ptr
,
"
m
alformed iCCP chunk"
);
png_warning
(
png_ptr
,
"
M
alformed iCCP chunk"
);
return
;
}
/* compression_type should always be zero */
compression_type
=
*
profile
++
;
if
(
compression_type
)
{
png_warning
(
png_ptr
,
"Ignoring nonzero compression type in iCCP chunk"
);
compression_type
=
0x00
;
/* Reset it to zero (libpng-1.0.6 through 1.0.8
wrote nonzero) */
}
prefix_length
=
profile
-
chunkdata
;
chunkdata
=
png_decompress_chunk
(
png_ptr
,
compression_type
,
chunkdata
,
slength
,
prefix_length
,
&
data_length
);
profile_length
=
data_length
-
prefix_length
;
profile_size
=
((
*
(
chunkdata
+
prefix_length
))
<<
24
)
|
((
*
(
chunkdata
+
prefix_length
+
1
))
<<
16
)
|
((
*
(
chunkdata
+
prefix_length
+
2
))
<<
8
)
|
((
*
(
chunkdata
+
prefix_length
+
3
))
);
if
(
profile_size
<
profile_length
)
profile_length
=
profile_size
;
if
(
profile_size
>
profile_length
)
{
png_warning
(
png_ptr
,
"Ignoring truncated iCCP profile.
\n
"
);
return
;
}
png_set_iCCP
(
png_ptr
,
info_ptr
,
chunkdata
,
compression_type
,
chunkdata
+
prefix_length
,
data_length
);
chunkdata
+
prefix_length
,
data_length
-
prefix_length
);
png_free
(
png_ptr
,
chunkdata
);
}
#endif
/* PNG_READ_iCCP_SUPPORTED */
...
...
@@ -1336,7 +1359,6 @@ png_handle_bKGD(png_structp png_ptr, png_infop info_ptr, png_uint_32 length)
if
(
buf
[
0
]
>
info_ptr
->
num_palette
)
{
png_warning
(
png_ptr
,
"Incorrect bKGD chunk index value"
);
png_crc_finish
(
png_ptr
,
length
);
return
;
}
png_ptr
->
background
.
red
=
...
...
This diff is collapsed.
Click to expand it.
pngset.c
浏览文件 @
5e5c1e1f
/* pngset.c - storage of image information into info struct
*
* libpng 1.0.
8 - July 24
, 2000
* libpng 1.0.
9beta1 - November 10
, 2000
* For conditions of distribution and use, see copyright notice in png.h
* Copyright (c) 1998, 1999, 2000 Glenn Randers-Pehrson
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
...
...
@@ -741,10 +741,27 @@ png_set_unknown_chunk_location(png_structp png_ptr, png_infop info_ptr,
void
PNGAPI
png_permit_empty_plte
(
png_structp
png_ptr
,
int
empty_plte_permitted
)
{
png_debug
(
1
,
"in png_permit_empty_plte
\n
"
);
/* This function is deprecated in favor of png_permit_mng_features()
and will be removed from libpng-2.0.0 */
png_debug
(
1
,
"in png_permit_empty_plte, DEPRECATED.
\n
"
);
if
(
png_ptr
==
NULL
)
return
;
png_ptr
->
empty_plte_permitted
=
(
png_byte
)
empty_plte_permitted
;
png_ptr
->
mng_features_permitted
=
(
png_byte
)
((
png_ptr
->
mng_features_permitted
&
(
~
(
PNG_FLAG_MNG_EMPTY_PLTE
)))
|
((
empty_plte_permitted
&
PNG_FLAG_MNG_EMPTY_PLTE
)));
}
#endif
#if defined(PNG_MNG_FEATURES_SUPPORTED)
png_uint_32
PNGAPI
png_permit_mng_features
(
png_structp
png_ptr
,
png_uint_32
mng_features
)
{
png_debug
(
1
,
"in png_permit_mng_features
\n
"
);
if
(
png_ptr
==
NULL
)
return
(
png_uint_32
)
0
;
png_ptr
->
mng_features_permitted
=
(
png_byte
)(
mng_features
&
PNG_ALL_MNG_FEATURES
);
return
(
png_uint_32
)
png_ptr
->
mng_features_permitted
;
}
#endif
...
...
This diff is collapsed.
Click to expand it.
pngtest.c
浏览文件 @
5e5c1e1f
/* pngtest.c - a simple test program to test libpng
*
* libpng 1.0.
8 - July 24
, 2000
* libpng 1.0.
9beta1 - November 10
, 2000
* For conditions of distribution and use, see copyright notice in png.h
* Copyright (c) 1998, 1999, 2000 Glenn Randers-Pehrson
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
...
...
@@ -16,7 +16,8 @@
* The program will report "FAIL" in certain legitimate cases:
* 1) when the compression level or filter selection method is changed.
* 2) when the maximum IDAT size (PNG_ZBUF_SIZE in pngconf.h) is not 8192.
* 3) unknown ancillary chunks exist in the input file.
* 3) unknown unsafe-to-copy ancillary chunks or unknown critical chunks
* exist in the input file.
* 4) others not listed here...
* In these cases, it is best to check with another tool such as "pngcheck"
* to see what the differences between the two files are.
...
...
@@ -345,7 +346,7 @@ pngtest_write_data(png_structp png_ptr, png_bytep data, png_size_t length)
{
png_uint_32
check
;
WRITEFILE
((
png_FILE_p
)
png_ptr
->
io_ptr
,
data
,
1
,
check
);
WRITEFILE
((
png_FILE_p
)
png_ptr
->
io_ptr
,
data
,
length
,
check
);
if
(
check
!=
length
)
{
png_error
(
png_ptr
,
"Write Error"
);
...
...
@@ -372,7 +373,7 @@ pngtest_write_data(png_structp png_ptr, png_bytep data, png_size_t length)
io_ptr
=
(
png_FILE_p
)
CVT_PTR
(
png_ptr
->
io_ptr
);
if
((
png_bytep
)
near_data
==
data
)
{
WRITEFILE
(
io_ptr
,
near_data
,
1
,
check
);
WRITEFILE
(
io_ptr
,
near_data
,
length
,
check
);
}
else
{
...
...
@@ -384,7 +385,7 @@ pngtest_write_data(png_structp png_ptr, png_bytep data, png_size_t length)
{
written
=
MIN
(
NEAR_BUF_SIZE
,
remaining
);
png_memcpy
(
buf
,
data
,
written
);
/* copy far buffer to near buffer */
WRITEFILE
(
io_ptr
,
written
,
1
,
err
);
WRITEFILE
(
io_ptr
,
buf
,
written
,
err
);
if
(
err
!=
written
)
break
;
else
...
...
@@ -1448,4 +1449,4 @@ main(int argc, char *argv[])
}
/* Generate a compiler error if there is an old png.h in the search path. */
typedef
version_1_0_
8
your_png_h_is_not_version_1_0_8
;
typedef
version_1_0_
9beta1
your_png_h_is_not_version_1_0_9beta1
;
This diff is collapsed.
Click to expand it.
pngtrans.c
浏览文件 @
5e5c1e1f
/* pngtrans.c - transforms the data in a row (used by both readers and writers)
*
* libpng 1.0.
8 - July 24
, 2000
* libpng 1.0.
9beta1 - November 10
, 2000
* For conditions of distribution and use, see copyright notice in png.h
* Copyright (c) 1998, 1999, 2000 Glenn Randers-Pehrson
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
...
...
This diff is collapsed.
Click to expand it.
pngvcrd.c
浏览文件 @
5e5c1e1f
...
...
@@ -2,7 +2,7 @@
*
* For Intel x86 CPU and Microsoft Visual C++ compiler
*
* libpng 1.0.
8 - July 24
, 2000
* libpng 1.0.
9beta1 - November 10
, 2000
* For conditions of distribution and use, see copyright notice in png.h
* Copyright (c) 1998, 1999, 2000 Glenn Randers-Pehrson
* Copyright (c) 1998, Intel Corporation
...
...
@@ -10,6 +10,8 @@
* Contributed by Nirav Chhatrapati, Intel Corporation, 1998
* Interface to libpng contributed by Gilles Vollant, 1999
*
* [png_read_filter_row_mmx_avg() bpp == 2 bugfix, GRR 20000916]
*
*/
#define PNG_INTERNAL
...
...
@@ -2117,8 +2119,8 @@ davg4lp:
case
2
:
{
ActiveMask
.
use
=
0x000000000000ffff
;
ShiftBpp
.
use
=
24
;
// == 3 * 8
ShiftRem
.
use
=
4
0
;
// == 64 - 24
ShiftBpp
.
use
=
16
;
// == 2 * 8 [BUGFIX]
ShiftRem
.
use
=
4
8
;
// == 64 - 16 [BUGFIX]
_asm
{
// Load ActiveMask
movq
mm7
,
ActiveMask
...
...
@@ -2133,7 +2135,7 @@ davg4lp:
// (we correct position in loop below)
davg2lp:
movq
mm0
,
[
edi
+
ebx
]
ps
llq
mm2
,
ShiftRem
// shift data to position correctly
ps
rlq
mm2
,
ShiftRem
// shift data to position correctly [BUGFIX]
movq
mm1
,
[
esi
+
ebx
]
// Add (Prev_row/2) to Average
movq
mm3
,
mm5
...
...
This diff is collapsed.
Click to expand it.
pngwio.c
浏览文件 @
5e5c1e1f
/* pngwio.c - functions for data output
*
* libpng 1.0.
8 - July 24
, 2000
* libpng 1.0.
9beta1 - November 10
, 2000
* For conditions of distribution and use, see copyright notice in png.h
* Copyright (c) 1998, 1999, 2000 Glenn Randers-Pehrson
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
...
...
This diff is collapsed.
Click to expand it.
pngwrite.c
浏览文件 @
5e5c1e1f
/* pngwrite.c - general routines to write a PNG file
*
* libpng 1.0.
8 - July 24
, 2000
* libpng 1.0.
9beta1 - November 10
, 2000
* For conditions of distribution and use, see copyright notice in png.h
* Copyright (c) 1998, 1999, 2000 Glenn Randers-Pehrson
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
...
...
@@ -964,7 +964,6 @@ void PNGAPI
png_set_filter
(
png_structp
png_ptr
,
int
method
,
int
filters
)
{
png_debug
(
1
,
"in png_set_filter
\n
"
);
/* We allow 'method' only for future expansion of the base filter method. */
if
(
method
==
PNG_FILTER_TYPE_BASE
)
{
switch
(
filters
&
(
PNG_ALL_FILTERS
|
0x07
))
...
...
This diff is collapsed.
Click to expand it.
pngwtran.c
浏览文件 @
5e5c1e1f
/* pngwtran.c - transforms the data in a row for PNG writers
*
* libpng 1.0.
8 - July 24
, 2000
* libpng 1.0.
9beta1 - November 10
, 2000
* For conditions of distribution and use, see copyright notice in png.h
* Copyright (c) 1998, 1999, 2000 Glenn Randers-Pehrson
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
...
...
This diff is collapsed.
Click to expand it.
pngwutil.c
浏览文件 @
5e5c1e1f
/* pngwutil.c - utilities to write a PNG file
*
* libpng 1.0.
8 - July 24
, 2000
* libpng 1.0.
9beta1 - November 10
, 2000
* For conditions of distribution and use, see copyright notice in png.h
* Copyright (c) 1998, 1999, 2000 Glenn Randers-Pehrson
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
...
...
@@ -514,8 +514,8 @@ png_write_PLTE(png_structp png_ptr, png_colorp palette, png_uint_32 num_pal)
png_debug
(
1
,
"in png_write_PLTE
\n
"
);
if
((
#if
def PNG_WRITE_EMPTY_PLTE_SUPPORTED
!
png_ptr
->
empty_plte_permitted
&&
#if
defined(PNG_MNG_FEATURES_SUPPORTED)
!
(
png_ptr
->
mng_features_permitted
&
PNG_FLAG_MNG_EMPTY_PLTE
)
&&
#endif
num_pal
==
0
)
||
num_pal
>
256
)
{
...
...
@@ -670,6 +670,7 @@ png_write_iCCP(png_structp png_ptr, png_charp name, int compression_type,
/* make sure we include the NULL after the name and the compression type */
png_write_chunk_start
(
png_ptr
,
(
png_bytep
)
png_iCCP
,
(
png_uint_32
)
name_len
+
profile_len
+
2
);
new_name
[
name_len
+
1
]
=
0x00
;
png_write_chunk_data
(
png_ptr
,
(
png_bytep
)
new_name
,
name_len
+
2
);
if
(
profile_len
)
...
...
@@ -996,9 +997,9 @@ png_write_bKGD(png_structp png_ptr, png_color_16p back, int color_type)
if
(
color_type
==
PNG_COLOR_TYPE_PALETTE
)
{
if
(
#if
def PNG_WRITE_EMPTY_PLTE_SUPPORTED
(
!
png_ptr
->
empty_plte_permitted
||
(
png_ptr
->
empty_plte_permitted
&&
png_ptr
->
num_palette
))
&&
#if
defined(PNG_MNG_FEATURES_SUPPORTED)
(
png_ptr
->
num_palette
||
(
!
(
png_ptr
->
mng_features_permitted
&
PNG_FLAG_MNG_EMPTY_PLTE
)
))
&&
#endif
back
->
index
>
png_ptr
->
num_palette
)
{
...
...
@@ -1083,7 +1084,7 @@ png_check_keyword(png_structp png_ptr, png_charp key, png_charpp new_key)
png_debug1
(
2
,
"Keyword to be checked is '%s'
\n
"
,
key
);
*
new_key
=
(
png_charp
)
png_malloc
(
png_ptr
,
(
png_uint_32
)(
key_len
+
1
));
*
new_key
=
(
png_charp
)
png_malloc
(
png_ptr
,
(
png_uint_32
)(
key_len
+
2
));
/* Replace non-printing characters with a blank and print a warning */
for
(
kp
=
key
,
dp
=
*
new_key
;
*
kp
!=
'\0'
;
kp
++
,
dp
++
)
...
...
@@ -2553,6 +2554,7 @@ png_write_filtered_row(png_structp png_ptr, png_bytep filtered_row)
png_debug
(
1
,
"in png_write_filtered_row
\n
"
);
png_debug1
(
2
,
"filter = %d
\n
"
,
filtered_row
[
0
]);
/* set up the zlib input buffer */
png_ptr
->
zstream
.
next_in
=
filtered_row
;
png_ptr
->
zstream
.
avail_in
=
(
uInt
)
png_ptr
->
row_info
.
rowbytes
+
1
;
/* repeat until we have compressed all the data */
...
...
This diff is collapsed.
Click to expand it.
scripts/makefile.beos
浏览文件 @
5e5c1e1f
...
...
@@ -31,7 +31,7 @@ RANLIB=ranlib
# read libpng.txt or png.h to see why PNGMAJ is 2. You should not
# have to change it.
PNGMAJ
=
2
PNGMIN
=
1.0.
8
PNGMIN
=
1.0.
9beta1
PNGVER
=
$(PNGMAJ)
.
$(PNGMIN)
# where make install puts libpng.a, libpng.so*, and png.h
...
...
This diff is collapsed.
Click to expand it.
scripts/makefile.cygwin
浏览文件 @
5e5c1e1f
...
...
@@ -22,13 +22,6 @@ ZLIBINC=${prefix}/include
#ZLIBLIB=../zlib
#ZLIBINC=../zlib
SHAREDLIB
=
libpng.dll
STATLIB
=
libpng.a
IMPLIB
=
libpng.dll.a
SHAREDDEF
=
libpng.def
LIBS
=
$(SHAREDLIB)
$(STATLIB)
EXE
=
.exe
ALIGN
=
# for i386:
#ALIGN=-malign-loops=2 -malign-functions=2
...
...
@@ -42,6 +35,19 @@ WARNMORE=-Wwrite-strings -Wpointer-arith -Wshadow \
CFLAGS
=
-I
$(ZLIBINC)
-Wall
-O3
$(ALIGN)
-funroll-loops
\
-fomit-frame-pointer
# read libpng.txt or png.h to see why PNGMAJ is 2. You should not
# have to change it.
PNGMAJ
=
2
PNGMIN
=
1.0.9beta1
PNGVER
=
$(PNGMAJ)
.
$(PNGMIN)
SHAREDLIB
=
cygpng
$(PNGMAJ)
.dll
STATLIB
=
libpng.a
IMPLIB
=
libpng.dll.a
SHAREDDEF
=
libpng.def
LIBS
=
$(SHAREDLIB)
$(STATLIB)
EXE
=
.exe
LDFLAGS
=
-L
.
-L
$(ZLIBLIB)
-lpng
-lz
LDSHARED
=
gcc
-shared
-Wl
,--enable-auto-image-base
LDEXTRA
=
-Wl
,--out-implib
=
$(IMPLIB)
$(SHAREDDEF)
...
...
@@ -49,19 +55,12 @@ LDEXTRA=-Wl,--out-implib=$(IMPLIB) $(SHAREDDEF)
RANLIB
=
ranlib
#RANLIB=echo
# read libpng.txt or png.h to see why PNGMAJ is 2. You should not
# have to change it.
PNGMAJ
=
2
PNGMIN
=
1.0.8beta3
PNGVER
=
$(PNGMAJ)
.
$(PNGMIN)
INCPATH
=
$(prefix)
/include
LIBPATH
=
$(prefix)
/lib
BINPATH
=
$(prefix)
/bin
MANPATH
=
$(prefix)
/man
MAN3PATH
=
$(MANPATH)
/man3
DOCPATH
=
$(prefix)
/doc/libpng-
$(PNGMIN)
CYGDOCPATH
=
$(prefix)
/doc/Cygwin
OBJS
=
png.o pngset.o pngget.o pngrutil.o pngtrans.o pngwutil.o
\
pngread.o pngrio.o pngwio.o pngwrite.o pngrtran.o
\
...
...
@@ -77,7 +76,15 @@ OBJSDLL = $(OBJS:.o=.pic.o)
%.pic.o
:
%.c
$(CC)
-c
$(CFLAGS)
-DPNG_BUILD_DLL
-o
$@
$<
all
:
$(SHAREDLIB) $(STATLIB) pngtest$(EXE) pngtest-stat$(EXE)
all
:
all-static all-shared
static
:
all-static
shared
:
all-shared
all-static
:
$(STATLIB) pngtest-stat$(EXE)
all-shared
:
$(SHAREDLIB) pngtest$(EXE)
pnggccrd.o
:
png.h pngconf.h pngasmrd.h
@
echo
""
...
...
@@ -91,7 +98,7 @@ pnggccrd.pic.o: png.h pngconf.h pngasmrd.h
@
echo
' You can ignore the single "control reaches end of non-void function"'
@
echo
' warning and multiple "<variable> defined but not used" warnings:'
@
echo
""
$(CC)
-c
$(CFLAGS)
-o
$@
pnggccrd.c
$(CC)
-c
$(CFLAGS)
-
DPNG_BUILD_DLL
-
o
$@
pnggccrd.c
$(STATLIB)
:
$(OBJS)
ar rc
$@
$(OBJS)
...
...
@@ -115,24 +122,36 @@ pngtest.pic.o: pngtest.c
pngtest.o
:
pngtest.c
$(CC)
$(CFLAGS)
-DPNG_STATIC
-DZLIB_STATIC
-c
$<
-o
$@
test
:
test-
dll test-stat
test
:
test-
static test-shared
test-stat
:
pngtest-stat$(EXE)
test-stat
ic
:
pngtest-stat$(EXE)
./pngtest-stat
test-
dll
:
pngtest$(EXE)
test-
shared
:
pngtest$(EXE)
./pngtest
install
:
$(STATLIB) $(SHAREDLIB)
-
@if
[
!
-d
$(INCPATH)
]
;
then
mkdir
-p
$(INCPATH)
;
fi
install
:
install-static install-shared
install-static
:
$(STATLIB) install-headers install-docs install-man
-
@if
[
!
-d
$(LIBPATH)
]
;
then
mkdir
-p
$(LIBPATH)
;
fi
install
-m
755
$(STATLIB)
$(LIBPATH)
install-shared
:
$(SHAREDLIB) install-headers install-docs install-man
-
@if
[
!
-d
$(LIBPATH)
]
;
then
mkdir
-p
$(LIBPATH)
;
fi
-
@if
[
!
-d
$(BINPATH)
]
;
then
mkdir
-p
$(BINPATH)
;
fi
-
@if
[
!
-d
$(MAN3PATH)
]
;
then
mkdir
-p
$(MAN3PATH)
;
fi
-
@if
[
!
-d
$(DOCPATH)
]
;
then
mkdir
-p
$(DOCPATH)
;
fi
install
-m
644 png.h pngconf.h
$(INCPATH)
install
-m
755
$(STATLIB)
$(IMPLIB)
$(LIBPATH)
install
-m
755
$(IMPLIB)
$(LIBPATH)
install
-s
-m
755
$(SHAREDLIB)
$(BINPATH)
install-headers
:
-
@if
[
!
-d
$(INCPATH)
]
;
then
mkdir
-p
$(INCPATH)
;
fi
install
-m
644 png.h pngconf.h
$(INCPATH)
install-docs
:
-
@if
[
!
-d
$(DOCPATH)
]
;
then
mkdir
-p
$(DOCPATH)
;
fi
install
-m
644
$(DOCS)
$(DOCPATH)
install-man
:
-
@if
[
!
-d
$(MAN3PATH)
]
;
then
mkdir
-p
$(MAN3PATH)
;
fi
install
-m
644 libpngpf.3 libpng.3
$(MAN3PATH)
clean
:
...
...
This diff is collapsed.
Click to expand it.
scripts/makefile.dec
浏览文件 @
5e5c1e1f
# makefile for libpng on DEC Alpha Unix
# Copyright (C) 2000 Glenn Randers-Pehrson
# Copyright (C) 1995 Guy Eric Schalnat, Group 42, Inc.
# For conditions of distribution and use, see copyright notice in png.h
# where make install puts libpng.a and png.h
prefix
=
/usr/local
INCPATH
=
$(prefix)
/include
LIBPATH
=
$(prefix)
/lib
# Where the zlib library and include files are located
#ZLIBLIB=/usr/local/lib
...
...
@@ -14,7 +17,7 @@ ZLIBINC=../zlib
# read libpng.txt or png.h to see why PNGMAJ is 2. You should not
# have to change it.
PNGMAJ
=
2
PNGMIN
=
1.0.
8
PNGMIN
=
1.0.
9beta1
PNGVER
=
$(PNGMAJ)
.
$(PNGMIN)
CC
=
cc
...
...
@@ -24,7 +27,6 @@ LDFLAGS=-L. -L$(ZLIBLIB) -lpng -lz -lm
#RANLIB=echo
RANLIB
=
ranlib
OBJS
=
png.o pngset.o pngget.o pngrutil.o pngtrans.o pngwutil.o
\
pngread.o pngrio.o pngwio.o pngwrite.o pngrtran.o
\
pngwtran.o pngmem.o pngerror.o pngpread.o
...
...
@@ -51,18 +53,18 @@ test: pngtest
./pngtest
install
:
libpng.a libpng.so.$(PNGVER)
-
@mkdir
$(
prefix)
/include
-
@mkdir
$(
prefix)
/lib
cp
png.h
$(
prefix)
/include
cp
pngconf.h
$(
prefix)
/include
chmod
644
$(
prefix)
/include
/png.h
chmod
644
$(
prefix)
/include
/pngconf.h
cp
libpng.a
$(
prefix)
/lib
cp
libpng.so.
$(PNGVER)
$(
prefix)
/lib
chmod
644
$(
prefix)
/lib
/libpng.a
chmod
644
$(
prefix)
/lib
/libpng.so.
$(PNGVER)
-
@mkdir
$(
INCPATH)
-
@mkdir
$(
LIBPATH)
cp
png.h
$(
INCPATH)
cp
pngconf.h
$(
INCPATH)
chmod
644
$(
INCPATH)
/png.h
chmod
644
$(
INCPATH)
/pngconf.h
cp
libpng.a
$(
LIBPATH)
cp
libpng.so.
$(PNGVER)
$(
LIBPATH)
chmod
644
$(
LIBPATH)
/libpng.a
chmod
644
$(
LIBPATH)
/libpng.so.
$(PNGVER)
-
@/bin/rm
-f
$(LIBPATH)
/libpng.so.
$(PNGMAJ)
$(LIBPATH)
/libpng.so
(
cd
$(LIBPATH)
;
ln
-f
-s
libpng.so.
$(PNGVER)
libpng.so.
$(PNGMAJ)
;
\
(
cd
$(LIBPATH)
)
;
ln
-f
-s
libpng.so.
$(PNGVER)
libpng.so.
$(PNGMAJ)
;
\
ln
-f
-s
libpng.so.
$(PNGMAJ)
libpng.so
)
clean
:
...
...
This diff is collapsed.
Click to expand it.
scripts/makefile.gcmmx
浏览文件 @
5e5c1e1f
...
...
@@ -29,6 +29,7 @@ WARNMORE=-Wwrite-strings -Wpointer-arith -Wshadow \
CFLAGS
=
-DPNG_USE_PNGGCCRD
-I
$(ZLIBINC)
-Wall
-O3
$(ALIGN)
-funroll-loops
\
-fomit-frame-pointer
#
$(WARNMORE)
-g
-DPNG_DEBUG
=
5
LDFLAGS
=
-L
.
-Wl
,-rpath,.
-L
$(ZLIBLIB)
-Wl
,-rpath,
$(ZLIBLIB)
-lpng
-lz
-lm
LDFLAGS_A
=
-L
$(ZLIBLIB)
-Wl
,-rpath,
$(ZLIBLIB)
libpng.a
-lz
-lm
RANLIB
=
ranlib
#RANLIB=echo
...
...
@@ -36,7 +37,7 @@ RANLIB=ranlib
# read libpng.txt or png.h to see why PNGMAJ is 2. You should not
# have to change it.
PNGMAJ
=
2
PNGMIN
=
1.0.
8
PNGMIN
=
1.0.
9beta1
PNGVER
=
$(PNGMAJ)
.
$(PNGMIN)
INCPATH
=
$(prefix)
/include
...
...
@@ -53,7 +54,7 @@ OBJSDLL = $(OBJS:.o=.pic.o)
.c.pic.o
:
$(CC)
-c
$(CFLAGS)
-fPIC
-o
$@
$*
.c
all
:
libpng.a libpng.so pngtest
all
:
libpng.a libpng.so pngtest
pngtest-static
pnggccrd.o
:
pnggccrd.c png.h pngconf.h pngasmrd.h
@
echo
""
...
...
@@ -86,8 +87,18 @@ libpng.so.$(PNGVER): $(OBJSDLL)
pngtest
:
pngtest.o libpng.so
$(CC)
-o
pngtest
$(CFLAGS)
pngtest.o
$(LDFLAGS)
test
:
pngtest
pngtest-static
:
pngtest.o libpng.a
$(CC)
-o
pngtest-static
$(CFLAGS)
pngtest.o
$(LDFLAGS_A)
test
:
pngtest pngtest-static
@
echo
""
@
echo
" Testing dynamically linked version:"
@
echo
""
./pngtest
@
echo
""
@
echo
" Testing statically linked version:"
@
echo
""
./pngtest-static
install
:
libpng.a libpng.so.$(PNGVER)
-
@if
[
!
-d
$(INCPATH)
]
;
then
mkdir
$(INCPATH)
;
fi
...
...
This diff is collapsed.
Click to expand it.
scripts/makefile.hpux
浏览文件 @
5e5c1e1f
...
...
@@ -18,7 +18,7 @@ RANLIB=ranlib
# read libpng.txt or png.h to see why PNGMAJ is 2. You should not
# have to change it.
PNGMAJ
=
2
PNGMIN
=
1.0.
8
PNGMIN
=
1.0.
9beta1
PNGVER
=
$(PNGMAJ)
.
$(PNGMIN)
# where make install puts libpng.a and png.h
...
...
@@ -67,7 +67,7 @@ install: libpng.a
cp
libpng.a libpng.sl.
$(PNGVER)
$(prefix)
/lib
chmod
644
$(prefix)
/lib/libpng.a
chmod
755
$(prefix)
/lib/libpng.sl.
$(PNGVER)
(
cd
$(prefix)
/lib
;
ln
-f
-s
libpng.sl.
$(PNGVER)
libpng.sl.
$(
M
NGMAJ)
;
\
(
cd
$(prefix)
/lib
;
ln
-f
-s
libpng.sl.
$(PNGVER)
libpng.sl.
$(
P
NGMAJ)
;
\
ln
-f
-s
libpng.sl.
$(PNGMAJ)
libpng.sl
)
clean
:
...
...
This diff is collapsed.
Click to expand it.
scripts/makefile.linux
浏览文件 @
5e5c1e1f
...
...
@@ -34,7 +34,7 @@ RANLIB=ranlib
# read libpng.txt or png.h to see why PNGMAJ is 2. You should not
# have to change it.
PNGMAJ
=
2
PNGMIN
=
1.0.
8
PNGMIN
=
1.0.
9beta1
PNGVER
=
$(PNGMAJ)
.
$(PNGMIN)
INCPATH
=
$(prefix)
/include
...
...
This diff is collapsed.
Click to expand it.
scripts/makefile.sco
浏览文件 @
5e5c1e1f
...
...
@@ -25,7 +25,7 @@ RANLIB=echo
# read libpng.txt or png.h to see why PNGMAJ is 2. You should not
# have to change it.
PNGMAJ
=
2
PNGMIN
=
1.0.
8
PNGMIN
=
1.0.
9beta1
PNGVER
=
$(PNGMAJ)
.
$(PNGMIN)
INCPATH
=
$(prefix)
/include
...
...
This diff is collapsed.
Click to expand it.
scripts/makefile.sggcc
浏览文件 @
5e5c1e1f
...
...
@@ -19,8 +19,8 @@ CFLAGS=-I$(ZLIBINC) -O2 $(WARNMORE) -fPIC -mabi=n32 # -g -DPNG_DEBUG=5
LDFLAGS
=
-L
.
-L
$(ZLIBLIB)
-lpng
-lz
-lm
LDSHARED
=
gcc
-shared
VER
=
1.0.
8
LIBS
=
libpng.so.1.0.
8
VER
=
1.0.
9beta1
LIBS
=
libpng.so.1.0.
9beta1
SHAREDLIB
=
libpng.so
libdir
=
$(prefix)
/lib32
...
...
This diff is collapsed.
Click to expand it.
scripts/makefile.solaris
浏览文件 @
5e5c1e1f
...
...
@@ -31,7 +31,7 @@ RANLIB=echo
# read libpng.txt or png.h to see why PNGMAJ is 2. You should not
# have to change it.
PNGMAJ
=
2
PNGMIN
=
1.0.
8
PNGMIN
=
1.0.
9beta1
PNGVER
=
$(PNGMAJ)
.
$(PNGMIN)
INCPATH
=
$(prefix)
/include
...
...
This diff is collapsed.
Click to expand it.
scripts/makevms.com
浏览文件 @
5e5c1e1f
...
...
@@ -3,6 +3,19 @@ $!
$!
$! Check for MMK/MMS
$!
$! This procedure accepts one parameter (contrib), which causes it to build
$! the programs from the contrib directory instead of libpng.
$!
$ p1 = f$edit(p1,"UPCASE")
$ if p1 .eqs. "CONTRIB"
$ then
$ set def [.contrib.gregbook]
$ @makevms
$ set def [-.pngminus]
$ @makevms
$ set def [--]
$ exit
$ endif
$ Make = ""
$ If F$Search ("Sys$System:MMS.EXE") .nes. "" Then Make = "MMS"
$ If F$Type (MMK) .eqs. "STRING" Then Make = "MMK"
...
...
@@ -83,6 +96,7 @@ $ call make pngtest.exe -
$ write sys$output "Testing Libpng..."
$ run pngtest
$ else
$ if f$search("DESCRIP.MMS") .eqs. "" then copy/nolog [.SCRIPTS]DESCRIP.MMS []
$ 'make'/macro=('comp',zlibsrc='zlibsrc')
$ endif
$ write sys$output "Libpng build completed"
...
...
@@ -128,4 +142,3 @@ $ VV='F$Verify(VV)
$Exit:
$ If V Then Set Verify
$ENDSUBROUTINE
This diff is collapsed.
Click to expand it.
scripts/pngdef.pas
浏览文件 @
5e5c1e1f
...
...
@@ -5,8 +5,8 @@ unit pngdef;
interface
const
PNG_LIBPNG_VER_STRING
=
'1.0.
8
'
;
PNG_LIBPNG_VER
=
1000
8
;
PNG_LIBPNG_VER_STRING
=
'1.0.
9beta1
'
;
PNG_LIBPNG_VER
=
1000
9
;
type
png_uint_32
=
Cardinal
;
...
...
This diff is collapsed.
Click to expand it.
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录
反馈
建议
客服
返回
顶部