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
d855ed41
Commit
d855ed41
authored
Feb 06, 2013
by
Hans Leidekker
Committed by
Alexandre Julliard
Feb 06, 2013
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
windowscodecs: Convert the source bitmap to the requested pixel format in…
windowscodecs: Convert the source bitmap to the requested pixel format in IWICColorTransform::Initialize.
parent
d9bfbd61
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
37 additions
and
12 deletions
+37
-12
colortransform.c
dlls/windowscodecs/colortransform.c
+37
-12
No files found.
dlls/windowscodecs/colortransform.c
View file @
d855ed41
...
...
@@ -36,6 +36,7 @@ WINE_DEFAULT_DEBUG_CHANNEL(wincodecs);
typedef
struct
ColorTransform
{
IWICColorTransform
IWICColorTransform_iface
;
LONG
ref
;
IWICBitmapSource
*
dst
;
}
ColorTransform
;
static
inline
ColorTransform
*
impl_from_IWICColorTransform
(
IWICColorTransform
*
iface
)
...
...
@@ -86,6 +87,7 @@ static ULONG WINAPI ColorTransform_Release(IWICColorTransform *iface)
if
(
ref
==
0
)
{
if
(
This
->
dst
)
IWICBitmapSource_Release
(
This
->
dst
);
HeapFree
(
GetProcessHeap
(),
0
,
This
);
}
...
...
@@ -95,45 +97,67 @@ static ULONG WINAPI ColorTransform_Release(IWICColorTransform *iface)
static
HRESULT
WINAPI
ColorTransform_GetSize
(
IWICColorTransform
*
iface
,
UINT
*
puiWidth
,
UINT
*
puiHeight
)
{
FIXME
(
"(%p,%p,%p)
\n
"
,
iface
,
puiWidth
,
puiHeight
);
return
E_NOTIMPL
;
ColorTransform
*
This
=
impl_from_IWICColorTransform
(
iface
);
TRACE
(
"(%p,%p,%p)
\n
"
,
iface
,
puiWidth
,
puiHeight
);
return
IWICBitmapSource_GetSize
(
This
->
dst
,
puiWidth
,
puiHeight
);
}
static
HRESULT
WINAPI
ColorTransform_GetPixelFormat
(
IWICColorTransform
*
iface
,
WICPixelFormatGUID
*
pPixelFormat
)
{
FIXME
(
"(%p,%p)
\n
"
,
iface
,
pPixelFormat
);
return
E_NOTIMPL
;
ColorTransform
*
This
=
impl_from_IWICColorTransform
(
iface
);
TRACE
(
"(%p,%p)
\n
"
,
iface
,
pPixelFormat
);
return
IWICBitmapSource_GetPixelFormat
(
This
->
dst
,
pPixelFormat
);
}
static
HRESULT
WINAPI
ColorTransform_GetResolution
(
IWICColorTransform
*
iface
,
double
*
pDpiX
,
double
*
pDpiY
)
{
FIXME
(
"(%p,%p,%p)
\n
"
,
iface
,
pDpiX
,
pDpiY
);
return
E_NOTIMPL
;
ColorTransform
*
This
=
impl_from_IWICColorTransform
(
iface
);
TRACE
(
"(%p,%p,%p)
\n
"
,
iface
,
pDpiX
,
pDpiY
);
return
IWICBitmapSource_GetResolution
(
This
->
dst
,
pDpiX
,
pDpiY
);
}
static
HRESULT
WINAPI
ColorTransform_CopyPalette
(
IWICColorTransform
*
iface
,
IWICPalette
*
pIPalette
)
{
FIXME
(
"(%p,%p)
\n
"
,
iface
,
pIPalette
);
return
E_NOTIMPL
;
ColorTransform
*
This
=
impl_from_IWICColorTransform
(
iface
);
TRACE
(
"(%p,%p)
\n
"
,
iface
,
pIPalette
);
return
IWICBitmapSource_CopyPalette
(
This
->
dst
,
pIPalette
);
}
static
HRESULT
WINAPI
ColorTransform_CopyPixels
(
IWICColorTransform
*
iface
,
const
WICRect
*
prc
,
UINT
cbStride
,
UINT
cbBufferSize
,
BYTE
*
pbBuffer
)
{
FIXME
(
"(%p,%p,%u,%u,%p)
\n
"
,
iface
,
prc
,
cbStride
,
cbBufferSize
,
pbBuffer
);
return
E_NOTIMPL
;
ColorTransform
*
This
=
impl_from_IWICColorTransform
(
iface
);
TRACE
(
"(%p,%p,%u,%u,%p)
\n
"
,
iface
,
prc
,
cbStride
,
cbBufferSize
,
pbBuffer
);
return
IWICBitmapSource_CopyPixels
(
This
->
dst
,
prc
,
cbStride
,
cbBufferSize
,
pbBuffer
);
}
static
HRESULT
WINAPI
ColorTransform_Initialize
(
IWICColorTransform
*
iface
,
IWICBitmapSource
*
pIBitmapSource
,
IWICColorContext
*
pIContextSource
,
IWICColorContext
*
pIContextDest
,
REFWICPixelFormatGUID
pixelFmtDest
)
{
FIXME
(
"(%p,%p,%p,%p,%s)
\n
"
,
iface
,
pIBitmapSource
,
pIContextSource
,
ColorTransform
*
This
=
impl_from_IWICColorTransform
(
iface
);
IWICBitmapSource
*
dst
;
HRESULT
hr
;
TRACE
(
"(%p,%p,%p,%p,%s)
\n
"
,
iface
,
pIBitmapSource
,
pIContextSource
,
pIContextDest
,
debugstr_guid
(
pixelFmtDest
));
return
E_NOTIMPL
;
FIXME
(
"ignoring color contexts
\n
"
);
hr
=
WICConvertBitmapSource
(
pixelFmtDest
,
pIBitmapSource
,
&
dst
);
if
(
FAILED
(
hr
))
return
hr
;
if
(
This
->
dst
)
IWICBitmapSource_Release
(
This
->
dst
);
This
->
dst
=
dst
;
return
S_OK
;
}
static
const
IWICColorTransformVtbl
ColorTransform_Vtbl
=
{
...
...
@@ -159,6 +183,7 @@ HRESULT ColorTransform_Create(IWICColorTransform **colortransform)
This
->
IWICColorTransform_iface
.
lpVtbl
=
&
ColorTransform_Vtbl
;
This
->
ref
=
1
;
This
->
dst
=
NULL
;
*
colortransform
=
&
This
->
IWICColorTransform_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