Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Third Party Libpng
提交
8f8fb6ae
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看板
提交
8f8fb6ae
编写于
3月 09, 1998
作者:
G
Glenn Randers-Pehrson
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Imported from libpng-1.0.0a.tar
上级
0f7202f0
变更
26
隐藏空白更改
内联
并排
Showing
26 changed file
with
159 addition
and
120 deletion
+159
-120
CHANGES
CHANGES
+7
-0
INSTALL
INSTALL
+2
-2
README
README
+1
-1
libpng.3
libpng.3
+25
-24
libpng.txt
libpng.txt
+1
-1
libpngpf.3
libpngpf.3
+1
-1
lpng100a
lpng100a
+0
-0
png.5
png.5
+1
-1
png.c
png.c
+3
-3
png.h
png.h
+30
-22
pngconf.h
pngconf.h
+2
-2
pngerror.c
pngerror.c
+2
-2
pngget.c
pngget.c
+2
-2
pngmem.c
pngmem.c
+2
-2
pngpread.c
pngpread.c
+2
-2
pngread.c
pngread.c
+2
-4
pngrio.c
pngrio.c
+2
-2
pngrtran.c
pngrtran.c
+54
-29
pngrutil.c
pngrutil.c
+2
-2
pngset.c
pngset.c
+2
-2
pngtest.c
pngtest.c
+2
-2
pngtrans.c
pngtrans.c
+2
-2
pngwio.c
pngwio.c
+2
-2
pngwrite.c
pngwrite.c
+4
-4
pngwtran.c
pngwtran.c
+2
-2
pngwutil.c
pngwutil.c
+4
-4
未找到文件。
CHANGES
浏览文件 @
8f8fb6ae
...
@@ -271,3 +271,10 @@ version 1.00 [March 7, 1998]
...
@@ -271,3 +271,10 @@ version 1.00 [March 7, 1998]
version 1.0.0 [March 8, 1998]
version 1.0.0 [March 8, 1998]
Changed name from 1.00 to 1.0.0 (Adam Costello)
Changed name from 1.00 to 1.0.0 (Adam Costello)
Added smakefile.ppc (with SCOPTIONS.ppc) for Amiga PPC (Andreas Kleinert)
Added smakefile.ppc (with SCOPTIONS.ppc) for Amiga PPC (Andreas Kleinert)
version 1.0.0a [March 9, 1998]
Fixed three bugs in pngrtran.c to make gamma+background handling consistent
(Greg Roelofs)
Changed format of the PNG_LIBPNG_VER integer to xyyzz instead of xyz
for major, minor, and bugfix releases. This is 10001. (Adam Costello,
Tom Lane)
Make months range from 1-12 in png_convert_to_rfc1123
INSTALL
浏览文件 @
8f8fb6ae
Installing libpng version 1.0.0
March 8
, 1998
Installing libpng version 1.0.0
a March 9
, 1998
Before installing libpng, you must first install zlib. zlib
Before installing libpng, you must first install zlib. zlib
can usually be found wherever you got libpng. zlib can be
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
...
@@ -10,7 +10,7 @@ zlib.h and zconf.h include files that correspond to the
version of zlib that's installed.
version of zlib that's installed.
You can rename the directories that you downloaded (they
You can rename the directories that you downloaded (they
might be called "libpng-1.0.0 or "lpng100" and "zlib-1.1.1"
might be called "libpng-1.0.0
a
or "lpng100" and "zlib-1.1.1"
or "zlib111") so that you have directories called "zlib" and "libpng".
or "zlib111") so that you have directories called "zlib" and "libpng".
Your directory structure should look like this:
Your directory structure should look like this:
...
...
README
浏览文件 @
8f8fb6ae
README for libpng 1.0.0 (shared library 2.1)
README for libpng 1.0.0
a
(shared library 2.1)
See the note about version numbers near the top of png.h
See the note about version numbers near the top of png.h
See INSTALL for instructions on how to install libpng.
See INSTALL for instructions on how to install libpng.
...
...
libpng.3
浏览文件 @
8f8fb6ae
.TH LIBPNG 3 "March
8
, 1998"
.TH LIBPNG 3 "March
9
, 1998"
.SH NAME
.SH NAME
libpng \- Portable Network Graphics (PNG) Reference Library
libpng \- Portable Network Graphics (PNG) Reference Library
.SH SYNOPSIS
.SH SYNOPSIS
...
@@ -396,7 +396,7 @@ Following is a copy of the libpng.txt file that accompanies libpng.
...
@@ -396,7 +396,7 @@ Following is a copy of the libpng.txt file that accompanies libpng.
.SH LIBPNG.TXT
.SH LIBPNG.TXT
libpng.txt - A description on how to use and modify libpng
libpng.txt - A description on how to use and modify libpng
libpng version 1.0.0
March 8
, 1998
libpng version 1.0.0
a March 9
, 1998
Updated and distributed by Glenn Randers-Pehrson
Updated and distributed by Glenn Randers-Pehrson
<randeg@alumni.rpi.edu>
<randeg@alumni.rpi.edu>
Copyright (c) 1998, Glenn Randers-Pehrson
Copyright (c) 1998, Glenn Randers-Pehrson
...
@@ -2291,28 +2291,29 @@ on the library has not always been consistent and straightforward.
...
@@ -2291,28 +2291,29 @@ on the library has not always been consistent and straightforward.
The following table summarizes matters since version 0.89c, which was
The following table summarizes matters since version 0.89c, which was
the first widely used release:
the first widely used release:
source png.h shared-lib
source png.h png.h shared-lib
version string version
version string int version
------- ------ ----------
------- ------ ------ ----------
0.89c ("1.0 beta 3") 0.89 1.0.89
0.89c 0.89 89 1.0.89
0.90 ("1.0 beta 4") 0.90 0.90
0.90 0.90 90 0.90 [should be 2.0.90]
[should have been 2.0.90]
0.95 0.95 95 0.95 [should be 2.0.95]
0.95 ("1.0 beta 5") 0.95 0.95
0.96 0.96 96 0.96 [should be 2.0.96]
[should have been 2.0.95]
0.97b 7") 1.00.97 97 1.0.1 [should be 2.0.97]
0.96 ("1.0 beta 6") 0.96 0.96
0.97c 0.97 97 2.0.97
[should have been 2.0.96]
0.98 0.98 98 2.0.98
0.97b ("1.00.97 beta 7") 1.00.97 1.0.0
0.99 0.99 98 2.0.99
[should have been 2.0.97]
0.99a-m 0.99 99 2.0.99
0.97c 0.97 2.0.97
1.00 1.00 100 2.1.0 [should be 10000]
0.98 0.98 2.0.98
1.0.0 1.0.0 100 2.1.0 [should be 10000]
0.99 0.99 2.0.99
1.0.1 1.0.1 10001 2.1.0
0.99a-m 0.99 2.0.99
1.0.0 1.00 2.1.0
Henceforth the source version will match the shared-library
minor and patch numbers; the shared-library major version number will be
Henceforth the source version will match the shared-library minor
and patch numbers; the shared-library major version number will be
used for changes in backward compatibility, as it is intended.
used for changes in backward compatibility, as it is intended.
The PNG_PNGLIB_VER macro, which is not used within libpng but
is available for applications, is an unsigned integer of the form
xyyzz corresponding to the source version x.y.z (leading zeros in y and z)
.SH "SEE ALSO"
.SH "SEE ALSO"
libpngpf(3), png(5)
libpngpf(3), png(5)
.LP
.LP
...
@@ -2365,7 +2366,7 @@ possible without all of you.
...
@@ -2365,7 +2366,7 @@ possible without all of you.
Thanks to Frank J. T. Wojcik for helping with the documentation.
Thanks to Frank J. T. Wojcik for helping with the documentation.
Libpng version 1.0.0
(March 8, 1998)
:
Libpng version 1.0.0
a March 9, 1998
:
Initially created in 1995 by Guy Eric Schalnat, then of Group 42, Inc.
Initially created in 1995 by Guy Eric Schalnat, then of Group 42, Inc.
Currently maintained by Glenn Randers-Pehrson (randeg@alumni.rpi.edu).
Currently maintained by Glenn Randers-Pehrson (randeg@alumni.rpi.edu).
...
...
libpng.txt
浏览文件 @
8f8fb6ae
libpng.txt - A description on how to use and modify libpng
libpng.txt - A description on how to use and modify libpng
libpng version 1.0.0
March 8
, 1998
libpng version 1.0.0
a March 9
, 1998
Updated and distributed by Glenn Randers-Pehrson
Updated and distributed by Glenn Randers-Pehrson
<randeg@alumni.rpi.edu>
<randeg@alumni.rpi.edu>
Copyright (c) 1998, Glenn Randers-Pehrson
Copyright (c) 1998, Glenn Randers-Pehrson
...
...
libpngpf.3
浏览文件 @
8f8fb6ae
.TH LIBPNGPF 3 "March
8
, 1998"
.TH LIBPNGPF 3 "March
9
, 1998"
.SH NAME
.SH NAME
libpng \- Portable Network Graphics (PNG) Reference Library
libpng \- Portable Network Graphics (PNG) Reference Library
(private functions)
(private functions)
...
...
lpng100a
0 → 100644
浏览文件 @
8f8fb6ae
png.5
浏览文件 @
8f8fb6ae
.TH PNG 5 "March
8
, 1998"
.TH PNG 5 "March
9
, 1998"
.SH NAME
.SH NAME
png \- Portable Network Graphics (PNG) format
png \- Portable Network Graphics (PNG) format
.SH DESCRIPTION
.SH DESCRIPTION
...
...
png.c
浏览文件 @
8f8fb6ae
/* png.c - location for general purpose libpng functions
/* png.c - location for general purpose libpng functions
*
*
* libpng 1.0.0
* libpng 1.0.0
a
* For conditions of distribution and use, see copyright notice in png.h
* For conditions of distribution and use, see copyright notice in png.h
* Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.
* Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.
* Copyright (c) 1996, 1997 Andreas Dilger
* Copyright (c) 1996, 1997 Andreas Dilger
* Copyright (c) 1998, Glenn Randers-Pehrson
* Copyright (c) 1998, Glenn Randers-Pehrson
* March
8
, 1998
* March
9
, 1998
*/
*/
#define PNG_INTERNAL
#define PNG_INTERNAL
...
@@ -16,7 +16,7 @@
...
@@ -16,7 +16,7 @@
/* Version information for C files. This had better match the version
/* Version information for C files. This had better match the version
* string defined in png.h.
* string defined in png.h.
*/
*/
char
png_libpng_ver
[
6
]
=
"1.0.0
"
;
char
png_libpng_ver
[
12
]
=
"1.0.0a
"
;
/* Place to hold the signature string for a PNG file. */
/* Place to hold the signature string for a PNG file. */
png_byte
FARDATA
png_sig
[
8
]
=
{
137
,
80
,
78
,
71
,
13
,
10
,
26
,
10
};
png_byte
FARDATA
png_sig
[
8
]
=
{
137
,
80
,
78
,
71
,
13
,
10
,
26
,
10
};
...
...
png.h
浏览文件 @
8f8fb6ae
/* png.h - header file for PNG reference library
/* png.h - header file for PNG reference library
*
*
* libpng 1.0.0
* libpng 1.0.0
a
* For conditions of distribution and use, see the COPYRIGHT NOTICE below.
* For conditions of distribution and use, see the COPYRIGHT NOTICE below.
* Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.
* Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.
* Copyright (c) 1996, 1997 Andreas Dilger
* Copyright (c) 1996, 1997 Andreas Dilger
* Copyright (c) 1998 Glenn Randers-Pehrson
* Copyright (c) 1998 Glenn Randers-Pehrson
* March
8
, 1998
* March
9
, 1998
*
*
* Note about libpng version numbers:
* Note about libpng version numbers:
*
*
...
@@ -16,23 +16,29 @@
...
@@ -16,23 +16,29 @@
* The following table summarizes matters since version 0.89c, which was
* The following table summarizes matters since version 0.89c, which was
* the first widely used release:
* the first widely used release:
*
*
* source png.h shared-lib
* source png.h png.h shared-lib
* version string version
* version string int version
* ------- ------ ----------
* ------- ------ ------ ----------
* 0.89c ("1.0 beta 3") 0.89 1.0.89
* 0.89c ("1.0 beta 3") 0.89 89 1.0.89
* 0.90 ("1.0 beta 4") 0.90 0.90 [should have been 2.0.90]
* 0.90 ("1.0 beta 4") 0.90 90 0.90 [should have been 2.0.90]
* 0.95 ("1.0 beta 5") 0.95 0.95 [should have been 2.0.95]
* 0.95 ("1.0 beta 5") 0.95 95 0.95 [should have been 2.0.95]
* 0.96 ("1.0 beta 6") 0.96 0.96 [should have been 2.0.96]
* 0.96 ("1.0 beta 6") 0.96 96 0.96 [should have been 2.0.96]
* 0.97b ("1.00.97 beta 7") 1.00.97 1.0.0 [should have been 2.0.97]
* 0.97b ("1.00.97 beta 7") 1.00.97 97 1.0.1 [should have been 2.0.97]
* 0.97c 0.97 2.0.97
* 0.97c 0.97 97 2.0.97
* 0.98 0.98 2.0.98
* 0.98 0.98 98 2.0.98
* 0.99 0.99 2.0.99
* 0.99 0.99 98 2.0.99
* 0.99a-m 0.99 2.0.99
* 0.99a-m 0.99 99 2.0.99
* 1.0.0 1.00 2.1.0
* 1.00 1.00 100 2.1.0 [int should be 10000]
* 1.0.0 1.0.0 100 2.1.0 [int should be 10000]
* 1.0.1 1.0.1 10001 2.1.0
*
*
* Henceforth the source version will match the shared-library minor
* Henceforth the source version will match the shared-library minor
* and patch numbers; the shared-library major version number will be
* and patch numbers; the shared-library major version number will be
* used for changes in backward compatibility, as it is intended.
* used for changes in backward compatibility, as it is intended.
* The PNG_PNGLIB_VER macro, which is not used within libpng but
* is available for applications, is an unsigned integer of the form
* xyyzz corresponding to the source version x.y.z (leading zeros in y and z)
*
*
*
* See libpng.txt for more information. The PNG specification is available
* See libpng.txt for more information. The PNG specification is available
* as RFC 2083 <ftp://ftp.uu.net/graphics/png/documents/>
* as RFC 2083 <ftp://ftp.uu.net/graphics/png/documents/>
...
@@ -112,19 +118,21 @@ extern "C" {
...
@@ -112,19 +118,21 @@ extern "C" {
*/
*/
/* Version information for png.h - this should match the version in png.c */
/* Version information for png.h - this should match the version in png.c */
#define PNG_LIBPNG_VER_STRING "1.0.0"
#define PNG_LIBPNG_VER_STRING "1.0.0
a
"
/* careful here. At one time, I wanted to use 082, but that would be octal.
/* Gareful here. At one time, Guy wanted to use 082, but that would be octal.
* Version 1.0.0 will be 100 here, etc.
* We must not include leading zeroes.
*/
* Versions 0.7 through 1.0.0 were in the range 0 to 100 here (only
#define PNG_LIBPNG_VER 100
* 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-bugfix*/
#define PNG_LIBPNG_VER 10001
/* variables declared in png.c - only it needs to define PNG_NO_EXTERN */
/* variables declared in png.c - only it needs to define PNG_NO_EXTERN */
#if !defined(PNG_NO_EXTERN) || defined(PNG_ALWAYS_EXTERN)
#if !defined(PNG_NO_EXTERN) || defined(PNG_ALWAYS_EXTERN)
/* Version information for C files, stored in png.c. This had better match
/* Version information for C files, stored in png.c. This had better match
* the version above.
* the version above.
*/
*/
extern
char
png_libpng_ver
[
6
];
extern
char
png_libpng_ver
[
12
];
/* need room for 99.99.99aa */
/* Structures to facilitate easy interlacing. See png.c for more details */
/* Structures to facilitate easy interlacing. See png.c for more details */
extern
int
FARDATA
png_pass_start
[
7
];
extern
int
FARDATA
png_pass_start
[
7
];
...
@@ -1834,7 +1842,7 @@ PNG_EXTERN void png_do_strip_filler PNGARG((png_row_infop row_info,
...
@@ -1834,7 +1842,7 @@ PNG_EXTERN void png_do_strip_filler PNGARG((png_row_infop row_info,
PNG_EXTERN
void
png_do_swap
PNGARG
((
png_row_infop
row_info
,
png_bytep
row
));
PNG_EXTERN
void
png_do_swap
PNGARG
((
png_row_infop
row_info
,
png_bytep
row
));
#endif
#endif
#if defined(PNG_READ_PACKSWAP_SUPPORTED) || defined(PNG_WRITE_PACKSWAP_SUPPOR)
#if defined(PNG_READ_PACKSWAP_SUPPORTED) || defined(PNG_WRITE_PACKSWAP_SUPPOR
TED
)
PNG_EXTERN
void
png_do_packswap
PNGARG
((
png_row_infop
row_info
,
png_bytep
row
));
PNG_EXTERN
void
png_do_packswap
PNGARG
((
png_row_infop
row_info
,
png_bytep
row
));
#endif
#endif
...
...
pngconf.h
浏览文件 @
8f8fb6ae
/* pngconf.h - machine configurable file for libpng
/* pngconf.h - machine configurable file for libpng
*
*
* libpng 1.0.0
* libpng 1.0.0
a
* For conditions of distribution and use, see copyright notice in png.h
* For conditions of distribution and use, see copyright notice in png.h
* Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.
* Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.
* Copyright (c) 1996, 1997 Andreas Dilger
* Copyright (c) 1996, 1997 Andreas Dilger
* Copyright (c) 1998, Glenn Randers-Pehrson
* Copyright (c) 1998, Glenn Randers-Pehrson
* March
8
, 1998
* March
9
, 1998
*/
*/
/* Any machine specific code is near the front of this file, so if you
/* Any machine specific code is near the front of this file, so if you
...
...
pngerror.c
浏览文件 @
8f8fb6ae
/* pngerror.c - stub functions for i/o and memory allocation
/* pngerror.c - stub functions for i/o and memory allocation
*
*
* libpng 1.0.0
* libpng 1.0.0
a
* For conditions of distribution and use, see copyright notice in png.h
* For conditions of distribution and use, see copyright notice in png.h
* Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.
* Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.
* Copyright (c) 1996, 1997 Andreas Dilger
* Copyright (c) 1996, 1997 Andreas Dilger
* Copyright (c) 1998, Glenn Randers-Pehrson
* Copyright (c) 1998, Glenn Randers-Pehrson
* March
8
, 1998
* March
9
, 1998
*
*
* This file provides a location for all error handling. Users which
* This file provides a location for all error handling. Users which
* need special error handling are expected to write replacement functions
* need special error handling are expected to write replacement functions
...
...
pngget.c
浏览文件 @
8f8fb6ae
/* pngget.c - retrieval of values from info struct
/* pngget.c - retrieval of values from info struct
*
*
* libpng 1.0.0
* libpng 1.0.0
a
* For conditions of distribution and use, see copyright notice in png.h
* For conditions of distribution and use, see copyright notice in png.h
* Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.
* Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.
* Copyright (c) 1996, 1997 Andreas Dilger
* Copyright (c) 1996, 1997 Andreas Dilger
* Copyright (c) 1998, Glenn Randers-Pehrson
* Copyright (c) 1998, Glenn Randers-Pehrson
* March
8
, 1998
* March
9
, 1998
*/
*/
#define PNG_INTERNAL
#define PNG_INTERNAL
...
...
pngmem.c
浏览文件 @
8f8fb6ae
/* pngmem.c - stub functions for memory allocation
/* pngmem.c - stub functions for memory allocation
*
*
* libpng 1.0.0
* libpng 1.0.0
a
* For conditions of distribution and use, see copyright notice in png.h
* For conditions of distribution and use, see copyright notice in png.h
* Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.
* Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.
* Copyright (c) 1996, 1997 Andreas Dilger
* Copyright (c) 1996, 1997 Andreas Dilger
* Copyright (c) 1998, Glenn Randers-Pehrson
* Copyright (c) 1998, Glenn Randers-Pehrson
* March
8
, 1998
* March
9
, 1998
*
*
* This file provides a location for all memory allocation. Users which
* This file provides a location for all memory allocation. Users which
* need special memory handling are expected to modify the code in this file
* need special memory handling are expected to modify the code in this file
...
...
pngpread.c
浏览文件 @
8f8fb6ae
/* pngpread.c - read a png file in push mode
/* pngpread.c - read a png file in push mode
*
*
* libpng 1.0.0
* libpng 1.0.0
a
* For conditions of distribution and use, see copyright notice in png.h
* For conditions of distribution and use, see copyright notice in png.h
* Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.
* Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.
* Copyright (c) 1996, 1997 Andreas Dilger
* Copyright (c) 1996, 1997 Andreas Dilger
* Copyright (c) 1998, Glenn Randers-Pehrson
* Copyright (c) 1998, Glenn Randers-Pehrson
* March
8
, 1998
* March
9
, 1998
*/
*/
#define PNG_INTERNAL
#define PNG_INTERNAL
...
...
pngread.c
浏览文件 @
8f8fb6ae
/* pngread.c - read a PNG file
/* pngread.c - read a PNG file
*
*
* libpng 1.0.0
* libpng 1.0.0
a
* For conditions of distribution and use, see copyright notice in png.h
* For conditions of distribution and use, see copyright notice in png.h
* Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.
* Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.
* Copyright (c) 1996, 1997 Andreas Dilger
* Copyright (c) 1996, 1997 Andreas Dilger
* Copyright (c) 1998, Glenn Randers-Pehrson
* Copyright (c) 1998, Glenn Randers-Pehrson
* March
8
, 1998
* March
9
, 1998
*
*
* This file contains routines that an application calls directly to
* This file contains routines that an application calls directly to
* read a PNG file or stream.
* read a PNG file or stream.
...
@@ -719,10 +719,8 @@ png_read_destroy(png_structp png_ptr, png_infop info_ptr, png_infop end_info_ptr
...
@@ -719,10 +719,8 @@ png_read_destroy(png_structp png_ptr, png_infop info_ptr, png_infop end_info_ptr
#endif
#endif
if
(
png_ptr
->
flags
&
PNG_FLAG_FREE_PALETTE
)
if
(
png_ptr
->
flags
&
PNG_FLAG_FREE_PALETTE
)
png_zfree
(
png_ptr
,
png_ptr
->
palette
);
png_zfree
(
png_ptr
,
png_ptr
->
palette
);
#if defined(PNG_READ_BACKGROUND_SUPPORTED) && defined(PNG_READ_bKGD_SUPPORTED)
if
(
png_ptr
->
flags
&
PNG_FLAG_FREE_TRANS
)
if
(
png_ptr
->
flags
&
PNG_FLAG_FREE_TRANS
)
png_free
(
png_ptr
,
png_ptr
->
trans
);
png_free
(
png_ptr
,
png_ptr
->
trans
);
#endif
#if defined(PNG_READ_hIST_SUPPORTED)
#if defined(PNG_READ_hIST_SUPPORTED)
if
(
png_ptr
->
flags
&
PNG_FLAG_FREE_HIST
)
if
(
png_ptr
->
flags
&
PNG_FLAG_FREE_HIST
)
png_free
(
png_ptr
,
png_ptr
->
hist
);
png_free
(
png_ptr
,
png_ptr
->
hist
);
...
...
pngrio.c
浏览文件 @
8f8fb6ae
/* pngrio.c - functions for data input
/* pngrio.c - functions for data input
*
*
* libpng 1.0.0
* libpng 1.0.0
a
* For conditions of distribution and use, see copyright notice in png.h
* For conditions of distribution and use, see copyright notice in png.h
* Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.
* Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.
* Copyright (c) 1996, 1997 Andreas Dilger
* Copyright (c) 1996, 1997 Andreas Dilger
* Copyright (c) 1998, Glenn Randers-Pehrson
* Copyright (c) 1998, Glenn Randers-Pehrson
* March
8
, 1998
* March
9
, 1998
*
*
* This file provides a location for all input. Users which need
* This file provides a location for all input. Users which need
* special handling are expected to write a function which has the same
* special handling are expected to write a function which has the same
...
...
pngrtran.c
浏览文件 @
8f8fb6ae
/* pngrtran.c - transforms the data in a row for PNG readers
/* pngrtran.c - transforms the data in a row for PNG readers
*
*
* libpng 1.0.0
* libpng 1.0.0
a
* For conditions of distribution and use, see copyright notice in png.h
* For conditions of distribution and use, see copyright notice in png.h
* Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.
* Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.
* Copyright (c) 1996, 1997 Andreas Dilger
* Copyright (c) 1996, 1997 Andreas Dilger
* Copyright (c) 1998, Glenn Randers-Pehrson
* Copyright (c) 1998, Glenn Randers-Pehrson
* March
8
, 1998
* March
9
, 1998
*
*
* This file contains functions optionally called by an application
* This file contains functions optionally called by an application
* in order to tell libpng how to handle data when reading a PNG.
* in order to tell libpng how to handle data when reading a PNG.
...
@@ -665,7 +665,8 @@ png_init_read_transformations(png_structp png_ptr)
...
@@ -665,7 +665,8 @@ png_init_read_transformations(png_structp png_ptr)
if
(
png_ptr
->
transformations
&
PNG_INVERT_ALPHA
)
if
(
png_ptr
->
transformations
&
PNG_INVERT_ALPHA
)
{
{
#if defined(PNG_READ_EXPAND_SUPPORTED)
#if defined(PNG_READ_EXPAND_SUPPORTED)
if
(
png_ptr
->
transformations
&
!
PNG_EXPAND
)
/* GRR BUG #1: was (png_ptr->transformations & !PNG_EXPAND) */
if
(
!
(
png_ptr
->
transformations
&
PNG_EXPAND
))
#endif
#endif
{
{
/* invert the alpha channel (in tRNS) unless the pixels are
/* invert the alpha channel (in tRNS) unless the pixels are
...
@@ -712,41 +713,65 @@ png_init_read_transformations(png_structp png_ptr)
...
@@ -712,41 +713,65 @@ png_init_read_transformations(png_structp png_ptr)
}
}
else
else
{
{
double
g
;
double
g
,
gs
;
g
=
1
.
0
/
(
png_ptr
->
background_gamma
*
png_ptr
->
screen_gamma
);
/*
GRR BUG #3: inconsistent with handling of full RGBA below
g = 1.0 / png_ptr->background_gamma;
gs = 1.0 / (png_ptr->background_gamma * png_ptr->screen_gamma);
*/
switch
(
png_ptr
->
background_gamma_type
)
{
case
PNG_BACKGROUND_GAMMA_SCREEN
:
g
=
(
png_ptr
->
screen_gamma
);
gs
=
1
.
0
;
break
;
case
PNG_BACKGROUND_GAMMA_FILE
:
g
=
1
.
0
/
(
png_ptr
->
gamma
);
gs
=
1
.
0
/
(
png_ptr
->
gamma
*
png_ptr
->
screen_gamma
);
break
;
case
PNG_BACKGROUND_GAMMA_UNIQUE
:
g
=
1
.
0
/
(
png_ptr
->
background_gamma
);
gs
=
1
.
0
/
(
png_ptr
->
background_gamma
*
png_ptr
->
screen_gamma
);
break
;
default:
g
=
1
.
0
;
/* back_1 */
gs
=
1
.
0
;
/* back */
}
if
(
png_ptr
->
background_gamma_type
==
PNG_BACKGROUND_GAMMA_SCREEN
||
if
(
fabs
(
g
-
1
.
0
)
<
PNG_GAMMA_THRESHOLD
)
/*
GRR BUG #2: This creates self-inconsistent images--fully
transparent and fully opaque look fine, but translucent
pixels are wrong (too bright if XV's code can be trusted).
Commenting it out makes an internally self-consistent
image, but still not consistent with RGBA version of same
thing (again, too bright in XV).
png_ptr->background_gamma_type==PNG_BACKGROUND_GAMMA_SCREEN||
*/
fabs
(
gs
-
1
.
0
)
<
PNG_GAMMA_THRESHOLD
)
{
{
back
.
red
=
(
png_byte
)
png_ptr
->
background
.
red
;
back
.
red
=
(
png_byte
)
png_ptr
->
background
.
red
;
back
.
green
=
(
png_byte
)
png_ptr
->
background
.
green
;
back
.
green
=
(
png_byte
)
png_ptr
->
background
.
green
;
back
.
blue
=
(
png_byte
)
png_ptr
->
background
.
blue
;
back
.
blue
=
(
png_byte
)
png_ptr
->
background
.
blue
;
}
}
else
else
{
{
back
.
red
=
back
.
red
=
(
png_byte
)(
pow
(
(
png_byte
)(
pow
((
double
)
png_ptr
->
background
.
red
/
255
,
g
)
*
(
double
)
png_ptr
->
background
.
red
/
255
,
gs
)
*
255
.
0
+
.
5
);
255
.
0
+
0
.
5
);
back
.
green
=
(
png_byte
)(
pow
(
back
.
green
=
(
double
)
png_ptr
->
background
.
green
/
255
,
gs
)
*
255
.
0
+
.
5
);
(
png_byte
)(
pow
((
double
)
png_ptr
->
background
.
green
/
255
,
g
)
*
back
.
blue
=
(
png_byte
)(
pow
(
255
.
0
+
0
.
5
);
(
double
)
png_ptr
->
background
.
blue
/
255
,
gs
)
*
255
.
0
+
.
5
);
back
.
blue
=
(
png_byte
)(
pow
((
double
)
png_ptr
->
background
.
blue
/
255
,
g
)
*
255
.
0
+
0
.
5
);
}
}
g
=
1
.
0
/
png_ptr
->
background_gamma
;
back_1
.
red
=
(
png_byte
)(
pow
(
(
double
)
png_ptr
->
background
.
red
/
255
,
g
)
*
255
.
0
+
.
5
);
back_1
.
red
=
back_1
.
green
=
(
png_byte
)(
pow
(
(
png_byte
)(
pow
((
double
)
png_ptr
->
background
.
red
/
255
,
g
)
*
(
double
)
png_ptr
->
background
.
green
/
255
,
g
)
*
255
.
0
+
.
5
);
255
.
0
+
0
.
5
);
back_1
.
blue
=
(
png_byte
)(
pow
(
back_1
.
green
=
(
double
)
png_ptr
->
background
.
blue
/
255
,
g
)
*
255
.
0
+
.
5
);
(
png_byte
)(
pow
((
double
)
png_ptr
->
background
.
green
/
255
,
g
)
*
255
.
0
+
0
.
5
);
back_1
.
blue
=
(
png_byte
)(
pow
((
double
)
png_ptr
->
background
.
blue
/
255
,
g
)
*
255
.
0
+
0
.
5
);
}
}
for
(
i
=
0
;
i
<
num_palette
;
i
++
)
for
(
i
=
0
;
i
<
num_palette
;
i
++
)
...
...
pngrutil.c
浏览文件 @
8f8fb6ae
/* pngrutil.c - utilities to read a PNG file
/* pngrutil.c - utilities to read a PNG file
*
*
* libpng 1.0.0
* libpng 1.0.0
a
* For conditions of distribution and use, see copyright notice in png.h
* For conditions of distribution and use, see copyright notice in png.h
* Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.
* Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.
* Copyright (c) 1996, 1997 Andreas Dilger
* Copyright (c) 1996, 1997 Andreas Dilger
* Copyright (c) 1998, Glenn Randers-Pehrson
* Copyright (c) 1998, Glenn Randers-Pehrson
* March
8
, 1998
* March
9
, 1998
*
*
* This file contains routines which are only called from within
* This file contains routines which are only called from within
* libpng itself during the course of reading an image.
* libpng itself during the course of reading an image.
...
...
pngset.c
浏览文件 @
8f8fb6ae
/* pngset.c - storage of image information into info struct
/* pngset.c - storage of image information into info struct
*
*
* libpng 1.0.0
* libpng 1.0.0
a
* For conditions of distribution and use, see copyright notice in png.h
* For conditions of distribution and use, see copyright notice in png.h
* Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.
* Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.
* Copyright (c) 1996, 1997 Andreas Dilger
* Copyright (c) 1996, 1997 Andreas Dilger
* Copyright (c) 1998, Glenn Randers-Pehrson
* Copyright (c) 1998, Glenn Randers-Pehrson
* March
8
, 1998
* March
9
, 1998
*
*
* The functions here are used during reads to store data from the file
* The functions here are used during reads to store data from the file
* into the info struct, and during writes to store application data
* into the info struct, and during writes to store application data
...
...
pngtest.c
浏览文件 @
8f8fb6ae
/* pngtest.c - a simple test program to test libpng
/* pngtest.c - a simple test program to test libpng
*
*
* libpng 1.0.0
* libpng 1.0.0
a
* For conditions of distribution and use, see copyright notice in png.h
* For conditions of distribution and use, see copyright notice in png.h
* Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.
* Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.
* Copyright (c) 1996, 1997 Andreas Dilger
* Copyright (c) 1996, 1997 Andreas Dilger
* Copyright (c) 1998, Glenn Randers-Pehrson
* Copyright (c) 1998, Glenn Randers-Pehrson
* March
8
, 1998
* March
9
, 1998
*
*
* This program reads in a PNG image, writes it out again, and then
* This program reads in a PNG image, writes it out again, and then
* compares the two files. If the files are identical, this shows that
* compares the two files. If the files are identical, this shows that
...
...
pngtrans.c
浏览文件 @
8f8fb6ae
/* pngtrans.c - transforms the data in a row (used by both readers and writers)
/* pngtrans.c - transforms the data in a row (used by both readers and writers)
*
*
* libpng 1.0.0
* libpng 1.0.0
a
* For conditions of distribution and use, see copyright notice in png.h
* For conditions of distribution and use, see copyright notice in png.h
* Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.
* Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.
* Copyright (c) 1996, 1997 Andreas Dilger
* Copyright (c) 1996, 1997 Andreas Dilger
* Copyright (c) 1998, Glenn Randers-Pehrson
* Copyright (c) 1998, Glenn Randers-Pehrson
* March
8
, 1998
* March
9
, 1998
*/
*/
#define PNG_INTERNAL
#define PNG_INTERNAL
...
...
pngwio.c
浏览文件 @
8f8fb6ae
/* pngwio.c - functions for data output
/* pngwio.c - functions for data output
*
*
* libpng 1.0.0
* libpng 1.0.0
a
* For conditions of distribution and use, see copyright notice in png.h
* For conditions of distribution and use, see copyright notice in png.h
* Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.
* Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.
* Copyright (c) 1996, 1997 Andreas Dilger
* Copyright (c) 1996, 1997 Andreas Dilger
* Copyright (c) 1998, Glenn Randers-Pehrson
* Copyright (c) 1998, Glenn Randers-Pehrson
* March
8
, 1998
* March
9
, 1998
*
*
* This file provides a location for all output. Users which need
* This file provides a location for all output. Users which need
* special handling are expected to write functions which have the same
* special handling are expected to write functions which have the same
...
...
pngwrite.c
浏览文件 @
8f8fb6ae
/* pngwrite.c - general routines to write a PNG file
/* pngwrite.c - general routines to write a PNG file
*
*
* libpng 1.0.0
* libpng 1.0.0
a
* For conditions of distribution and use, see copyright notice in png.h
* For conditions of distribution and use, see copyright notice in png.h
* Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.
* Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.
* Copyright (c) 1996, 1997 Andreas Dilger
* Copyright (c) 1996, 1997 Andreas Dilger
* Copyright (c) 1998, Glenn Randers-Pehrson
* Copyright (c) 1998, Glenn Randers-Pehrson
* March
8
, 1998
* March
9
, 1998
*/
*/
/* get internal access to png.h */
/* get internal access to png.h */
...
@@ -239,7 +239,7 @@ png_convert_to_rfc1123(png_structp png_ptr, png_timep ptime)
...
@@ -239,7 +239,7 @@ png_convert_to_rfc1123(png_structp png_ptr, png_timep ptime)
{
{
char
near_time_buf
[
29
];
char
near_time_buf
[
29
];
sprintf
(
near_time_buf
,
"%d %s %d %02d:%02d:%02d +0000"
,
sprintf
(
near_time_buf
,
"%d %s %d %02d:%02d:%02d +0000"
,
ptime
->
day
%
31
,
short_months
[
ptime
->
month
],
ptime
->
day
%
31
,
short_months
[
ptime
->
month
-
1
],
ptime
->
year
,
ptime
->
hour
%
24
,
ptime
->
minute
%
60
,
ptime
->
year
,
ptime
->
hour
%
24
,
ptime
->
minute
%
60
,
ptime
->
second
%
61
);
ptime
->
second
%
61
);
png_memcpy
(
png_ptr
->
time_buffer
,
near_time_buf
,
png_memcpy
(
png_ptr
->
time_buffer
,
near_time_buf
,
...
@@ -247,7 +247,7 @@ png_convert_to_rfc1123(png_structp png_ptr, png_timep ptime)
...
@@ -247,7 +247,7 @@ png_convert_to_rfc1123(png_structp png_ptr, png_timep ptime)
}
}
#else
#else
sprintf
(
png_ptr
->
time_buffer
,
"%d %s %d %02d:%02d:%02d +0000"
,
sprintf
(
png_ptr
->
time_buffer
,
"%d %s %d %02d:%02d:%02d +0000"
,
ptime
->
day
%
31
,
short_months
[
ptime
->
month
],
ptime
->
day
%
31
,
short_months
[
ptime
->
month
-
1
],
ptime
->
year
,
ptime
->
hour
%
24
,
ptime
->
minute
%
60
,
ptime
->
year
,
ptime
->
hour
%
24
,
ptime
->
minute
%
60
,
ptime
->
second
%
61
);
ptime
->
second
%
61
);
#endif
#endif
...
...
pngwtran.c
浏览文件 @
8f8fb6ae
/* pngwtran.c - transforms the data in a row for PNG writers
/* pngwtran.c - transforms the data in a row for PNG writers
*
*
* libpng 1.0.0
* libpng 1.0.0
a
* For conditions of distribution and use, see copyright notice in png.h
* For conditions of distribution and use, see copyright notice in png.h
* Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.
* Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.
* Copyright (c) 1996, 1997 Andreas Dilger
* Copyright (c) 1996, 1997 Andreas Dilger
* Copyright (c) 1998, Glenn Randers-Pehrson
* Copyright (c) 1998, Glenn Randers-Pehrson
* March
8
, 1998
* March
9
, 1998
*/
*/
#define PNG_INTERNAL
#define PNG_INTERNAL
...
...
pngwutil.c
浏览文件 @
8f8fb6ae
/* pngwutil.c - utilities to write a PNG file
/* pngwutil.c - utilities to write a PNG file
*
*
* libpng 1.0.0
* libpng 1.0.0
a
* For conditions of distribution and use, see copyright notice in png.h
* For conditions of distribution and use, see copyright notice in png.h
* Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.
* Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.
* Copyright (c) 1996, 1997 Andreas Dilger
* Copyright (c) 1996, 1997 Andreas Dilger
* Copyright (c) 1998, Glenn Randers-Pehrson
* Copyright (c) 1998, Glenn Randers-Pehrson
* March
8
, 1998
* March
9
, 1998
*/
*/
#define PNG_INTERNAL
#define PNG_INTERNAL
...
@@ -340,7 +340,7 @@ png_write_gAMA(png_structp png_ptr, double file_gamma)
...
@@ -340,7 +340,7 @@ png_write_gAMA(png_structp png_ptr, double file_gamma)
png_byte
buf
[
4
];
png_byte
buf
[
4
];
png_debug
(
1
,
"in png_write_gAMA
\n
"
);
png_debug
(
1
,
"in png_write_gAMA
\n
"
);
/* file_gamma is saved in 1/100
,
000ths */
/* file_gamma is saved in 1/100
0
000ths */
igamma
=
(
png_uint_32
)(
file_gamma
*
100000
.
0
+
0
.
5
);
igamma
=
(
png_uint_32
)(
file_gamma
*
100000
.
0
+
0
.
5
);
png_save_uint_32
(
buf
,
igamma
);
png_save_uint_32
(
buf
,
igamma
);
png_write_chunk
(
png_ptr
,
png_gAMA
,
buf
,
(
png_size_t
)
4
);
png_write_chunk
(
png_ptr
,
png_gAMA
,
buf
,
(
png_size_t
)
4
);
...
@@ -426,7 +426,7 @@ png_write_cHRM(png_structp png_ptr, double white_x, double white_y,
...
@@ -426,7 +426,7 @@ png_write_cHRM(png_structp png_ptr, double white_x, double white_y,
png_byte
buf
[
32
];
png_byte
buf
[
32
];
png_debug
(
1
,
"in png_write_cHRM
\n
"
);
png_debug
(
1
,
"in png_write_cHRM
\n
"
);
/* each value is saved int 1/100
,
000ths */
/* each value is saved int 1/100
0
000ths */
if
(
white_x
<
0
||
white_x
>
0
.
8
||
white_y
<
0
||
white_y
>
0
.
8
||
if
(
white_x
<
0
||
white_x
>
0
.
8
||
white_y
<
0
||
white_y
>
0
.
8
||
white_x
+
white_y
>
1
.
0
)
white_x
+
white_y
>
1
.
0
)
{
{
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录