Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Third Party Libpng
提交
4766a244
T
Third Party Libpng
项目概览
OpenHarmony
/
Third Party Libpng
接近 2 年 前同步成功
通知
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看板
提交
4766a244
编写于
7月 17, 2000
作者:
G
Glenn Randers-Pehrson
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Imported from libpng-1.0.8rc1.tar
上级
a4d54bdb
变更
43
隐藏空白更改
内联
并排
Showing
43 changed file
with
170 addition
and
126 deletion
+170
-126
ANNOUNCE
ANNOUNCE
+2
-1
CHANGES
CHANGES
+3
-1
INSTALL
INSTALL
+6
-6
LICENSE
LICENSE
+2
-2
README
README
+5
-5
Y2KINFO
Y2KINFO
+2
-2
configure
configure
+1
-1
example.c
example.c
+2
-0
libpng.3
libpng.3
+8
-8
libpng.txt
libpng.txt
+3
-3
libpngpf.3
libpngpf.3
+2
-2
msvc/README.txt
msvc/README.txt
+1
-1
msvc/png32ms.def
msvc/png32ms.def
+1
-1
png.5
png.5
+1
-1
png.c
png.c
+18
-11
png.h
png.h
+34
-23
pngasmrd.h
pngasmrd.h
+1
-1
pngconf.h
pngconf.h
+1
-1
pngerror.c
pngerror.c
+1
-1
pnggccrd.c
pnggccrd.c
+1
-1
pngget.c
pngget.c
+1
-1
pngmem.c
pngmem.c
+1
-1
pngpread.c
pngpread.c
+1
-1
pngread.c
pngread.c
+6
-5
pngrio.c
pngrio.c
+1
-1
pngrtran.c
pngrtran.c
+1
-1
pngrutil.c
pngrutil.c
+11
-11
pngset.c
pngset.c
+9
-6
pngtest.c
pngtest.c
+21
-8
pngtrans.c
pngtrans.c
+1
-1
pngvcrd.c
pngvcrd.c
+1
-1
pngwio.c
pngwio.c
+1
-1
pngwrite.c
pngwrite.c
+5
-3
pngwtran.c
pngwtran.c
+1
-1
pngwutil.c
pngwutil.c
+5
-3
scripts/makefile.beos
scripts/makefile.beos
+1
-1
scripts/makefile.dec
scripts/makefile.dec
+1
-1
scripts/makefile.gcmmx
scripts/makefile.gcmmx
+1
-1
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/pngdef.pas
scripts/pngdef.pas
+1
-1
未找到文件。
ANNOUNCE
浏览文件 @
4766a244
Libpng 1.0.8
beta4 - July 14
, 2000
Libpng 1.0.8
rc1 - July 17
, 2000
This is a public release of libpng, intended for use in production codes.
...
...
@@ -18,6 +18,7 @@ Changes since the last public release (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.
Send comments/corrections/commendations to
png-implement@ccrc.wustl.edu or to randeg@alum.rpi.edu
...
...
CHANGES
浏览文件 @
4766a244
...
...
@@ -797,7 +797,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
beta4 [July 14
, 2000]
version 1.0.8
rc1 [July 17
, 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
...
...
@@ -818,6 +818,8 @@ 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 PNG_NO_ZALLOC_ZERO macro (makes png_zalloc skip zeroing memory)
version 1.0.8rc1 [July 17, 2000]
Revised png_debug() macros and statements to eliminate compiler warnings.
Send comments/corrections/commendations to
png-implement@ccrc.wustl.edu or to randeg@alum.rpi.edu
...
...
INSTALL
浏览文件 @
4766a244
Installing libpng version 1.0.8
beta4 - July 14
, 2000
Installing libpng version 1.0.8
rc1 - July 17
, 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
beta4
" or "lpng107" and "zlib-1.1.3"
might be called "libpng-1.0.8
rc1
" or "lpng107" and "zlib-1.1.3"
or "zlib113") so that you have directories called "zlib" and "libpng".
Your directory structure should look like this:
...
...
@@ -57,8 +57,8 @@ The files that are presently available in the scripts directory
include
makefile.std => Generic UNIX makefile (cc, creates static libpng.a)
makefile.linux => Linux/ELF makefile (gcc, creates libpng.so.2.1.0.8
beta4
)
makefile.gcmmx => Linux/ELF makefile (gcc, creates libpng.so.2.1.0.8
beta4
,
makefile.linux => Linux/ELF makefile (gcc, creates libpng.so.2.1.0.8
rc1
)
makefile.gcmmx => Linux/ELF makefile (gcc, creates libpng.so.2.1.0.8
rc1
,
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
...
...
@@ -70,9 +70,9 @@ include
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
beta4
)
makefile.sggcc => Silicon Graphics (gcc, creates libpng.so.2.1.0.8
rc1
)
makefile.sunos => Sun makefile
makefile.solaris => Solaris 2.X makefile (gcc, creates libpng.so.2.1.0.8
beta4
)
makefile.solaris => Solaris 2.X makefile (gcc, creates libpng.so.2.1.0.8
rc1
)
makefile.sco => For SCO OSr5 ELF and Unixware 7 with Native cc
makefile.mips => MIPS makefile
makefile.acorn => Acorn makefile
...
...
LICENSE
浏览文件 @
4766a244
...
...
@@ -4,7 +4,7 @@ COPYRIGHT NOTICE, DISCLAIMER, and LICENSE:
If you modify libpng you may insert additional notices immediately following
this sentence.
libpng version 1.0.8
beta4, July 14
, 2000 is Copyright (c) 2000 Glenn Randers-Pehrson
libpng version 1.0.8
rc1, July 17
, 2000 is Copyright (c) 2000 Glenn Randers-Pehrson
Distributed according to the same disclaimer and license as libpng-1.0.6
with the following individuals added to the list of Contributing Authors
...
...
@@ -94,4 +94,4 @@ certification mark of the Open Source Initiative.
Glenn Randers-Pehrson
randeg@alum.rpi.edu
July 1
4
, 2000
July 1
7
, 2000
README
浏览文件 @
4766a244
README for libpng 1.0.8
beta4 - July 14
, 2000 (shared library 2.1)
README for libpng 1.0.8
rc1 - July 17
, 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.
...
...
@@ -177,9 +177,9 @@ Files in this distribution:
descrip.mms => VMS makefile for MMS or MMK
makefile.std => Generic UNIX makefile (cc, creates static libpng.a)
makefile.linux => Linux/ELF makefile
(gcc, creates libpng.so.2.1.0.8
beta4
)
(gcc, creates libpng.so.2.1.0.8
rc1
)
makefile.gcmmx => Linux/ELF makefile (gcc, creates
libpng.so.2.1.0.8
beta4
, uses assembler code
libpng.so.2.1.0.8
rc1
, 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
...
...
@@ -191,10 +191,10 @@ Files in this distribution:
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
beta4
)
makefile.sggcc => Silicon Graphics (gcc, creates libpng.so.2.1.0.8
rc1
)
makefile.sunos => Sun makefile
makefile.solaris => Solaris 2.X makefile
(gcc, creates libpng.so.2.1.0.8
beta4
)
(gcc, creates libpng.so.2.1.0.8
rc1
)
makefile.sco => For SCO OSr5 ELF and Unixware 7 with Native cc
makefile.mips => MIPS makefile
makefile.acorn => Acorn makefile
...
...
Y2KINFO
浏览文件 @
4766a244
Y2K compliance in libpng:
=========================
July 1
4
, 2000
July 1
7
, 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
beta4
are Y2K compliant. It is my belief that earlier
upward through 1.0.8
rc1
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
...
...
configure
浏览文件 @
4766a244
echo "
There is no \"configure\" script for Libpng-1.0.8
beta4
. Instead, please
There is no \"configure\" script for Libpng-1.0.8
rc1
. Instead, please
copy the appropriate makefile for your system from the \"scripts\"
directory. Read the INSTALL file for more details.
"
...
...
example.c
浏览文件 @
4766a244
...
...
@@ -755,11 +755,13 @@ void write_png(char *file_name /* , ... other image information ... */)
allocated it with malloc() instead of png_malloc(), use free() instead
of png_free(). */
png_free
(
png_ptr
,
palette
);
palette
=
NULL
;
/* Similarly, if you png_malloced any data that you passed in with
png_set_something(), such as a hist or trans array, free it here,
when you can be sure that libpng is through with it. */
png_free
(
png_ptr
,
trans
);
trans
=
NULL
;
/* clean up after the write, and free any memory allocated */
png_destroy_write_struct
(
&
png_ptr
,
&
info_ptr
);
...
...
libpng.3
浏览文件 @
4766a244
.TH LIBPNG 3 "July 1
4
, 2000"
.TH LIBPNG 3 "July 1
7
, 2000"
.SH NAME
libpng \- Portable Network Graphics (PNG) Reference Library 1.0.8
beta4
libpng \- Portable Network Graphics (PNG) Reference Library 1.0.8
rc1
.SH SYNOPSIS
\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
beta4 - July 14
, 2000
libpng version 1.0.8
rc1 - July 17
, 2000
Updated and distributed by Glenn Randers-Pehrson
<randeg@alum.rpi.edu>
Copyright (c) 1998, 1999, 2000 Glenn Randers-Pehrson
...
...
@@ -3381,13 +3381,13 @@ application:
.SH VII. Y2K Compliance in libpng
July 1
4
, 2000
July 1
7
, 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
beta4
are Y2K compliant. It is my belief that earlier
upward through 1.0.8
rc1
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
...
...
@@ -3528,7 +3528,7 @@ possible without all of you.
Thanks to Frank J. T. Wojcik for helping with the documentation.
Libpng version 1.0.8
beta4 - July 14
, 2000:
Libpng version 1.0.8
rc1 - July 17
, 2000:
Initially created in 1995 by Guy Eric Schalnat, then of Group 42, Inc.
Currently maintained by Glenn Randers-Pehrson (randeg@alum.rpi.edu).
...
...
@@ -3541,7 +3541,7 @@ Supported by the PNG development group
If you modify libpng you may insert additional notices immediately following
this sentence.
libpng version 1.0.8
beta4, July 14
, 2000 is
libpng version 1.0.8
rc1, July 17
, 2000 is
Copyright (c) 2000 Glenn Randers-Pehrson
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 +3632,7 @@ certification mark of the Open Source Initiative.
Glenn Randers-Pehrson
randeg@alum.rpi.edu
July 1
4
, 2000
July 1
7
, 2000
.\" end of man page
libpng.txt
浏览文件 @
4766a244
libpng.txt - A description on how to use and modify libpng
libpng version 1.0.8
beta4 - July 14
, 2000
libpng version 1.0.8
rc1 - July 17
, 2000
Updated and distributed by Glenn Randers-Pehrson
<randeg@alum.rpi.edu>
Copyright (c) 1998, 1999, 2000 Glenn Randers-Pehrson
...
...
@@ -2634,13 +2634,13 @@ application:
VII. Y2K Compliance in libpng
July 1
4
, 2000
July 1
7
, 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
beta4
are Y2K compliant. It is my belief that earlier
upward through 1.0.8
rc1
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
...
...
libpngpf.3
浏览文件 @
4766a244
.TH LIBPNGPF 3 "July 1
4
, 2000"
.TH LIBPNGPF 3 "July 1
7
, 2000"
.SH NAME
libpng \- Portable Network Graphics (PNG) Reference Library 1.0.8
beta4
libpng \- Portable Network Graphics (PNG) Reference Library 1.0.8
rc1
(private functions)
.SH SYNOPSIS
\fB#include <png.h>\fP
...
...
msvc/README.txt
浏览文件 @
4766a244
Microsoft Developer Studio Build File, Format Version 6.00 for
libpng 1.0.8
beta4 (July 14
, 2000) and zlib
libpng 1.0.8
rc1 (July 17
, 2000) and zlib
Copyright (C) 2000 Simon-Pierre Cadieux
For conditions of distribution and use, see copyright notice in png.h
...
...
msvc/png32ms.def
浏览文件 @
4766a244
...
...
@@ -6,7 +6,7 @@ LIBRARY
DESCRIPTION "PNG image compression library for Windows"
EXPORTS
;Version 1.0.8
beta4
;Version 1.0.8
rc1
png_build_grayscale_palette @1
png_check_sig @2
png_chunk_error @3
...
...
png.5
浏览文件 @
4766a244
.TH PNG 5 "July 1
4
, 2000"
.TH PNG 5 "July 1
7
, 2000"
.SH NAME
png \- Portable Network Graphics (PNG) format
.SH DESCRIPTION
...
...
png.c
浏览文件 @
4766a244
/* png.c - location for general purpose libpng functions
*
* libpng version 1.0.8
beta4 - July 14
, 2000
* libpng version 1.0.8
rc1 - July 17
, 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,14 +13,14 @@
#include "png.h"
/* Generate a compiler error if there is an old png.h in the search path. */
typedef
version_1_0_8
beta4
Your_png_h_is_not_version_1_0_8beta4
;
typedef
version_1_0_8
rc1
Your_png_h_is_not_version_1_0_8rc1
;
/* 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 */
char
png_libpng_ver
[
12
]
=
"1.0.8
beta4
"
;
char
png_libpng_ver
[
12
]
=
"1.0.8
rc1
"
;
/* png_sig was changed to a function in version 1.0.5c */
/* Place to hold the signature string for a PNG file. */
...
...
@@ -363,7 +363,10 @@ if (mask & PNG_FREE_PCAL)
{
int
i
;
for
(
i
=
0
;
i
<
(
int
)
info_ptr
->
pcal_nparams
;
i
++
)
{
png_free
(
png_ptr
,
info_ptr
->
pcal_params
[
i
]);
info_ptr
->
pcal_params
[
i
]
=
NULL
;
}
png_free
(
png_ptr
,
info_ptr
->
pcal_params
);
info_ptr
->
pcal_params
=
NULL
;
}
...
...
@@ -493,7 +496,10 @@ if (mask & PNG_FREE_ROWS)
{
int
row
;
for
(
row
=
0
;
row
<
(
int
)
info_ptr
->
height
;
row
++
)
{
png_free
(
png_ptr
,
info_ptr
->
row_pointers
[
row
]);
info_ptr
->
row_pointers
[
row
]
=
NULL
;
}
png_free
(
png_ptr
,
info_ptr
->
row_pointers
);
info_ptr
->
row_pointers
=
NULL
;
}
...
...
@@ -524,6 +530,7 @@ png_info_destroy(png_structp png_ptr, png_infop info_ptr)
if
(
png_ptr
->
num_chunk_list
)
{
png_free
(
png_ptr
,
png_ptr
->
chunk_list
);
png_ptr
->
chunk_list
=
NULL
;
png_ptr
->
num_chunk_list
=
0
;
}
#endif
...
...
@@ -618,11 +625,11 @@ png_charp PNGAPI
png_get_copyright
(
png_structp
png_ptr
)
{
if
(
png_ptr
!=
NULL
||
png_ptr
==
NULL
)
/* silence compiler warning */
return
(
"
\n
libpng version 1.0.8beta4 - July 14
, 2000
\n
\
return
(
(
png_charp
)
"
\n
libpng version 1.0.8rc1 - July 17
, 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
"
);
return
(
""
);
return
(
(
png_charp
)
""
);
}
/* The following return the library version as a short string in the
...
...
@@ -636,8 +643,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
(
"1.0.8beta4
"
);
return
(
"1.0.8beta4
"
);
return
(
(
png_charp
)
"1.0.8rc1
"
);
return
(
(
png_charp
)
"1.0.8rc1
"
);
}
png_charp
PNGAPI
...
...
@@ -645,8 +652,8 @@ png_get_header_ver(png_structp png_ptr)
{
/* Version of *.h files used when building libpng */
if
(
png_ptr
!=
NULL
)
/* silence compiler warning about unused png_ptr */
return
(
PNG_LIBPNG_VER_STRING
);
return
(
PNG_LIBPNG_VER_STRING
);
return
(
(
png_charp
)
PNG_LIBPNG_VER_STRING
);
return
(
(
png_charp
)
PNG_LIBPNG_VER_STRING
);
}
png_charp
PNGAPI
...
...
@@ -654,8 +661,8 @@ png_get_header_version(png_structp png_ptr)
{
/* Returns longer string containing both version and date */
if
(
png_ptr
!=
NULL
)
/* silence compiler warning about unused png_ptr */
return
(
PNG_HEADER_VERSION_STRING
);
return
(
PNG_HEADER_VERSION_STRING
);
return
(
(
png_charp
)
PNG_HEADER_VERSION_STRING
);
return
(
(
png_charp
)
PNG_HEADER_VERSION_STRING
);
}
#ifdef PNG_HANDLE_AS_UNKNOWN_SUPPORTED
...
...
png.h
浏览文件 @
4766a244
/* png.h - header file for PNG reference library
*
* libpng version 1.0.8
beta4 - July 14
, 2000
* libpng version 1.0.8
rc1 - July 17
, 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
beta4 - July 14
, 2000: Glenn
* libpng versions 0.97, January 1998, through 1.0.8
rc1 - July 17
, 2000: Glenn
* See also "Contributing Authors", below.
*
* Note about libpng version numbers:
...
...
@@ -55,7 +55,8 @@
* 1.0.7beta11-18 10007 2.1.0.7beta11-18 (binary compatible)
* 1.0.7rc1-2 10007 2.1.0.7rc1-2 (binary compatible)
* 1.0.7 10007 (still compatible)
* 1.0.7beta1-2 10008 2.1.0.8beta1-2
* 1.0.8beta1-4 10008 2.1.0.8beta1-4
* 1.0.8rc1 10008 2.1.0.8rc1
*
* Henceforth the source version will match the shared-library major
* and minor numbers; the shared-library major version number will be
...
...
@@ -82,7 +83,7 @@
* If you modify libpng you may insert additional notices immediately following
* this sentence.
*
* libpng version 1.0.8
beta4, July 14
, 2000, is
* libpng version 1.0.8
rc1, July 17
, 2000, is
* Copyright (c) 2000 Glenn Randers-Pehrson
* Distributed according to the same disclaimer and license as libpng-1.0.6
* with the following individuals added to the list of Contributing Authors
...
...
@@ -187,13 +188,13 @@
* Y2K compliance in libpng:
* =========================
*
* July 1
4
, 2000
* July 1
7
, 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
beta4
are Y2K compliant. It is my belief that earlier
* upward through 1.0.8
rc1
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
...
...
@@ -249,7 +250,7 @@
*/
/* Version information for png.h - this should match the version in png.c */
#define PNG_LIBPNG_VER_STRING "1.0.8
beta4
"
#define PNG_LIBPNG_VER_STRING "1.0.8
rc1
"
#define PNG_LIBPNG_VER_SONUM 2
...
...
@@ -259,7 +260,7 @@
#define PNG_LIBPNG_VER_RELEASE 8
/* This should match the numeric part of the final component of
* PNG_LIBPNG_VER_STRING, omitting any leading zero: */
#define PNG_LIBPNG_VER_BUILD
4
#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.
...
...
@@ -1147,9 +1148,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
beta4
and png.h are both at * version 1.0.8
rc1
*/
typedef
png_structp
version_1_0_8
beta4
;
typedef
png_structp
version_1_0_8
rc1
;
typedef
png_struct
FAR
*
FAR
*
png_structpp
;
...
...
@@ -2131,25 +2132,35 @@ extern PNG_EXPORT(void, png_write_png) PNGARG((png_structp png_ptr,
#if (PNG_DEBUG > 0)
#if !defined(PNG_DEBUG_FILE) && defined(_MSC_VER)
#include <crtdbg.h>
#define png_debug(l,m) if (PNG_DEBUG > l) _RPT0(_CRT_WARN,m)
#define png_debug1(l,m,p1) if (PNG_DEBUG > l) _RPT1(_CRT_WARN,m,p1)
#define png_debug2(l,m,p1,p2) if (PNG_DEBUG > l) _RPT2(_CRT_WARN,m,p1,p2)
#if (PNG_DEBUG > 1)
#define png_debug(l,m) _RPT0(_CRT_WARN,m)
#define png_debug1(l,m,p1) _RPT1(_CRT_WARN,m,p1)
#define png_debug2(l,m,p1,p2) _RPT2(_CRT_WARN,m,p1,p2)
#endif
#else
/* PNG_DEBUG_FILE || !_MSC_VER */
#ifndef PNG_DEBUG_FILE
#define PNG_DEBUG_FILE stderr
#endif
/* PNG_DEBUG_FILE */
#if (PNG_DEBUG > 1)
#define png_debug(l,m) \
if (PNG_DEBUG > l) \
fprintf(PNG_DEBUG_FILE,"%s"m,(l==1 ? "\t" : \
(l==2 ? "\t\t":(l>2 ? "\t\t\t":""))))
{ \
int num_tabs=l; \
fprintf(PNG_DEBUG_FILE,"%s"m,(num_tabs==1 ? "\t" : \
(num_tabs==2 ? "\t\t":(num_tabs>2 ? "\t\t\t":"")))); \
}
#define png_debug1(l,m,p1) \
if (PNG_DEBUG > l) \
fprintf(PNG_DEBUG_FILE,"%s"m,(l==1 ? "\t" : \
(l==2 ? "\t\t":(l>2 ? "\t\t\t":""))),p1)
{ \
int num_tabs=l; \
fprintf(PNG_DEBUG_FILE,"%s"m,(num_tabs==1 ? "\t" : \
(num_tabs==2 ? "\t\t":(num_tabs>2 ? "\t\t\t":""))),p1); \
}
#define png_debug2(l,m,p1,p2) \
if (PNG_DEBUG > l) \
fprintf(PNG_DEBUG_FILE,"%s"m,(l==1 ? "\t" : \
(l==2 ? "\t\t":(l>2 ? "\t\t\t":""))),p1,p2)
{ \
int num_tabs=l; \
fprintf(PNG_DEBUG_FILE,"%s"m,(num_tabs==1 ? "\t" : \
(num_tabs==2 ? "\t\t":(num_tabs>2 ? "\t\t\t":""))),p1,p2); \
}
#endif
/* (PNG_DEBUG > 1) */
#endif
/* _MSC_VER */
#endif
/* (PNG_DEBUG > 0) */
#endif
/* PNG_DEBUG */
...
...
@@ -2171,7 +2182,7 @@ 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
));
#define PNG_HEADER_VERSION_STRING \
" libpng version 1.0.8
beta4 - July 14
, 2000 (header)\n"
" libpng version 1.0.8
rc1 - July 17
, 2000 (header)\n"
#ifdef PNG_READ_COMPOSITE_NODIV_SUPPORTED
/* With these routines we avoid an integer divide, which will be slower on
...
...
pngasmrd.h
浏览文件 @
4766a244
/* pngasmrd.h - assembler version of utilities to read a PNG file
*
* libpng 1.0.8
beta4 - July 14
, 2000
* libpng 1.0.8
rc1 - July 17
, 2000
* For conditions of distribution and use, see copyright notice in png.h
* Copyright (c) 1999, 2000 Glenn Randers-Pehrson
*
...
...
pngconf.h
浏览文件 @
4766a244
/* pngconf.h - machine configurable file for libpng
*
* libpng 1.0.8
beta4 - July 14
, 2000
* libpng 1.0.8
rc1 - July 17
, 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)
...
...
pngerror.c
浏览文件 @
4766a244
/* pngerror.c - stub functions for i/o and memory allocation
*
* libpng 1.0.8
beta4 - July 14
, 2000
* libpng 1.0.8
rc1 - July 17
, 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)
...
...
pnggccrd.c
浏览文件 @
4766a244
...
...
@@ -6,7 +6,7 @@
* and http://www.intel.com/drg/pentiumII/appnotes/923/923.htm
* for Intel's performance analysis of the MMX vs. non-MMX code.
*
* libpng version 1.0.8
beta4 - July 14
, 2000
* libpng version 1.0.8
rc1 - July 17
, 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
...
...
pngget.c
浏览文件 @
4766a244
/* pngget.c - retrieval of values from info struct
*
* libpng 1.0.8
beta4 - July 14
, 2000
* libpng 1.0.8
rc1 - July 17
, 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)
...
...
pngmem.c
浏览文件 @
4766a244
/* pngmem.c - stub functions for memory allocation
*
* libpng 1.0.8
beta4 - July 14
, 2000
* libpng 1.0.8
rc1 - July 17
, 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)
...
...
pngpread.c
浏览文件 @
4766a244
/* pngpread.c - read a png file in push mode
*
* libpng 1.0.8
beta4 - July 14
, 2000
* libpng 1.0.8
rc1 - July 17
, 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)
...
...
pngread.c
浏览文件 @
4766a244
/* pngread.c - read a PNG file
*
* libpng 1.0.8
beta4 - July 14
, 2000
* libpng 1.0.8
rc1 - July 17
, 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)
...
...
@@ -62,6 +62,7 @@ png_create_read_struct_2(png_const_charp user_png_ver, png_voidp error_ptr,
#endif
{
png_free
(
png_ptr
,
png_ptr
->
zbuf
);
png_ptr
->
zbuf
=
NULL
;
png_destroy_struct
(
png_ptr
);
return
(
png_structp
)
NULL
;
}
...
...
@@ -315,7 +316,7 @@ png_read_info(png_structp png_ptr, png_infop info_ptr)
png_reset_crc
(
png_ptr
);
png_crc_read
(
png_ptr
,
png_ptr
->
chunk_name
,
4
);
png_debug2
(
0
,
"Reading %s chunk, length=%
d
.
\n
"
,
png_ptr
->
chunk_name
,
png_debug2
(
0
,
"Reading %s chunk, length=%
lu
.
\n
"
,
png_ptr
->
chunk_name
,
length
);
/* This should be a binary subdivision search or a hash for
...
...
@@ -465,7 +466,7 @@ png_read_row(png_structp png_ptr, png_bytep row, png_bytep dsp_row)
const
int
png_pass_mask
[
7
]
=
{
0x80
,
0x08
,
0x88
,
0x22
,
0xaa
,
0x55
,
0xff
};
#endif
int
ret
;
png_debug2
(
1
,
"in png_read_row (row %
d
, pass %d)
\n
"
,
png_debug2
(
1
,
"in png_read_row (row %
lu
, pass %d)
\n
"
,
png_ptr
->
row_number
,
png_ptr
->
pass
);
/* save jump buffer and error functions */
if
(
!
(
png_ptr
->
flags
&
PNG_FLAG_ROW_INIT
))
...
...
@@ -697,7 +698,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
beta4
* [*] png_handle_alpha() does not exist yet, as of libpng version 1.0.8
rc1
*/
void
PNGAPI
...
...
@@ -746,7 +747,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
beta4
* [*] png_handle_alpha() does not exist yet, as of libpng version 1.0.8
rc1
*/
void
PNGAPI
png_read_image
(
png_structp
png_ptr
,
png_bytepp
image
)
...
...
pngrio.c
浏览文件 @
4766a244
/* pngrio.c - functions for data input
*
* libpng 1.0.8
beta4 - July 14
, 2000
* libpng 1.0.8
rc1 - July 17
, 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)
...
...
pngrtran.c
浏览文件 @
4766a244
/* pngrtran.c - transforms the data in a row for PNG readers
*
* libpng 1.0.8
beta4 - July 14
, 2000
* libpng 1.0.8
rc1 - July 17
, 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)
...
...
pngrutil.c
浏览文件 @
4766a244
/* pngrutil.c - utilities to read a PNG file
*
* libpng 1.0.8
beta4 - July 14
, 2000
* libpng 1.0.8
rc1 - July 17
, 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)
...
...
@@ -388,7 +388,7 @@ png_handle_IHDR(png_structp png_ptr, png_infop info_ptr, png_uint_32 length)
(
png_uint_32
)
png_ptr
->
pixel_depth
+
7
)
>>
3
);
png_debug1
(
3
,
"bit_depth = %d
\n
"
,
png_ptr
->
bit_depth
);
png_debug1
(
3
,
"channels = %d
\n
"
,
png_ptr
->
channels
);
png_debug1
(
3
,
"rowbytes = %
d
\n
"
,
png_ptr
->
rowbytes
);
png_debug1
(
3
,
"rowbytes = %
lu
\n
"
,
png_ptr
->
rowbytes
);
png_set_IHDR
(
png_ptr
,
info_ptr
,
width
,
height
,
bit_depth
,
color_type
,
interlace_type
,
compression_type
,
filter_type
);
}
...
...
@@ -1541,7 +1541,7 @@ png_handle_pCAL(png_structp png_ptr, png_infop info_ptr, png_uint_32 length)
return
;
}
png_debug1
(
2
,
"Allocating and reading pCAL chunk data (%
d
bytes)
\n
"
,
png_debug1
(
2
,
"Allocating and reading pCAL chunk data (%
lu
bytes)
\n
"
,
length
+
1
);
purpose
=
(
png_charp
)
png_malloc
(
png_ptr
,
length
+
1
);
slength
=
(
png_size_t
)
length
;
...
...
@@ -1661,7 +1661,7 @@ png_handle_sCAL(png_structp png_ptr, png_infop info_ptr, png_uint_32 length)
return
;
}
png_debug1
(
2
,
"Allocating and reading sCAL chunk data (%
d
bytes)
\n
"
,
png_debug1
(
2
,
"Allocating and reading sCAL chunk data (%
lu
bytes)
\n
"
,
length
+
1
);
buffer
=
(
png_charp
)
png_malloc
(
png_ptr
,
length
+
1
);
slength
=
(
png_size_t
)
length
;
...
...
@@ -2576,7 +2576,7 @@ png_read_filter_row
png_bytep
prev_row
,
int
filter
)
{
png_debug
(
1
,
"in png_read_filter_row
\n
"
);
png_debug2
(
2
,
"row = %
d
, filter = %d
\n
"
,
png_ptr
->
row_number
,
filter
);
png_debug2
(
2
,
"row = %
lu
, filter = %d
\n
"
,
png_ptr
->
row_number
,
filter
);
switch
(
filter
)
{
case
PNG_FILTER_VALUE_NONE
:
...
...
@@ -2990,12 +2990,12 @@ defined(PNG_USER_TRANSFORM_PTR_SUPPORTED)
png_memset_check
(
png_ptr
,
png_ptr
->
prev_row
,
0
,
png_ptr
->
rowbytes
+
1
);
png_debug1
(
3
,
"width = %
d
,
\n
"
,
png_ptr
->
width
);
png_debug1
(
3
,
"height = %
d
,
\n
"
,
png_ptr
->
height
);
png_debug1
(
3
,
"iwidth = %
d
,
\n
"
,
png_ptr
->
iwidth
);
png_debug1
(
3
,
"num_rows = %
d
\n
"
,
png_ptr
->
num_rows
);
png_debug1
(
3
,
"rowbytes = %
d
,
\n
"
,
png_ptr
->
rowbytes
);
png_debug1
(
3
,
"irowbytes = %
d
,
\n
"
,
png_ptr
->
irowbytes
);
png_debug1
(
3
,
"width = %
lu
,
\n
"
,
png_ptr
->
width
);
png_debug1
(
3
,
"height = %
lu
,
\n
"
,
png_ptr
->
height
);
png_debug1
(
3
,
"iwidth = %
lu
,
\n
"
,
png_ptr
->
iwidth
);
png_debug1
(
3
,
"num_rows = %
lu
\n
"
,
png_ptr
->
num_rows
);
png_debug1
(
3
,
"rowbytes = %
lu
,
\n
"
,
png_ptr
->
rowbytes
);
png_debug1
(
3
,
"irowbytes = %
lu
,
\n
"
,
png_ptr
->
irowbytes
);
png_ptr
->
flags
|=
PNG_FLAG_ROW_INIT
;
}
pngset.c
浏览文件 @
4766a244
/* pngset.c - storage of image information into info struct
*
* libpng 1.0.8
beta4 - July 14
, 2000
* libpng 1.0.8
rc1 - July 17
, 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)
...
...
@@ -212,7 +212,7 @@ png_set_pCAL(png_structp png_ptr, png_infop info_ptr,
return
;
length
=
png_strlen
(
purpose
)
+
1
;
png_debug1
(
3
,
"allocating purpose for info (%
d
bytes)
\n
"
,
length
);
png_debug1
(
3
,
"allocating purpose for info (%
lu
bytes)
\n
"
,
length
);
info_ptr
->
pcal_purpose
=
(
png_charp
)
png_malloc
(
png_ptr
,
length
);
png_memcpy
(
info_ptr
->
pcal_purpose
,
purpose
,
(
png_size_t
)
length
);
...
...
@@ -223,7 +223,7 @@ png_set_pCAL(png_structp png_ptr, png_infop info_ptr,
info_ptr
->
pcal_nparams
=
(
png_byte
)
nparams
;
length
=
png_strlen
(
units
)
+
1
;
png_debug1
(
3
,
"allocating units for info (%
d
bytes)
\n
"
,
length
);
png_debug1
(
3
,
"allocating units for info (%
lu
bytes)
\n
"
,
length
);
info_ptr
->
pcal_units
=
(
png_charp
)
png_malloc
(
png_ptr
,
length
);
png_memcpy
(
info_ptr
->
pcal_units
,
units
,
(
png_size_t
)
length
);
...
...
@@ -234,7 +234,7 @@ png_set_pCAL(png_structp png_ptr, png_infop info_ptr,
for
(
i
=
0
;
i
<
nparams
;
i
++
)
{
length
=
png_strlen
(
params
[
i
])
+
1
;
png_debug2
(
3
,
"allocating parameter %d for info (%
d
bytes)
\n
"
,
i
,
length
);
png_debug2
(
3
,
"allocating parameter %d for info (%
lu
bytes)
\n
"
,
i
,
length
);
info_ptr
->
pcal_params
[
i
]
=
(
png_charp
)
png_malloc
(
png_ptr
,
length
);
png_memcpy
(
info_ptr
->
pcal_params
[
i
],
params
[
i
],
(
png_size_t
)
length
);
}
...
...
@@ -556,7 +556,7 @@ png_set_text(png_structp png_ptr, png_infop info_ptr, png_textp text_ptr,
textp
->
key
=
(
png_charp
)
png_malloc
(
png_ptr
,
(
png_uint_32
)(
key_len
+
text_length
+
lang_len
+
lang_key_len
+
4
));
png_debug2
(
2
,
"Allocated %d bytes at %x in png_set_text
\n
"
,
key_len
+
lang_len
+
lang_key_len
+
text_length
+
4
,
textp
->
key
);
key_len
+
lang_len
+
lang_key_len
+
text_length
+
4
,
(
int
)
textp
->
key
);
png_memcpy
(
textp
->
key
,
text_ptr
[
i
].
key
,
(
png_size_t
)(
key_len
));
...
...
@@ -659,6 +659,7 @@ png_set_sPLT(png_structp png_ptr,
png_memcpy
(
np
,
info_ptr
->
splt_palettes
,
info_ptr
->
splt_palettes_num
*
sizeof
(
png_sPLT_t
));
png_free
(
png_ptr
,
info_ptr
->
splt_palettes
);
info_ptr
->
splt_palettes
=
NULL
;
for
(
i
=
0
;
i
<
nentries
;
i
++
)
{
...
...
@@ -703,6 +704,7 @@ png_set_unknown_chunks(png_structp png_ptr,
png_memcpy
(
np
,
info_ptr
->
unknown_chunks
,
info_ptr
->
unknown_chunks_num
*
sizeof
(
png_unknown_chunk
));
png_free
(
png_ptr
,
info_ptr
->
unknown_chunks
);
info_ptr
->
unknown_chunks
=
NULL
;
for
(
i
=
0
;
i
<
num_unknowns
;
i
++
)
{
...
...
@@ -739,7 +741,7 @@ 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
(
1
,
"in png_permit_empty_plte
\n
"
,
"
"
);
png_debug
(
1
,
"in png_permit_empty_plte
\n
"
);
if
(
png_ptr
==
NULL
)
return
;
png_ptr
->
empty_plte_permitted
=
(
png_byte
)
empty_plte_permitted
;
...
...
@@ -774,6 +776,7 @@ png_set_keep_unknown_chunks(png_structp png_ptr, int keep, png_bytep
{
png_memcpy
(
new_list
,
png_ptr
->
chunk_list
,
5
*
old_num_chunks
);
png_free
(
png_ptr
,
png_ptr
->
chunk_list
);
png_ptr
->
chunk_list
=
NULL
;
}
png_memcpy
(
new_list
+
5
*
old_num_chunks
,
chunk_list
,
5
*
num_chunks
);
for
(
p
=
new_list
+
5
*
old_num_chunks
+
4
,
i
=
0
;
i
<
num_chunks
;
i
++
,
p
+=
5
)
...
...
pngtest.c
浏览文件 @
4766a244
/* pngtest.c - a simple test program to test libpng
*
* libpng 1.0.8
beta4 - July 14
, 2000
* libpng 1.0.8
rc1 - July 17
, 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)
...
...
@@ -103,6 +103,8 @@ static int status_pass=1;
static
int
status_dots_requested
=
0
;
static
int
status_dots
=
1
;
void
read_row_callback
(
png_structp
png_ptr
,
png_uint_32
row_number
,
int
pass
);
void
read_row_callback
(
png_structp
png_ptr
,
png_uint_32
row_number
,
int
pass
)
{
...
...
@@ -122,6 +124,8 @@ read_row_callback(png_structp png_ptr, png_uint_32 row_number, int pass)
fprintf
(
stdout
,
"r"
);
}
void
write_row_callback
(
png_structp
png_ptr
,
png_uint_32
row_number
,
int
pass
);
void
write_row_callback
(
png_structp
png_ptr
,
png_uint_32
row_number
,
int
pass
)
{
...
...
@@ -136,6 +140,8 @@ write_row_callback(png_structp png_ptr, png_uint_32 row_number, int pass)
5 in case illegal filter values are present.) */
static
png_uint_32
filters_used
[
256
];
void
count_filters
(
png_structp
png_ptr
,
png_row_infop
row_info
,
png_bytep
data
);
void
count_filters
(
png_structp
png_ptr
,
png_row_infop
row_info
,
png_bytep
data
)
{
if
(
png_ptr
!=
NULL
&&
row_info
!=
NULL
)
...
...
@@ -149,6 +155,8 @@ count_filters(png_structp png_ptr, png_row_infop row_info, png_bytep data)
static
png_uint_32
zero_samples
;
void
count_zero_samples
(
png_structp
png_ptr
,
png_row_infop
row_info
,
png_bytep
data
);
void
count_zero_samples
(
png_structp
png_ptr
,
png_row_infop
row_info
,
png_bytep
data
)
{
...
...
@@ -517,6 +525,7 @@ png_debug_free(png_structp png_ptr, png_voidp ptr)
the memory that is to be freed. */
memset
(
ptr
,
0x55
,
pinfo
->
size
);
png_free_default
(
png_ptr
,
pinfo
);
pinfo
=
NULL
;
break
;
}
if
(
pinfo
->
next
==
NULL
)
...
...
@@ -534,6 +543,7 @@ png_debug_free(png_structp png_ptr, png_voidp ptr)
printf
(
"Freeing %x
\n
"
,
ptr
);
#endif
png_free_default
(
png_ptr
,
ptr
);
ptr
=
NULL
;
}
#endif
/* PNG_USER_MEM_SUPPORTED */
/* END of code to test memory allocation/deallocation */
...
...
@@ -878,22 +888,24 @@ test_one_file(PNG_CONST char *inname, PNG_CONST char *outname)
#ifdef PNG_FLOATING_POINT_SUPPORTED
{
int
unit
;
double
width
,
height
;
double
scal_width
,
scal_
height
;
if
(
png_get_sCAL
(
read_ptr
,
read_info_ptr
,
&
unit
,
&
width
,
&
height
))
if
(
png_get_sCAL
(
read_ptr
,
read_info_ptr
,
&
unit
,
&
scal_width
,
&
scal_height
))
{
png_set_sCAL
(
write_ptr
,
write_info_ptr
,
unit
,
width
,
height
);
png_set_sCAL
(
write_ptr
,
write_info_ptr
,
unit
,
scal_width
,
scal_
height
);
}
}
#else
#ifdef PNG_FIXED_POINT_SUPPORTED
{
int
unit
;
png_charp
width
,
height
;
png_charp
scal_width
,
scal_
height
;
if
(
png_get_sCAL_s
(
read_ptr
,
read_info_ptr
,
&
unit
,
&
width
,
&
height
))
if
(
png_get_sCAL_s
(
read_ptr
,
read_info_ptr
,
&
unit
,
&
scal_width
,
&
scal_height
))
{
png_set_sCAL_s
(
write_ptr
,
write_info_ptr
,
unit
,
width
,
height
);
png_set_sCAL_s
(
write_ptr
,
write_info_ptr
,
unit
,
scal_width
,
scal_
height
);
}
}
#endif
...
...
@@ -1091,6 +1103,7 @@ test_one_file(PNG_CONST char *inname, PNG_CONST char *outname)
png_debug
(
0
,
"Destroying data structs
\n
"
);
png_free
(
read_ptr
,
row_buf
);
row_buf
=
NULL
;
png_destroy_read_struct
(
&
read_ptr
,
&
read_info_ptr
,
&
end_info_ptr
);
png_destroy_info_struct
(
write_ptr
,
&
write_end_info_ptr
);
png_destroy_write_struct
(
&
write_ptr
,
&
write_info_ptr
);
...
...
@@ -1435,4 +1448,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
beta4
your_png_h_is_not_version_1_0_8beta4
;
typedef
version_1_0_8
rc1
your_png_h_is_not_version_1_0_8rc1
;
pngtrans.c
浏览文件 @
4766a244
/* pngtrans.c - transforms the data in a row (used by both readers and writers)
*
* libpng 1.0.8
beta4 - July 14
, 2000
* libpng 1.0.8
rc1 - July 17
, 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)
...
...
pngvcrd.c
浏览文件 @
4766a244
...
...
@@ -2,7 +2,7 @@
*
* For Intel x86 CPU and Microsoft Visual C++ compiler
*
* libpng 1.0.8
beta4 - July 14
, 2000
* libpng 1.0.8
rc1 - July 17
, 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
...
...
pngwio.c
浏览文件 @
4766a244
/* pngwio.c - functions for data output
*
* libpng 1.0.8
beta4 - July 14
, 2000
* libpng 1.0.8
rc1 - July 17
, 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)
...
...
pngwrite.c
浏览文件 @
4766a244
/* pngwrite.c - general routines to write a PNG file
*
* libpng 1.0.8
beta4 - July 14
, 2000
* libpng 1.0.8
rc1 - July 17
, 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)
...
...
@@ -447,6 +447,7 @@ png_create_write_struct_2(png_const_charp user_png_ver, png_voidp error_ptr,
#endif
{
png_free
(
png_ptr
,
png_ptr
->
zbuf
);
png_ptr
->
zbuf
=
NULL
;
png_destroy_struct
(
png_ptr
);
return
((
png_structp
)
NULL
);
}
...
...
@@ -737,11 +738,11 @@ png_write_row(png_structp png_ptr, png_bytep row)
(
png_uint_32
)
png_ptr
->
row_info
.
pixel_depth
+
7
)
>>
3
);
png_debug1
(
3
,
"row_info->color_type = %d
\n
"
,
png_ptr
->
row_info
.
color_type
);
png_debug1
(
3
,
"row_info->width = %
d
\n
"
,
png_ptr
->
row_info
.
width
);
png_debug1
(
3
,
"row_info->width = %
lu
\n
"
,
png_ptr
->
row_info
.
width
);
png_debug1
(
3
,
"row_info->channels = %d
\n
"
,
png_ptr
->
row_info
.
channels
);
png_debug1
(
3
,
"row_info->bit_depth = %d
\n
"
,
png_ptr
->
row_info
.
bit_depth
);
png_debug1
(
3
,
"row_info->pixel_depth = %d
\n
"
,
png_ptr
->
row_info
.
pixel_depth
);
png_debug1
(
3
,
"row_info->rowbytes = %
d
\n
"
,
png_ptr
->
row_info
.
rowbytes
);
png_debug1
(
3
,
"row_info->rowbytes = %
lu
\n
"
,
png_ptr
->
row_info
.
rowbytes
);
/* Copy user's row into buffer, leaving room for filter byte. */
png_memcpy_check
(
png_ptr
,
png_ptr
->
row_buf
+
1
,
row
,
...
...
@@ -866,6 +867,7 @@ png_destroy_write_struct(png_structpp png_ptr_ptr, png_infopp info_ptr_ptr)
if
(
png_ptr
->
num_chunk_list
)
{
png_free
(
png_ptr
,
png_ptr
->
chunk_list
);
png_ptr
->
chunk_list
=
NULL
;
png_ptr
->
num_chunk_list
=
0
;
}
#endif
...
...
pngwtran.c
浏览文件 @
4766a244
/* pngwtran.c - transforms the data in a row for PNG writers
*
* libpng 1.0.8
beta4 - July 14
, 2000
* libpng 1.0.8
rc1 - July 17
, 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)
...
...
pngwutil.c
浏览文件 @
4766a244
/* pngwutil.c - utilities to write a PNG file
*
* libpng 1.0.8
beta4 - July 14
, 2000
* libpng 1.0.8
rc1 - July 17
, 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)
...
...
@@ -77,7 +77,7 @@ png_write_chunk_start(png_structp png_ptr, png_bytep chunk_name,
png_uint_32
length
)
{
png_byte
buf
[
4
];
png_debug2
(
0
,
"Writing %s chunk (%
d
bytes)
\n
"
,
chunk_name
,
length
);
png_debug2
(
0
,
"Writing %s chunk (%
lu
bytes)
\n
"
,
chunk_name
,
length
);
/* write the length */
png_save_uint_32
(
buf
,
length
);
...
...
@@ -339,9 +339,11 @@ png_write_compressed_data_out(png_structp png_ptr, compression_state *comp)
png_write_chunk_data
(
png_ptr
,(
png_bytep
)
comp
->
output_ptr
[
i
],
png_ptr
->
zbuf_size
);
png_free
(
png_ptr
,
comp
->
output_ptr
[
i
]);
comp
->
output_ptr
[
i
]
=
NULL
;
}
if
(
comp
->
max_output_ptr
!=
0
)
png_free
(
png_ptr
,
comp
->
output_ptr
);
comp
->
output_ptr
=
NULL
;
/* write anything left in zbuf */
if
(
png_ptr
->
zstream
.
avail_out
<
(
png_uint_32
)
png_ptr
->
zbuf_size
)
png_write_chunk_data
(
png_ptr
,
png_ptr
->
zbuf
,
...
...
@@ -1400,7 +1402,7 @@ png_write_pCAL(png_structp png_ptr, png_charp purpose, png_int_32 X0,
for
(
i
=
0
;
i
<
nparams
;
i
++
)
{
params_len
[
i
]
=
png_strlen
(
params
[
i
])
+
(
i
==
nparams
-
1
?
0
:
1
);
png_debug2
(
3
,
"pCAL parameter %d length = %
d
\n
"
,
i
,
params_len
[
i
]);
png_debug2
(
3
,
"pCAL parameter %d length = %
lu
\n
"
,
i
,
params_len
[
i
]);
total_len
+=
(
png_size_t
)
params_len
[
i
];
}
...
...
scripts/makefile.beos
浏览文件 @
4766a244
...
...
@@ -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
beta4
PNGMIN
=
1.0.8
rc1
PNGVER
=
$(PNGMAJ)
.
$(PNGMIN)
# where make install puts libpng.a, libpng.so*, and png.h
...
...
scripts/makefile.dec
浏览文件 @
4766a244
...
...
@@ -14,7 +14,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
beta4
PNGMIN
=
1.0.8
rc1
PNGVER
=
$(PNGMAJ)
.
$(PNGMIN)
CC
=
cc
...
...
scripts/makefile.gcmmx
浏览文件 @
4766a244
...
...
@@ -36,7 +36,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
beta4
PNGMIN
=
1.0.8
rc1
PNGVER
=
$(PNGMAJ)
.
$(PNGMIN)
INCPATH
=
$(prefix)
/include
...
...
scripts/makefile.linux
浏览文件 @
4766a244
...
...
@@ -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
beta4
PNGMIN
=
1.0.8
rc1
PNGVER
=
$(PNGMAJ)
.
$(PNGMIN)
INCPATH
=
$(prefix)
/include
...
...
scripts/makefile.sco
浏览文件 @
4766a244
...
...
@@ -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
beta4
PNGMIN
=
1.0.8
rc1
PNGVER
=
$(PNGMAJ)
.
$(PNGMIN)
INCPATH
=
$(prefix)
/include
...
...
scripts/makefile.sggcc
浏览文件 @
4766a244
...
...
@@ -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
beta4
LIBS
=
libpng.so.1.0.8
beta4
VER
=
1.0.8
rc1
LIBS
=
libpng.so.1.0.8
rc1
SHAREDLIB
=
libpng.so
libdir
=
$(prefix)
/lib32
...
...
scripts/makefile.solaris
浏览文件 @
4766a244
...
...
@@ -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
beta4
PNGMIN
=
1.0.8
rc1
PNGVER
=
$(PNGMAJ)
.
$(PNGMIN)
INCPATH
=
$(prefix)
/include
...
...
scripts/pngdef.pas
浏览文件 @
4766a244
...
...
@@ -5,7 +5,7 @@ unit pngdef;
interface
const
PNG_LIBPNG_VER_STRING
=
'1.0.8
beta4
'
;
PNG_LIBPNG_VER_STRING
=
'1.0.8
rc1
'
;
PNG_LIBPNG_VER
=
10008
;
type
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录