Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openanolis
dragonwell8_jdk
提交
2aef8baa
D
dragonwell8_jdk
项目概览
openanolis
/
dragonwell8_jdk
通知
4
Star
2
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
D
dragonwell8_jdk
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
2aef8baa
编写于
6月 12, 2019
作者:
S
serb
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
8217676: Upgrade libpng to 1.6.37
Reviewed-by: prr, jdv, kcr
上级
bd3ca404
变更
23
隐藏空白更改
内联
并排
Showing
23 changed file
with
643 addition
and
569 deletion
+643
-569
THIRD_PARTY_README
THIRD_PARTY_README
+91
-62
make/lib/Awt2dLibraries.gmk
make/lib/Awt2dLibraries.gmk
+1
-0
src/share/native/sun/awt/libpng/CHANGES
src/share/native/sun/awt/libpng/CHANGES
+43
-5
src/share/native/sun/awt/libpng/LICENSE
src/share/native/sun/awt/libpng/LICENSE
+89
-88
src/share/native/sun/awt/libpng/README
src/share/native/sun/awt/libpng/README
+36
-75
src/share/native/sun/awt/libpng/png.c
src/share/native/sun/awt/libpng/png.c
+22
-28
src/share/native/sun/awt/libpng/png.h
src/share/native/sun/awt/libpng/png.h
+141
-172
src/share/native/sun/awt/libpng/pngconf.h
src/share/native/sun/awt/libpng/pngconf.h
+9
-9
src/share/native/sun/awt/libpng/pngdebug.h
src/share/native/sun/awt/libpng/pngdebug.h
+3
-3
src/share/native/sun/awt/libpng/pngerror.c
src/share/native/sun/awt/libpng/pngerror.c
+6
-6
src/share/native/sun/awt/libpng/pngget.c
src/share/native/sun/awt/libpng/pngget.c
+3
-3
src/share/native/sun/awt/libpng/pnginfo.h
src/share/native/sun/awt/libpng/pnginfo.h
+3
-3
src/share/native/sun/awt/libpng/pnglibconf.h
src/share/native/sun/awt/libpng/pnglibconf.h
+9
-6
src/share/native/sun/awt/libpng/pngmem.c
src/share/native/sun/awt/libpng/pngmem.c
+3
-3
src/share/native/sun/awt/libpng/pngpread.c
src/share/native/sun/awt/libpng/pngpread.c
+8
-8
src/share/native/sun/awt/libpng/pngpriv.h
src/share/native/sun/awt/libpng/pngpriv.h
+33
-6
src/share/native/sun/awt/libpng/pngread.c
src/share/native/sun/awt/libpng/pngread.c
+22
-16
src/share/native/sun/awt/libpng/pngrio.c
src/share/native/sun/awt/libpng/pngrio.c
+3
-3
src/share/native/sun/awt/libpng/pngrtran.c
src/share/native/sun/awt/libpng/pngrtran.c
+78
-38
src/share/native/sun/awt/libpng/pngrutil.c
src/share/native/sun/awt/libpng/pngrutil.c
+19
-20
src/share/native/sun/awt/libpng/pngset.c
src/share/native/sun/awt/libpng/pngset.c
+6
-6
src/share/native/sun/awt/libpng/pngstruct.h
src/share/native/sun/awt/libpng/pngstruct.h
+9
-3
src/share/native/sun/awt/libpng/pngtrans.c
src/share/native/sun/awt/libpng/pngtrans.c
+6
-6
未找到文件。
THIRD_PARTY_README
浏览文件 @
2aef8baa
...
@@ -1470,60 +1470,90 @@ included with JDK 8 and OpenJDK 8 source distributions.
...
@@ -1470,60 +1470,90 @@ included with JDK 8 and OpenJDK 8 source distributions.
-------------------------------------------------------------------------------
-------------------------------------------------------------------------------
%% This notice is provided with respect to libpng 1.6.3
5
, which may be
%% This notice is provided with respect to libpng 1.6.3
7
, which may be
included with JRE 8, JDK 8, and OpenJDK 8.
included with JRE 8, JDK 8, and OpenJDK 8.
--- begin of LICENSE ---
--- begin of LICENSE ---
This copy of the libpng notices is provided for your convenience. In case of
COPYRIGHT NOTICE, DISCLAIMER, and LICENSE
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:
PNG Reference Library License version 2
---------------------------------------
If you modify libpng you may insert additional notices immediately following
* Copyright (c) 1995-2019 The PNG Reference Library Authors.
this sentence.
* Copyright (c) 2018-2019 Cosmin Truta.
* Copyright (c) 2000-2002, 2004, 2006-2018 Glenn Randers-Pehrson.
* Copyright (c) 1996-1997 Andreas Dilger.
* Copyright (c) 1995-1996 Guy Eric Schalnat, Group 42, Inc.
This code is released under the libpng license.
The software is supplied "as is", without warranty of any kind,
express or implied, including, without limitation, the warranties
of merchantability, fitness for a particular purpose, title, and
non-infringement. In no event shall the Copyright owners, or
anyone distributing the software, be liable for any damages or
other liability, whether in contract, tort or otherwise, arising
from, out of, or in connection with the software, or the use or
other dealings in the software, even if advised of the possibility
of such damage.
libpng versions 1.0.7, July 1, 2000 through 1.6.35, July 15, 2018 are
Permission is hereby granted to use, copy, modify, and distribute
this software, or portions hereof, for any purpose, without fee,
subject to the following restrictions:
1. The origin of this software must not be misrepresented; you
must not claim that you wrote the original software. If you
use this software in a product, an acknowledgment in the product
documentation would be appreciated, but is not required.
2. Altered source versions must be plainly marked as such, and must
not be misrepresented as being the original software.
3. This Copyright notice may not be removed or altered from any
source or altered source distribution.
PNG Reference Library License version 1 (for libpng 0.5 through 1.6.35)
-----------------------------------------------------------------------
libpng versions 1.0.7, July 1, 2000, through 1.6.35, July 15, 2018 are
Copyright (c) 2000-2002, 2004, 2006-2018 Glenn Randers-Pehrson, are
Copyright (c) 2000-2002, 2004, 2006-2018 Glenn Randers-Pehrson, are
derived from libpng-1.0.6, and are distributed according to the same
derived from libpng-1.0.6, and are distributed according to the same
disclaimer and license as libpng-1.0.6 with the following individuals
disclaimer and license as libpng-1.0.6 with the following individuals
added to the list of Contributing Authors:
added to the list of Contributing Authors:
Simon-Pierre Cadieux
Simon-Pierre Cadieux
Eric S. Raymond
Eric S. Raymond
Mans Rullgard
Mans Rullgard
Cosmin Truta
Cosmin Truta
Gilles Vollant
Gilles Vollant
James Yu
James Yu
Mandar Sahastrabuddhe
Mandar Sahastrabuddhe
Google Inc.
Google Inc.
Vadim Barkov
Vadim Barkov
and with the following additions to the disclaimer:
and with the following additions to the disclaimer:
There is no warranty against interference with your enjoyment of the
There is no warranty against interference with your enjoyment of
library or against infringement. There is no warranty that our
the
library or against infringement. There is no warranty that our
efforts or the library will fulfill any of your particular purposes
efforts or the library will fulfill any of your particular purposes
or needs. This library is provided with all faults, and the entire
or needs. This library is provided with all faults, and the entire
risk of satisfactory quality, performance, accuracy, and effort is with
risk of satisfactory quality, performance, accuracy, and effort is
the user.
with
the user.
Some files in the "contrib" directory and some configure-generated
Some files in the "contrib" directory and some configure-generated
files that are distributed with libpng have other copyright owners and
files that are distributed with libpng have other copyright owners
,
and
are released under other open source licenses.
are released under other open source licenses.
libpng versions 0.97, January 1998, through 1.0.6, March 20, 2000, are
libpng versions 0.97, January 1998, through 1.0.6, March 20, 2000, are
Copyright (c) 1998-2000 Glenn Randers-Pehrson, are derived from
Copyright (c) 1998-2000 Glenn Randers-Pehrson, are derived from
libpng-0.96, and are distributed according to the same disclaimer and
libpng-0.96, and are distributed according to the same disclaimer and
license as libpng-0.96, with the following individuals added to the
list
license as libpng-0.96, with the following individuals added to the
of Contributing Authors:
list
of Contributing Authors:
Tom Lane
Tom Lane
Glenn Randers-Pehrson
Glenn Randers-Pehrson
Willem van Schaik
Willem van Schaik
libpng versions 0.89, June 1996, through 0.96, May 1997, are
libpng versions 0.89, June 1996, through 0.96, May 1997, are
Copyright (c) 1996-1997 Andreas Dilger, are derived from libpng-0.88,
Copyright (c) 1996-1997 Andreas Dilger, are derived from libpng-0.88,
...
@@ -1531,14 +1561,14 @@ and are distributed according to the same disclaimer and license as
...
@@ -1531,14 +1561,14 @@ and are distributed according to the same disclaimer and license as
libpng-0.88, with the following individuals added to the list of
libpng-0.88, with the following individuals added to the list of
Contributing Authors:
Contributing Authors:
John Bowler
John Bowler
Kevin Bracey
Kevin Bracey
Sam Bushell
Sam Bushell
Magnus Holmgren
Magnus Holmgren
Greg Roelofs
Greg Roelofs
Tom Tanner
Tom Tanner
Some files in the "scripts" directory have other copyright owners
Some files in the "scripts" directory have other copyright owners
,
but are released under this license.
but are released under this license.
libpng versions 0.5, May 1995, through 0.88, January 1996, are
libpng versions 0.5, May 1995, through 0.88, January 1996, are
...
@@ -1547,39 +1577,38 @@ Copyright (c) 1995-1996 Guy Eric Schalnat, Group 42, Inc.
...
@@ -1547,39 +1577,38 @@ Copyright (c) 1995-1996 Guy Eric Schalnat, Group 42, Inc.
For the purposes of this copyright and license, "Contributing Authors"
For the purposes of this copyright and license, "Contributing Authors"
is defined as the following set of individuals:
is defined as the following set of individuals:
Andreas Dilger
Andreas Dilger
Dave Martindale
Dave Martindale
Guy Eric Schalnat
Guy Eric Schalnat
Paul Schmidt
Paul Schmidt
Tim Wegner
Tim Wegner
The PNG Reference Library is supplied "AS IS". The Contributing Authors
The PNG Reference Library is supplied "AS IS". The Contributing
and Group 42, Inc. disclaim all warranties, expressed or implied,
Authors and Group 42, Inc. disclaim all warranties, expressed or
including, without limitation, the warranties of merchantability and of
implied, including, without limitation, the warranties of
fitness for any purpose. The Contributing Authors and Group 42, Inc.
merchantability and of fitness for any purpose. The Contributing
assume no liability for direct, indirect, incidental, special, exemplary,
Authors and Group 42, Inc. assume no liability for direct, indirect,
or consequential damages, which may result from the use of the PNG
incidental, special, exemplary, or consequential damages, which may
Reference Library, even if advised of the possibility of such damage.
result from the use of the PNG Reference Library, even if advised of
the possibility of such damage.
Permission is hereby granted to use, copy, modify, and distribute this
Permission is hereby granted to use, copy, modify, and distribute this
source code, or portions hereof, for any purpose, without fee, subject
source code, or portions hereof, for any purpose, without fee, subject
to the following restrictions:
to the following restrictions:
1. The origin of this source code must not be misrepresented.
1. The origin of this source code must not be misrepresented.
2. Altered versions must be plainly marked as such and must not
be misrepresented as being the original source.
3. This Copyright notice may not be removed or altered from any
2. Altered versions must be plainly marked as such and must not
source or altered source distribution
.
be misrepresented as being the original source
.
The Contributing Authors and Group 42, Inc. specifically permit, without
3. This Copyright notice may not be removed or altered from any
fee, and encourage the use of this source code as a component to
source or altered source distribution.
supporting the PNG file format in commercial products. If you use this
source code in a product, acknowledgment is not required but would be
appreciated.
END OF COPYRIGHT NOTICE, DISCLAIMER, and LICENSE.
The Contributing Authors and Group 42, Inc. specifically permit,
without fee, and encourage the use of this source code as a component
to supporting the PNG file format in commercial products. If you use
this source code in a product, acknowledgment is not required but would
be appreciated.
TRADEMARK:
TRADEMARK:
...
...
make/lib/Awt2dLibraries.gmk
浏览文件 @
2aef8baa
...
@@ -1149,6 +1149,7 @@ ifndef BUILD_HEADLESS_ONLY
...
@@ -1149,6 +1149,7 @@ ifndef BUILD_HEADLESS_ONLY
endif
endif
LIBSPLASHSCREEN_CFLAGS := -DSPLASHSCREEN -DPNG_NO_MMX_CODE \
LIBSPLASHSCREEN_CFLAGS := -DSPLASHSCREEN -DPNG_NO_MMX_CODE \
-DPNG_ARM_NEON_OPT=0 -DPNG_ARM_NEON_IMPLEMENTATION=0 \
$(foreach dir, $(LIBSPLASHSCREEN_DIRS), -I$(dir))
$(foreach dir, $(LIBSPLASHSCREEN_DIRS), -I$(dir))
ifeq ($(OPENJDK_TARGET_OS), macosx)
ifeq ($(OPENJDK_TARGET_OS), macosx)
...
...
src/share/native/sun/awt/libpng/CHANGES
浏览文件 @
2aef8baa
...
@@ -6063,9 +6063,47 @@ Version 1.6.35 [July 15, 2018]
...
@@ -6063,9 +6063,47 @@ Version 1.6.35 [July 15, 2018]
Added missing parentheses to a macro definition
Added missing parentheses to a macro definition
(suggested by "irwir" in GitHub issue #216)
(suggested by "irwir" in GitHub issue #216)
Send comments/corrections/commendations to png-mng-implement at lists.sf.net
Version 1.6.36 [December 1, 2018]
(subscription required; visit
Optimized png_do_expand_palette for ARM processors.
Improved performance by around 10-22% on a recent ARM Chromebook.
(Contributed by Richard Townsend, ARM Holdings)
Fixed manipulation of machine-specific optimization options.
(Contributed by Vicki Pfau)
Used memcpy instead of manual pointer arithmetic on Intel SSE2.
(Contributed by Samuel Williams)
Fixed build errors with MSVC on ARM64.
(Contributed by Zhijie Liang)
Fixed detection of libm in CMakeLists.
(Contributed by Cameron Cawley)
Fixed incorrect creation of pkg-config file in CMakeLists.
(Contributed by Kyle Bentley)
Fixed the CMake build on Windows MSYS by avoiding symlinks.
Fixed a build warning on OpenBSD.
(Contributed by Theo Buehler)
Fixed various typos in comments.
(Contributed by "luz.paz")
Raised the minimum required CMake version from 3.0.2 to 3.1.
Removed yet more of the vestigial support for pre-ANSI C compilers.
Removed ancient makefiles for ancient systems that have been broken
across all previous libpng-1.6.x versions.
Removed the Y2K compliance statement and the export control
information.
Applied various code style and documentation fixes.
Version 1.6.37 [April 14, 2019]
Fixed a use-after-free vulnerability (CVE-2019-7317) in png_image_free.
Fixed a memory leak in the ARM NEON implementation of png_do_expand_palette.
Fixed a memory leak in pngtest.c.
Fixed two vulnerabilities (CVE-2018-14048, CVE-2018-14550) in
contrib/pngminus; refactor.
Changed the license of contrib/pngminus to MIT; refresh makefile and docs.
(Contributed by Willem van Schaik)
Fixed a typo in the libpng license v2.
(Contributed by Miguel Ojeda)
Added makefiles for AddressSanitizer-enabled builds.
Cleaned up various makefiles.
Send comments/corrections/commendations to png-mng-implement at lists.sf.net.
Subscription is required; visit
https://lists.sourceforge.net/lists/listinfo/png-mng-implement
https://lists.sourceforge.net/lists/listinfo/png-mng-implement
to subscribe).
to subscribe.
Glenn R-P
src/share/native/sun/awt/libpng/LICENSE
浏览文件 @
2aef8baa
COPYRIGHT NOTICE, DISCLAIMER, and LICENSE
=========================================
This copy of the libpng notices is provided for your convenience. In case of
PNG Reference Library License version 2
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:
* Copyright (c) 1995-2019 The PNG Reference Library Authors.
* Copyright (c) 2018-2019 Cosmin Truta.
* Copyright (c) 2000-2002, 2004, 2006-2018 Glenn Randers-Pehrson.
* Copyright (c) 1996-1997 Andreas Dilger.
* Copyright (c) 1995-1996 Guy Eric Schalnat, Group 42, Inc.
If you modify libpng you may insert additional notices immediately following
The software is supplied "as is", without warranty of any kind,
this sentence.
express or implied, including, without limitation, the warranties
of merchantability, fitness for a particular purpose, title, and
non-infringement. In no event shall the Copyright owners, or
anyone distributing the software, be liable for any damages or
other liability, whether in contract, tort or otherwise, arising
from, out of, or in connection with the software, or the use or
other dealings in the software, even if advised of the possibility
of such damage.
This code is released under the libpng license.
Permission is hereby granted to use, copy, modify, and distribute
this software, or portions hereof, for any purpose, without fee,
subject to the following restrictions:
libpng versions 1.0.7, July 1, 2000 through 1.6.35, July 15, 2018 are
1. The origin of this software must not be misrepresented; you
must not claim that you wrote the original software. If you
use this software in a product, an acknowledgment in the product
documentation would be appreciated, but is not required.
2. Altered source versions must be plainly marked as such, and must
not be misrepresented as being the original software.
3. This Copyright notice may not be removed or altered from any
source or altered source distribution.
PNG Reference Library License version 1 (for libpng 0.5 through 1.6.35)
-----------------------------------------------------------------------
libpng versions 1.0.7, July 1, 2000, through 1.6.35, July 15, 2018 are
Copyright (c) 2000-2002, 2004, 2006-2018 Glenn Randers-Pehrson, are
Copyright (c) 2000-2002, 2004, 2006-2018 Glenn Randers-Pehrson, are
derived from libpng-1.0.6, and are distributed according to the same
derived from libpng-1.0.6, and are distributed according to the same
disclaimer and license as libpng-1.0.6 with the following individuals
disclaimer and license as libpng-1.0.6 with the following individuals
added to the list of Contributing Authors:
added to the list of Contributing Authors:
Simon-Pierre Cadieux
Simon-Pierre Cadieux
Eric S. Raymond
Eric S. Raymond
Mans Rullgard
Mans Rullgard
Cosmin Truta
Cosmin Truta
Gilles Vollant
Gilles Vollant
James Yu
James Yu
Mandar Sahastrabuddhe
Mandar Sahastrabuddhe
Google Inc.
Google Inc.
Vadim Barkov
Vadim Barkov
and with the following additions to the disclaimer:
and with the following additions to the disclaimer:
There is no warranty against interference with your enjoyment of the
There is no warranty against interference with your enjoyment of
library or against infringement. There is no warranty that our
the
library or against infringement. There is no warranty that our
efforts or the library will fulfill any of your particular purposes
efforts or the library will fulfill any of your particular purposes
or needs. This library is provided with all faults, and the entire
or needs. This library is provided with all faults, and the entire
risk of satisfactory quality, performance, accuracy, and effort is with
risk of satisfactory quality, performance, accuracy, and effort is
the user.
with
the user.
Some files in the "contrib" directory and some configure-generated
Some files in the "contrib" directory and some configure-generated
files that are distributed with libpng have other copyright owners and
files that are distributed with libpng have other copyright owners
,
and
are released under other open source licenses.
are released under other open source licenses.
libpng versions 0.97, January 1998, through 1.0.6, March 20, 2000, are
libpng versions 0.97, January 1998, through 1.0.6, March 20, 2000, are
Copyright (c) 1998-2000 Glenn Randers-Pehrson, are derived from
Copyright (c) 1998-2000 Glenn Randers-Pehrson, are derived from
libpng-0.96, and are distributed according to the same disclaimer and
libpng-0.96, and are distributed according to the same disclaimer and
license as libpng-0.96, with the following individuals added to the
list
license as libpng-0.96, with the following individuals added to the
of Contributing Authors:
list
of Contributing Authors:
Tom Lane
Tom Lane
Glenn Randers-Pehrson
Glenn Randers-Pehrson
Willem van Schaik
Willem van Schaik
libpng versions 0.89, June 1996, through 0.96, May 1997, are
libpng versions 0.89, June 1996, through 0.96, May 1997, are
Copyright (c) 1996-1997 Andreas Dilger, are derived from libpng-0.88,
Copyright (c) 1996-1997 Andreas Dilger, are derived from libpng-0.88,
...
@@ -55,14 +84,14 @@ and are distributed according to the same disclaimer and license as
...
@@ -55,14 +84,14 @@ and are distributed according to the same disclaimer and license as
libpng-0.88, with the following individuals added to the list of
libpng-0.88, with the following individuals added to the list of
Contributing Authors:
Contributing Authors:
John Bowler
John Bowler
Kevin Bracey
Kevin Bracey
Sam Bushell
Sam Bushell
Magnus Holmgren
Magnus Holmgren
Greg Roelofs
Greg Roelofs
Tom Tanner
Tom Tanner
Some files in the "scripts" directory have other copyright owners
Some files in the "scripts" directory have other copyright owners
,
but are released under this license.
but are released under this license.
libpng versions 0.5, May 1995, through 0.88, January 1996, are
libpng versions 0.5, May 1995, through 0.88, January 1996, are
...
@@ -71,63 +100,35 @@ Copyright (c) 1995-1996 Guy Eric Schalnat, Group 42, Inc.
...
@@ -71,63 +100,35 @@ Copyright (c) 1995-1996 Guy Eric Schalnat, Group 42, Inc.
For the purposes of this copyright and license, "Contributing Authors"
For the purposes of this copyright and license, "Contributing Authors"
is defined as the following set of individuals:
is defined as the following set of individuals:
Andreas Dilger
Andreas Dilger
Dave Martindale
Dave Martindale
Guy Eric Schalnat
Guy Eric Schalnat
Paul Schmidt
Paul Schmidt
Tim Wegner
Tim Wegner
The PNG Reference Library is supplied "AS IS". The Contributing Authors
The PNG Reference Library is supplied "AS IS". The Contributing
and Group 42, Inc. disclaim all warranties, expressed or implied,
Authors and Group 42, Inc. disclaim all warranties, expressed or
including, without limitation, the warranties of merchantability and of
implied, including, without limitation, the warranties of
fitness for any purpose. The Contributing Authors and Group 42, Inc.
merchantability and of fitness for any purpose. The Contributing
assume no liability for direct, indirect, incidental, special, exemplary,
Authors and Group 42, Inc. assume no liability for direct, indirect,
or consequential damages, which may result from the use of the PNG
incidental, special, exemplary, or consequential damages, which may
Reference Library, even if advised of the possibility of such damage.
result from the use of the PNG Reference Library, even if advised of
the possibility of such damage.
Permission is hereby granted to use, copy, modify, and distribute this
Permission is hereby granted to use, copy, modify, and distribute this
source code, or portions hereof, for any purpose, without fee, subject
source code, or portions hereof, for any purpose, without fee, subject
to the following restrictions:
to the following restrictions:
1. The origin of this source code must not be misrepresented.
1. The origin of this source code must not be misrepresented.
2. Altered versions must be plainly marked as such and must not
be misrepresented as being the original source.
3. This Copyright notice may not be removed or altered from any
source or altered source distribution.
The Contributing Authors and Group 42, Inc. specifically permit, without
fee, and encourage the use of this source code as a component to
supporting the PNG file format in commercial products. If you use this
source code in a product, acknowledgment is not required but would be
appreciated.
END OF COPYRIGHT NOTICE, DISCLAIMER, and LICENSE.
TRADEMARK:
The name "libpng" has not been registered by the Copyright owner
as a trademark in any jurisdiction. However, because libpng has
been distributed and maintained world-wide, continually since 1995,
the Copyright owner claims "common-law trademark protection" in any
jurisdiction where common-law trademark is recognized.
OSI CERTIFICATION:
Libpng is OSI Certified Open Source Software. OSI Certified Open Source is
a certification mark of the Open Source Initiative. OSI has not addressed
the additional disclaimers inserted at version 1.0.7.
EXPORT CONTROL:
2. Altered versions must be plainly marked as such and must not
be misrepresented as being the original source.
The Copyright owner believes that the Export Control Classification
3. This Copyright notice may not be removed or altered from any
Number (ECCN) for libpng is EAR99, which means not subject to export
source or altered source distribution.
controls or International Traffic in Arms Regulations (ITAR) because
it is open source, publicly available software, that does not contain
any encryption software. See the EAR, paragraphs 734.3(b)(3) and
734.7(b).
Glenn Randers-Pehrson
The Contributing Authors and Group 42, Inc. specifically permit,
glennrp at users.sourceforge.net
without fee, and encourage the use of this source code as a component
July 15, 2018
to supporting the PNG file format in commercial products. If you use
this source code in a product, acknowledgment is not required but would
be appreciated.
src/share/native/sun/awt/libpng/README
浏览文件 @
2aef8baa
README for libpng version 1.6.3
5 - July 15, 2018 (shared library 16.0)
README for libpng version 1.6.3
7 - April 14, 2019
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 comes in several distribution formats. Get libpng-*.tar.gz or
Libpng comes in several distribution formats. Get libpng-*.tar.gz or
libpng-*.tar.xz or if you want UNIX-style line endings in the text
files,
libpng-*.tar.xz or if you want UNIX-style line endings in the text
or lpng*.7z or lpng*.zip if you want DOS-style line endings.
files,
or lpng*.7z or lpng*.zip if you want DOS-style line endings.
Version 0.89 was the first official release of libpng. Don't let the
Version 0.89 was the first official release of libpng. Don't let the
fact that it's the first release fool you. The libpng library has been
in
fact that it's the first release fool you. The libpng library has been
extensive use and testing since mid-1995. By late 1997 it had
in
extensive use and testing since mid-1995. By late 1997 it had
finally gotten to the stage where there hadn't been significant
finally gotten to the stage where there hadn't been significant
changes to the API in some time, and people have a bad feeling about
changes to the API in some time, and people have a bad feeling about
libraries with versions < 1.0. Version 1.0.0 was released in
libraries with versions < 1.0. Version 1.0.0 was released in
...
@@ -60,59 +61,37 @@ the library action on the detection of chunk CRC errors. It is possible
...
@@ -60,59 +61,37 @@ the library action on the detection of chunk CRC errors. It is possible
to set different actions based on whether the CRC error occurred in a
to set different actions based on whether the CRC error occurred in a
critical or an ancillary chunk.
critical or an ancillary chunk.
The changes made to the library, and bugs fixed are based on discussions
For a detailed description on using libpng, read libpng-manual.txt.
on the PNG-implement mailing list and not on material submitted
For examples of libpng in a program, see example.c and pngtest.c. For
privately to Guy, Andreas, or Glenn. They will forward any good
usage information and restrictions (what little they are) on libpng,
suggestions to the list.
see png.h. For a description on using zlib (the compression library
used by libpng) and zlib's restrictions, see zlib.h
For a detailed description on using libpng, read libpng-manual.txt. For
examples of libpng in a program, see example.c and pngtest.c. For usage
information and restrictions (what little they are) on libpng, see
png.h. For a description on using zlib (the compression library used by
libpng) and zlib's restrictions, see zlib.h
I have included a general makefile, as well as several machine and
I have included a general makefile, as well as several machine and
compiler specific ones, but you may have to modify one for your own needs.
compiler specific ones, but you may have to modify one for your own
needs.
You should use zlib 1.0.4 or later to run this, but it MAY work with
You should use zlib 1.0.4 or later to run this, but it MAY work with
versions as old as zlib 0.95. Even so, there are bugs in older zlib
versions as old as zlib 0.95. Even so, there are bugs in older zlib
versions which can cause the output of invalid compression streams for
versions which can cause the output of invalid compression streams for
some images. You will definitely need zlib 1.0.4 or later if you are
some images.
taking advantage of the MS-DOS "far" structure allocation for the small
and medium memory models. You should also note that zlib is a
You should also note that zlib is a compression library that is useful
compression library that is useful for more things than just PNG files.
for more things than just PNG files. You can use zlib as a drop-in
You can use zlib as a drop-in replacement for fread() and fwrite() if
replacement for fread() and fwrite(), if you are so inclined.
you are so inclined.
zlib should be available at the same place that libpng is, or at zlib.net.
zlib should be available at the same place that libpng is, or at
https://zlib.net.
You may also want a copy of the PNG specification. It is available
You may also want a copy of the PNG specification. It is available
as an RFC, a W3C Recommendation, and an ISO/IEC Standard. You can find
as an RFC, a W3C Recommendation, and an ISO/IEC Standard. You can find
these at http://www.libpng.org/pub/png/pngdocs.html .
these at http://www.libpng.org/pub/png/pngdocs.html .
This code is currently being archived at libpng.sourceforge.io in the
This code is currently being archived at libpng.sourceforge.io in the
[DOWNLOAD] area, and at http://libpng.download/src . If you
[DOWNLOAD] area, and at http://libpng.download/src .
can't find it in any of those places, e-mail me, and I'll help you find it.
This release, based in a large way on Glenn's, Guy's and Andreas'
I am not a lawyer, but I believe that the Export Control Classification
earlier work, was created and will be supported by myself and the PNG
Number (ECCN) for libpng is EAR99, which means not subject to export
controls or International Traffic in Arms Regulations (ITAR) because it
is open source, publicly available software, that does not contain any
encryption software. See the EAR, paragraphs 734.3(b)(3) and 734.7(b).
If you have any code changes, requests, problems, etc., please e-mail
them to me. Also, I'd appreciate any make files or project files,
and any modifications you needed to make to get libpng to compile,
along with a #define variable to tell what compiler/system you are on.
If you needed to add transformations to libpng, or wish libpng would
provide the image in a different way, drop me a note (and code, if
possible), so I can consider supporting the transformation.
Finally, if you get any warning messages when compiling libpng
(note: not zlib), and they are easy to fix, I'd appreciate the
fix. Please mention "libpng" somewhere in the subject line. Thanks.
This release was created and will be supported by myself (of course
based in a large way on Guy's and Andreas' earlier work), and the PNG
development group.
development group.
Send comments/corrections/commendations to png-mng-implement at
Send comments/corrections/commendations to png-mng-implement at
...
@@ -120,34 +99,21 @@ lists.sourceforge.net (subscription required; visit
...
@@ -120,34 +99,21 @@ lists.sourceforge.net (subscription required; visit
https://lists.sourceforge.net/lists/listinfo/png-mng-implement
https://lists.sourceforge.net/lists/listinfo/png-mng-implement
to subscribe).
to subscribe).
You can't reach Guy, the original libpng author, at the addresses
Send general questions about the PNG specification to png-mng-misc
given in previous versions of this document. He and Andreas will
at lists.sourceforge.net (subscription required; visit
read mail addressed to the png-implement list, however.
Please do not send general questions about PNG. Send them to
png-mng-misc at lists.sf.net (subscription required; visit
https://lists.sourceforge.net/lists/listinfo/png-mng-misc to
https://lists.sourceforge.net/lists/listinfo/png-mng-misc to
subscribe). If you have a question about something
subscribe).
in the PNG specification that is related to using libpng, send it
to me. Send me any questions that start with "I was using libpng,
and ...". If in doubt, send questions to me. I'll bounce them
to others, if necessary.
Please do not send suggestions on how to change PNG. We have
been discussing PNG for twenty years now, and it is official and
finished. If you have suggestions for libpng, however, I'll
gladly listen. Even if your suggestion is not used immediately,
it may be used later.
Files in this distribution:
Files in this distribution:
ANNOUNCE => Announcement of this version, with recent changes
ANNOUNCE => Announcement of this version, with recent changes
AUTHORS => List of contributing authors
CHANGES => Description of changes between libpng versions
CHANGES => Description of changes between libpng versions
KNOWNBUG => List of known bugs and deficiencies
KNOWNBUG => List of known bugs and deficiencies
LICENSE => License to use and redistribute libpng
LICENSE => License to use and redistribute libpng
README => This file
README => This file
TODO => Things not implemented in the current library
TODO => Things not implemented in the current library
Y2KINFO => Statement of Y2K compliance
TRADEMARK => Trademark information
example.c => Example code for using libpng functions
example.c => Example code for using libpng functions
libpng.3 => manual page for libpng (includes libpng-manual.txt)
libpng.3 => manual page for libpng (includes libpng-manual.txt)
libpng-manual.txt => Description of libpng and its functions
libpng-manual.txt => Description of libpng and its functions
...
@@ -208,15 +174,10 @@ Files in this distribution:
...
@@ -208,15 +174,10 @@ Files in this distribution:
scripts => Directory containing scripts for building libpng:
scripts => Directory containing scripts for building libpng:
(see scripts/README.txt for the list of scripts)
(see scripts/README.txt for the list of scripts)
Good luck, and happy coding.
Good luck, and happy coding!
-Glenn Randers-Pehrson (current maintainer, since 1998)
Internet: glennrp at users.sourceforge.net
-Andreas Eric Dilger (former maintainer, 1996-1997)
Internet: adilger at enel.ucalgary.ca
Web: http://www-mddsp.enel.ucalgary.ca/People/adilger/
-Guy Eric Schalnat (original author and former maintainer, 1995-1996)
* Cosmin Truta (current maintainer, since 2018)
(formerly of Group 42, Inc)
* Glenn Randers-Pehrson (former maintainer, 1998-2018)
Internet: gschal at infinet.com
* Andreas Eric Dilger (former maintainer, 1996-1997)
* Guy Eric Schalnat (original author and former maintainer, 1995-1996)
(formerly of Group 42, Inc.)
src/share/native/sun/awt/libpng/png.c
浏览文件 @
2aef8baa
...
@@ -29,10 +29,10 @@
...
@@ -29,10 +29,10 @@
* However, the following notice accompanied the original version of this
* However, the following notice accompanied the original version of this
* file and, per its terms, should not be removed:
* file and, per its terms, should not be removed:
*
*
*
Last changed in libpng 1.6.35 [July 15, 2018]
*
Copyright (c) 2018-2019 Cosmin Truta
* Copyright (c) 1998-2002,2004,2006-2018 Glenn Randers-Pehrson
* Copyright (c) 1998-2002,2004,2006-2018 Glenn Randers-Pehrson
*
(Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
*
Copyright (c) 1996-1997 Andreas Dilger
*
(Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
*
Copyright (c) 1995-1996 Guy Eric Schalnat, Group 42, Inc.
*
*
* This code is released under the libpng license.
* This code is released under the libpng license.
* For conditions of distribution and use, see the disclaimer
* For conditions of distribution and use, see the disclaimer
...
@@ -42,7 +42,7 @@
...
@@ -42,7 +42,7 @@
#include "pngpriv.h"
#include "pngpriv.h"
/* Generate a compiler error if there is an old png.h in the search path. */
/* Generate a compiler error if there is an old png.h in the search path. */
typedef
png_libpng_version_1_6_3
5
Your_png_h_is_not_version_1_6_35
;
typedef
png_libpng_version_1_6_3
7
Your_png_h_is_not_version_1_6_37
;
#ifdef __GNUC__
#ifdef __GNUC__
/* The version tests may need to be added to, but the problem warning has
/* The version tests may need to be added to, but the problem warning has
...
@@ -764,7 +764,7 @@ png_save_int_32(png_bytep buf, png_int_32 i)
...
@@ -764,7 +764,7 @@ png_save_int_32(png_bytep buf, png_int_32 i)
int
PNGAPI
int
PNGAPI
png_convert_to_rfc1123_buffer
(
char
out
[
29
],
png_const_timep
ptime
)
png_convert_to_rfc1123_buffer
(
char
out
[
29
],
png_const_timep
ptime
)
{
{
static
PNG_CONST
char
short_months
[
12
][
4
]
=
static
const
char
short_months
[
12
][
4
]
=
{
"Jan"
,
"Feb"
,
"Mar"
,
"Apr"
,
"May"
,
"Jun"
,
{
"Jan"
,
"Feb"
,
"Mar"
,
"Apr"
,
"May"
,
"Jun"
,
"Jul"
,
"Aug"
,
"Sep"
,
"Oct"
,
"Nov"
,
"Dec"
};
"Jul"
,
"Aug"
,
"Sep"
,
"Oct"
,
"Nov"
,
"Dec"
};
...
@@ -842,20 +842,14 @@ png_get_copyright(png_const_structrp png_ptr)
...
@@ -842,20 +842,14 @@ png_get_copyright(png_const_structrp png_ptr)
#ifdef PNG_STRING_COPYRIGHT
#ifdef PNG_STRING_COPYRIGHT
return
PNG_STRING_COPYRIGHT
return
PNG_STRING_COPYRIGHT
#else
#else
# ifdef __STDC__
return
PNG_STRING_NEWLINE
\
return
PNG_STRING_NEWLINE
\
"libpng version 1.6.35 - July 15, 2018"
PNG_STRING_NEWLINE
\
"libpng version 1.6.37"
PNG_STRING_NEWLINE
\
"Copyright (c) 2018-2019 Cosmin Truta"
PNG_STRING_NEWLINE
\
"Copyright (c) 1998-2002,2004,2006-2018 Glenn Randers-Pehrson"
\
"Copyright (c) 1998-2002,2004,2006-2018 Glenn Randers-Pehrson"
\
PNG_STRING_NEWLINE
\
PNG_STRING_NEWLINE
\
"Copyright (c) 1996-1997 Andreas Dilger"
PNG_STRING_NEWLINE
\
"Copyright (c) 1996-1997 Andreas Dilger"
PNG_STRING_NEWLINE
\
"Copyright (c) 1995-1996 Guy Eric Schalnat, Group 42, Inc."
\
"Copyright (c) 1995-1996 Guy Eric Schalnat, Group 42, Inc."
\
PNG_STRING_NEWLINE
;
PNG_STRING_NEWLINE
;
# else
return
"libpng version 1.6.35 - July 15, 2018\
Copyright (c) 1998-2002,2004,2006-2018 Glenn Randers-Pehrson\
Copyright (c) 1996-1997 Andreas Dilger\
Copyright (c) 1995-1996 Guy Eric Schalnat, Group 42, Inc."
;
# endif
#endif
#endif
}
}
...
@@ -1149,7 +1143,7 @@ png_colorspace_set_gamma(png_const_structrp png_ptr,
...
@@ -1149,7 +1143,7 @@ png_colorspace_set_gamma(png_const_structrp png_ptr,
png_colorspacerp
colorspace
,
png_fixed_point
gAMA
)
png_colorspacerp
colorspace
,
png_fixed_point
gAMA
)
{
{
/* Changed in libpng-1.5.4 to limit the values to ensure overflow can't
/* Changed in libpng-1.5.4 to limit the values to ensure overflow can't
* occur. Since the fixed point representation is asymetrical it is
* occur. Since the fixed point representation is asym
m
etrical it is
* possible for 1/gamma to overflow the limit of 21474 and this means the
* possible for 1/gamma to overflow the limit of 21474 and this means the
* gamma value must be at least 5/100000 and hence at most 20000.0. For
* gamma value must be at least 5/100000 and hence at most 20000.0. For
* safety the limits here are a little narrower. The values are 0.00016 to
* safety the limits here are a little narrower. The values are 0.00016 to
...
@@ -3162,11 +3156,11 @@ png_ascii_from_fp(png_const_structrp png_ptr, png_charp ascii, size_t size,
...
@@ -3162,11 +3156,11 @@ png_ascii_from_fp(png_const_structrp png_ptr, png_charp ascii, size_t size,
/* The total output count (max) is now 4+precision */
/* The total output count (max) is now 4+precision */
/* Check for an exponent, if we don't need one we are
/* Check for an exponent, if we don't need one we are
* done and just need to terminate the string. At
* done and just need to terminate the string. At
this
*
this point exp_b10==(-1) is effectively a flag -
it got
*
point, exp_b10==(-1) is effectively a flag:
it got
* to '-1' because of the decrement after outputting
* to '-1' because of the decrement
,
after outputting
* the decimal point above
(t
he exponent required is
* the decimal point above
. (T
he exponent required is
* *not* -1
!
)
* *not* -1
.
)
*/
*/
if
(
exp_b10
>=
(
-
1
)
&&
exp_b10
<=
2
)
if
(
exp_b10
>=
(
-
1
)
&&
exp_b10
<=
2
)
{
{
...
@@ -4004,18 +3998,18 @@ png_gamma_correct(png_structrp png_ptr, unsigned int value,
...
@@ -4004,18 +3998,18 @@ png_gamma_correct(png_structrp png_ptr, unsigned int value,
*/
*/
static
void
static
void
png_build_16bit_table
(
png_structrp
png_ptr
,
png_uint_16pp
*
ptable
,
png_build_16bit_table
(
png_structrp
png_ptr
,
png_uint_16pp
*
ptable
,
PNG_CONST
unsigned
int
shift
,
PNG_CONST
png_fixed_point
gamma_val
)
unsigned
int
shift
,
png_fixed_point
gamma_val
)
{
{
/* Various values derived from 'shift': */
/* Various values derived from 'shift': */
PNG_CONST
unsigned
int
num
=
1U
<<
(
8U
-
shift
);
unsigned
int
num
=
1U
<<
(
8U
-
shift
);
#ifdef PNG_FLOATING_ARITHMETIC_SUPPORTED
#ifdef PNG_FLOATING_ARITHMETIC_SUPPORTED
/* CSE the division and work round wacky GCC warnings (see the comments
/* CSE the division and work round wacky GCC warnings (see the comments
* in png_gamma_8bit_correct for where these come from.)
* in png_gamma_8bit_correct for where these come from.)
*/
*/
PNG_CONST
double
fmax
=
1
.
/
(((
png_int_32
)
1
<<
(
16U
-
shift
))
-
1
);
double
fmax
=
1
.
0
/
(((
png_int_32
)
1
<<
(
16U
-
shift
))
-
1
);
#endif
#endif
PNG_CONST
unsigned
int
max
=
(
1U
<<
(
16U
-
shift
))
-
1U
;
unsigned
int
max
=
(
1U
<<
(
16U
-
shift
))
-
1U
;
PNG_CONST
unsigned
int
max_by_2
=
1U
<<
(
15U
-
shift
);
unsigned
int
max_by_2
=
1U
<<
(
15U
-
shift
);
unsigned
int
i
;
unsigned
int
i
;
png_uint_16pp
table
=
*
ptable
=
png_uint_16pp
table
=
*
ptable
=
...
@@ -4081,10 +4075,10 @@ png_build_16bit_table(png_structrp png_ptr, png_uint_16pp *ptable,
...
@@ -4081,10 +4075,10 @@ png_build_16bit_table(png_structrp png_ptr, png_uint_16pp *ptable,
*/
*/
static
void
static
void
png_build_16to8_table
(
png_structrp
png_ptr
,
png_uint_16pp
*
ptable
,
png_build_16to8_table
(
png_structrp
png_ptr
,
png_uint_16pp
*
ptable
,
PNG_CONST
unsigned
int
shift
,
PNG_CONST
png_fixed_point
gamma_val
)
unsigned
int
shift
,
png_fixed_point
gamma_val
)
{
{
PNG_CONST
unsigned
int
num
=
1U
<<
(
8U
-
shift
);
unsigned
int
num
=
1U
<<
(
8U
-
shift
);
PNG_CONST
unsigned
int
max
=
(
1U
<<
(
16U
-
shift
))
-
1U
;
unsigned
int
max
=
(
1U
<<
(
16U
-
shift
))
-
1U
;
unsigned
int
i
;
unsigned
int
i
;
png_uint_32
last
;
png_uint_32
last
;
...
@@ -4149,7 +4143,7 @@ png_build_16to8_table(png_structrp png_ptr, png_uint_16pp *ptable,
...
@@ -4149,7 +4143,7 @@ png_build_16to8_table(png_structrp png_ptr, png_uint_16pp *ptable,
*/
*/
static
void
static
void
png_build_8bit_table
(
png_structrp
png_ptr
,
png_bytepp
ptable
,
png_build_8bit_table
(
png_structrp
png_ptr
,
png_bytepp
ptable
,
PNG_CONST
png_fixed_point
gamma_val
)
png_fixed_point
gamma_val
)
{
{
unsigned
int
i
;
unsigned
int
i
;
png_bytep
table
=
*
ptable
=
(
png_bytep
)
png_malloc
(
png_ptr
,
256
);
png_bytep
table
=
*
ptable
=
(
png_bytep
)
png_malloc
(
png_ptr
,
256
);
...
...
src/share/native/sun/awt/libpng/png.h
浏览文件 @
2aef8baa
...
@@ -29,68 +29,105 @@
...
@@ -29,68 +29,105 @@
* However, the following notice accompanied the original version of this
* However, the following notice accompanied the original version of this
* file and, per its terms, should not be removed:
* file and, per its terms, should not be removed:
*
*
* libpng version 1.6.3
5, July 15, 2018
* libpng version 1.6.3
7 - April 14, 2019
*
*
* Copyright (c) 2018-2019 Cosmin Truta
* Copyright (c) 1998-2002,2004,2006-2018 Glenn Randers-Pehrson
* Copyright (c) 1998-2002,2004,2006-2018 Glenn Randers-Pehrson
*
(Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
*
Copyright (c) 1996-1997 Andreas Dilger
*
(Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
*
Copyright (c) 1995-1996 Guy Eric Schalnat, Group 42, Inc.
*
*
* This code is released under the libpng license
(See LICENSE, below
)
* This code is released under the libpng license
. (See LICENSE, below.
)
*
*
* Authors and maintainers:
* Authors and maintainers:
* libpng versions 0.71, May 1995, through 0.88, January 1996: Guy Schalnat
* libpng versions 0.71, May 1995, through 0.88, January 1996: Guy Schalnat
* libpng versions 0.89, June 1996, through 0.96, May 1997: Andreas Dilger
* libpng versions 0.89, June 1996, through 0.96, May 1997: Andreas Dilger
* libpng versions 0.97, January 1998, through 1.6.35, July 15, 2018:
* libpng versions 0.97, January 1998, through 1.6.35, July 2018:
* Glenn Randers-Pehrson.
* Glenn Randers-Pehrson
* libpng versions 1.6.36, December 2018, through 1.6.37, April 2019:
* Cosmin Truta
* See also "Contributing Authors", below.
* See also "Contributing Authors", below.
*/
*/
/*
/*
* COPYRIGHT NOTICE, DISCLAIMER, and LICENSE:
* COPYRIGHT NOTICE, DISCLAIMER, and LICENSE
* =========================================
*
* PNG Reference Library License version 2
* ---------------------------------------
*
* * Copyright (c) 1995-2019 The PNG Reference Library Authors.
* * Copyright (c) 2018-2019 Cosmin Truta.
* * Copyright (c) 2000-2002, 2004, 2006-2018 Glenn Randers-Pehrson.
* * Copyright (c) 1996-1997 Andreas Dilger.
* * Copyright (c) 1995-1996 Guy Eric Schalnat, Group 42, Inc.
*
* The software is supplied "as is", without warranty of any kind,
* express or implied, including, without limitation, the warranties
* of merchantability, fitness for a particular purpose, title, and
* non-infringement. In no event shall the Copyright owners, or
* anyone distributing the software, be liable for any damages or
* other liability, whether in contract, tort or otherwise, arising
* from, out of, or in connection with the software, or the use or
* other dealings in the software, even if advised of the possibility
* of such damage.
*
* Permission is hereby granted to use, copy, modify, and distribute
* this software, or portions hereof, for any purpose, without fee,
* subject to the following restrictions:
*
*
* If you modify libpng you may insert additional notices immediately following
* 1. The origin of this software must not be misrepresented; you
* this sentence.
* must not claim that you wrote the original software. If you
* use this software in a product, an acknowledgment in the product
* documentation would be appreciated, but is not required.
*
*
* This code is released under the libpng license.
* 2. Altered source versions must be plainly marked as such, and must
* not be misrepresented as being the original software.
*
*
* libpng versions 1.0.7, July 1, 2000 through 1.6.35, July 15, 2018 are
* 3. This Copyright notice may not be removed or altered from any
* source or altered source distribution.
*
*
* PNG Reference Library License version 1 (for libpng 0.5 through 1.6.35)
* -----------------------------------------------------------------------
*
* libpng versions 1.0.7, July 1, 2000, through 1.6.35, July 15, 2018 are
* Copyright (c) 2000-2002, 2004, 2006-2018 Glenn Randers-Pehrson, are
* Copyright (c) 2000-2002, 2004, 2006-2018 Glenn Randers-Pehrson, are
* derived from libpng-1.0.6, and are distributed according to the same
* derived from libpng-1.0.6, and are distributed according to the same
* disclaimer and license as libpng-1.0.6 with the following individuals
* disclaimer and license as libpng-1.0.6 with the following individuals
* added to the list of Contributing Authors:
* added to the list of Contributing Authors:
*
*
* Simon-Pierre Cadieux
*
Simon-Pierre Cadieux
* Eric S. Raymond
*
Eric S. Raymond
* Mans Rullgard
*
Mans Rullgard
* Cosmin Truta
*
Cosmin Truta
* Gilles Vollant
*
Gilles Vollant
* James Yu
*
James Yu
* Mandar Sahastrabuddhe
*
Mandar Sahastrabuddhe
* Google Inc.
*
Google Inc.
* Vadim Barkov
*
Vadim Barkov
*
*
* and with the following additions to the disclaimer:
* and with the following additions to the disclaimer:
*
*
*
There is no warranty against interference with your enjoyment of the
*
There is no warranty against interference with your enjoyment of
* library or against infringement. There is no warranty that our
*
the
library or against infringement. There is no warranty that our
* efforts or the library will fulfill any of your particular purposes
*
efforts or the library will fulfill any of your particular purposes
* or needs. This library is provided with all faults, and the entire
*
or needs. This library is provided with all faults, and the entire
*
risk of satisfactory quality, performance, accuracy, and effort is with
*
risk of satisfactory quality, performance, accuracy, and effort is
* the user.
*
with
the user.
*
*
* Some files in the "contrib" directory and some configure-generated
* Some files in the "contrib" directory and some configure-generated
* files that are distributed with libpng have other copyright owners and
* files that are distributed with libpng have other copyright owners
,
and
* are released under other open source licenses.
* are released under other open source licenses.
*
*
* libpng versions 0.97, January 1998, through 1.0.6, March 20, 2000, are
* libpng versions 0.97, January 1998, through 1.0.6, March 20, 2000, are
* Copyright (c) 1998-2000 Glenn Randers-Pehrson, are derived from
* Copyright (c) 1998-2000 Glenn Randers-Pehrson, are derived from
* libpng-0.96, and are distributed according to the same disclaimer and
* libpng-0.96, and are distributed according to the same disclaimer and
* license as libpng-0.96, with the following individuals added to the
list
* license as libpng-0.96, with the following individuals added to the
* of Contributing Authors:
*
list
of Contributing Authors:
*
*
* Tom Lane
*
Tom Lane
* Glenn Randers-Pehrson
*
Glenn Randers-Pehrson
* Willem van Schaik
*
Willem van Schaik
*
*
* libpng versions 0.89, June 1996, through 0.96, May 1997, are
* libpng versions 0.89, June 1996, through 0.96, May 1997, are
* Copyright (c) 1996-1997 Andreas Dilger, are derived from libpng-0.88,
* Copyright (c) 1996-1997 Andreas Dilger, are derived from libpng-0.88,
...
@@ -98,14 +135,14 @@
...
@@ -98,14 +135,14 @@
* libpng-0.88, with the following individuals added to the list of
* libpng-0.88, with the following individuals added to the list of
* Contributing Authors:
* Contributing Authors:
*
*
* John Bowler
*
John Bowler
* Kevin Bracey
*
Kevin Bracey
* Sam Bushell
*
Sam Bushell
* Magnus Holmgren
*
Magnus Holmgren
* Greg Roelofs
*
Greg Roelofs
* Tom Tanner
*
Tom Tanner
*
*
* Some files in the "scripts" directory have other copyright owners
* Some files in the "scripts" directory have other copyright owners
,
* but are released under this license.
* but are released under this license.
*
*
* libpng versions 0.5, May 1995, through 0.88, January 1996, are
* libpng versions 0.5, May 1995, through 0.88, January 1996, are
...
@@ -114,62 +151,49 @@
...
@@ -114,62 +151,49 @@
* For the purposes of this copyright and license, "Contributing Authors"
* For the purposes of this copyright and license, "Contributing Authors"
* is defined as the following set of individuals:
* is defined as the following set of individuals:
*
*
* Andreas Dilger
* Andreas Dilger
* Dave Martindale
* Dave Martindale
* Guy Eric Schalnat
* Guy Eric Schalnat
* Paul Schmidt
* Paul Schmidt
* Tim Wegner
* Tim Wegner
*
*
* The PNG Reference Library is supplied "AS IS". The Contributing Authors
* The PNG Reference Library is supplied "AS IS". The Contributing
* and Group 42, Inc. disclaim all warranties, expressed or implied,
* Authors and Group 42, Inc. disclaim all warranties, expressed or
* including, without limitation, the warranties of merchantability and of
* implied, including, without limitation, the warranties of
* fitness for any purpose. The Contributing Authors and Group 42, Inc.
* merchantability and of fitness for any purpose. The Contributing
* assume no liability for direct, indirect, incidental, special, exemplary,
* Authors and Group 42, Inc. assume no liability for direct, indirect,
* or consequential damages, which may result from the use of the PNG
* incidental, special, exemplary, or consequential damages, which may
* Reference Library, even if advised of the possibility of such damage.
* result from the use of the PNG Reference Library, even if advised of
* the possibility of such damage.
*
*
* Permission is hereby granted to use, copy, modify, and distribute this
* Permission is hereby granted to use, copy, modify, and distribute this
* source code, or portions hereof, for any purpose, without fee, subject
* source code, or portions hereof, for any purpose, without fee, subject
* to the following restrictions:
* to the following restrictions:
*
*
*
1. The origin of this source code must not be misrepresented.
* 1. The origin of this source code must not be misrepresented.
*
*
*
2. Altered versions must be plainly marked as such and must not
* 2. Altered versions must be plainly marked as such and must not
*
be misrepresented as being the original source.
* be misrepresented as being the original source.
*
*
*
3. This Copyright notice may not be removed or altered from any
* 3. This Copyright notice may not be removed or altered from any
*
source or altered source distribution.
* source or altered source distribution.
*
*
* The Contributing Authors and Group 42, Inc. specifically permit,
without
* The Contributing Authors and Group 42, Inc. specifically permit,
*
fee, and encourage the use of this source code as a component to
*
without fee, and encourage the use of this source code as a component
*
supporting the PNG file format in commercial products. If you use this
*
to supporting the PNG file format in commercial products. If you use
*
source code in a product, acknowledgment is not required but would be
*
this source code in a product, acknowledgment is not required but would
* appreciated.
*
be
appreciated.
*
*
* END OF COPYRIGHT NOTICE, DISCLAIMER, and LICENSE.
* END OF COPYRIGHT NOTICE, DISCLAIMER, and LICENSE.
*
*
* TRADEMARK:
* TRADEMARK
* =========
*
*
* The name "libpng" has not been registered by the Copyright owner
* The name "libpng" has not been registered by the Copyright owner
s
* as a trademark in any jurisdiction. However, because libpng has
* as a trademark in any jurisdiction. However, because libpng has
* been distributed and maintained world-wide, continually since 1995,
* been distributed and maintained world-wide, continually since 1995,
* the Copyright owner
claims
"common-law trademark protection" in any
* the Copyright owner
s claim
"common-law trademark protection" in any
* jurisdiction where common-law trademark is recognized.
* jurisdiction where common-law trademark is recognized.
*
* OSI CERTIFICATION:
*
* Libpng is OSI Certified Open Source Software. OSI Certified Open Source is
* a certification mark of the Open Source Initiative. OSI has not addressed
* the additional disclaimers inserted at version 1.0.7.
*
* EXPORT CONTROL:
*
* The Copyright owner believes that the Export Control Classification
* Number (ECCN) for libpng is EAR99, which means not subject to export
* controls or International Traffic in Arms Regulations (ITAR) because
* it is open source, publicly available software, that does not contain
* any encryption software. See the EAR, paragraphs 734.3(b)(3) and
* 734.7(b).
*/
*/
/*
/*
...
@@ -235,23 +259,25 @@
...
@@ -235,23 +259,25 @@
* 1.0.7rc1-2 1 10007 2.1.0.7rc1-2 (binary compatible)
* 1.0.7rc1-2 1 10007 2.1.0.7rc1-2 (binary compatible)
* 1.0.7 1 10007 (still compatible)
* 1.0.7 1 10007 (still compatible)
* ...
* ...
* 1.0.19 10 10019 10.so.0.19[.0]
* 1.0.69 10 10069 10.so.0.69[.0]
* ...
* 1.2.59 13 10259 12.so.0.59[.0]
* ...
* ...
* 1.
2.59 13 10257 12.so.0.59
[.0]
* 1.
4.20 14 10420 14.so.0.20
[.0]
* ...
* ...
* 1.5.30 15 105
27
15.so.15.30[.0]
* 1.5.30 15 105
30
15.so.15.30[.0]
* ...
* ...
* 1.6.3
5 16 10635 16.so.16.35
[.0]
* 1.6.3
7 16 10637 16.so.16.37
[.0]
*
*
* Henceforth the source version will match the shared-library major
* Henceforth the source version will match the shared-library major
and
*
and minor numbers; the shared-library major version number will be
*
minor numbers; the shared-library major version number will be used for
*
used for changes in backward compatibility, as it is intended. The
*
changes in backward compatibility, as it is intended.
*
PNG_LIBPNG_VER macro, which is not used within libpng but is available
*
The PNG_LIBPNG_VER macro, which is not used within libpng but is
*
for applications, is an unsigned integer of the form xyyzz corresponding
*
available for applications, is an unsigned integer of the form XYYZZ
*
to the source version x.y.z (leading zeros in y and z). Beta versions
*
corresponding to the source version X.Y.Z (leading zeros in Y and Z).
*
were given the previous public release number plus a letter, until
*
Beta versions were given the previous public release number plus a
*
version 1.0.6j; from then on they were given the upcoming public
*
letter, until version 1.0.6j; from then on they were given the upcoming
* release number plus "betaNN" or "rcNN".
*
public
release number plus "betaNN" or "rcNN".
*
*
* Binary incompatibility exists only when applications make direct access
* Binary incompatibility exists only when applications make direct access
* to the info_ptr or png_ptr members through png.h, and the compiled
* to the info_ptr or png_ptr members through png.h, and the compiled
...
@@ -261,65 +287,8 @@
...
@@ -261,65 +287,8 @@
* in binary compatibility (e.g., when a new feature is added).
* in binary compatibility (e.g., when a new feature is added).
*
*
* See libpng.txt or libpng.3 for more information. The PNG specification
* See libpng.txt or libpng.3 for more information. The PNG specification
* is available as a W3C Recommendation and as an ISO Specification,
* is available as a W3C Recommendation and as an ISO/IEC Standard; see
* <https://www.w3.org/TR/2003/REC-PNG-20031110/
* <https://www.w3.org/TR/2003/REC-PNG-20031110/>
*/
/*
* Y2K compliance in libpng:
* =========================
*
* July 15, 2018
*
* 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.6.35 are Y2K compliant. It is my belief that
* earlier versions were also Y2K compliant.
*
* Libpng only has two year fields. One is a 2-byte unsigned integer
* that will hold years up to 65535. The other, which is deprecated,
* holds the date in text format, and will hold years up to 9999.
*
* The integer is
* "png_uint_16 year" in png_time_struct.
*
* The string is
* "char time_buffer[29]" in png_struct. This is no longer used
* in libpng-1.6.x and will be removed from libpng-1.7.0.
*
* There are seven time-related functions:
* png.c: png_convert_to_rfc_1123_buffer() in png.c
* (formerly png_convert_to_rfc_1123() prior to libpng-1.5.x and
* png_convert_to_rfc_1152() in error prior to libpng-0.98)
* png_convert_from_struct_tm() in pngwrite.c, called in pngwrite.c
* png_convert_from_time_t() in pngwrite.c
* png_get_tIME() in pngget.c
* png_handle_tIME() in pngrutil.c, called in pngread.c
* png_set_tIME() in pngset.c
* png_write_tIME() in pngwutil.c, called in pngwrite.c
*
* All handle dates properly in a Y2K environment. The
* png_convert_from_time_t() function calls gmtime() to convert from system
* clock time, which returns (year - 1900), which we properly convert to
* the full 4-digit year. There is a possibility that libpng applications
* are not passing 4-digit years into the png_convert_to_rfc_1123_buffer()
* function, or that they are incorrectly passing only a 2-digit year
* instead of "year - 1900" into the png_convert_from_struct_tm() function,
* but this is not under our control. The libpng documentation has always
* stated that it works with 4-digit years, and the APIs have been
* documented as such.
*
* The tIME chunk itself is also Y2K compliant. It uses a 2-byte unsigned
* integer to hold the year, and can hold years as large as 65535.
*
* zlib, upon which libpng depends, is also Y2K compliant. It contains
* no date-related code.
*
* Glenn Randers-Pehrson
* libpng maintainer
* PNG Development Group
*/
*/
#ifndef PNG_H
#ifndef PNG_H
...
@@ -337,8 +306,8 @@
...
@@ -337,8 +306,8 @@
*/
*/
/* 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.6.3
5
"
#define PNG_LIBPNG_VER_STRING "1.6.3
7
"
#define PNG_HEADER_VERSION_STRING " libpng version 1.6.3
5 - July 15, 2018
\n"
#define PNG_HEADER_VERSION_STRING " libpng version 1.6.3
7 - April 14, 2019
\n"
#define PNG_LIBPNG_VER_SONUM 16
#define PNG_LIBPNG_VER_SONUM 16
#define PNG_LIBPNG_VER_DLLNUM 16
#define PNG_LIBPNG_VER_DLLNUM 16
...
@@ -346,13 +315,12 @@
...
@@ -346,13 +315,12 @@
/* These should match the first 3 components of PNG_LIBPNG_VER_STRING: */
/* These should match the first 3 components of PNG_LIBPNG_VER_STRING: */
#define PNG_LIBPNG_VER_MAJOR 1
#define PNG_LIBPNG_VER_MAJOR 1
#define PNG_LIBPNG_VER_MINOR 6
#define PNG_LIBPNG_VER_MINOR 6
#define PNG_LIBPNG_VER_RELEASE 3
5
#define PNG_LIBPNG_VER_RELEASE 3
7
/* This should
match the numeric part of the final component of
/* This should
be zero for a public release, or non-zero for a
*
PNG_LIBPNG_VER_STRING, omitting any leading zero:
*
development version. [Deprecated]
*/
*/
#define PNG_LIBPNG_VER_BUILD 0
#define PNG_LIBPNG_VER_BUILD 02
/* Release Status */
/* Release Status */
#define PNG_LIBPNG_BUILD_ALPHA 1
#define PNG_LIBPNG_BUILD_ALPHA 1
...
@@ -369,15 +337,16 @@
...
@@ -369,15 +337,16 @@
#define PNG_LIBPNG_BUILD_SPECIAL 32
/* Cannot be OR'ed with
#define PNG_LIBPNG_BUILD_SPECIAL 32
/* Cannot be OR'ed with
PNG_LIBPNG_BUILD_PRIVATE */
PNG_LIBPNG_BUILD_PRIVATE */
#define PNG_LIBPNG_BUILD_BASE_TYPE PNG_LIBPNG_BUILD_
BETA
#define PNG_LIBPNG_BUILD_BASE_TYPE PNG_LIBPNG_BUILD_
STABLE
/* Careful here. At one time, Guy wanted to use 082, but that would be octal.
/* Careful here. At one time, Guy wanted to use 082, but that
* We must not include leading zeros.
* 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
* Versions 0.7 through 1.0.0 were in the range 0 to 100 here
* version 1.0.0 was mis-numbered 100 instead of 10000). From
* (only version 1.0.0 was mis-numbered 100 instead of 10000).
* version 1.0.1 it's xxyyzz, where x=major, y=minor, z=release
* From version 1.0.1 it is:
* XXYYZZ, where XX=major, YY=minor, ZZ=release
*/
*/
#define PNG_LIBPNG_VER 1063
5
/* 1.6.35
*/
#define PNG_LIBPNG_VER 1063
7
/* 1.6.37
*/
/* Library configuration: these options cannot be changed after
/* Library configuration: these options cannot be changed after
* the library has been built.
* the library has been built.
...
@@ -487,7 +456,7 @@ extern "C" {
...
@@ -487,7 +456,7 @@ extern "C" {
/* This triggers a compiler error in png.c, if png.c and png.h
/* This triggers a compiler error in png.c, if png.c and png.h
* do not agree upon the version number.
* do not agree upon the version number.
*/
*/
typedef
char
*
png_libpng_version_1_6_3
5
;
typedef
char
*
png_libpng_version_1_6_3
7
;
/* Basic control structions. Read libpng-manual.txt or libpng.3 for more info.
/* Basic control structions. Read libpng-manual.txt or libpng.3 for more info.
*
*
...
@@ -2041,12 +2010,12 @@ PNG_FIXED_EXPORT(233, void, png_set_cHRM_XYZ_fixed, (png_const_structrp png_ptr,
...
@@ -2041,12 +2010,12 @@ PNG_FIXED_EXPORT(233, void, png_set_cHRM_XYZ_fixed, (png_const_structrp png_ptr,
PNG_EXPORT
(
246
,
png_uint_32
,
png_get_eXIf
,
(
png_const_structrp
png_ptr
,
PNG_EXPORT
(
246
,
png_uint_32
,
png_get_eXIf
,
(
png_const_structrp
png_ptr
,
png_inforp
info_ptr
,
png_bytep
*
exif
));
png_inforp
info_ptr
,
png_bytep
*
exif
));
PNG_EXPORT
(
247
,
void
,
png_set_eXIf
,
(
png_const_structrp
png_ptr
,
PNG_EXPORT
(
247
,
void
,
png_set_eXIf
,
(
png_const_structrp
png_ptr
,
png_inforp
info_ptr
,
const
png_bytep
exif
));
png_inforp
info_ptr
,
png_bytep
exif
));
PNG_EXPORT
(
248
,
png_uint_32
,
png_get_eXIf_1
,
(
png_const_structrp
png_ptr
,
PNG_EXPORT
(
248
,
png_uint_32
,
png_get_eXIf_1
,
(
png_const_structrp
png_ptr
,
png_const_inforp
info_ptr
,
png_uint_32
*
num_exif
,
png_bytep
*
exif
));
png_const_inforp
info_ptr
,
png_uint_32
*
num_exif
,
png_bytep
*
exif
));
PNG_EXPORT
(
249
,
void
,
png_set_eXIf_1
,
(
png_const_structrp
png_ptr
,
PNG_EXPORT
(
249
,
void
,
png_set_eXIf_1
,
(
png_const_structrp
png_ptr
,
png_inforp
info_ptr
,
const
png_uint_32
num_exif
,
const
png_bytep
exif
));
png_inforp
info_ptr
,
png_uint_32
num_exif
,
png_bytep
exif
));
#endif
#endif
#ifdef PNG_gAMA_SUPPORTED
#ifdef PNG_gAMA_SUPPORTED
...
@@ -2792,7 +2761,7 @@ typedef struct
...
@@ -2792,7 +2761,7 @@ typedef struct
*
*
* When the simplified API needs to convert between sRGB and linear colorspaces,
* When the simplified API needs to convert between sRGB and linear colorspaces,
* the actual sRGB transfer curve defined in the sRGB specification (see the
* the actual sRGB transfer curve defined in the sRGB specification (see the
* article at
https://en.wikipedia.org/wiki/SRGB
) is used, not the gamma=1/2.2
* article at
<https://en.wikipedia.org/wiki/SRGB>
) is used, not the gamma=1/2.2
* approximation used elsewhere in libpng.
* approximation used elsewhere in libpng.
*
*
* When an alpha channel is present it is expected to denote pixel coverage
* When an alpha channel is present it is expected to denote pixel coverage
...
@@ -2995,7 +2964,7 @@ typedef struct
...
@@ -2995,7 +2964,7 @@ typedef struct
* 'flags' field of png_image.
* 'flags' field of png_image.
*/
*/
#define PNG_IMAGE_FLAG_COLORSPACE_NOT_sRGB 0x01
#define PNG_IMAGE_FLAG_COLORSPACE_NOT_sRGB 0x01
/* This indicates th
e
the RGB values of the in-memory bitmap do not
/* This indicates th
at
the RGB values of the in-memory bitmap do not
* correspond to the red, green and blue end-points defined by sRGB.
* correspond to the red, green and blue end-points defined by sRGB.
*/
*/
...
...
src/share/native/sun/awt/libpng/pngconf.h
浏览文件 @
2aef8baa
...
@@ -22,18 +22,19 @@
...
@@ -22,18 +22,19 @@
* questions.
* questions.
*/
*/
/* pngconf.h - machine
configurable file for libpng
/* pngconf.h - machine
-
configurable file for libpng
*
*
* This file is available under and governed by the GNU General Public
* This file is available under and governed by the GNU General Public
* License version 2 only, as published by the Free Software Foundation.
* License version 2 only, as published by the Free Software Foundation.
* However, the following notice accompanied the original version of this
* However, the following notice accompanied the original version of this
* file and, per its terms, should not be removed:
* file and, per its terms, should not be removed:
*
*
* libpng version 1.6.3
5, July 15, 2018
* libpng version 1.6.3
7
*
*
* Copyright (c) 2018-2019 Cosmin Truta
* Copyright (c) 1998-2002,2004,2006-2016,2018 Glenn Randers-Pehrson
* Copyright (c) 1998-2002,2004,2006-2016,2018 Glenn Randers-Pehrson
*
(Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
*
Copyright (c) 1996-1997 Andreas Dilger
*
(Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
*
Copyright (c) 1995-1996 Guy Eric Schalnat, Group 42, Inc.
*
*
* This code is released under the libpng license.
* This code is released under the libpng license.
* For conditions of distribution and use, see the disclaimer
* For conditions of distribution and use, see the disclaimer
...
@@ -85,14 +86,13 @@
...
@@ -85,14 +86,13 @@
#endif
/* PNG_BUILDING_SYMBOL_TABLE */
#endif
/* PNG_BUILDING_SYMBOL_TABLE */
/* Prior to 1.6.0 it was possible to turn off 'const' in declarations using
/* Prior to 1.6.0, it was possible to turn off 'const' in declarations,
* PNG_NO_CONST; this is no longer supported except for data declarations which
* using PNG_NO_CONST. This is no longer supported.
* apparently still cause problems in 2011 on some compilers.
*/
*/
#define PNG_CONST const
/* backward compatibility only */
#define PNG_CONST const
/* backward compatibility only */
/* This controls optimization of the reading of 16-bit and 32-bit
values
/* This controls optimization of the reading of 16-bit and 32-bit
*
from PNG files. It can be set on a per-app-file basis -
it
*
values from PNG files. It can be set on a per-app-file basis:
it
* just changes whether a macro is used when the function is called.
* just changes whether a macro is used when the function is called.
* The library builder sets the default; if read functions are not
* The library builder sets the default; if read functions are not
* built into the library the macro implementation is forced on.
* built into the library the macro implementation is forced on.
...
...
src/share/native/sun/awt/libpng/pngdebug.h
浏览文件 @
2aef8baa
...
@@ -29,10 +29,10 @@
...
@@ -29,10 +29,10 @@
* However, the following notice accompanied the original version of this
* However, the following notice accompanied the original version of this
* file and, per its terms, should not be removed:
* file and, per its terms, should not be removed:
*
*
*
Last changed in libpng 1.6.8 [December 19, 2013]
*
Copyright (c) 2018 Cosmin Truta
* Copyright (c) 1998-2002,2004,2006-2013 Glenn Randers-Pehrson
* Copyright (c) 1998-2002,2004,2006-2013 Glenn Randers-Pehrson
*
(Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
*
Copyright (c) 1996-1997 Andreas Dilger
*
(Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
*
Copyright (c) 1995-1996 Guy Eric Schalnat, Group 42, Inc.
*
*
* This code is released under the libpng license.
* This code is released under the libpng license.
* For conditions of distribution and use, see the disclaimer
* For conditions of distribution and use, see the disclaimer
...
...
src/share/native/sun/awt/libpng/pngerror.c
浏览文件 @
2aef8baa
...
@@ -29,10 +29,10 @@
...
@@ -29,10 +29,10 @@
* However, the following notice accompanied the original version of this
* However, the following notice accompanied the original version of this
* file and, per its terms, should not be removed:
* file and, per its terms, should not be removed:
*
*
*
Last changed in libpng 1.6.31 [July 27, 2017]
*
Copyright (c) 2018 Cosmin Truta
* Copyright (c) 1998-2002,2004,2006-2017 Glenn Randers-Pehrson
* Copyright (c) 1998-2002,2004,2006-2017 Glenn Randers-Pehrson
*
(Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
*
Copyright (c) 1996-1997 Andreas Dilger
*
(Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
*
Copyright (c) 1995-1996 Guy Eric Schalnat, Group 42, Inc.
*
*
* This code is released under the libpng license.
* This code is released under the libpng license.
* For conditions of distribution and use, see the disclaimer
* For conditions of distribution and use, see the disclaimer
...
@@ -453,7 +453,7 @@ png_app_error(png_const_structrp png_ptr, png_const_charp error_message)
...
@@ -453,7 +453,7 @@ png_app_error(png_const_structrp png_ptr, png_const_charp error_message)
* if the character is invalid.
* if the character is invalid.
*/
*/
#define isnonalpha(c) ((c) < 65 || (c) > 122 || ((c) > 90 && (c) < 97))
#define isnonalpha(c) ((c) < 65 || (c) > 122 || ((c) > 90 && (c) < 97))
static
PNG_CONST
char
png_digit
[
16
]
=
{
static
const
char
png_digit
[
16
]
=
{
'0'
,
'1'
,
'2'
,
'3'
,
'4'
,
'5'
,
'6'
,
'7'
,
'8'
,
'9'
,
'0'
,
'1'
,
'2'
,
'3'
,
'4'
,
'5'
,
'6'
,
'7'
,
'8'
,
'9'
,
'A'
,
'B'
,
'C'
,
'D'
,
'E'
,
'F'
'A'
,
'B'
,
'C'
,
'D'
,
'E'
,
'F'
};
};
...
@@ -913,7 +913,7 @@ PNG_FUNCTION(void /* PRIVATE */, (PNGCBAPI
...
@@ -913,7 +913,7 @@ PNG_FUNCTION(void /* PRIVATE */, (PNGCBAPI
png_safe_error
),(
png_structp
png_nonconst_ptr
,
png_const_charp
error_message
),
png_safe_error
),(
png_structp
png_nonconst_ptr
,
png_const_charp
error_message
),
PNG_NORETURN
)
PNG_NORETURN
)
{
{
const
png_const_structrp
png_ptr
=
png_nonconst_ptr
;
png_const_structrp
png_ptr
=
png_nonconst_ptr
;
png_imagep
image
=
png_voidcast
(
png_imagep
,
png_ptr
->
error_ptr
);
png_imagep
image
=
png_voidcast
(
png_imagep
,
png_ptr
->
error_ptr
);
/* An error is always logged here, overwriting anything (typically a warning)
/* An error is always logged here, overwriting anything (typically a warning)
...
@@ -948,7 +948,7 @@ png_safe_error),(png_structp png_nonconst_ptr, png_const_charp error_message),
...
@@ -948,7 +948,7 @@ png_safe_error),(png_structp png_nonconst_ptr, png_const_charp error_message),
void
/* PRIVATE */
PNGCBAPI
void
/* PRIVATE */
PNGCBAPI
png_safe_warning
(
png_structp
png_nonconst_ptr
,
png_const_charp
warning_message
)
png_safe_warning
(
png_structp
png_nonconst_ptr
,
png_const_charp
warning_message
)
{
{
const
png_const_structrp
png_ptr
=
png_nonconst_ptr
;
png_const_structrp
png_ptr
=
png_nonconst_ptr
;
png_imagep
image
=
png_voidcast
(
png_imagep
,
png_ptr
->
error_ptr
);
png_imagep
image
=
png_voidcast
(
png_imagep
,
png_ptr
->
error_ptr
);
/* A warning is only logged if there is no prior warning or error. */
/* A warning is only logged if there is no prior warning or error. */
...
...
src/share/native/sun/awt/libpng/pngget.c
浏览文件 @
2aef8baa
...
@@ -29,10 +29,10 @@
...
@@ -29,10 +29,10 @@
* However, the following notice accompanied the original version of this
* However, the following notice accompanied the original version of this
* file and, per its terms, should not be removed:
* file and, per its terms, should not be removed:
*
*
*
Last changed in libpng 1.6.35 [July 15, 2018]
*
Copyright (c) 2018 Cosmin Truta
* Copyright (c) 1998-2002,2004,2006-2018 Glenn Randers-Pehrson
* Copyright (c) 1998-2002,2004,2006-2018 Glenn Randers-Pehrson
*
(Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
*
Copyright (c) 1996-1997 Andreas Dilger
*
(Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
*
Copyright (c) 1995-1996 Guy Eric Schalnat, Group 42, Inc.
*
*
* This code is released under the libpng license.
* This code is released under the libpng license.
* For conditions of distribution and use, see the disclaimer
* For conditions of distribution and use, see the disclaimer
...
...
src/share/native/sun/awt/libpng/pnginfo.h
浏览文件 @
2aef8baa
...
@@ -29,10 +29,10 @@
...
@@ -29,10 +29,10 @@
* However, the following notice accompanied the original version of this
* However, the following notice accompanied the original version of this
* file and, per its terms, should not be removed:
* file and, per its terms, should not be removed:
*
*
*
Last changed in libpng 1.6.35 [July 15, 2018]
*
Copyright (c) 2018 Cosmin Truta
* Copyright (c) 1998-2002,2004,2006-2013,2018 Glenn Randers-Pehrson
* Copyright (c) 1998-2002,2004,2006-2013,2018 Glenn Randers-Pehrson
*
(Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
*
Copyright (c) 1996-1997 Andreas Dilger
*
(Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
*
Copyright (c) 1995-1996 Guy Eric Schalnat, Group 42, Inc.
*
*
* This code is released under the libpng license.
* This code is released under the libpng license.
* For conditions of distribution and use, see the disclaimer
* For conditions of distribution and use, see the disclaimer
...
...
src/share/native/sun/awt/libpng/pnglibconf.h
浏览文件 @
2aef8baa
...
@@ -29,18 +29,16 @@
...
@@ -29,18 +29,16 @@
* THIS FILE WAS MODIFIED BY ORACLE, INC.
* THIS FILE WAS MODIFIED BY ORACLE, INC.
*/
*/
/* libpng STANDARD API DEFINITION */
/* pnglibconf.h - library build configuration */
/* pnglibconf.h - library build configuration */
/* This file is available under and governed by the GNU General Public
/* This file is available under and governed by the GNU General Public
* License version 2 only, as published by the Free Software Foundation.
* License version 2 only, as published by the Free Software Foundation.
* However, the following notice accompanied the original version of this
* However, the following notice accompanied the original version of this
* file and, per its terms, should not be removed:
* file and, per its terms, should not be removed:
*/
*/
/* libpng version 1.6.37 */
/* libpng version 1.6.35, July 15, 2018 */
/* Copyright (c) 2018-2019 Cosmin Truta */
/* Copyright (c) 1998-2002,2004,2006-2018 Glenn Randers-Pehrson */
/* Copyright (c) 1998-2018 Glenn Randers-Pehrson */
/* This code is released under the libpng license. */
/* This code is released under the libpng license. */
/* For conditions of distribution and use, see the disclaimer */
/* For conditions of distribution and use, see the disclaimer */
...
@@ -80,6 +78,8 @@
...
@@ -80,6 +78,8 @@
#define PNG_IO_STATE_SUPPORTED
#define PNG_IO_STATE_SUPPORTED
#define PNG_MNG_FEATURES_SUPPORTED
#define PNG_MNG_FEATURES_SUPPORTED
#define PNG_POINTER_INDEXING_SUPPORTED
#define PNG_POINTER_INDEXING_SUPPORTED
/*#undef PNG_POWERPC_VSX_API_SUPPORTED*/
/*#undef PNG_POWERPC_VSX_CHECK_SUPPORTED*/
#define PNG_PROGRESSIVE_READ_SUPPORTED
#define PNG_PROGRESSIVE_READ_SUPPORTED
#define PNG_READ_16BIT_SUPPORTED
#define PNG_READ_16BIT_SUPPORTED
#define PNG_READ_ALPHA_MODE_SUPPORTED
#define PNG_READ_ALPHA_MODE_SUPPORTED
...
@@ -118,6 +118,7 @@
...
@@ -118,6 +118,7 @@
#define PNG_READ_USER_TRANSFORM_SUPPORTED
#define PNG_READ_USER_TRANSFORM_SUPPORTED
#define PNG_READ_bKGD_SUPPORTED
#define PNG_READ_bKGD_SUPPORTED
#define PNG_READ_cHRM_SUPPORTED
#define PNG_READ_cHRM_SUPPORTED
/*#undef PNG_READ_eXIf_SUPPORTED*/
#define PNG_READ_gAMA_SUPPORTED
#define PNG_READ_gAMA_SUPPORTED
#define PNG_READ_hIST_SUPPORTED
#define PNG_READ_hIST_SUPPORTED
/*#undef PNG_READ_iCCP_SUPPORTED*/
/*#undef PNG_READ_iCCP_SUPPORTED*/
...
@@ -187,6 +188,7 @@
...
@@ -187,6 +188,7 @@
/*#undef PNG_WRITE_WEIGHTED_FILTER_SUPPORTED*/
/*#undef PNG_WRITE_WEIGHTED_FILTER_SUPPORTED*/
/*#undef PNG_WRITE_bKGD_SUPPORTED*/
/*#undef PNG_WRITE_bKGD_SUPPORTED*/
/*#undef PNG_WRITE_cHRM_SUPPORTED*/
/*#undef PNG_WRITE_cHRM_SUPPORTED*/
/*#undef PNG_WRITE_eXIf_SUPPORTED*/
/*#undef PNG_WRITE_gAMA_SUPPORTED*/
/*#undef PNG_WRITE_gAMA_SUPPORTED*/
/*#undef PNG_WRITE_hIST_SUPPORTED*/
/*#undef PNG_WRITE_hIST_SUPPORTED*/
/*#undef PNG_WRITE_iCCP_SUPPORTED*/
/*#undef PNG_WRITE_iCCP_SUPPORTED*/
...
@@ -204,6 +206,7 @@
...
@@ -204,6 +206,7 @@
/*#undef PNG_WRITE_zTXt_SUPPORTED*/
/*#undef PNG_WRITE_zTXt_SUPPORTED*/
#define PNG_bKGD_SUPPORTED
#define PNG_bKGD_SUPPORTED
#define PNG_cHRM_SUPPORTED
#define PNG_cHRM_SUPPORTED
/*#undef PNG_eXIf_SUPPORTED*/
#define PNG_gAMA_SUPPORTED
#define PNG_gAMA_SUPPORTED
#define PNG_hIST_SUPPORTED
#define PNG_hIST_SUPPORTED
#define PNG_iCCP_SUPPORTED
#define PNG_iCCP_SUPPORTED
...
@@ -241,7 +244,7 @@
...
@@ -241,7 +244,7 @@
#define PNG_USER_HEIGHT_MAX 8000
#define PNG_USER_HEIGHT_MAX 8000
#define PNG_USER_WIDTH_MAX 8000
#define PNG_USER_WIDTH_MAX 8000
#define PNG_ZBUF_SIZE 8192
#define PNG_ZBUF_SIZE 8192
#define PNG_ZLIB_VERNUM 0
#define PNG_ZLIB_VERNUM 0
/* unknown */
#define PNG_Z_DEFAULT_COMPRESSION (-1)
#define PNG_Z_DEFAULT_COMPRESSION (-1)
#define PNG_Z_DEFAULT_NOFILTER_STRATEGY 0
#define PNG_Z_DEFAULT_NOFILTER_STRATEGY 0
#define PNG_Z_DEFAULT_STRATEGY 1
#define PNG_Z_DEFAULT_STRATEGY 1
...
...
src/share/native/sun/awt/libpng/pngmem.c
浏览文件 @
2aef8baa
...
@@ -29,10 +29,10 @@
...
@@ -29,10 +29,10 @@
* However, the following notice accompanied the original version of this
* However, the following notice accompanied the original version of this
* file and, per its terms, should not be removed:
* file and, per its terms, should not be removed:
*
*
*
Last changed in libpng 1.6.26 [October 20, 2016]
*
Copyright (c) 2018 Cosmin Truta
* Copyright (c) 1998-2002,2004,2006-2014,2016 Glenn Randers-Pehrson
* Copyright (c) 1998-2002,2004,2006-2014,2016 Glenn Randers-Pehrson
*
(Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
*
Copyright (c) 1996-1997 Andreas Dilger
*
(Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
*
Copyright (c) 1995-1996 Guy Eric Schalnat, Group 42, Inc.
*
*
* This code is released under the libpng license.
* This code is released under the libpng license.
* For conditions of distribution and use, see the disclaimer
* For conditions of distribution and use, see the disclaimer
...
...
src/share/native/sun/awt/libpng/pngpread.c
浏览文件 @
2aef8baa
...
@@ -29,10 +29,10 @@
...
@@ -29,10 +29,10 @@
* However, the following notice accompanied the original version of this
* However, the following notice accompanied the original version of this
* file and, per its terms, should not be removed:
* file and, per its terms, should not be removed:
*
*
*
Last changed in libpng 1.6.35 [July 15, 2018]
*
Copyright (c) 2018 Cosmin Truta
* Copyright (c) 1998-2002,2004,2006-2018 Glenn Randers-Pehrson
* Copyright (c) 1998-2002,2004,2006-2018 Glenn Randers-Pehrson
*
(Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
*
Copyright (c) 1996-1997 Andreas Dilger
*
(Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
*
Copyright (c) 1995-1996 Guy Eric Schalnat, Group 42, Inc.
*
*
* This code is released under the libpng license.
* This code is released under the libpng license.
* For conditions of distribution and use, see the disclaimer
* For conditions of distribution and use, see the disclaimer
...
@@ -1000,20 +1000,20 @@ png_read_push_finish_row(png_structrp png_ptr)
...
@@ -1000,20 +1000,20 @@ png_read_push_finish_row(png_structrp png_ptr)
/* Arrays to facilitate easy interlacing - use pass (0 - 6) as index */
/* Arrays to facilitate easy interlacing - use pass (0 - 6) as index */
/* Start of interlace block */
/* Start of interlace block */
static
PNG_CONST
png_byte
png_pass_start
[]
=
{
0
,
4
,
0
,
2
,
0
,
1
,
0
};
static
const
png_byte
png_pass_start
[]
=
{
0
,
4
,
0
,
2
,
0
,
1
,
0
};
/* Offset to next interlace block */
/* Offset to next interlace block */
static
PNG_CONST
png_byte
png_pass_inc
[]
=
{
8
,
8
,
4
,
4
,
2
,
2
,
1
};
static
const
png_byte
png_pass_inc
[]
=
{
8
,
8
,
4
,
4
,
2
,
2
,
1
};
/* Start of interlace block in the y direction */
/* Start of interlace block in the y direction */
static
PNG_CONST
png_byte
png_pass_ystart
[]
=
{
0
,
0
,
4
,
0
,
2
,
0
,
1
};
static
const
png_byte
png_pass_ystart
[]
=
{
0
,
0
,
4
,
0
,
2
,
0
,
1
};
/* Offset to next interlace block in the y direction */
/* Offset to next interlace block in the y direction */
static
PNG_CONST
png_byte
png_pass_yinc
[]
=
{
8
,
8
,
8
,
4
,
4
,
2
,
2
};
static
const
png_byte
png_pass_yinc
[]
=
{
8
,
8
,
8
,
4
,
4
,
2
,
2
};
/* Height of interlace block. This is not currently used - if you need
/* Height of interlace block. This is not currently used - if you need
* it, uncomment it here and in png.h
* it, uncomment it here and in png.h
static
PNG_CONST
png_byte png_pass_height[] = {8, 8, 4, 4, 2, 2, 1};
static
const
png_byte png_pass_height[] = {8, 8, 4, 4, 2, 2, 1};
*/
*/
#endif
#endif
...
...
src/share/native/sun/awt/libpng/pngpriv.h
浏览文件 @
2aef8baa
...
@@ -29,10 +29,10 @@
...
@@ -29,10 +29,10 @@
* However, the following notice accompanied the original version of this
* However, the following notice accompanied the original version of this
* file and, per its terms, should not be removed:
* file and, per its terms, should not be removed:
*
*
*
Last changed in libpng 1.6.35 [July 15, 2018]
*
Copyright (c) 2018-2019 Cosmin Truta
* Copyright (c) 1998-2002,2004,2006-2018 Glenn Randers-Pehrson
* Copyright (c) 1998-2002,2004,2006-2018 Glenn Randers-Pehrson
*
(Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
*
Copyright (c) 1996-1997 Andreas Dilger
*
(Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
*
Copyright (c) 1995-1996 Guy Eric Schalnat, Group 42, Inc.
*
*
* This code is released under the libpng license.
* This code is released under the libpng license.
* For conditions of distribution and use, see the disclaimer
* For conditions of distribution and use, see the disclaimer
...
@@ -202,7 +202,10 @@
...
@@ -202,7 +202,10 @@
# else
/* !defined __ARM_NEON__ */
# else
/* !defined __ARM_NEON__ */
/* The 'intrinsics' code simply won't compile without this -mfpu=neon:
/* The 'intrinsics' code simply won't compile without this -mfpu=neon:
*/
*/
# define PNG_ARM_NEON_IMPLEMENTATION 2
# if !defined(__aarch64__)
/* The assembler code currently does not work on ARM64 */
# define PNG_ARM_NEON_IMPLEMENTATION 2
# endif
/* __aarch64__ */
# endif
/* __ARM_NEON__ */
# endif
/* __ARM_NEON__ */
# endif
/* !PNG_ARM_NEON_IMPLEMENTATION */
# endif
/* !PNG_ARM_NEON_IMPLEMENTATION */
...
@@ -298,6 +301,7 @@
...
@@ -298,6 +301,7 @@
#endif
#endif
/* Is this a build of a DLL where compilation of the object modules requires
/* Is this a build of a DLL where compilation of the object modules requires
* different preprocessor settings to those required for a simple library? If
* different preprocessor settings to those required for a simple library? If
* so PNG_BUILD_DLL must be set.
* so PNG_BUILD_DLL must be set.
...
@@ -1564,10 +1568,10 @@ PNG_INTERNAL_FUNCTION(void,png_handle_zTXt,(png_structrp png_ptr,
...
@@ -1564,10 +1568,10 @@ PNG_INTERNAL_FUNCTION(void,png_handle_zTXt,(png_structrp png_ptr,
#endif
#endif
PNG_INTERNAL_FUNCTION
(
void
,
png_check_chunk_name
,(
png_const_structrp
png_ptr
,
PNG_INTERNAL_FUNCTION
(
void
,
png_check_chunk_name
,(
png_const_structrp
png_ptr
,
const
png_uint_32
chunk_name
),
PNG_EMPTY
);
png_uint_32
chunk_name
),
PNG_EMPTY
);
PNG_INTERNAL_FUNCTION
(
void
,
png_check_chunk_length
,(
png_const_structrp
png_ptr
,
PNG_INTERNAL_FUNCTION
(
void
,
png_check_chunk_length
,(
png_const_structrp
png_ptr
,
const
png_uint_32
chunk_length
),
PNG_EMPTY
);
png_uint_32
chunk_length
),
PNG_EMPTY
);
PNG_INTERNAL_FUNCTION
(
void
,
png_handle_unknown
,(
png_structrp
png_ptr
,
PNG_INTERNAL_FUNCTION
(
void
,
png_handle_unknown
,(
png_structrp
png_ptr
,
png_inforp
info_ptr
,
png_uint_32
length
,
int
keep
),
PNG_EMPTY
);
png_inforp
info_ptr
,
png_uint_32
length
,
int
keep
),
PNG_EMPTY
);
...
@@ -2144,6 +2148,29 @@ PNG_INTERNAL_FUNCTION(void, png_init_filter_functions_sse2,
...
@@ -2144,6 +2148,29 @@ PNG_INTERNAL_FUNCTION(void, png_init_filter_functions_sse2,
PNG_INTERNAL_FUNCTION
(
png_uint_32
,
png_check_keyword
,
(
png_structrp
png_ptr
,
PNG_INTERNAL_FUNCTION
(
png_uint_32
,
png_check_keyword
,
(
png_structrp
png_ptr
,
png_const_charp
key
,
png_bytep
new_key
),
PNG_EMPTY
);
png_const_charp
key
,
png_bytep
new_key
),
PNG_EMPTY
);
#if PNG_ARM_NEON_IMPLEMENTATION == 1
PNG_INTERNAL_FUNCTION
(
void
,
png_riffle_palette_neon
,
(
png_structrp
),
PNG_EMPTY
);
PNG_INTERNAL_FUNCTION
(
int
,
png_do_expand_palette_rgba8_neon
,
(
png_structrp
,
png_row_infop
,
png_const_bytep
,
const
png_bytepp
,
const
png_bytepp
),
PNG_EMPTY
);
PNG_INTERNAL_FUNCTION
(
int
,
png_do_expand_palette_rgb8_neon
,
(
png_structrp
,
png_row_infop
,
png_const_bytep
,
const
png_bytepp
,
const
png_bytepp
),
PNG_EMPTY
);
#endif
/* Maintainer: Put new private prototypes here ^ */
/* Maintainer: Put new private prototypes here ^ */
#include "pngdebug.h"
#include "pngdebug.h"
...
...
src/share/native/sun/awt/libpng/pngread.c
浏览文件 @
2aef8baa
...
@@ -29,10 +29,10 @@
...
@@ -29,10 +29,10 @@
* However, the following notice accompanied the original version of this
* However, the following notice accompanied the original version of this
* file and, per its terms, should not be removed:
* file and, per its terms, should not be removed:
*
*
*
Last changed in libpng 1.6.35 [July 15, 2018]
*
Copyright (c) 2018-2019 Cosmin Truta
* Copyright (c) 1998-2002,2004,2006-2018 Glenn Randers-Pehrson
* Copyright (c) 1998-2002,2004,2006-2018 Glenn Randers-Pehrson
*
(Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
*
Copyright (c) 1996-1997 Andreas Dilger
*
(Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
*
Copyright (c) 1995-1996 Guy Eric Schalnat, Group 42, Inc.
*
*
* This code is released under the libpng license.
* This code is released under the libpng license.
* For conditions of distribution and use, see the disclaimer
* For conditions of distribution and use, see the disclaimer
...
@@ -1022,6 +1022,12 @@ png_read_destroy(png_structrp png_ptr)
...
@@ -1022,6 +1022,12 @@ png_read_destroy(png_structrp png_ptr)
png_ptr
->
chunk_list
=
NULL
;
png_ptr
->
chunk_list
=
NULL
;
#endif
#endif
#if defined(PNG_READ_EXPAND_SUPPORTED) && \
defined(PNG_ARM_NEON_IMPLEMENTATION)
png_free
(
png_ptr
,
png_ptr
->
riffled_palette
);
png_ptr
->
riffled_palette
=
NULL
;
#endif
/* NOTE: the 'setjmp' buffer may still be allocated and the memory and error
/* NOTE: the 'setjmp' buffer may still be allocated and the memory and error
* callbacks are still set at this point. They are required to complete the
* callbacks are still set at this point. They are required to complete the
* destruction of the png_struct itself.
* destruction of the png_struct itself.
...
@@ -1649,7 +1655,7 @@ png_image_skip_unused_chunks(png_structrp png_ptr)
...
@@ -1649,7 +1655,7 @@ png_image_skip_unused_chunks(png_structrp png_ptr)
* errors (which are unfortunately quite common.)
* errors (which are unfortunately quite common.)
*/
*/
{
{
static
PNG_CONST
png_byte
chunks_to_process
[]
=
{
static
const
png_byte
chunks_to_process
[]
=
{
98
,
75
,
71
,
68
,
'\0'
,
/* bKGD */
98
,
75
,
71
,
68
,
'\0'
,
/* bKGD */
99
,
72
,
82
,
77
,
'\0'
,
/* cHRM */
99
,
72
,
82
,
77
,
'\0'
,
/* cHRM */
103
,
65
,
77
,
65
,
'\0'
,
/* gAMA */
103
,
65
,
77
,
65
,
'\0'
,
/* gAMA */
...
@@ -1786,9 +1792,9 @@ png_create_colormap_entry(png_image_read_control *display,
...
@@ -1786,9 +1792,9 @@ png_create_colormap_entry(png_image_read_control *display,
png_uint_32
alpha
,
int
encoding
)
png_uint_32
alpha
,
int
encoding
)
{
{
png_imagep
image
=
display
->
image
;
png_imagep
image
=
display
->
image
;
const
int
output_encoding
=
(
image
->
format
&
PNG_FORMAT_FLAG_LINEAR
)
!=
0
?
int
output_encoding
=
(
image
->
format
&
PNG_FORMAT_FLAG_LINEAR
)
!=
0
?
P_LINEAR
:
P_sRGB
;
P_LINEAR
:
P_sRGB
;
const
int
convert_to_Y
=
(
image
->
format
&
PNG_FORMAT_FLAG_COLOR
)
==
0
&&
int
convert_to_Y
=
(
image
->
format
&
PNG_FORMAT_FLAG_COLOR
)
==
0
&&
(
red
!=
green
||
green
!=
blue
);
(
red
!=
green
||
green
!=
blue
);
if
(
ip
>
255
)
if
(
ip
>
255
)
...
@@ -1897,13 +1903,13 @@ png_create_colormap_entry(png_image_read_control *display,
...
@@ -1897,13 +1903,13 @@ png_create_colormap_entry(png_image_read_control *display,
/* Store the value. */
/* Store the value. */
{
{
# ifdef PNG_FORMAT_AFIRST_SUPPORTED
# ifdef PNG_FORMAT_AFIRST_SUPPORTED
const
int
afirst
=
(
image
->
format
&
PNG_FORMAT_FLAG_AFIRST
)
!=
0
&&
int
afirst
=
(
image
->
format
&
PNG_FORMAT_FLAG_AFIRST
)
!=
0
&&
(
image
->
format
&
PNG_FORMAT_FLAG_ALPHA
)
!=
0
;
(
image
->
format
&
PNG_FORMAT_FLAG_ALPHA
)
!=
0
;
# else
# else
# define afirst 0
# define afirst 0
# endif
# endif
# ifdef PNG_FORMAT_BGR_SUPPORTED
# ifdef PNG_FORMAT_BGR_SUPPORTED
const
int
bgr
=
(
image
->
format
&
PNG_FORMAT_FLAG_BGR
)
!=
0
?
2
:
0
;
int
bgr
=
(
image
->
format
&
PNG_FORMAT_FLAG_BGR
)
!=
0
?
2
:
0
;
# else
# else
# define bgr 0
# define bgr 0
# endif
# endif
...
@@ -2113,11 +2119,11 @@ png_image_read_colormap(png_voidp argument)
...
@@ -2113,11 +2119,11 @@ png_image_read_colormap(png_voidp argument)
{
{
png_image_read_control
*
display
=
png_image_read_control
*
display
=
png_voidcast
(
png_image_read_control
*
,
argument
);
png_voidcast
(
png_image_read_control
*
,
argument
);
const
png_imagep
image
=
display
->
image
;
png_imagep
image
=
display
->
image
;
const
png_structrp
png_ptr
=
image
->
opaque
->
png_ptr
;
png_structrp
png_ptr
=
image
->
opaque
->
png_ptr
;
const
png_uint_32
output_format
=
image
->
format
;
png_uint_32
output_format
=
image
->
format
;
const
int
output_encoding
=
(
output_format
&
PNG_FORMAT_FLAG_LINEAR
)
!=
0
?
int
output_encoding
=
(
output_format
&
PNG_FORMAT_FLAG_LINEAR
)
!=
0
?
P_LINEAR
:
P_sRGB
;
P_LINEAR
:
P_sRGB
;
unsigned
int
cmap_entries
;
unsigned
int
cmap_entries
;
...
@@ -2830,7 +2836,7 @@ png_image_read_colormap(png_voidp argument)
...
@@ -2830,7 +2836,7 @@ png_image_read_colormap(png_voidp argument)
unsigned
int
num_trans
=
png_ptr
->
num_trans
;
unsigned
int
num_trans
=
png_ptr
->
num_trans
;
png_const_bytep
trans
=
num_trans
>
0
?
png_ptr
->
trans_alpha
:
NULL
;
png_const_bytep
trans
=
num_trans
>
0
?
png_ptr
->
trans_alpha
:
NULL
;
png_const_colorp
colormap
=
png_ptr
->
palette
;
png_const_colorp
colormap
=
png_ptr
->
palette
;
const
int
do_background
=
trans
!=
NULL
&&
int
do_background
=
trans
!=
NULL
&&
(
output_format
&
PNG_FORMAT_FLAG_ALPHA
)
==
0
;
(
output_format
&
PNG_FORMAT_FLAG_ALPHA
)
==
0
;
unsigned
int
i
;
unsigned
int
i
;
...
@@ -3974,7 +3980,7 @@ png_image_read_direct(png_voidp argument)
...
@@ -3974,7 +3980,7 @@ png_image_read_direct(png_voidp argument)
*/
*/
if
(
linear
!=
0
)
if
(
linear
!=
0
)
{
{
PNG_CONST
png_uint_16
le
=
0x0001
;
png_uint_16
le
=
0x0001
;
if
((
*
(
png_const_bytep
)
&
le
)
!=
0
)
if
((
*
(
png_const_bytep
)
&
le
)
!=
0
)
png_set_swap
(
png_ptr
);
png_set_swap
(
png_ptr
);
...
@@ -4136,7 +4142,7 @@ png_image_finish_read(png_imagep image, png_const_colorp background,
...
@@ -4136,7 +4142,7 @@ png_image_finish_read(png_imagep image, png_const_colorp background,
* original PNG format because it may not occur in the output PNG format
* original PNG format because it may not occur in the output PNG format
* and libpng deals with the issues of reading the original.
* and libpng deals with the issues of reading the original.
*/
*/
const
unsigned
int
channels
=
PNG_IMAGE_PIXEL_CHANNELS
(
image
->
format
);
unsigned
int
channels
=
PNG_IMAGE_PIXEL_CHANNELS
(
image
->
format
);
/* The following checks just the 'row_stride' calculation to ensure it
/* The following checks just the 'row_stride' calculation to ensure it
* fits in a signed 32-bit value. Because channels/components can be
* fits in a signed 32-bit value. Because channels/components can be
...
@@ -4147,7 +4153,7 @@ png_image_finish_read(png_imagep image, png_const_colorp background,
...
@@ -4147,7 +4153,7 @@ png_image_finish_read(png_imagep image, png_const_colorp background,
if
(
image
->
width
<=
0x7fffffffU
/
channels
)
/* no overflow */
if
(
image
->
width
<=
0x7fffffffU
/
channels
)
/* no overflow */
{
{
png_uint_32
check
;
png_uint_32
check
;
const
png_uint_32
png_row_stride
=
image
->
width
*
channels
;
png_uint_32
png_row_stride
=
image
->
width
*
channels
;
if
(
row_stride
==
0
)
if
(
row_stride
==
0
)
row_stride
=
(
png_int_32
)
/*SAFE*/
png_row_stride
;
row_stride
=
(
png_int_32
)
/*SAFE*/
png_row_stride
;
...
...
src/share/native/sun/awt/libpng/pngrio.c
浏览文件 @
2aef8baa
...
@@ -29,10 +29,10 @@
...
@@ -29,10 +29,10 @@
* However, the following notice accompanied the original version of this
* However, the following notice accompanied the original version of this
* file and, per its terms, should not be removed:
* file and, per its terms, should not be removed:
*
*
*
Last changed in libpng 1.6.35 [July 15, 2018]
*
Copyright (c) 2018 Cosmin Truta
* Copyright (c) 1998-2002,2004,2006-2016,2018 Glenn Randers-Pehrson
* Copyright (c) 1998-2002,2004,2006-2016,2018 Glenn Randers-Pehrson
*
(Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
*
Copyright (c) 1996-1997 Andreas Dilger
*
(Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
*
Copyright (c) 1995-1996 Guy Eric Schalnat, Group 42, Inc.
*
*
* This code is released under the libpng license.
* This code is released under the libpng license.
* For conditions of distribution and use, see the disclaimer
* For conditions of distribution and use, see the disclaimer
...
...
src/share/native/sun/awt/libpng/pngrtran.c
浏览文件 @
2aef8baa
...
@@ -29,10 +29,10 @@
...
@@ -29,10 +29,10 @@
* However, the following notice accompanied the original version of this
* However, the following notice accompanied the original version of this
* file and, per its terms, should not be removed:
* file and, per its terms, should not be removed:
*
*
*
Last changed in libpng 1.6.35 [July 15, 2018]
*
Copyright (c) 2018-2019 Cosmin Truta
* Copyright (c) 1998-2002,2004,2006-2018 Glenn Randers-Pehrson
* Copyright (c) 1998-2002,2004,2006-2018 Glenn Randers-Pehrson
*
(Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
*
Copyright (c) 1996-1997 Andreas Dilger
*
(Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
*
Copyright (c) 1995-1996 Guy Eric Schalnat, Group 42, Inc.
*
*
* This code is released under the libpng license.
* This code is released under the libpng license.
* For conditions of distribution and use, see the disclaimer
* For conditions of distribution and use, see the disclaimer
...
@@ -46,6 +46,17 @@
...
@@ -46,6 +46,17 @@
#include "pngpriv.h"
#include "pngpriv.h"
#ifdef PNG_ARM_NEON_IMPLEMENTATION
# if PNG_ARM_NEON_IMPLEMENTATION == 1
# define PNG_ARM_NEON_INTRINSICS_AVAILABLE
# if defined(_MSC_VER) && defined(_M_ARM64)
# include <arm64_neon.h>
# else
# include <arm_neon.h>
# endif
# endif
#endif
#ifdef PNG_READ_SUPPORTED
#ifdef PNG_READ_SUPPORTED
/* Set the action on getting a CRC error for an ancillary or critical chunk. */
/* Set the action on getting a CRC error for an ancillary or critical chunk. */
...
@@ -1199,20 +1210,20 @@ png_init_palette_transformations(png_structrp png_ptr)
...
@@ -1199,20 +1210,20 @@ png_init_palette_transformations(png_structrp png_ptr)
png_ptr
->
palette
[
png_ptr
->
background
.
index
].
blue
;
png_ptr
->
palette
[
png_ptr
->
background
.
index
].
blue
;
#ifdef PNG_READ_INVERT_ALPHA_SUPPORTED
#ifdef PNG_READ_INVERT_ALPHA_SUPPORTED
if
((
png_ptr
->
transformations
&
PNG_INVERT_ALPHA
)
!=
0
)
if
((
png_ptr
->
transformations
&
PNG_INVERT_ALPHA
)
!=
0
)
{
{
if
((
png_ptr
->
transformations
&
PNG_EXPAND_tRNS
)
==
0
)
if
((
png_ptr
->
transformations
&
PNG_EXPAND_tRNS
)
==
0
)
{
{
/* Invert the alpha channel (in tRNS) unless the pixels are
/* Invert the alpha channel (in tRNS) unless the pixels are
* going to be expanded, in which case leave it for later
* going to be expanded, in which case leave it for later
*/
*/
int
i
,
istop
=
png_ptr
->
num_trans
;
int
i
,
istop
=
png_ptr
->
num_trans
;
for
(
i
=
0
;
i
<
istop
;
i
++
)
for
(
i
=
0
;
i
<
istop
;
i
++
)
png_ptr
->
trans_alpha
[
i
]
=
(
png_byte
)(
255
-
png_ptr
->
trans_alpha
[
i
]
=
png_ptr
->
trans_alpha
[
i
]);
(
png_byte
)(
255
-
png_ptr
->
trans_alpha
[
i
]);
}
}
}
}
#endif
/* READ_INVERT_ALPHA */
#endif
/* READ_INVERT_ALPHA */
}
}
}
/* background expand and (therefore) no alpha association. */
}
/* background expand and (therefore) no alpha association. */
...
@@ -3014,7 +3025,6 @@ png_do_gray_to_rgb(png_row_infop row_info, png_bytep row)
...
@@ -3014,7 +3025,6 @@ png_do_gray_to_rgb(png_row_infop row_info, png_bytep row)
*/
*/
static
int
static
int
png_do_rgb_to_gray
(
png_structrp
png_ptr
,
png_row_infop
row_info
,
png_bytep
row
)
png_do_rgb_to_gray
(
png_structrp
png_ptr
,
png_row_infop
row_info
,
png_bytep
row
)
{
{
int
rgb_error
=
0
;
int
rgb_error
=
0
;
...
@@ -3023,12 +3033,11 @@ png_do_rgb_to_gray(png_structrp png_ptr, png_row_infop row_info, png_bytep row)
...
@@ -3023,12 +3033,11 @@ png_do_rgb_to_gray(png_structrp png_ptr, png_row_infop row_info, png_bytep row)
if
((
row_info
->
color_type
&
PNG_COLOR_MASK_PALETTE
)
==
0
&&
if
((
row_info
->
color_type
&
PNG_COLOR_MASK_PALETTE
)
==
0
&&
(
row_info
->
color_type
&
PNG_COLOR_MASK_COLOR
)
!=
0
)
(
row_info
->
color_type
&
PNG_COLOR_MASK_COLOR
)
!=
0
)
{
{
PNG_CONST
png_uint_32
rc
=
png_ptr
->
rgb_to_gray_red_coeff
;
png_uint_32
rc
=
png_ptr
->
rgb_to_gray_red_coeff
;
PNG_CONST
png_uint_32
gc
=
png_ptr
->
rgb_to_gray_green_coeff
;
png_uint_32
gc
=
png_ptr
->
rgb_to_gray_green_coeff
;
PNG_CONST
png_uint_32
bc
=
32768
-
rc
-
gc
;
png_uint_32
bc
=
32768
-
rc
-
gc
;
PNG_CONST
png_uint_32
row_width
=
row_info
->
width
;
png_uint_32
row_width
=
row_info
->
width
;
PNG_CONST
int
have_alpha
=
int
have_alpha
=
(
row_info
->
color_type
&
PNG_COLOR_MASK_ALPHA
)
!=
0
;
(
row_info
->
color_type
&
PNG_COLOR_MASK_ALPHA
)
!=
0
;
if
(
row_info
->
bit_depth
==
8
)
if
(
row_info
->
bit_depth
==
8
)
{
{
...
@@ -4171,12 +4180,11 @@ png_do_encode_alpha(png_row_infop row_info, png_bytep row, png_structrp png_ptr)
...
@@ -4171,12 +4180,11 @@ png_do_encode_alpha(png_row_infop row_info, png_bytep row, png_structrp png_ptr)
{
{
if
(
row_info
->
bit_depth
==
8
)
if
(
row_info
->
bit_depth
==
8
)
{
{
PNG_CONST
png_bytep
table
=
png_ptr
->
gamma_from_1
;
png_bytep
table
=
png_ptr
->
gamma_from_1
;
if
(
table
!=
NULL
)
if
(
table
!=
NULL
)
{
{
PNG_CONST
int
step
=
int
step
=
(
row_info
->
color_type
&
PNG_COLOR_MASK_COLOR
)
?
4
:
2
;
(
row_info
->
color_type
&
PNG_COLOR_MASK_COLOR
)
?
4
:
2
;
/* The alpha channel is the last component: */
/* The alpha channel is the last component: */
row
+=
step
-
1
;
row
+=
step
-
1
;
...
@@ -4190,13 +4198,12 @@ png_do_encode_alpha(png_row_infop row_info, png_bytep row, png_structrp png_ptr)
...
@@ -4190,13 +4198,12 @@ png_do_encode_alpha(png_row_infop row_info, png_bytep row, png_structrp png_ptr)
else
if
(
row_info
->
bit_depth
==
16
)
else
if
(
row_info
->
bit_depth
==
16
)
{
{
PNG_CONST
png_uint_16pp
table
=
png_ptr
->
gamma_16_from_1
;
png_uint_16pp
table
=
png_ptr
->
gamma_16_from_1
;
PNG_CONST
int
gamma_shift
=
png_ptr
->
gamma_shift
;
int
gamma_shift
=
png_ptr
->
gamma_shift
;
if
(
table
!=
NULL
)
if
(
table
!=
NULL
)
{
{
PNG_CONST
int
step
=
int
step
=
(
row_info
->
color_type
&
PNG_COLOR_MASK_COLOR
)
?
8
:
4
;
(
row_info
->
color_type
&
PNG_COLOR_MASK_COLOR
)
?
8
:
4
;
/* The alpha channel is the last component: */
/* The alpha channel is the last component: */
row
+=
step
-
2
;
row
+=
step
-
2
;
...
@@ -4227,8 +4234,9 @@ png_do_encode_alpha(png_row_infop row_info, png_bytep row, png_structrp png_ptr)
...
@@ -4227,8 +4234,9 @@ png_do_encode_alpha(png_row_infop row_info, png_bytep row, png_structrp png_ptr)
* upon whether you supply trans and num_trans.
* upon whether you supply trans and num_trans.
*/
*/
static
void
static
void
png_do_expand_palette
(
png_row_infop
row_info
,
png_bytep
row
,
png_do_expand_palette
(
png_structrp
png_ptr
,
png_row_infop
row_info
,
png_const_colorp
palette
,
png_const_bytep
trans_alpha
,
int
num_trans
)
png_bytep
row
,
png_const_colorp
palette
,
png_const_bytep
trans_alpha
,
int
num_trans
)
{
{
int
shift
,
value
;
int
shift
,
value
;
png_bytep
sp
,
dp
;
png_bytep
sp
,
dp
;
...
@@ -4332,14 +4340,27 @@ png_do_expand_palette(png_row_infop row_info, png_bytep row,
...
@@ -4332,14 +4340,27 @@ png_do_expand_palette(png_row_infop row_info, png_bytep row,
sp
=
row
+
(
size_t
)
row_width
-
1
;
sp
=
row
+
(
size_t
)
row_width
-
1
;
dp
=
row
+
((
size_t
)
row_width
<<
2
)
-
1
;
dp
=
row
+
((
size_t
)
row_width
<<
2
)
-
1
;
for
(
i
=
0
;
i
<
row_width
;
i
++
)
i
=
0
;
#ifdef PNG_ARM_NEON_INTRINSICS_AVAILABLE
if
(
png_ptr
->
riffled_palette
!=
NULL
)
{
/* The RGBA optimization works with png_ptr->bit_depth == 8
* but sometimes row_info->bit_depth has been changed to 8.
* In these cases, the palette hasn't been riffled.
*/
i
=
png_do_expand_palette_rgba8_neon
(
png_ptr
,
row_info
,
row
,
&
sp
,
&
dp
);
}
#else
PNG_UNUSED
(
png_ptr
)
#endif
for
(;
i
<
row_width
;
i
++
)
{
{
if
((
int
)(
*
sp
)
>=
num_trans
)
if
((
int
)(
*
sp
)
>=
num_trans
)
*
dp
--
=
0xff
;
*
dp
--
=
0xff
;
else
else
*
dp
--
=
trans_alpha
[
*
sp
];
*
dp
--
=
trans_alpha
[
*
sp
];
*
dp
--
=
palette
[
*
sp
].
blue
;
*
dp
--
=
palette
[
*
sp
].
blue
;
*
dp
--
=
palette
[
*
sp
].
green
;
*
dp
--
=
palette
[
*
sp
].
green
;
*
dp
--
=
palette
[
*
sp
].
red
;
*
dp
--
=
palette
[
*
sp
].
red
;
...
@@ -4356,8 +4377,15 @@ png_do_expand_palette(png_row_infop row_info, png_bytep row,
...
@@ -4356,8 +4377,15 @@ png_do_expand_palette(png_row_infop row_info, png_bytep row,
{
{
sp
=
row
+
(
size_t
)
row_width
-
1
;
sp
=
row
+
(
size_t
)
row_width
-
1
;
dp
=
row
+
(
size_t
)(
row_width
*
3
)
-
1
;
dp
=
row
+
(
size_t
)(
row_width
*
3
)
-
1
;
i
=
0
;
#ifdef PNG_ARM_NEON_INTRINSICS_AVAILABLE
i
=
png_do_expand_palette_rgb8_neon
(
png_ptr
,
row_info
,
row
,
&
sp
,
&
dp
);
#else
PNG_UNUSED
(
png_ptr
)
#endif
for
(
i
=
0
;
i
<
row_width
;
i
++
)
for
(;
i
<
row_width
;
i
++
)
{
{
*
dp
--
=
palette
[
*
sp
].
blue
;
*
dp
--
=
palette
[
*
sp
].
blue
;
*
dp
--
=
palette
[
*
sp
].
green
;
*
dp
--
=
palette
[
*
sp
].
green
;
...
@@ -4771,7 +4799,19 @@ png_do_read_transformations(png_structrp png_ptr, png_row_infop row_info)
...
@@ -4771,7 +4799,19 @@ png_do_read_transformations(png_structrp png_ptr, png_row_infop row_info)
{
{
if
(
row_info
->
color_type
==
PNG_COLOR_TYPE_PALETTE
)
if
(
row_info
->
color_type
==
PNG_COLOR_TYPE_PALETTE
)
{
{
png_do_expand_palette
(
row_info
,
png_ptr
->
row_buf
+
1
,
#ifdef PNG_ARM_NEON_INTRINSICS_AVAILABLE
if
((
png_ptr
->
num_trans
>
0
)
&&
(
png_ptr
->
bit_depth
==
8
))
{
if
(
png_ptr
->
riffled_palette
==
NULL
)
{
/* Initialize the accelerated palette expansion. */
png_ptr
->
riffled_palette
=
(
png_bytep
)
png_malloc
(
png_ptr
,
256
*
4
);
png_riffle_palette_neon
(
png_ptr
);
}
}
#endif
png_do_expand_palette
(
png_ptr
,
row_info
,
png_ptr
->
row_buf
+
1
,
png_ptr
->
palette
,
png_ptr
->
trans_alpha
,
png_ptr
->
num_trans
);
png_ptr
->
palette
,
png_ptr
->
trans_alpha
,
png_ptr
->
num_trans
);
}
}
...
...
src/share/native/sun/awt/libpng/pngrutil.c
浏览文件 @
2aef8baa
...
@@ -29,10 +29,10 @@
...
@@ -29,10 +29,10 @@
* However, the following notice accompanied the original version of this
* However, the following notice accompanied the original version of this
* file and, per its terms, should not be removed:
* file and, per its terms, should not be removed:
*
*
*
Last changed in libpng 1.6.35 [July 15, 2018]
*
Copyright (c) 2018 Cosmin Truta
* Copyright (c) 1998-2002,2004,2006-2018 Glenn Randers-Pehrson
* Copyright (c) 1998-2002,2004,2006-2018 Glenn Randers-Pehrson
*
(Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
*
Copyright (c) 1996-1997 Andreas Dilger
*
(Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
*
Copyright (c) 1995-1996 Guy Eric Schalnat, Group 42, Inc.
*
*
* This code is released under the libpng license.
* This code is released under the libpng license.
* For conditions of distribution and use, see the disclaimer
* For conditions of distribution and use, see the disclaimer
...
@@ -1489,8 +1489,7 @@ png_handle_iCCP(png_structrp png_ptr, png_inforp info_ptr, png_uint_32 length)
...
@@ -1489,8 +1489,7 @@ png_handle_iCCP(png_structrp png_ptr, png_inforp info_ptr, png_uint_32 length)
{
{
/* We have the ICC profile header; do the basic header checks.
/* We have the ICC profile header; do the basic header checks.
*/
*/
const
png_uint_32
profile_length
=
png_uint_32
profile_length
=
png_get_uint_32
(
profile_header
);
png_get_uint_32
(
profile_header
);
if
(
png_icc_check_length
(
png_ptr
,
&
png_ptr
->
colorspace
,
if
(
png_icc_check_length
(
png_ptr
,
&
png_ptr
->
colorspace
,
keyword
,
profile_length
)
!=
0
)
keyword
,
profile_length
)
!=
0
)
...
@@ -1507,8 +1506,8 @@ png_handle_iCCP(png_structrp png_ptr, png_inforp info_ptr, png_uint_32 length)
...
@@ -1507,8 +1506,8 @@ png_handle_iCCP(png_structrp png_ptr, png_inforp info_ptr, png_uint_32 length)
* profile. The header check has already validated
* profile. The header check has already validated
* that none of this stuff will overflow.
* that none of this stuff will overflow.
*/
*/
const
png_uint_32
tag_count
=
png_get_uint_32
(
png_uint_32
tag_count
=
profile_header
+
128
);
png_get_uint_32
(
profile_header
+
128
);
png_bytep
profile
=
png_read_buffer
(
png_ptr
,
png_bytep
profile
=
png_read_buffer
(
png_ptr
,
profile_length
,
2
/*silent*/
);
profile_length
,
2
/*silent*/
);
...
@@ -3160,7 +3159,7 @@ png_handle_unknown(png_structrp png_ptr, png_inforp info_ptr,
...
@@ -3160,7 +3159,7 @@ png_handle_unknown(png_structrp png_ptr, png_inforp info_ptr,
*/
*/
void
/* PRIVATE */
void
/* PRIVATE */
png_check_chunk_name
(
png_const_structrp
png_ptr
,
const
png_uint_32
chunk_name
)
png_check_chunk_name
(
png_const_structrp
png_ptr
,
png_uint_32
chunk_name
)
{
{
int
i
;
int
i
;
png_uint_32
cn
=
chunk_name
;
png_uint_32
cn
=
chunk_name
;
...
@@ -3179,7 +3178,7 @@ png_check_chunk_name(png_const_structrp png_ptr, const png_uint_32 chunk_name)
...
@@ -3179,7 +3178,7 @@ png_check_chunk_name(png_const_structrp png_ptr, const png_uint_32 chunk_name)
}
}
void
/* PRIVATE */
void
/* PRIVATE */
png_check_chunk_length
(
png_const_structrp
png_ptr
,
const
png_uint_32
length
)
png_check_chunk_length
(
png_const_structrp
png_ptr
,
png_uint_32
length
)
{
{
png_alloc_size_t
limit
=
PNG_UINT_31_MAX
;
png_alloc_size_t
limit
=
PNG_UINT_31_MAX
;
...
@@ -3391,7 +3390,7 @@ png_combine_row(png_const_structrp png_ptr, png_bytep dp, int display)
...
@@ -3391,7 +3390,7 @@ png_combine_row(png_const_structrp png_ptr, png_bytep dp, int display)
/* Hence the pre-compiled masks indexed by PACKSWAP (or not), depth and
/* Hence the pre-compiled masks indexed by PACKSWAP (or not), depth and
* then pass:
* then pass:
*/
*/
static
PNG_CONST
png_uint_32
row_mask
[
2
/*PACKSWAP*/
][
3
/*depth*/
][
6
]
=
static
const
png_uint_32
row_mask
[
2
/*PACKSWAP*/
][
3
/*depth*/
][
6
]
=
{
{
/* Little-endian byte masks for PACKSWAP */
/* Little-endian byte masks for PACKSWAP */
{
S_MASKS
(
1
,
0
),
S_MASKS
(
2
,
0
),
S_MASKS
(
4
,
0
)
},
{
S_MASKS
(
1
,
0
),
S_MASKS
(
2
,
0
),
S_MASKS
(
4
,
0
)
},
...
@@ -3402,7 +3401,7 @@ png_combine_row(png_const_structrp png_ptr, png_bytep dp, int display)
...
@@ -3402,7 +3401,7 @@ png_combine_row(png_const_structrp png_ptr, png_bytep dp, int display)
/* display_mask has only three entries for the odd passes, so index by
/* display_mask has only three entries for the odd passes, so index by
* pass>>1.
* pass>>1.
*/
*/
static
PNG_CONST
png_uint_32
display_mask
[
2
][
3
][
3
]
=
static
const
png_uint_32
display_mask
[
2
][
3
][
3
]
=
{
{
/* Little-endian byte masks for PACKSWAP */
/* Little-endian byte masks for PACKSWAP */
{
B_MASKS
(
1
,
0
),
B_MASKS
(
2
,
0
),
B_MASKS
(
4
,
0
)
},
{
B_MASKS
(
1
,
0
),
B_MASKS
(
2
,
0
),
B_MASKS
(
4
,
0
)
},
...
@@ -3715,7 +3714,7 @@ png_do_read_interlace(png_row_infop row_info, png_bytep row, int pass,
...
@@ -3715,7 +3714,7 @@ png_do_read_interlace(png_row_infop row_info, png_bytep row, int pass,
{
{
/* Arrays to facilitate easy interlacing - use pass (0 - 6) as index */
/* Arrays to facilitate easy interlacing - use pass (0 - 6) as index */
/* Offset to next interlace block */
/* Offset to next interlace block */
static
PNG_CONST
unsigned
int
png_pass_inc
[
7
]
=
{
8
,
8
,
4
,
4
,
2
,
2
,
1
};
static
const
unsigned
int
png_pass_inc
[
7
]
=
{
8
,
8
,
4
,
4
,
2
,
2
,
1
};
png_debug
(
1
,
"in png_do_read_interlace"
);
png_debug
(
1
,
"in png_do_read_interlace"
);
if
(
row
!=
NULL
&&
row_info
!=
NULL
)
if
(
row
!=
NULL
&&
row_info
!=
NULL
)
...
@@ -4357,16 +4356,16 @@ png_read_finish_row(png_structrp png_ptr)
...
@@ -4357,16 +4356,16 @@ png_read_finish_row(png_structrp png_ptr)
/* Arrays to facilitate easy interlacing - use pass (0 - 6) as index */
/* Arrays to facilitate easy interlacing - use pass (0 - 6) as index */
/* Start of interlace block */
/* Start of interlace block */
static
PNG_CONST
png_byte
png_pass_start
[
7
]
=
{
0
,
4
,
0
,
2
,
0
,
1
,
0
};
static
const
png_byte
png_pass_start
[
7
]
=
{
0
,
4
,
0
,
2
,
0
,
1
,
0
};
/* Offset to next interlace block */
/* Offset to next interlace block */
static
PNG_CONST
png_byte
png_pass_inc
[
7
]
=
{
8
,
8
,
4
,
4
,
2
,
2
,
1
};
static
const
png_byte
png_pass_inc
[
7
]
=
{
8
,
8
,
4
,
4
,
2
,
2
,
1
};
/* Start of interlace block in the y direction */
/* Start of interlace block in the y direction */
static
PNG_CONST
png_byte
png_pass_ystart
[
7
]
=
{
0
,
0
,
4
,
0
,
2
,
0
,
1
};
static
const
png_byte
png_pass_ystart
[
7
]
=
{
0
,
0
,
4
,
0
,
2
,
0
,
1
};
/* Offset to next interlace block in the y direction */
/* Offset to next interlace block in the y direction */
static
PNG_CONST
png_byte
png_pass_yinc
[
7
]
=
{
8
,
8
,
8
,
4
,
4
,
2
,
2
};
static
const
png_byte
png_pass_yinc
[
7
]
=
{
8
,
8
,
8
,
4
,
4
,
2
,
2
};
png_debug
(
1
,
"in png_read_finish_row"
);
png_debug
(
1
,
"in png_read_finish_row"
);
png_ptr
->
row_number
++
;
png_ptr
->
row_number
++
;
...
@@ -4422,16 +4421,16 @@ png_read_start_row(png_structrp png_ptr)
...
@@ -4422,16 +4421,16 @@ png_read_start_row(png_structrp png_ptr)
/* Arrays to facilitate easy interlacing - use pass (0 - 6) as index */
/* Arrays to facilitate easy interlacing - use pass (0 - 6) as index */
/* Start of interlace block */
/* Start of interlace block */
static
PNG_CONST
png_byte
png_pass_start
[
7
]
=
{
0
,
4
,
0
,
2
,
0
,
1
,
0
};
static
const
png_byte
png_pass_start
[
7
]
=
{
0
,
4
,
0
,
2
,
0
,
1
,
0
};
/* Offset to next interlace block */
/* Offset to next interlace block */
static
PNG_CONST
png_byte
png_pass_inc
[
7
]
=
{
8
,
8
,
4
,
4
,
2
,
2
,
1
};
static
const
png_byte
png_pass_inc
[
7
]
=
{
8
,
8
,
4
,
4
,
2
,
2
,
1
};
/* Start of interlace block in the y direction */
/* Start of interlace block in the y direction */
static
PNG_CONST
png_byte
png_pass_ystart
[
7
]
=
{
0
,
0
,
4
,
0
,
2
,
0
,
1
};
static
const
png_byte
png_pass_ystart
[
7
]
=
{
0
,
0
,
4
,
0
,
2
,
0
,
1
};
/* Offset to next interlace block in the y direction */
/* Offset to next interlace block in the y direction */
static
PNG_CONST
png_byte
png_pass_yinc
[
7
]
=
{
8
,
8
,
8
,
4
,
4
,
2
,
2
};
static
const
png_byte
png_pass_yinc
[
7
]
=
{
8
,
8
,
8
,
4
,
4
,
2
,
2
};
unsigned
int
max_pixel_depth
;
unsigned
int
max_pixel_depth
;
size_t
row_bytes
;
size_t
row_bytes
;
...
...
src/share/native/sun/awt/libpng/pngset.c
浏览文件 @
2aef8baa
...
@@ -29,10 +29,10 @@
...
@@ -29,10 +29,10 @@
* However, the following notice accompanied the original version of this
* However, the following notice accompanied the original version of this
* file and, per its terms, should not be removed:
* file and, per its terms, should not be removed:
*
*
*
Last changed in libpng 1.6.35 [July 15, 2018]
*
Copyright (c) 2018 Cosmin Truta
* Copyright (c) 1998-2018 Glenn Randers-Pehrson
* Copyright (c) 1998-2018 Glenn Randers-Pehrson
*
(Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
*
Copyright (c) 1996-1997 Andreas Dilger
*
(Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
*
Copyright (c) 1995-1996 Guy Eric Schalnat, Group 42, Inc.
*
*
* This code is released under the libpng license.
* This code is released under the libpng license.
* For conditions of distribution and use, see the disclaimer
* For conditions of distribution and use, see the disclaimer
...
@@ -165,7 +165,7 @@ png_set_cHRM_XYZ(png_const_structrp png_ptr, png_inforp info_ptr, double red_X,
...
@@ -165,7 +165,7 @@ png_set_cHRM_XYZ(png_const_structrp png_ptr, png_inforp info_ptr, double red_X,
#ifdef PNG_eXIf_SUPPORTED
#ifdef PNG_eXIf_SUPPORTED
void
PNGAPI
void
PNGAPI
png_set_eXIf
(
png_const_structrp
png_ptr
,
png_inforp
info_ptr
,
png_set_eXIf
(
png_const_structrp
png_ptr
,
png_inforp
info_ptr
,
const
png_bytep
eXIf_buf
)
png_bytep
eXIf_buf
)
{
{
png_warning
(
png_ptr
,
"png_set_eXIf does not work; use png_set_eXIf_1"
);
png_warning
(
png_ptr
,
"png_set_eXIf does not work; use png_set_eXIf_1"
);
PNG_UNUSED
(
info_ptr
)
PNG_UNUSED
(
info_ptr
)
...
@@ -174,7 +174,7 @@ png_set_eXIf(png_const_structrp png_ptr, png_inforp info_ptr,
...
@@ -174,7 +174,7 @@ png_set_eXIf(png_const_structrp png_ptr, png_inforp info_ptr,
void
PNGAPI
void
PNGAPI
png_set_eXIf_1
(
png_const_structrp
png_ptr
,
png_inforp
info_ptr
,
png_set_eXIf_1
(
png_const_structrp
png_ptr
,
png_inforp
info_ptr
,
const
png_uint_32
num_exif
,
const
png_bytep
eXIf_buf
)
png_uint_32
num_exif
,
png_bytep
eXIf_buf
)
{
{
int
i
;
int
i
;
...
@@ -1427,7 +1427,7 @@ png_set_keep_unknown_chunks(png_structrp png_ptr, int keep,
...
@@ -1427,7 +1427,7 @@ png_set_keep_unknown_chunks(png_structrp png_ptr, int keep,
/* Ignore all unknown chunks and all chunks recognized by
/* Ignore all unknown chunks and all chunks recognized by
* libpng except for IHDR, PLTE, tRNS, IDAT, and IEND
* libpng except for IHDR, PLTE, tRNS, IDAT, and IEND
*/
*/
static
PNG_CONST
png_byte
chunks_to_ignore
[]
=
{
static
const
png_byte
chunks_to_ignore
[]
=
{
98
,
75
,
71
,
68
,
'\0'
,
/* bKGD */
98
,
75
,
71
,
68
,
'\0'
,
/* bKGD */
99
,
72
,
82
,
77
,
'\0'
,
/* cHRM */
99
,
72
,
82
,
77
,
'\0'
,
/* cHRM */
101
,
88
,
73
,
102
,
'\0'
,
/* eXIf */
101
,
88
,
73
,
102
,
'\0'
,
/* eXIf */
...
...
src/share/native/sun/awt/libpng/pngstruct.h
浏览文件 @
2aef8baa
...
@@ -29,10 +29,10 @@
...
@@ -29,10 +29,10 @@
* However, the following notice accompanied the original version of this
* However, the following notice accompanied the original version of this
* file and, per its terms, should not be removed:
* file and, per its terms, should not be removed:
*
*
*
Last changed in libpng 1.6.35 [July 15, 2018]
*
Copyright (c) 2018-2019 Cosmin Truta
* Copyright (c) 1998-2002,2004,2006-2018 Glenn Randers-Pehrson
* Copyright (c) 1998-2002,2004,2006-2018 Glenn Randers-Pehrson
*
(Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
*
Copyright (c) 1996-1997 Andreas Dilger
*
(Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
*
Copyright (c) 1995-1996 Guy Eric Schalnat, Group 42, Inc.
*
*
* This code is released under the libpng license.
* This code is released under the libpng license.
* For conditions of distribution and use, see the disclaimer
* For conditions of distribution and use, see the disclaimer
...
@@ -420,6 +420,12 @@ struct png_struct_def
...
@@ -420,6 +420,12 @@ struct png_struct_def
/* deleted in 1.5.5: rgb_to_gray_blue_coeff; */
/* deleted in 1.5.5: rgb_to_gray_blue_coeff; */
#endif
#endif
/* New member added in libpng-1.6.36 */
#if defined(PNG_READ_EXPAND_SUPPORTED) && \
defined(PNG_ARM_NEON_IMPLEMENTATION)
png_bytep
riffled_palette
;
/* buffer for accelerated palette expansion */
#endif
/* New member added in libpng-1.0.4 (renamed in 1.0.9) */
/* New member added in libpng-1.0.4 (renamed in 1.0.9) */
#if defined(PNG_MNG_FEATURES_SUPPORTED)
#if defined(PNG_MNG_FEATURES_SUPPORTED)
/* Changed from png_byte to png_uint_32 at version 1.2.0 */
/* Changed from png_byte to png_uint_32 at version 1.2.0 */
...
...
src/share/native/sun/awt/libpng/pngtrans.c
浏览文件 @
2aef8baa
...
@@ -29,10 +29,10 @@
...
@@ -29,10 +29,10 @@
* However, the following notice accompanied the original version of this
* However, the following notice accompanied the original version of this
* file and, per its terms, should not be removed:
* file and, per its terms, should not be removed:
*
*
*
Last changed in libpng 1.6.35 [July 15, 2018]
*
Copyright (c) 2018 Cosmin Truta
* Copyright (c) 1998-2002,2004,2006-2018 Glenn Randers-Pehrson
* Copyright (c) 1998-2002,2004,2006-2018 Glenn Randers-Pehrson
*
(Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
*
Copyright (c) 1996-1997 Andreas Dilger
*
(Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
*
Copyright (c) 1995-1996 Guy Eric Schalnat, Group 42, Inc.
*
*
* This code is released under the libpng license.
* This code is released under the libpng license.
* For conditions of distribution and use, see the disclaimer
* For conditions of distribution and use, see the disclaimer
...
@@ -373,7 +373,7 @@ png_do_swap(png_row_infop row_info, png_bytep row)
...
@@ -373,7 +373,7 @@ png_do_swap(png_row_infop row_info, png_bytep row)
#endif
#endif
#if defined(PNG_READ_PACKSWAP_SUPPORTED)||defined(PNG_WRITE_PACKSWAP_SUPPORTED)
#if defined(PNG_READ_PACKSWAP_SUPPORTED)||defined(PNG_WRITE_PACKSWAP_SUPPORTED)
static
PNG_CONST
png_byte
onebppswaptable
[
256
]
=
{
static
const
png_byte
onebppswaptable
[
256
]
=
{
0x00
,
0x80
,
0x40
,
0xC0
,
0x20
,
0xA0
,
0x60
,
0xE0
,
0x00
,
0x80
,
0x40
,
0xC0
,
0x20
,
0xA0
,
0x60
,
0xE0
,
0x10
,
0x90
,
0x50
,
0xD0
,
0x30
,
0xB0
,
0x70
,
0xF0
,
0x10
,
0x90
,
0x50
,
0xD0
,
0x30
,
0xB0
,
0x70
,
0xF0
,
0x08
,
0x88
,
0x48
,
0xC8
,
0x28
,
0xA8
,
0x68
,
0xE8
,
0x08
,
0x88
,
0x48
,
0xC8
,
0x28
,
0xA8
,
0x68
,
0xE8
,
...
@@ -408,7 +408,7 @@ static PNG_CONST png_byte onebppswaptable[256] = {
...
@@ -408,7 +408,7 @@ static PNG_CONST png_byte onebppswaptable[256] = {
0x1F
,
0x9F
,
0x5F
,
0xDF
,
0x3F
,
0xBF
,
0x7F
,
0xFF
0x1F
,
0x9F
,
0x5F
,
0xDF
,
0x3F
,
0xBF
,
0x7F
,
0xFF
};
};
static
PNG_CONST
png_byte
twobppswaptable
[
256
]
=
{
static
const
png_byte
twobppswaptable
[
256
]
=
{
0x00
,
0x40
,
0x80
,
0xC0
,
0x10
,
0x50
,
0x90
,
0xD0
,
0x00
,
0x40
,
0x80
,
0xC0
,
0x10
,
0x50
,
0x90
,
0xD0
,
0x20
,
0x60
,
0xA0
,
0xE0
,
0x30
,
0x70
,
0xB0
,
0xF0
,
0x20
,
0x60
,
0xA0
,
0xE0
,
0x30
,
0x70
,
0xB0
,
0xF0
,
0x04
,
0x44
,
0x84
,
0xC4
,
0x14
,
0x54
,
0x94
,
0xD4
,
0x04
,
0x44
,
0x84
,
0xC4
,
0x14
,
0x54
,
0x94
,
0xD4
,
...
@@ -443,7 +443,7 @@ static PNG_CONST png_byte twobppswaptable[256] = {
...
@@ -443,7 +443,7 @@ static PNG_CONST png_byte twobppswaptable[256] = {
0x2F
,
0x6F
,
0xAF
,
0xEF
,
0x3F
,
0x7F
,
0xBF
,
0xFF
0x2F
,
0x6F
,
0xAF
,
0xEF
,
0x3F
,
0x7F
,
0xBF
,
0xFF
};
};
static
PNG_CONST
png_byte
fourbppswaptable
[
256
]
=
{
static
const
png_byte
fourbppswaptable
[
256
]
=
{
0x00
,
0x10
,
0x20
,
0x30
,
0x40
,
0x50
,
0x60
,
0x70
,
0x00
,
0x10
,
0x20
,
0x30
,
0x40
,
0x50
,
0x60
,
0x70
,
0x80
,
0x90
,
0xA0
,
0xB0
,
0xC0
,
0xD0
,
0xE0
,
0xF0
,
0x80
,
0x90
,
0xA0
,
0xB0
,
0xC0
,
0xD0
,
0xE0
,
0xF0
,
0x01
,
0x11
,
0x21
,
0x31
,
0x41
,
0x51
,
0x61
,
0x71
,
0x01
,
0x11
,
0x21
,
0x31
,
0x41
,
0x51
,
0x61
,
0x71
,
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录