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
96ebc618
Commit
96ebc618
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: Add a stub IWICColorContext implementation.
parent
1b762afa
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
165 additions
and
2 deletions
+165
-2
Makefile.in
dlls/windowscodecs/Makefile.in
+1
-0
colorcontext.c
dlls/windowscodecs/colorcontext.c
+161
-0
imgfactory.c
dlls/windowscodecs/imgfactory.c
+2
-2
wincodecs_private.h
dlls/windowscodecs/wincodecs_private.h
+1
-0
No files found.
dlls/windowscodecs/Makefile.in
View file @
96ebc618
...
...
@@ -10,6 +10,7 @@ C_SRCS = \
bmpdecode.c
\
bmpencode.c
\
clsfactory.c
\
colorcontext.c
\
converter.c
\
fliprotate.c
\
gifformat.c
\
...
...
dlls/windowscodecs/colorcontext.c
0 → 100644
View file @
96ebc618
/*
* Copyright 2012 Hans Leidekker for CodeWeavers
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
#include "config.h"
#include <stdarg.h>
#define COBJMACROS
#include "windef.h"
#include "winbase.h"
#include "objbase.h"
#include "wincodec.h"
#include "wincodecs_private.h"
#include "wine/debug.h"
WINE_DEFAULT_DEBUG_CHANNEL
(
wincodecs
);
typedef
struct
ColorContext
{
IWICColorContext
IWICColorContext_iface
;
LONG
ref
;
}
ColorContext
;
static
inline
ColorContext
*
impl_from_IWICColorContext
(
IWICColorContext
*
iface
)
{
return
CONTAINING_RECORD
(
iface
,
ColorContext
,
IWICColorContext_iface
);
}
static
HRESULT
WINAPI
ColorContext_QueryInterface
(
IWICColorContext
*
iface
,
REFIID
iid
,
void
**
ppv
)
{
ColorContext
*
This
=
impl_from_IWICColorContext
(
iface
);
TRACE
(
"(%p,%s,%p)
\n
"
,
iface
,
debugstr_guid
(
iid
),
ppv
);
if
(
!
ppv
)
return
E_INVALIDARG
;
if
(
IsEqualIID
(
&
IID_IUnknown
,
iid
)
||
IsEqualIID
(
&
IID_IWICColorContext
,
iid
))
{
*
ppv
=
&
This
->
IWICColorContext_iface
;
}
else
{
*
ppv
=
NULL
;
return
E_NOINTERFACE
;
}
IUnknown_AddRef
((
IUnknown
*
)
*
ppv
);
return
S_OK
;
}
static
ULONG
WINAPI
ColorContext_AddRef
(
IWICColorContext
*
iface
)
{
ColorContext
*
This
=
impl_from_IWICColorContext
(
iface
);
ULONG
ref
=
InterlockedIncrement
(
&
This
->
ref
);
TRACE
(
"(%p) refcount=%u
\n
"
,
iface
,
ref
);
return
ref
;
}
static
ULONG
WINAPI
ColorContext_Release
(
IWICColorContext
*
iface
)
{
ColorContext
*
This
=
impl_from_IWICColorContext
(
iface
);
ULONG
ref
=
InterlockedDecrement
(
&
This
->
ref
);
TRACE
(
"(%p) refcount=%u
\n
"
,
iface
,
ref
);
if
(
ref
==
0
)
{
HeapFree
(
GetProcessHeap
(),
0
,
This
);
}
return
ref
;
}
static
HRESULT
WINAPI
ColorContext_InitializeFromFilename
(
IWICColorContext
*
iface
,
LPCWSTR
wzFilename
)
{
FIXME
(
"(%p,%s)
\n
"
,
iface
,
debugstr_w
(
wzFilename
));
return
E_NOTIMPL
;
}
static
HRESULT
WINAPI
ColorContext_InitializeFromMemory
(
IWICColorContext
*
iface
,
const
BYTE
*
pbBuffer
,
UINT
cbBufferSize
)
{
FIXME
(
"(%p,%p,%u)
\n
"
,
iface
,
pbBuffer
,
cbBufferSize
);
return
E_NOTIMPL
;
}
static
HRESULT
WINAPI
ColorContext_InitializeFromExifColorSpace
(
IWICColorContext
*
iface
,
UINT
value
)
{
FIXME
(
"(%p,%u)
\n
"
,
iface
,
value
);
return
E_NOTIMPL
;
}
static
HRESULT
WINAPI
ColorContext_GetType
(
IWICColorContext
*
iface
,
WICColorContextType
*
pType
)
{
FIXME
(
"(%p,%p)
\n
"
,
iface
,
pType
);
return
E_NOTIMPL
;
}
static
HRESULT
WINAPI
ColorContext_GetProfileBytes
(
IWICColorContext
*
iface
,
UINT
cbBuffer
,
BYTE
*
pbBuffer
,
UINT
*
pcbActual
)
{
FIXME
(
"(%p,%u,%p,%p)
\n
"
,
iface
,
cbBuffer
,
pbBuffer
,
pcbActual
);
return
E_NOTIMPL
;
}
static
HRESULT
WINAPI
ColorContext_GetExifColorSpace
(
IWICColorContext
*
iface
,
UINT
*
pValue
)
{
FIXME
(
"(%p,%p)
\n
"
,
iface
,
pValue
);
return
E_NOTIMPL
;
}
static
const
IWICColorContextVtbl
ColorContext_Vtbl
=
{
ColorContext_QueryInterface
,
ColorContext_AddRef
,
ColorContext_Release
,
ColorContext_InitializeFromFilename
,
ColorContext_InitializeFromMemory
,
ColorContext_InitializeFromExifColorSpace
,
ColorContext_GetType
,
ColorContext_GetProfileBytes
,
ColorContext_GetExifColorSpace
};
HRESULT
ColorContext_Create
(
IWICColorContext
**
colorcontext
)
{
ColorContext
*
This
;
This
=
HeapAlloc
(
GetProcessHeap
(),
0
,
sizeof
(
ColorContext
));
if
(
!
This
)
return
E_OUTOFMEMORY
;
This
->
IWICColorContext_iface
.
lpVtbl
=
&
ColorContext_Vtbl
;
This
->
ref
=
1
;
*
colorcontext
=
&
This
->
IWICColorContext_iface
;
return
S_OK
;
}
dlls/windowscodecs/imgfactory.c
View file @
96ebc618
...
...
@@ -442,8 +442,8 @@ static HRESULT WINAPI ComponentFactory_CreateStream(IWICComponentFactory *iface,
static
HRESULT
WINAPI
ComponentFactory_CreateColorContext
(
IWICComponentFactory
*
iface
,
IWICColorContext
**
ppIColorContext
)
{
FIXME
(
"(%p,%p): stub
\n
"
,
iface
,
ppIColorContext
);
return
E_NOTIMPL
;
TRACE
(
"(%p,%p)
\n
"
,
iface
,
ppIColorContext
);
return
ColorContext_Create
(
ppIColorContext
)
;
}
static
HRESULT
WINAPI
ComponentFactory_CreateColorTransformer
(
IWICComponentFactory
*
iface
,
...
...
dlls/windowscodecs/wincodecs_private.h
View file @
96ebc618
...
...
@@ -51,6 +51,7 @@ extern HRESULT BitmapScaler_Create(IWICBitmapScaler **scaler) DECLSPEC_HIDDEN;
extern
HRESULT
FlipRotator_Create
(
IWICBitmapFlipRotator
**
fliprotator
)
DECLSPEC_HIDDEN
;
extern
HRESULT
PaletteImpl_Create
(
IWICPalette
**
palette
)
DECLSPEC_HIDDEN
;
extern
HRESULT
StreamImpl_Create
(
IWICStream
**
stream
)
DECLSPEC_HIDDEN
;
extern
HRESULT
ColorContext_Create
(
IWICColorContext
**
context
)
DECLSPEC_HIDDEN
;
extern
HRESULT
copy_pixels
(
UINT
bpp
,
const
BYTE
*
srcbuffer
,
UINT
srcwidth
,
UINT
srcheight
,
INT
srcstride
,
...
...
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