Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
b9bea18c
Commit
b9bea18c
authored
Feb 26, 2008
by
Dmitry Timoshkov
Committed by
Alexandre Julliard
Feb 26, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mscms: Allow compilation without LCMS installed.
parent
bdbb7a03
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
57 additions
and
59 deletions
+57
-59
transform.c
dlls/mscms/transform.c
+57
-59
No files found.
dlls/mscms/transform.c
View file @
b9bea18c
...
...
@@ -34,6 +34,63 @@
WINE_DEFAULT_DEBUG_CHANNEL
(
mscms
);
#ifdef HAVE_LCMS
static
DWORD
from_profile
(
HPROFILE
profile
)
{
PROFILEHEADER
header
;
GetColorProfileHeader
(
profile
,
&
header
);
TRACE
(
"color space: 0x%08x %s
\n
"
,
header
.
phDataColorSpace
,
MSCMS_dbgstr_tag
(
header
.
phDataColorSpace
)
);
switch
(
header
.
phDataColorSpace
)
{
case
0x434d594b
:
return
TYPE_CMYK_16
;
/* 'CMYK' */
case
0x47524159
:
return
TYPE_GRAY_16
;
/* 'GRAY' */
case
0x4c616220
:
return
TYPE_Lab_16
;
/* 'Lab ' */
case
0x52474220
:
return
TYPE_RGB_16
;
/* 'RGB ' */
case
0x58595a20
:
return
TYPE_XYZ_16
;
/* 'XYZ ' */
default:
WARN
(
"unhandled format
\n
"
);
return
TYPE_RGB_16
;
}
}
static
DWORD
from_bmformat
(
BMFORMAT
format
)
{
TRACE
(
"bitmap format: 0x%08x
\n
"
,
format
);
switch
(
format
)
{
case
BM_RGBTRIPLETS
:
return
TYPE_RGB_8
;
case
BM_BGRTRIPLETS
:
return
TYPE_BGR_8
;
case
BM_GRAY
:
return
TYPE_GRAY_8
;
default:
FIXME
(
"unhandled bitmap format
\n
"
);
return
TYPE_RGB_8
;
}
}
static
DWORD
from_type
(
COLORTYPE
type
)
{
TRACE
(
"color type: 0x%08x
\n
"
,
type
);
switch
(
type
)
{
case
COLOR_GRAY
:
return
TYPE_GRAY_16
;
case
COLOR_RGB
:
return
TYPE_RGB_16
;
case
COLOR_XYZ
:
return
TYPE_XYZ_16
;
case
COLOR_Yxy
:
return
TYPE_Yxy_16
;
case
COLOR_Lab
:
return
TYPE_Lab_16
;
case
COLOR_CMYK
:
return
TYPE_CMYK_16
;
default:
FIXME
(
"unhandled color type
\n
"
);
return
TYPE_RGB_16
;
}
}
#endif
/* HAVE_LCMS */
/******************************************************************************
* CreateColorTransformA [MSCMS.@]
*
...
...
@@ -58,28 +115,6 @@ HTRANSFORM WINAPI CreateColorTransformA( LPLOGCOLORSPACEA space, HPROFILE dest,
return
CreateColorTransformW
(
&
spaceW
,
dest
,
target
,
flags
);
}
static
DWORD
from_profile
(
HPROFILE
profile
)
{
PROFILEHEADER
header
;
GetColorProfileHeader
(
profile
,
&
header
);
TRACE
(
"color space: 0x%08x %s
\n
"
,
header
.
phDataColorSpace
,
MSCMS_dbgstr_tag
(
header
.
phDataColorSpace
)
);
switch
(
header
.
phDataColorSpace
)
{
case
0x434d594b
:
return
TYPE_CMYK_16
;
/* 'CMYK' */
case
0x47524159
:
return
TYPE_GRAY_16
;
/* 'GRAY' */
case
0x4c616220
:
return
TYPE_Lab_16
;
/* 'Lab ' */
case
0x52474220
:
return
TYPE_RGB_16
;
/* 'RGB ' */
case
0x58595a20
:
return
TYPE_XYZ_16
;
/* 'XYZ ' */
default:
{
WARN
(
"unhandled format
\n
"
);
return
TYPE_RGB_16
;
}
}
}
/******************************************************************************
* CreateColorTransformW [MSCMS.@]
*
...
...
@@ -234,23 +269,6 @@ BOOL WINAPI DeleteColorTransform( HTRANSFORM transform )
return
ret
;
}
static
DWORD
from_bmformat
(
BMFORMAT
format
)
{
TRACE
(
"bitmap format: 0x%08x
\n
"
,
format
);
switch
(
format
)
{
case
BM_RGBTRIPLETS
:
return
TYPE_RGB_8
;
case
BM_BGRTRIPLETS
:
return
TYPE_BGR_8
;
case
BM_GRAY
:
return
TYPE_GRAY_8
;
default:
{
FIXME
(
"unhandled bitmap format
\n
"
);
return
TYPE_RGB_8
;
}
}
}
/******************************************************************************
* TranslateBitmapBits [MSCMS.@]
*
...
...
@@ -295,26 +313,6 @@ BOOL WINAPI TranslateBitmapBits( HTRANSFORM transform, PVOID srcbits, BMFORMAT i
return
ret
;
}
static
DWORD
from_type
(
COLORTYPE
type
)
{
TRACE
(
"color type: 0x%08x
\n
"
,
type
);
switch
(
type
)
{
case
COLOR_GRAY
:
return
TYPE_GRAY_16
;
case
COLOR_RGB
:
return
TYPE_RGB_16
;
case
COLOR_XYZ
:
return
TYPE_XYZ_16
;
case
COLOR_Yxy
:
return
TYPE_Yxy_16
;
case
COLOR_Lab
:
return
TYPE_Lab_16
;
case
COLOR_CMYK
:
return
TYPE_CMYK_16
;
default:
{
FIXME
(
"unhandled color type
\n
"
);
return
TYPE_RGB_16
;
}
}
}
/******************************************************************************
* TranslateColors [MSCMS.@]
*
...
...
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