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
efab3932
Commit
efab3932
authored
Feb 28, 2012
by
Vincent Povirk
Committed by
Alexandre Julliard
Jun 26, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
windowscodecs: Add stub IWICBitmapScaler implementation.
parent
917c4e1f
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
174 additions
and
2 deletions
+174
-2
Makefile.in
dlls/windowscodecs/Makefile.in
+1
-0
imgfactory.c
dlls/windowscodecs/imgfactory.c
+3
-2
scaler.c
dlls/windowscodecs/scaler.c
+169
-0
wincodecs_private.h
dlls/windowscodecs/wincodecs_private.h
+1
-0
No files found.
dlls/windowscodecs/Makefile.in
View file @
efab3932
...
...
@@ -24,6 +24,7 @@ C_SRCS = \
propertybag.c
\
proxy.c
\
regsvr.c
\
scaler.c
\
stream.c
\
tgaformat.c
\
tiffformat.c
\
...
...
dlls/windowscodecs/imgfactory.c
View file @
efab3932
...
...
@@ -356,8 +356,9 @@ static HRESULT WINAPI ComponentFactory_CreateFormatConverter(IWICComponentFactor
static
HRESULT
WINAPI
ComponentFactory_CreateBitmapScaler
(
IWICComponentFactory
*
iface
,
IWICBitmapScaler
**
ppIBitmapScaler
)
{
FIXME
(
"(%p,%p): stub
\n
"
,
iface
,
ppIBitmapScaler
);
return
E_NOTIMPL
;
TRACE
(
"(%p,%p)
\n
"
,
iface
,
ppIBitmapScaler
);
return
BitmapScaler_Create
(
ppIBitmapScaler
);
}
static
HRESULT
WINAPI
ComponentFactory_CreateBitmapClipper
(
IWICComponentFactory
*
iface
,
...
...
dlls/windowscodecs/scaler.c
0 → 100644
View file @
efab3932
/*
* Copyright 2010 Vincent Povirk 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
BitmapScaler
{
IWICBitmapScaler
IWICBitmapScaler_iface
;
LONG
ref
;
}
BitmapScaler
;
static
inline
BitmapScaler
*
impl_from_IWICBitmapScaler
(
IWICBitmapScaler
*
iface
)
{
return
CONTAINING_RECORD
(
iface
,
BitmapScaler
,
IWICBitmapScaler_iface
);
}
static
HRESULT
WINAPI
BitmapScaler_QueryInterface
(
IWICBitmapScaler
*
iface
,
REFIID
iid
,
void
**
ppv
)
{
BitmapScaler
*
This
=
impl_from_IWICBitmapScaler
(
iface
);
TRACE
(
"(%p,%s,%p)
\n
"
,
iface
,
debugstr_guid
(
iid
),
ppv
);
if
(
!
ppv
)
return
E_INVALIDARG
;
if
(
IsEqualIID
(
&
IID_IUnknown
,
iid
)
||
IsEqualIID
(
&
IID_IWICBitmapSource
,
iid
)
||
IsEqualIID
(
&
IID_IWICBitmapScaler
,
iid
))
{
*
ppv
=
This
;
}
else
{
*
ppv
=
NULL
;
return
E_NOINTERFACE
;
}
IUnknown_AddRef
((
IUnknown
*
)
*
ppv
);
return
S_OK
;
}
static
ULONG
WINAPI
BitmapScaler_AddRef
(
IWICBitmapScaler
*
iface
)
{
BitmapScaler
*
This
=
impl_from_IWICBitmapScaler
(
iface
);
ULONG
ref
=
InterlockedIncrement
(
&
This
->
ref
);
TRACE
(
"(%p) refcount=%u
\n
"
,
iface
,
ref
);
return
ref
;
}
static
ULONG
WINAPI
BitmapScaler_Release
(
IWICBitmapScaler
*
iface
)
{
BitmapScaler
*
This
=
impl_from_IWICBitmapScaler
(
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
BitmapScaler_GetSize
(
IWICBitmapScaler
*
iface
,
UINT
*
puiWidth
,
UINT
*
puiHeight
)
{
FIXME
(
"(%p,%p,%p): stub
\n
"
,
iface
,
puiWidth
,
puiHeight
);
return
E_NOTIMPL
;
}
static
HRESULT
WINAPI
BitmapScaler_GetPixelFormat
(
IWICBitmapScaler
*
iface
,
WICPixelFormatGUID
*
pPixelFormat
)
{
FIXME
(
"(%p,%p): stub
\n
"
,
iface
,
pPixelFormat
);
return
E_NOTIMPL
;
}
static
HRESULT
WINAPI
BitmapScaler_GetResolution
(
IWICBitmapScaler
*
iface
,
double
*
pDpiX
,
double
*
pDpiY
)
{
FIXME
(
"(%p,%p,%p): stub
\n
"
,
iface
,
pDpiX
,
pDpiY
);
return
E_NOTIMPL
;
}
static
HRESULT
WINAPI
BitmapScaler_CopyPalette
(
IWICBitmapScaler
*
iface
,
IWICPalette
*
pIPalette
)
{
FIXME
(
"(%p,%p): stub
\n
"
,
iface
,
pIPalette
);
return
E_NOTIMPL
;
}
static
HRESULT
WINAPI
BitmapScaler_CopyPixels
(
IWICBitmapScaler
*
iface
,
const
WICRect
*
prc
,
UINT
cbStride
,
UINT
cbBufferSize
,
BYTE
*
pbBuffer
)
{
FIXME
(
"(%p,%p,%u,%u,%p): stub
\n
"
,
iface
,
prc
,
cbStride
,
cbBufferSize
,
pbBuffer
);
return
E_NOTIMPL
;
}
static
HRESULT
WINAPI
BitmapScaler_Initialize
(
IWICBitmapScaler
*
iface
,
IWICBitmapSource
*
pISource
,
UINT
uiWidth
,
UINT
uiHeight
,
WICBitmapInterpolationMode
mode
)
{
FIXME
(
"(%p,%p,%u,%u,%u): stub
\n
"
,
iface
,
pISource
,
uiWidth
,
uiHeight
,
mode
);
return
E_NOTIMPL
;
}
static
const
IWICBitmapScalerVtbl
BitmapScaler_Vtbl
=
{
BitmapScaler_QueryInterface
,
BitmapScaler_AddRef
,
BitmapScaler_Release
,
BitmapScaler_GetSize
,
BitmapScaler_GetPixelFormat
,
BitmapScaler_GetResolution
,
BitmapScaler_CopyPalette
,
BitmapScaler_CopyPixels
,
BitmapScaler_Initialize
};
HRESULT
BitmapScaler_Create
(
IWICBitmapScaler
**
scaler
)
{
BitmapScaler
*
This
;
This
=
HeapAlloc
(
GetProcessHeap
(),
0
,
sizeof
(
BitmapScaler
));
if
(
!
This
)
return
E_OUTOFMEMORY
;
This
->
IWICBitmapScaler_iface
.
lpVtbl
=
&
BitmapScaler_Vtbl
;
This
->
ref
=
1
;
*
scaler
=
&
This
->
IWICBitmapScaler_iface
;
return
S_OK
;
}
dlls/windowscodecs/wincodecs_private.h
View file @
efab3932
...
...
@@ -44,6 +44,7 @@ extern HRESULT IcnsEncoder_CreateInstance(IUnknown *pUnkOuter, REFIID iid, void*
extern
HRESULT
TgaDecoder_CreateInstance
(
IUnknown
*
pUnkOuter
,
REFIID
iid
,
void
**
ppv
)
DECLSPEC_HIDDEN
;
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
;
...
...
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