Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
d462bcdf
Commit
d462bcdf
authored
Mar 11, 2023
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
lcms2: Import upstream release 2.15.
parent
fbfa4a3a
Hide whitespace changes
Inline
Side-by-side
Showing
24 changed files
with
88 additions
and
50 deletions
+88
-50
AUTHORS
libs/lcms2/AUTHORS
+4
-0
lcms2.h
libs/lcms2/include/lcms2.h
+4
-4
lcms2_plugin.h
libs/lcms2/include/lcms2_plugin.h
+1
-1
cmsalpha.c
libs/lcms2/src/cmsalpha.c
+1
-1
cmscnvrt.c
libs/lcms2/src/cmscnvrt.c
+6
-6
cmserr.c
libs/lcms2/src/cmserr.c
+1
-1
cmsgamma.c
libs/lcms2/src/cmsgamma.c
+5
-1
cmshalf.c
libs/lcms2/src/cmshalf.c
+1
-1
cmsintrp.c
libs/lcms2/src/cmsintrp.c
+1
-1
cmsio0.c
libs/lcms2/src/cmsio0.c
+4
-4
cmsio1.c
libs/lcms2/src/cmsio1.c
+5
-1
cmslut.c
libs/lcms2/src/cmslut.c
+1
-1
cmsmtrx.c
libs/lcms2/src/cmsmtrx.c
+1
-1
cmsnamed.c
libs/lcms2/src/cmsnamed.c
+10
-2
cmsopt.c
libs/lcms2/src/cmsopt.c
+5
-1
cmspack.c
libs/lcms2/src/cmspack.c
+5
-5
cmspcs.c
libs/lcms2/src/cmspcs.c
+1
-1
cmsplugin.c
libs/lcms2/src/cmsplugin.c
+9
-7
cmssamp.c
libs/lcms2/src/cmssamp.c
+3
-4
cmstypes.c
libs/lcms2/src/cmstypes.c
+12
-2
cmsvirt.c
libs/lcms2/src/cmsvirt.c
+1
-1
cmswtpnt.c
libs/lcms2/src/cmswtpnt.c
+5
-2
cmsxform.c
libs/lcms2/src/cmsxform.c
+1
-1
lcms2_internal.h
libs/lcms2/src/lcms2_internal.h
+1
-1
No files found.
libs/lcms2/AUTHORS
View file @
d462bcdf
...
...
@@ -39,11 +39,15 @@ Mark Allen
Noel Carboni
Sergei Trofimovic
Philipp Knechtges
Amyspark
Lovell Fuller
Eli Schwartz
Special Thanks
--------------
Artifex software
AlienSkin software
libVIPS
Jan Morovic
Jos Vernon (WebSupergoo)
Harald Schneider (Maxon)
...
...
libs/lcms2/include/lcms2.h
View file @
d462bcdf
//---------------------------------------------------------------------------------
//
// Little Color Management System
// Copyright (c) 1998-202
2
Marti Maria Saguer
// Copyright (c) 1998-202
3
Marti Maria Saguer
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the "Software"),
...
...
@@ -23,7 +23,7 @@
//
//---------------------------------------------------------------------------------
//
// Version 2.1
4
// Version 2.1
5
//
#ifndef _lcms2_H
...
...
@@ -81,7 +81,7 @@ extern "C" {
#endif
// Version/release
#define LCMS_VERSION 21
4
0
#define LCMS_VERSION 21
5
0
// I will give the chance of redefining basic types for compilers that are not fully C99 compliant
#ifndef CMS_BASIC_TYPES_ALREADY_DEFINED
...
...
@@ -227,7 +227,7 @@ typedef int cmsBool;
// Calling convention -- this is hardly platform and compiler dependent
#if
def CMS_IS_WINDOWS_
#if
defined(CMS_IS_WINDOWS_) && !defined(__GNUC__)
# if defined(CMS_DLL) || defined(CMS_DLL_BUILD)
# ifdef __BORLANDC__
# define CMSEXPORT __stdcall _export
...
...
libs/lcms2/include/lcms2_plugin.h
View file @
d462bcdf
//---------------------------------------------------------------------------------
//
// Little Color Management System
// Copyright (c) 1998-202
2
Marti Maria Saguer
// Copyright (c) 1998-202
3
Marti Maria Saguer
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the "Software"),
...
...
libs/lcms2/src/cmsalpha.c
View file @
d462bcdf
//---------------------------------------------------------------------------------
//
// Little Color Management System
// Copyright (c) 1998-202
2
Marti Maria Saguer
// Copyright (c) 1998-202
3
Marti Maria Saguer
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the "Software"),
...
...
libs/lcms2/src/cmscnvrt.c
View file @
d462bcdf
//---------------------------------------------------------------------------------
//
// Little Color Management System
// Copyright (c) 1998-202
2
Marti Maria Saguer
// Copyright (c) 1998-202
3
Marti Maria Saguer
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the "Software"),
...
...
@@ -234,7 +234,7 @@ cmsFloat64Number CHAD2Temp(const cmsMAT3* Chad)
// Compute a CHAD based on a given temperature
static
void
Temp2CHAD
(
cmsMAT3
*
Chad
,
cmsFloat64Number
Temp
)
void
Temp2CHAD
(
cmsMAT3
*
Chad
,
cmsFloat64Number
Temp
)
{
cmsCIEXYZ
White
;
cmsCIExyY
ChromaticityOfWhite
;
...
...
@@ -370,11 +370,11 @@ cmsBool ComputeConversion(cmsUInt32Number i,
cmsCIEXYZ
WhitePointIn
,
WhitePointOut
;
cmsMAT3
ChromaticAdaptationMatrixIn
,
ChromaticAdaptationMatrixOut
;
_cmsReadMediaWhitePoint
(
&
WhitePointIn
,
hProfiles
[
i
-
1
])
;
_cmsReadCHAD
(
&
ChromaticAdaptationMatrixIn
,
hProfiles
[
i
-
1
])
;
if
(
!
_cmsReadMediaWhitePoint
(
&
WhitePointIn
,
hProfiles
[
i
-
1
]))
return
FALSE
;
if
(
!
_cmsReadCHAD
(
&
ChromaticAdaptationMatrixIn
,
hProfiles
[
i
-
1
]))
return
FALSE
;
_cmsReadMediaWhitePoint
(
&
WhitePointOut
,
hProfiles
[
i
])
;
_cmsReadCHAD
(
&
ChromaticAdaptationMatrixOut
,
hProfiles
[
i
])
;
if
(
!
_cmsReadMediaWhitePoint
(
&
WhitePointOut
,
hProfiles
[
i
]))
return
FALSE
;
if
(
!
_cmsReadCHAD
(
&
ChromaticAdaptationMatrixOut
,
hProfiles
[
i
]))
return
FALSE
;
if
(
!
ComputeAbsoluteIntent
(
AdaptationState
,
&
WhitePointIn
,
&
ChromaticAdaptationMatrixIn
,
...
...
libs/lcms2/src/cmserr.c
View file @
d462bcdf
//---------------------------------------------------------------------------------
//
// Little Color Management System
// Copyright (c) 1998-202
2
Marti Maria Saguer
// Copyright (c) 1998-202
3
Marti Maria Saguer
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the "Software"),
...
...
libs/lcms2/src/cmsgamma.c
View file @
d462bcdf
//---------------------------------------------------------------------------------
//
// Little Color Management System
// Copyright (c) 1998-202
2
Marti Maria Saguer
// Copyright (c) 1998-202
3
Marti Maria Saguer
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the "Software"),
...
...
@@ -823,6 +823,10 @@ cmsToneCurve* CMSEXPORT cmsBuildTabulatedToneCurveFloat(cmsContext ContextID, cm
{
cmsCurveSegment
Seg
[
3
];
// Do some housekeeping
if
(
nEntries
==
0
||
values
==
NULL
)
return
NULL
;
// A segmented tone curve should have function segments in the first and last positions
// Initialize segmented curve part up to 0 to constant value = samples[0]
Seg
[
0
].
x0
=
MINUS_INF
;
...
...
libs/lcms2/src/cmshalf.c
View file @
d462bcdf
//---------------------------------------------------------------------------------
//
// Little Color Management System
// Copyright (c) 1998-202
2
Marti Maria Saguer
// Copyright (c) 1998-202
3
Marti Maria Saguer
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the "Software"),
...
...
libs/lcms2/src/cmsintrp.c
View file @
d462bcdf
//---------------------------------------------------------------------------------
//
// Little Color Management System
// Copyright (c) 1998-202
2
Marti Maria Saguer
// Copyright (c) 1998-202
3
Marti Maria Saguer
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the "Software"),
...
...
libs/lcms2/src/cmsio0.c
View file @
d462bcdf
//---------------------------------------------------------------------------------
//
// Little Color Management System
// Copyright (c) 1998-202
2
Marti Maria Saguer
// Copyright (c) 1998-202
3
Marti Maria Saguer
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the "Software"),
...
...
@@ -1922,7 +1922,7 @@ cmsUInt32Number CMSEXPORT cmsReadRawTag(cmsHPROFILE hProfile, cmsTagSignature si
if
(
data
!=
NULL
)
{
if
(
BufferSize
<
TagSize
)
goto
Error
;
TagSize
=
BufferSize
;
if
(
!
Icc
->
IOhandler
->
Seek
(
Icc
->
IOhandler
,
Offset
))
goto
Error
;
if
(
!
Icc
->
IOhandler
->
Read
(
Icc
->
IOhandler
,
data
,
1
,
TagSize
))
goto
Error
;
...
...
@@ -1935,7 +1935,7 @@ cmsUInt32Number CMSEXPORT cmsReadRawTag(cmsHPROFILE hProfile, cmsTagSignature si
return
Icc
->
TagSizes
[
i
];
}
// The data has been already read, or written. But wait!, maybe the user chose to save as
// The data has been already read, or written. But wait!, maybe the user cho
o
se to save as
// raw data. In this case, return the raw data directly
if
(
Icc
->
TagSaveAsRaw
[
i
])
{
...
...
@@ -1944,7 +1944,7 @@ cmsUInt32Number CMSEXPORT cmsReadRawTag(cmsHPROFILE hProfile, cmsTagSignature si
TagSize
=
Icc
->
TagSizes
[
i
];
if
(
BufferSize
<
TagSize
)
goto
Error
;
TagSize
=
BufferSize
;
memmove
(
data
,
Icc
->
TagPtrs
[
i
],
TagSize
);
...
...
libs/lcms2/src/cmsio1.c
View file @
d462bcdf
//---------------------------------------------------------------------------------
//
// Little Color Management System
// Copyright (c) 1998-202
2
Marti Maria Saguer
// Copyright (c) 1998-202
3
Marti Maria Saguer
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the "Software"),
...
...
@@ -851,6 +851,10 @@ cmsBool CMSEXPORT cmsIsCLUT(cmsHPROFILE hProfile, cmsUInt32Number Intent, cmsUI
return
FALSE
;
}
// Extended intents are not strictly CLUT-based
if
(
Intent
>
INTENT_ABSOLUTE_COLORIMETRIC
)
return
FALSE
;
return
cmsIsTag
(
hProfile
,
TagTable
[
Intent
]);
}
...
...
libs/lcms2/src/cmslut.c
View file @
d462bcdf
//---------------------------------------------------------------------------------
//
// Little Color Management System
// Copyright (c) 1998-202
2
Marti Maria Saguer
// Copyright (c) 1998-202
3
Marti Maria Saguer
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the "Software"),
...
...
libs/lcms2/src/cmsmtrx.c
View file @
d462bcdf
//---------------------------------------------------------------------------------
//
// Little Color Management System
// Copyright (c) 1998-202
2
Marti Maria Saguer
// Copyright (c) 1998-202
3
Marti Maria Saguer
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the "Software"),
...
...
libs/lcms2/src/cmsnamed.c
View file @
d462bcdf
//---------------------------------------------------------------------------------
//
// Little Color Management System
// Copyright (c) 1998-202
2
Marti Maria Saguer
// Copyright (c) 1998-202
3
Marti Maria Saguer
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the "Software"),
...
...
@@ -370,6 +370,8 @@ const wchar_t* _cmsMLUgetWide(const cmsMLU* mlu,
if
(
len
!=
NULL
)
*
len
=
v
->
Len
;
if
(
v
->
StrW
+
v
->
Len
>
mlu
->
PoolSize
)
return
NULL
;
return
(
wchar_t
*
)
((
cmsUInt8Number
*
)
mlu
->
MemPool
+
v
->
StrW
);
}
...
...
@@ -761,7 +763,13 @@ cmsStage* CMSEXPORT _cmsStageAllocNamedColor(cmsNAMEDCOLORLIST* NamedColorList,
cmsNAMEDCOLORLIST
*
CMSEXPORT
cmsGetNamedColorList
(
cmsHTRANSFORM
xform
)
{
_cmsTRANSFORM
*
v
=
(
_cmsTRANSFORM
*
)
xform
;
cmsStage
*
mpe
=
v
->
Lut
->
Elements
;
cmsStage
*
mpe
;
if
(
v
==
NULL
)
return
NULL
;
if
(
v
->
Lut
==
NULL
)
return
NULL
;
mpe
=
v
->
Lut
->
Elements
;
if
(
mpe
==
NULL
)
return
NULL
;
if
(
mpe
->
Type
!=
cmsSigNamedColorElemType
)
return
NULL
;
return
(
cmsNAMEDCOLORLIST
*
)
mpe
->
Data
;
...
...
libs/lcms2/src/cmsopt.c
View file @
d462bcdf
//---------------------------------------------------------------------------------
//
// Little Color Management System
// Copyright (c) 1998-202
2
Marti Maria Saguer
// Copyright (c) 1998-202
3
Marti Maria Saguer
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the "Software"),
...
...
@@ -1695,6 +1695,10 @@ cmsBool OptimizeMatrixShaper(cmsPipeline** Lut, cmsUInt32Number Intent, cmsUInt3
_cmsStageMatrixData
*
Data1
=
(
_cmsStageMatrixData
*
)
cmsStageData
(
Matrix1
);
_cmsStageMatrixData
*
Data2
=
(
_cmsStageMatrixData
*
)
cmsStageData
(
Matrix2
);
// Only RGB to RGB
if
(
Matrix1
->
InputChannels
!=
3
||
Matrix1
->
OutputChannels
!=
3
||
Matrix2
->
InputChannels
!=
3
||
Matrix2
->
OutputChannels
!=
3
)
return
FALSE
;
// Input offset should be zero
if
(
Data1
->
Offset
!=
NULL
)
return
FALSE
;
...
...
libs/lcms2/src/cmspack.c
View file @
d462bcdf
//---------------------------------------------------------------------------------
//
// Little Color Management System
// Copyright (c) 1998-202
2
Marti Maria Saguer
// Copyright (c) 1998-202
3
Marti Maria Saguer
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the "Software"),
...
...
@@ -1707,7 +1707,7 @@ cmsUInt8Number* PackChunkyBytes(CMSREGISTER _cmsTRANSFORM* info,
if
(
Reverse
)
v
=
REVERSE_FLAVOR_16
(
v
);
if
(
Premul
&&
alpha_factor
!=
0
)
if
(
Premul
)
{
v
=
(
cmsUInt16Number
)((
cmsUInt32Number
)((
cmsUInt32Number
)
v
*
alpha_factor
+
0x8000
)
>>
16
);
}
...
...
@@ -1776,7 +1776,7 @@ cmsUInt8Number* PackChunkyWords(CMSREGISTER _cmsTRANSFORM* info,
if
(
Reverse
)
v
=
REVERSE_FLAVOR_16
(
v
);
if
(
Premul
&&
alpha_factor
!=
0
)
if
(
Premul
)
{
v
=
(
cmsUInt16Number
)((
cmsUInt32Number
)((
cmsUInt32Number
)
v
*
alpha_factor
+
0x8000
)
>>
16
);
}
...
...
@@ -1843,7 +1843,7 @@ cmsUInt8Number* PackPlanarBytes(CMSREGISTER _cmsTRANSFORM* info,
if
(
Reverse
)
v
=
REVERSE_FLAVOR_16
(
v
);
if
(
Premul
&&
alpha_factor
!=
0
)
if
(
Premul
)
{
v
=
(
cmsUInt16Number
)((
cmsUInt32Number
)((
cmsUInt32Number
)
v
*
alpha_factor
+
0x8000
)
>>
16
);
}
...
...
@@ -1903,7 +1903,7 @@ cmsUInt8Number* PackPlanarWords(CMSREGISTER _cmsTRANSFORM* info,
if
(
Reverse
)
v
=
REVERSE_FLAVOR_16
(
v
);
if
(
Premul
&&
alpha_factor
!=
0
)
if
(
Premul
)
{
v
=
(
cmsUInt16Number
)((
cmsUInt32Number
)((
cmsUInt32Number
)
v
*
alpha_factor
+
0x8000
)
>>
16
);
}
...
...
libs/lcms2/src/cmspcs.c
View file @
d462bcdf
//---------------------------------------------------------------------------------
//
// Little Color Management System
// Copyright (c) 1998-202
2
Marti Maria Saguer
// Copyright (c) 1998-202
3
Marti Maria Saguer
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the "Software"),
...
...
libs/lcms2/src/cmsplugin.c
View file @
d462bcdf
//---------------------------------------------------------------------------------
//
// Little Color Management System
// Copyright (c) 1998-202
2
Marti Maria Saguer
// Copyright (c) 1998-202
3
Marti Maria Saguer
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the "Software"),
...
...
@@ -796,8 +796,6 @@ void* _cmsContextGetClientChunk(cmsContext ContextID, _cmsMemoryClient mc)
// identify which plug-in to unregister.
void
CMSEXPORT
cmsUnregisterPluginsTHR
(
cmsContext
ContextID
)
{
struct
_cmsContext_struct
*
ctx
=
_cmsGetContext
(
ContextID
);
_cmsRegisterMemHandlerPlugin
(
ContextID
,
NULL
);
_cmsRegisterInterpPlugin
(
ContextID
,
NULL
);
_cmsRegisterTagTypePlugin
(
ContextID
,
NULL
);
...
...
@@ -811,9 +809,6 @@ void CMSEXPORT cmsUnregisterPluginsTHR(cmsContext ContextID)
_cmsRegisterMutexPlugin
(
ContextID
,
NULL
);
_cmsRegisterParallelizationPlugin
(
ContextID
,
NULL
);
if
(
ctx
->
MemPool
!=
NULL
)
_cmsSubAllocDestroy
(
ctx
->
MemPool
);
ctx
->
MemPool
=
NULL
;
}
...
...
@@ -981,7 +976,14 @@ cmsContext CMSEXPORT cmsDupContext(cmsContext ContextID, void* NewUserData)
// The ContextID can no longer be used in any THR operation.
void
CMSEXPORT
cmsDeleteContext
(
cmsContext
ContextID
)
{
if
(
ContextID
!=
NULL
)
{
if
(
ContextID
==
NULL
)
{
cmsUnregisterPlugins
();
if
(
globalContext
.
MemPool
!=
NULL
)
_cmsSubAllocDestroy
(
globalContext
.
MemPool
);
globalContext
.
MemPool
=
NULL
;
}
else
{
struct
_cmsContext_struct
*
ctx
=
(
struct
_cmsContext_struct
*
)
ContextID
;
struct
_cmsContext_struct
fakeContext
;
...
...
libs/lcms2/src/cmssamp.c
View file @
d462bcdf
//---------------------------------------------------------------------------------
//
// Little Color Management System
// Copyright (c) 1998-202
2
Marti Maria Saguer
// Copyright (c) 1998-202
3
Marti Maria Saguer
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the "Software"),
...
...
@@ -123,10 +123,9 @@ cmsBool BlackPointAsDarkerColorant(cmsHPROFILE hInput,
// Convert black to Lab
cmsDoTransform
(
xform
,
Black
,
&
Lab
,
1
);
// Force it to be neutral, c
lip to max. L* of 50
// Force it to be neutral, c
heck for inconsistences
Lab
.
a
=
Lab
.
b
=
0
;
if
(
Lab
.
L
>
50
)
Lab
.
L
=
50
;
if
(
Lab
.
L
<
0
)
Lab
.
L
=
0
;
if
(
Lab
.
L
>
50
||
Lab
.
L
<
0
)
Lab
.
L
=
0
;
// Free the resources
cmsDeleteTransform
(
xform
);
...
...
libs/lcms2/src/cmstypes.c
View file @
d462bcdf
//---------------------------------------------------------------------------------
//
// Little Color Management System
// Copyright (c) 1998-202
2
Marti Maria Saguer
// Copyright (c) 1998-202
3
Marti Maria Saguer
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the "Software"),
...
...
@@ -1520,6 +1520,12 @@ void *Type_MLU_Read(struct _cms_typehandler_struct* self, cmsIOHANDLER* io, cmsU
if
(
!
_cmsReadUInt32Number
(
io
,
&
Len
))
goto
Error
;
if
(
!
_cmsReadUInt32Number
(
io
,
&
Offset
))
goto
Error
;
// Offset MUST be even because it indexes a block of utf16 chars.
// Tricky profiles that uses odd positions will not work anyway
// because the whole utf16 block is previously converted to wchar_t
// and sizeof this type may be of 4 bytes. On Linux systems, for example.
if
(
Offset
&
1
)
goto
Error
;
// Check for overflow
if
(
Offset
<
(
SizeOfHeader
+
8
))
goto
Error
;
if
(((
Offset
+
Len
)
<
Len
)
||
((
Offset
+
Len
)
>
SizeOfTag
+
8
))
goto
Error
;
...
...
@@ -1547,8 +1553,12 @@ void *Type_MLU_Read(struct _cms_typehandler_struct* self, cmsIOHANDLER* io, cmsU
}
else
{
Block
=
(
wchar_t
*
)
_cmsMalloc
(
self
->
ContextID
,
SizeOfTag
);
// Make sure this is an even utf16 size.
if
(
SizeOfTag
&
1
)
goto
Error
;
Block
=
(
wchar_t
*
)
_cmsCalloc
(
self
->
ContextID
,
1
,
SizeOfTag
);
if
(
Block
==
NULL
)
goto
Error
;
NumOfWchar
=
SizeOfTag
/
sizeof
(
wchar_t
);
if
(
!
_cmsReadWCharArray
(
io
,
NumOfWchar
,
Block
))
{
_cmsFree
(
self
->
ContextID
,
Block
);
...
...
libs/lcms2/src/cmsvirt.c
View file @
d462bcdf
//---------------------------------------------------------------------------------
//
// Little Color Management System
// Copyright (c) 1998-202
2
Marti Maria Saguer
// Copyright (c) 1998-202
3
Marti Maria Saguer
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the "Software"),
...
...
libs/lcms2/src/cmswtpnt.c
View file @
d462bcdf
//---------------------------------------------------------------------------------
//
// Little Color Management System
// Copyright (c) 1998-202
2
Marti Maria Saguer
// Copyright (c) 1998-202
3
Marti Maria Saguer
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the "Software"),
...
...
@@ -215,12 +215,15 @@ cmsBool ComputeChromaticAdaptation(cmsMAT3* Conversion,
_cmsMAT3eval
(
&
ConeSourceRGB
,
Chad
,
&
ConeSourceXYZ
);
_cmsMAT3eval
(
&
ConeDestRGB
,
Chad
,
&
ConeDestXYZ
);
if
((
fabs
(
ConeSourceRGB
.
n
[
0
])
<
MATRIX_DET_TOLERANCE
)
||
(
fabs
(
ConeSourceRGB
.
n
[
1
])
<
MATRIX_DET_TOLERANCE
)
||
(
fabs
(
ConeSourceRGB
.
n
[
2
])
<
MATRIX_DET_TOLERANCE
))
return
FALSE
;
// Build matrix
_cmsVEC3init
(
&
Cone
.
v
[
0
],
ConeDestRGB
.
n
[
0
]
/
ConeSourceRGB
.
n
[
0
],
0
.
0
,
0
.
0
);
_cmsVEC3init
(
&
Cone
.
v
[
1
],
0
.
0
,
ConeDestRGB
.
n
[
1
]
/
ConeSourceRGB
.
n
[
1
],
0
.
0
);
_cmsVEC3init
(
&
Cone
.
v
[
2
],
0
.
0
,
0
.
0
,
ConeDestRGB
.
n
[
2
]
/
ConeSourceRGB
.
n
[
2
]);
// Normalize
_cmsMAT3per
(
&
Tmp
,
&
Cone
,
Chad
);
_cmsMAT3per
(
Conversion
,
&
Chad_Inv
,
&
Tmp
);
...
...
libs/lcms2/src/cmsxform.c
View file @
d462bcdf
//---------------------------------------------------------------------------------
//
// Little Color Management System
// Copyright (c) 1998-202
2
Marti Maria Saguer
// Copyright (c) 1998-202
3
Marti Maria Saguer
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the "Software"),
...
...
libs/lcms2/src/lcms2_internal.h
View file @
d462bcdf
//
// Little Color Management System
// Copyright (c) 1998-202
2
Marti Maria Saguer
// Copyright (c) 1998-202
3
Marti Maria Saguer
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the "Software"),
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment