Skip to content

Commit 01b2138

Browse files
committed
8297088: Update LCMS to 2.14
Reviewed-by: mbaesken Backport-of: f2c3f352bbe7222d7a43fa26f091372ecef20a68
1 parent 972ff6f commit 01b2138

31 files changed

+2002
-591
lines changed
Lines changed: 96 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,107 @@
1-
## Little Color Management System (LCMS) v2.12
1+
## Little Color Management System (LCMS) v2.14
22

33
### LCMS License
44
<pre>
55

6-
Little Color Management System
7-
Copyright (c) 1998-2020 Marti Maria Saguer
6+
README.1ST file information
7+
8+
LittleCMS core is released under MIT License
9+
10+
---------------------------------
11+
12+
Little CMS
13+
Copyright (c) 1998-2022 Marti Maria Saguer
814

915
Permission is hereby granted, free of charge, to any person obtaining
10-
a copy of this software and associated documentation files (the "Software"),
11-
to deal in the Software without restriction, including without limitation
12-
the rights to use, copy, modify, merge, publish, distribute, sublicense,
13-
and/or sell copies of the Software, and to permit persons to whom the Software
14-
is furnished to do so, subject to the following conditions:
16+
a copy of this software and associated documentation files (the
17+
"Software"), to deal in the Software without restriction, including
18+
without limitation the rights to use, copy, modify, merge, publish,
19+
distribute, sublicense, and/or sell copies of the Software, and to
20+
permit persons to whom the Software is furnished to do so, subject
21+
to the following conditions:
1522

16-
The above copyright notice and this permission notice shall be included in
17-
all copies or substantial portions of the Software.
23+
The above copyright notice and this permission notice shall be
24+
included in all copies or substantial portions of the Software.
1825

1926
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
20-
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO
21-
THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
22-
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
23-
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
24-
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
25-
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
27+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
28+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
29+
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
30+
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
31+
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
32+
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
33+
34+
---------------------------------
35+
36+
The below license applies to the following files:
37+
liblcms/cmssm.c
38+
39+
Copyright 2001, softSurfer (www.softsurfer.com)
40+
41+
This code may be freely used and modified for any purpose
42+
providing that this copyright notice is included with it.
43+
SoftSurfer makes no warranty for this code, and cannot be held
44+
liable for any real or imagined damage resulting from its use.
45+
Users of this code must verify correctness for their application.
46+
2647

2748
</pre>
49+
50+
### AUTHORS File Information
51+
```
52+
53+
Main Author
54+
------------
55+
Marti Maria
56+
57+
58+
Contributors
59+
------------
60+
Bob Friesenhahn
61+
Kai-Uwe Behrmann
62+
Stuart Nixon
63+
Jordi Vilar
64+
Richard Hughes
65+
Auke Nauta
66+
Chris Evans (Google)
67+
Lorenzo Ridolfi
68+
Robin Watts (Artifex)
69+
Shawn Pedersen
70+
Andrew Brygin
71+
Samuli Suominen
72+
Florian Hˆch
73+
Aurelien Jarno
74+
Claudiu Cebuc
75+
Michael Vhrel (Artifex)
76+
Michal Cihar
77+
Daniel Kaneider
78+
Mateusz Jurczyk (Google)
79+
Paul Miller
80+
SÈbastien LÈon
81+
Christian Schmitz
82+
XhmikosR
83+
Stanislav Brabec (SuSe)
84+
Leonhard Gruenschloss (Google)
85+
Patrick Noffke
86+
Christopher James Halse Rogers
87+
John Hein
88+
Thomas Weber (Debian)
89+
Mark Allen
90+
Noel Carboni
91+
Sergei Trofimovic
92+
Philipp Knechtges
93+
94+
Special Thanks
95+
--------------
96+
Artifex software
97+
AlienSkin software
98+
Jan Morovic
99+
Jos Vernon (WebSupergoo)
100+
Harald Schneider (Maxon)
101+
Christian Albrecht
102+
Dimitrios Anastassakis
103+
Lemke Software
104+
Tim Zaman
105+
106+
107+
```
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
# Tips and tasks when updating LittleCMS sources to a newer version.
2+
3+
Download and unzip latest release from https://sourceforge.net/projects/lcms/files/
4+
Replace files in src/java.desktop/share/native/liblcms with files from unzipped src and include folders
5+
Replace is important because the lcms sources here are just the subset needed by JDK.
6+
This is deliberate, so when updating be sure to import only the same files.
7+
If a file has been removed from upstream you will notice it during the copy.
8+
It should then be removed from the JDK sources.
9+
If a new file is needed then the build will fail. Manually copy that in.
10+
11+
Some re-editing of these updated files will be needed.
12+
Use "expand" and "sed" to remove tabs and trailing white space from the imported files.
13+
Re-apply the GPL headers used by the JDK. If done correctly these should then not
14+
show up in the PR diff.
15+
16+
Update src/java.desktop/share/legal/lcms.md per the current license/copyrights/attributions etc.
17+
18+
Build on all platforms.
19+
If there are compiler warnings causing build failures, update the disabled warnings in
20+
make/modules/java.desktop/lib/Awt2dLibraries.gmk
21+
Run all automated client tests on all platforms.
22+
Also run J2Ddemo and pay particular attention to the "color" tab.
23+
Visually verify the color transforms against the same with the current/previous JDK

src/java.desktop/share/native/liblcms/cmsalpha.c

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
//---------------------------------------------------------------------------------
3131
//
3232
// Little Color Management System
33-
// Copyright (c) 1998-2020 Marti Maria Saguer
33+
// Copyright (c) 1998-2022 Marti Maria Saguer
3434
//
3535
// Permission is hereby granted, free of charge, to any person obtaining
3636
// a copy of this software and associated documentation files (the "Software"),
@@ -220,21 +220,21 @@ static
220220
void fromFLTto8(void* dst, const void* src)
221221
{
222222
cmsFloat32Number n = *(cmsFloat32Number*)src;
223-
*(cmsUInt8Number*)dst = _cmsQuickSaturateByte(n * 255.0f);
223+
*(cmsUInt8Number*)dst = _cmsQuickSaturateByte(n * 255.0);
224224
}
225225

226226
static
227227
void fromFLTto16(void* dst, const void* src)
228228
{
229229
cmsFloat32Number n = *(cmsFloat32Number*)src;
230-
*(cmsUInt16Number*)dst = _cmsQuickSaturateWord(n * 65535.0f);
230+
*(cmsUInt16Number*)dst = _cmsQuickSaturateWord(n * 65535.0);
231231
}
232232

233233
static
234234
void fromFLTto16SE(void* dst, const void* src)
235235
{
236236
cmsFloat32Number n = *(cmsFloat32Number*)src;
237-
cmsUInt16Number i = _cmsQuickSaturateWord(n * 65535.0f);
237+
cmsUInt16Number i = _cmsQuickSaturateWord(n * 65535.0);
238238

239239
*(cmsUInt16Number*)dst = CHANGE_ENDIAN(i);
240240
}
@@ -272,7 +272,7 @@ void fromHLFto8(void* dst, const void* src)
272272
{
273273
#ifndef CMS_NO_HALF_SUPPORT
274274
cmsFloat32Number n = _cmsHalf2Float(*(cmsUInt16Number*)src);
275-
*(cmsUInt8Number*)dst = _cmsQuickSaturateByte(n * 255.0f);
275+
*(cmsUInt8Number*)dst = _cmsQuickSaturateByte(n * 255.0);
276276
#else
277277
cmsUNUSED_PARAMETER(dst);
278278
cmsUNUSED_PARAMETER(src);
@@ -285,7 +285,7 @@ void fromHLFto16(void* dst, const void* src)
285285
{
286286
#ifndef CMS_NO_HALF_SUPPORT
287287
cmsFloat32Number n = _cmsHalf2Float(*(cmsUInt16Number*)src);
288-
*(cmsUInt16Number*)dst = _cmsQuickSaturateWord(n * 65535.0f);
288+
*(cmsUInt16Number*)dst = _cmsQuickSaturateWord(n * 65535.0);
289289
#else
290290
cmsUNUSED_PARAMETER(dst);
291291
cmsUNUSED_PARAMETER(src);
@@ -297,7 +297,7 @@ void fromHLFto16SE(void* dst, const void* src)
297297
{
298298
#ifndef CMS_NO_HALF_SUPPORT
299299
cmsFloat32Number n = _cmsHalf2Float(*(cmsUInt16Number*)src);
300-
cmsUInt16Number i = _cmsQuickSaturateWord(n * 65535.0f);
300+
cmsUInt16Number i = _cmsQuickSaturateWord(n * 65535.0);
301301
*(cmsUInt16Number*)dst = CHANGE_ENDIAN(i);
302302
#else
303303
cmsUNUSED_PARAMETER(dst);
@@ -443,9 +443,9 @@ void ComputeIncrementsForChunky(cmsUInt32Number Format,
443443
cmsUInt32Number channelSize = trueBytesSize(Format);
444444
cmsUInt32Number pixelSize = channelSize * total_chans;
445445

446-
// Sanity check
447-
if (total_chans <= 0 || total_chans >= cmsMAXCHANNELS)
448-
return;
446+
// Sanity check
447+
if (total_chans <= 0 || total_chans >= cmsMAXCHANNELS)
448+
return;
449449

450450
memset(channels, 0, sizeof(channels));
451451

src/java.desktop/share/native/liblcms/cmscam02.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
//---------------------------------------------------------------------------------
3131
//
3232
// Little Color Management System
33-
// Copyright (c) 1998-2020 Marti Maria Saguer
33+
// Copyright (c) 1998-2022 Marti Maria Saguer
3434
//
3535
// Permission is hereby granted, free of charge, to any person obtaining
3636
// a copy of this software and associated documentation files (the "Software"),

0 commit comments

Comments
 (0)