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
3e60f767
Commit
3e60f767
authored
Dec 13, 2004
by
Hans Leidekker
Committed by
Alexandre Julliard
Dec 13, 2004
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Test and implement SetColorProfileElement.
Document more functions.
parent
76d8779c
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
119 additions
and
10 deletions
+119
-10
icc.c
dlls/mscms/icc.c
+6
-0
mscms.spec
dlls/mscms/mscms.spec
+1
-1
mscms_priv.h
dlls/mscms/mscms_priv.h
+1
-0
profile.c
dlls/mscms/profile.c
+110
-9
profile.c
dlls/mscms/tests/profile.c
+0
-0
icm.h
include/icm.h
+1
-0
No files found.
dlls/mscms/icc.c
View file @
3e60f767
...
...
@@ -95,4 +95,10 @@ void MSCMS_get_tag_data( icProfile *iccprofile, icTag *tag, DWORD offset, void *
{
memcpy
(
buffer
,
(
char
*
)
iccprofile
+
tag
->
offset
+
offset
,
tag
->
size
-
offset
);
}
void
MSCMS_set_tag_data
(
icProfile
*
iccprofile
,
icTag
*
tag
,
DWORD
offset
,
void
*
buffer
)
{
memcpy
(
(
char
*
)
iccprofile
+
tag
->
offset
+
offset
,
buffer
,
tag
->
size
-
offset
);
}
#endif
/* HAVE_LCMS_H */
dlls/mscms/mscms.spec
View file @
3e60f767
...
...
@@ -46,7 +46,7 @@
@ stub RegisterCMMA
@ stub RegisterCMMW
@ stub SelectCMM
@ st
ub SetColorProfileElement
@ st
dcall SetColorProfileElement(ptr long long ptr ptr)
@ stub SetColorProfileElementReference
@ stub SetColorProfileElementSize
@ stdcall SetColorProfileHeader(ptr ptr)
...
...
dlls/mscms/mscms_priv.h
View file @
3e60f767
...
...
@@ -81,6 +81,7 @@ extern void MSCMS_destroy_hprofile_handle( HPROFILE profile );
extern
DWORD
MSCMS_get_tag_count
(
icProfile
*
iccprofile
);
extern
void
MSCMS_get_tag_by_index
(
icProfile
*
iccprofile
,
DWORD
index
,
icTag
*
tag
);
extern
void
MSCMS_get_tag_data
(
icProfile
*
iccprofile
,
icTag
*
tag
,
DWORD
offset
,
void
*
buffer
);
extern
void
MSCMS_set_tag_data
(
icProfile
*
iccprofile
,
icTag
*
tag
,
DWORD
offset
,
void
*
buffer
);
extern
void
MSCMS_get_profile_header
(
icProfile
*
iccprofile
,
PROFILEHEADER
*
header
);
extern
void
MSCMS_set_profile_header
(
icProfile
*
iccprofile
,
PROFILEHEADER
*
header
);
...
...
dlls/mscms/profile.c
View file @
3e60f767
...
...
@@ -103,7 +103,7 @@ BOOL WINAPI GetColorDirectoryA( PCSTR machine, PSTR buffer, PDWORD size )
* PARAMS
* machine [I] Name of the machine for which to get the color directory.
* Must be NULL, which indicates the local machine.
* buffer [I] Buffer to rec
ieve the path name in
.
* buffer [I] Buffer to rec
eive the path name
.
* size [I/O] Size of the buffer in bytes. On return the variable holds
* the number of bytes actually needed.
*/
...
...
@@ -133,6 +133,25 @@ BOOL WINAPI GetColorDirectoryW( PCWSTR machine, PWSTR buffer, PDWORD size )
return
FALSE
;
}
/******************************************************************************
* GetColorProfileElement [MSCMS.@]
*
* Retrieve data for a specified tag type.
*
* PARAMS
* profile [I] Handle to a color profile.
* type [I] ICC tag type.
* offset [I] Offset in bytes to start copying from.
* size [I/O] Size of the buffer in bytes. On return the variable holds
* the number of bytes actually needed.
* buffer [O] Buffer to receive the tag data.
* ref [O] Pointer to a BOOL that specifies whether more than one tag
* references the data.
*
* RETURNS
* Success: TRUE
* Failure: FALSE
*/
BOOL
WINAPI
GetColorProfileElement
(
HPROFILE
profile
,
TAGTYPE
type
,
DWORD
offset
,
PDWORD
size
,
PVOID
buffer
,
PBOOL
ref
)
{
...
...
@@ -173,12 +192,12 @@ BOOL WINAPI GetColorProfileElement( HPROFILE profile, TAGTYPE type, DWORD offset
/******************************************************************************
* GetColorProfileElementTag [MSCMS.@]
*
* Get
a tag
from a color profile by index.
* Get
the tag type
from a color profile by index.
*
* PARAMS
* profile [I] Handle to a color profile.
* index [I] Index into the tag table of the color profile.
* t
ag [O] Pointer to a TAGTYPE variable
.
* t
ype [O] Pointer to a variable that holds the ICC tag type on return
.
*
* RETURNS
* Success: TRUE
...
...
@@ -212,6 +231,24 @@ BOOL WINAPI GetColorProfileElementTag( HPROFILE profile, DWORD index, PTAGTYPE t
return
ret
;
}
/******************************************************************************
* GetColorProfileFromHandle [MSCMS.@]
*
* Retrieve an ICC color profile by handle.
*
* PARAMS
* profile [I] Handle to a color profile.
* buffer [O] Buffer to receive the ICC profile.
* size [I/O] Size of the buffer in bytes. On return the variable holds the
* number of bytes actually needed.
*
* RETURNS
* Success: TRUE
* Failure: FALSE
*
* NOTES
* The profile returned will be in big-endian format.
*/
BOOL
WINAPI
GetColorProfileFromHandle
(
HPROFILE
profile
,
PBYTE
buffer
,
PDWORD
size
)
{
BOOL
ret
=
FALSE
;
...
...
@@ -238,6 +275,22 @@ BOOL WINAPI GetColorProfileFromHandle( HPROFILE profile, PBYTE buffer, PDWORD si
return
ret
;
}
/******************************************************************************
* GetColorProfileHeader [MSCMS.@]
*
* Retrieve a color profile header by handle.
*
* PARAMS
* profile [I] Handle to a color profile.
* header [O] Buffer to receive the ICC profile header.
*
* RETURNS
* Success: TRUE
* Failure: FALSE
*
* NOTES
* The profile header returned will be adjusted for endianess.
*/
BOOL
WINAPI
GetColorProfileHeader
(
HPROFILE
profile
,
PPROFILEHEADER
header
)
{
BOOL
ret
=
FALSE
;
...
...
@@ -420,28 +473,28 @@ BOOL WINAPI InstallColorProfileW( PCWSTR machine, PCWSTR profile )
/******************************************************************************
* IsColorProfileTagPresent [MSCMS.@]
*
* Determine if a given ICC tag is present in a color profile.
* Determine if a given ICC tag
type
is present in a color profile.
*
* PARAMS
* profile [I] Color profile handle.
* tag [I] ICC tag.
* present [O] Pointer to a BOOL variable. Set to TRUE if tag is present,
* tag [I] ICC tag
type
.
* present [O] Pointer to a BOOL variable. Set to TRUE if tag
type
is present,
* FALSE otherwise.
*
* RETURNS
* Success: TRUE
* Failure: FALSE
*/
BOOL
WINAPI
IsColorProfileTagPresent
(
HPROFILE
profile
,
TAGTYPE
t
ag
,
PBOOL
present
)
BOOL
WINAPI
IsColorProfileTagPresent
(
HPROFILE
profile
,
TAGTYPE
t
ype
,
PBOOL
present
)
{
BOOL
ret
=
FALSE
;
#ifdef HAVE_LCMS_H
cmsHPROFILE
cmsprofile
=
MSCMS_hprofile2cmsprofile
(
profile
);
TRACE
(
"( %p, 0x%08lx, %p )
\n
"
,
profile
,
t
ag
,
present
);
TRACE
(
"( %p, 0x%08lx, %p )
\n
"
,
profile
,
t
ype
,
present
);
if
(
!
cmsprofile
||
!
present
)
return
FALSE
;
ret
=
cmsIsTag
(
cmsprofile
,
t
ag
);
ret
=
cmsIsTag
(
cmsprofile
,
t
ype
);
#endif
/* HAVE_LCMS_H */
return
*
present
=
ret
;
...
...
@@ -476,6 +529,54 @@ BOOL WINAPI IsColorProfileValid( HPROFILE profile, PBOOL valid )
return
ret
;
}
/******************************************************************************
* SetColorProfileElement [MSCMS.@]
*
* Set data for a specified tag type.
*
* PARAMS
* profile [I] Handle to a color profile.
* type [I] ICC tag type.
* offset [I] Offset in bytes to start copying to.
* size [I/O] Size of the buffer in bytes. On return the variable holds the
* number of bytes actually needed.
* buffer [O] Buffer holding the tag data.
*
* RETURNS
* Success: TRUE
* Failure: FALSE
*/
BOOL
WINAPI
SetColorProfileElement
(
HPROFILE
profile
,
TAGTYPE
type
,
DWORD
offset
,
PDWORD
size
,
PVOID
buffer
)
{
BOOL
ret
=
FALSE
;
#ifdef HAVE_LCMS_H
icProfile
*
iccprofile
=
MSCMS_hprofile2iccprofile
(
profile
);
DWORD
i
,
count
;
icTag
tag
;
TRACE
(
"( %p, 0x%08lx, %ld, %p, %p )
\n
"
,
profile
,
type
,
offset
,
size
,
buffer
);
if
(
!
iccprofile
||
!
size
||
!
buffer
)
return
FALSE
;
count
=
MSCMS_get_tag_count
(
iccprofile
);
for
(
i
=
0
;
i
<
count
;
i
++
)
{
MSCMS_get_tag_by_index
(
iccprofile
,
i
,
&
tag
);
if
(
tag
.
sig
==
type
)
{
if
(
offset
>
tag
.
size
)
return
FALSE
;
MSCMS_set_tag_data
(
iccprofile
,
&
tag
,
offset
,
buffer
);
return
TRUE
;
}
}
#endif
/* HAVE_LCMS_H */
return
ret
;
}
BOOL
WINAPI
SetColorProfileHeader
(
HPROFILE
profile
,
PPROFILEHEADER
header
)
{
BOOL
ret
=
FALSE
;
...
...
dlls/mscms/tests/profile.c
View file @
3e60f767
This diff is collapsed.
Click to expand it.
include/icm.h
View file @
3e60f767
...
...
@@ -174,6 +174,7 @@ BOOL WINAPI IsColorProfileValid(HPROFILE,PBOOL);
HPROFILE
WINAPI
OpenColorProfileA
(
PPROFILE
,
DWORD
,
DWORD
,
DWORD
);
HPROFILE
WINAPI
OpenColorProfileW
(
PPROFILE
,
DWORD
,
DWORD
,
DWORD
);
#define OpenColorProfile WINELIB_NAME_AW(OpenColorProfile)
BOOL
WINAPI
SetColorProfileElement
(
HPROFILE
,
TAGTYPE
,
DWORD
,
PDWORD
,
PVOID
);
BOOL
WINAPI
SetColorProfileHeader
(
HPROFILE
,
PPROFILEHEADER
);
BOOL
WINAPI
SetStandardColorSpaceProfileA
(
PCSTR
,
DWORD
,
PSTR
);
BOOL
WINAPI
SetStandardColorSpaceProfileW
(
PCWSTR
,
DWORD
,
PWSTR
);
...
...
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