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
7712c0e8
Commit
7712c0e8
authored
Nov 15, 2012
by
Hans Leidekker
Committed by
Alexandre Julliard
Nov 15, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
windowscodecs: Implement IWICColorContext::InitializeFromMemory.
parent
c9acbecd
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
20 additions
and
2 deletions
+20
-2
colorcontext.c
dlls/windowscodecs/colorcontext.c
+20
-2
No files found.
dlls/windowscodecs/colorcontext.c
View file @
7712c0e8
...
...
@@ -37,6 +37,8 @@ typedef struct ColorContext {
IWICColorContext
IWICColorContext_iface
;
LONG
ref
;
WICColorContextType
type
;
BYTE
*
profile
;
UINT
profile_len
;
}
ColorContext
;
static
inline
ColorContext
*
impl_from_IWICColorContext
(
IWICColorContext
*
iface
)
...
...
@@ -86,6 +88,7 @@ static ULONG WINAPI ColorContext_Release(IWICColorContext *iface)
if
(
ref
==
0
)
{
HeapFree
(
GetProcessHeap
(),
0
,
This
->
profile
);
HeapFree
(
GetProcessHeap
(),
0
,
This
);
}
...
...
@@ -102,8 +105,21 @@ static HRESULT WINAPI ColorContext_InitializeFromFilename(IWICColorContext *ifac
static
HRESULT
WINAPI
ColorContext_InitializeFromMemory
(
IWICColorContext
*
iface
,
const
BYTE
*
pbBuffer
,
UINT
cbBufferSize
)
{
FIXME
(
"(%p,%p,%u)
\n
"
,
iface
,
pbBuffer
,
cbBufferSize
);
return
E_NOTIMPL
;
ColorContext
*
This
=
impl_from_IWICColorContext
(
iface
);
TRACE
(
"(%p,%p,%u)
\n
"
,
iface
,
pbBuffer
,
cbBufferSize
);
if
(
This
->
type
!=
WICColorContextUninitialized
)
return
WINCODEC_ERR_WRONGSTATE
;
HeapFree
(
GetProcessHeap
(),
0
,
This
->
profile
);
if
(
!
(
This
->
profile
=
HeapAlloc
(
GetProcessHeap
(),
0
,
cbBufferSize
)))
return
E_OUTOFMEMORY
;
memcpy
(
This
->
profile
,
pbBuffer
,
cbBufferSize
);
This
->
profile_len
=
cbBufferSize
;
This
->
type
=
WICColorContextProfile
;
return
S_OK
;
}
static
HRESULT
WINAPI
ColorContext_InitializeFromExifColorSpace
(
IWICColorContext
*
iface
,
...
...
@@ -159,6 +175,8 @@ HRESULT ColorContext_Create(IWICColorContext **colorcontext)
This
->
IWICColorContext_iface
.
lpVtbl
=
&
ColorContext_Vtbl
;
This
->
ref
=
1
;
This
->
type
=
0
;
This
->
profile
=
NULL
;
This
->
profile_len
=
0
;
*
colorcontext
=
&
This
->
IWICColorContext_iface
;
...
...
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