2 * Misleadingly named convenience functions for accessing WIC.
4 * Copyright 2012 Vincent Povirk for CodeWeavers
6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Lesser General Public
8 * License as published by the Free Software Foundation; either
9 * version 2.1 of the License, or (at your option) any later version.
11 * This library is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 * Lesser General Public License for more details.
16 * You should have received a copy of the GNU Lesser General Public
17 * License along with this library; if not, write to the Free Software
18 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
26 #define NONAMELESSUNION
33 #include "wincodecs_private.h"
35 #include "wine/debug.h"
37 WINE_DEFAULT_DEBUG_CHANNEL(wincodecs
);
39 HRESULT WINAPI
IWICBitmapFlipRotator_Initialize_Proxy_W(IWICBitmapFlipRotator
*iface
,
40 IWICBitmapSource
*pISource
, WICBitmapTransformOptions options
)
42 return IWICBitmapFlipRotator_Initialize(iface
, pISource
, options
);
45 HRESULT WINAPI
IWICBitmapLock_GetDataPointer_Proxy_W(IWICBitmapLock
*iface
,
46 UINT
*pcbBufferSize
, BYTE
**ppbData
)
48 return IWICBitmapLock_GetDataPointer(iface
, pcbBufferSize
, ppbData
);
51 HRESULT WINAPI
IWICBitmapLock_GetStride_Proxy_W(IWICBitmapLock
*iface
,
54 return IWICBitmapLock_GetStride(iface
, pcbStride
);
57 HRESULT WINAPI
IWICBitmapSource_GetSize_Proxy_W(IWICBitmapSource
*iface
,
58 UINT
*puiWidth
, UINT
*puiHeight
)
60 return IWICBitmapSource_GetSize(iface
, puiWidth
, puiHeight
);
63 HRESULT WINAPI
IWICBitmapSource_GetPixelFormat_Proxy_W(IWICBitmapSource
*iface
,
64 WICPixelFormatGUID
*pPixelFormat
)
66 return IWICBitmapSource_GetPixelFormat(iface
, pPixelFormat
);
69 HRESULT WINAPI
IWICBitmapSource_GetResolution_Proxy_W(IWICBitmapSource
*iface
,
70 double *pDpiX
, double *pDpiY
)
72 return IWICBitmapSource_GetResolution(iface
, pDpiX
, pDpiY
);
75 HRESULT WINAPI
IWICBitmapSource_CopyPalette_Proxy_W(IWICBitmapSource
*iface
,
76 IWICPalette
*pIPalette
)
78 return IWICBitmapSource_CopyPalette(iface
, pIPalette
);
81 HRESULT WINAPI
IWICBitmapSource_CopyPixels_Proxy_W(IWICBitmapSource
*iface
,
82 const WICRect
*prc
, UINT cbStride
, UINT cbBufferSize
, BYTE
*pbBuffer
)
84 return IWICBitmapSource_CopyPixels(iface
, prc
, cbStride
, cbBufferSize
, pbBuffer
);
87 HRESULT WINAPI
IWICBitmap_Lock_Proxy_W(IWICBitmap
*iface
,
88 const WICRect
*prcLock
, DWORD flags
, IWICBitmapLock
**ppILock
)
90 return IWICBitmap_Lock(iface
, prcLock
, flags
, ppILock
);
93 HRESULT WINAPI
IWICBitmap_SetPalette_Proxy_W(IWICBitmap
*iface
,
94 IWICPalette
*pIPalette
)
96 return IWICBitmap_SetPalette(iface
, pIPalette
);
99 HRESULT WINAPI
IWICBitmap_SetResolution_Proxy_W(IWICBitmap
*iface
,
100 double dpiX
, double dpiY
)
102 return IWICBitmap_SetResolution(iface
, dpiX
, dpiY
);
105 HRESULT WINAPI
IWICColorContext_InitializeFromMemory_Proxy_W(IWICColorContext
*iface
,
106 const BYTE
*pbBuffer
, UINT cbBufferSize
)
108 return IWICColorContext_InitializeFromMemory(iface
, pbBuffer
, cbBufferSize
);
111 HRESULT WINAPI
IWICComponentInfo_GetCLSID_Proxy_W(IWICComponentInfo
*iface
,
114 return IWICComponentInfo_GetCLSID(iface
, pclsid
);
117 HRESULT WINAPI
IWICComponentInfo_GetAuthor_Proxy_W(IWICComponentInfo
*iface
,
118 UINT cchAuthor
, WCHAR
*wzAuthor
, UINT
*pcchActual
)
120 return IWICComponentInfo_GetAuthor(iface
, cchAuthor
, wzAuthor
, pcchActual
);
123 HRESULT WINAPI
IWICComponentInfo_GetVersion_Proxy_W(IWICComponentInfo
*iface
,
124 UINT cchVersion
, WCHAR
*wzVersion
, UINT
*pcchActual
)
126 return IWICComponentInfo_GetVersion(iface
, cchVersion
, wzVersion
, pcchActual
);
129 HRESULT WINAPI
IWICComponentInfo_GetSpecVersion_Proxy_W(IWICComponentInfo
*iface
,
130 UINT cchSpecVersion
, WCHAR
*wzSpecVersion
, UINT
*pcchActual
)
132 return IWICComponentInfo_GetSpecVersion(iface
, cchSpecVersion
, wzSpecVersion
, pcchActual
);
135 HRESULT WINAPI
IWICComponentInfo_GetFriendlyName_Proxy_W(IWICComponentInfo
*iface
,
136 UINT cchFriendlyName
, WCHAR
*wzFriendlyName
, UINT
*pcchActual
)
138 return IWICComponentInfo_GetFriendlyName(iface
, cchFriendlyName
, wzFriendlyName
, pcchActual
);
141 HRESULT WINAPI
IWICFastMetadataEncoder_Commit_Proxy_W(IWICFastMetadataEncoder
*iface
)
143 return IWICFastMetadataEncoder_Commit(iface
);
146 HRESULT WINAPI
IWICFastMetadataEncoder_GetMetadataQueryWriter_Proxy_W(IWICFastMetadataEncoder
*iface
,
147 IWICMetadataQueryWriter
**ppIMetadataQueryWriter
)
149 return IWICFastMetadataEncoder_GetMetadataQueryWriter(iface
, ppIMetadataQueryWriter
);
152 HRESULT WINAPI
IWICBitmapFrameDecode_GetMetadataQueryReader_Proxy_W(IWICBitmapFrameDecode
*iface
,
153 IWICMetadataQueryReader
**ppIMetadataQueryReader
)
155 return IWICBitmapFrameDecode_GetMetadataQueryReader(iface
, ppIMetadataQueryReader
);
158 HRESULT WINAPI
IWICBitmapFrameDecode_GetColorContexts_Proxy_W(IWICBitmapFrameDecode
*iface
,
159 UINT cCount
, IWICColorContext
**ppIColorContexts
, UINT
*pcActualCount
)
161 return IWICBitmapFrameDecode_GetColorContexts(iface
, cCount
, ppIColorContexts
, pcActualCount
);
164 HRESULT WINAPI
IWICBitmapFrameDecode_GetThumbnail_Proxy_W(IWICBitmapFrameDecode
*iface
,
165 IWICBitmapSource
**ppIThumbnail
)
167 return IWICBitmapFrameDecode_GetThumbnail(iface
, ppIThumbnail
);
170 HRESULT WINAPI
IWICImagingFactory_CreateBitmapClipper_Proxy_W(IWICImagingFactory
*pFactory
,
171 IWICBitmapClipper
**ppIBitmapClipper
)
173 return IWICImagingFactory_CreateBitmapClipper(pFactory
, ppIBitmapClipper
);
176 HRESULT WINAPI
IWICImagingFactory_CreateBitmapFlipRotator_Proxy_W(IWICImagingFactory
*pFactory
,
177 IWICBitmapFlipRotator
**ppIBitmapFlipRotator
)
179 return IWICImagingFactory_CreateBitmapFlipRotator(pFactory
, ppIBitmapFlipRotator
);
182 HRESULT WINAPI
IWICImagingFactory_CreateBitmapFromHBITMAP_Proxy_W(IWICImagingFactory
*pFactory
,
183 HBITMAP hBitmap
, HPALETTE hPalette
, WICBitmapAlphaChannelOption options
, IWICBitmap
**ppIBitmap
)
185 return IWICImagingFactory_CreateBitmapFromHBITMAP(pFactory
, hBitmap
, hPalette
, options
, ppIBitmap
);
188 HRESULT WINAPI
IWICImagingFactory_CreateBitmapFromHICON_Proxy_W(IWICImagingFactory
*pFactory
,
189 HICON hIcon
, IWICBitmap
**ppIBitmap
)
191 return IWICImagingFactory_CreateBitmapFromHICON(pFactory
, hIcon
, ppIBitmap
);
194 HRESULT WINAPI
IWICImagingFactory_CreateBitmapFromMemory_Proxy_W(IWICImagingFactory
*pFactory
,
195 UINT uiWidth
, UINT uiHeight
, REFWICPixelFormatGUID pixelFormat
, UINT cbStride
,
196 UINT cbBufferSize
, BYTE
*pbBuffer
, IWICBitmap
**ppIBitmap
)
198 return IWICImagingFactory_CreateBitmapFromMemory(pFactory
, uiWidth
, uiHeight
,
199 pixelFormat
, cbStride
, cbBufferSize
, pbBuffer
, ppIBitmap
);
202 HRESULT WINAPI
IWICImagingFactory_CreateBitmapFromSource_Proxy_W(IWICImagingFactory
*pFactory
,
203 IWICBitmapSource
*piBitmapSource
, WICBitmapCreateCacheOption option
, IWICBitmap
**ppIBitmap
)
205 return IWICImagingFactory_CreateBitmapFromSource(pFactory
, piBitmapSource
, option
, ppIBitmap
);
208 HRESULT WINAPI
IWICImagingFactory_CreateBitmapScaler_Proxy_W(IWICImagingFactory
*pFactory
,
209 IWICBitmapScaler
**ppIBitmapScaler
)
211 return IWICImagingFactory_CreateBitmapScaler(pFactory
, ppIBitmapScaler
);
214 HRESULT WINAPI
IWICImagingFactory_CreateBitmap_Proxy_W(IWICImagingFactory
*pFactory
,
215 UINT uiWidth
, UINT uiHeight
, REFWICPixelFormatGUID pixelFormat
,
216 WICBitmapCreateCacheOption option
, IWICBitmap
**ppIBitmap
)
218 return IWICImagingFactory_CreateBitmap(pFactory
, uiWidth
, uiHeight
,
219 pixelFormat
, option
, ppIBitmap
);
222 HRESULT WINAPI
IWICImagingFactory_CreateComponentInfo_Proxy_W(IWICImagingFactory
*pFactory
,
223 REFCLSID clsidComponent
, IWICComponentInfo
**ppIInfo
)
225 return IWICImagingFactory_CreateComponentInfo(pFactory
, clsidComponent
, ppIInfo
);
228 HRESULT WINAPI
IWICImagingFactory_CreateDecoderFromFileHandle_Proxy_W(IWICImagingFactory
*pFactory
,
229 ULONG_PTR hFile
, const GUID
*pguidVendor
, WICDecodeOptions metadataOptions
, IWICBitmapDecoder
**ppIDecoder
)
231 return IWICImagingFactory_CreateDecoderFromFileHandle(pFactory
, hFile
, pguidVendor
, metadataOptions
, ppIDecoder
);
234 HRESULT WINAPI
IWICImagingFactory_CreateDecoderFromFilename_Proxy_W(IWICImagingFactory
*pFactory
,
235 LPCWSTR wzFilename
, const GUID
*pguidVendor
, DWORD dwDesiredAccess
,
236 WICDecodeOptions metadataOptions
, IWICBitmapDecoder
**ppIDecoder
)
238 return IWICImagingFactory_CreateDecoderFromFilename(pFactory
, wzFilename
,
239 pguidVendor
, dwDesiredAccess
, metadataOptions
, ppIDecoder
);
242 HRESULT WINAPI
IWICImagingFactory_CreateDecoderFromStream_Proxy_W(IWICImagingFactory
*pFactory
,
243 IStream
*pIStream
, const GUID
*pguidVendor
,
244 WICDecodeOptions metadataOptions
, IWICBitmapDecoder
**ppIDecoder
)
246 return IWICImagingFactory_CreateDecoderFromStream(pFactory
, pIStream
, pguidVendor
, metadataOptions
, ppIDecoder
);
249 HRESULT WINAPI
IWICImagingFactory_CreateEncoder_Proxy_W(IWICImagingFactory
*pFactory
,
250 REFGUID guidContainerFormat
, const GUID
*pguidVendor
, IWICBitmapEncoder
**ppIEncoder
)
252 return IWICImagingFactory_CreateEncoder(pFactory
, guidContainerFormat
, pguidVendor
, ppIEncoder
);
255 HRESULT WINAPI
IWICImagingFactory_CreateFastMetadataEncoderFromDecoder_Proxy_W(IWICImagingFactory
*pFactory
,
256 IWICBitmapDecoder
*pIDecoder
, IWICFastMetadataEncoder
**ppIFastEncoder
)
258 return IWICImagingFactory_CreateFastMetadataEncoderFromDecoder(pFactory
, pIDecoder
, ppIFastEncoder
);
261 HRESULT WINAPI
IWICImagingFactory_CreateFastMetadataEncoderFromFrameDecode_Proxy_W(IWICImagingFactory
*pFactory
,
262 IWICBitmapFrameDecode
*pIFrameDecoder
, IWICFastMetadataEncoder
**ppIFastEncoder
)
264 return IWICImagingFactory_CreateFastMetadataEncoderFromFrameDecode(pFactory
, pIFrameDecoder
, ppIFastEncoder
);
267 HRESULT WINAPI
IWICImagingFactory_CreateFormatConverter_Proxy_W(IWICImagingFactory
*pFactory
,
268 IWICFormatConverter
**ppIFormatConverter
)
270 return IWICImagingFactory_CreateFormatConverter(pFactory
, ppIFormatConverter
);
273 HRESULT WINAPI
IWICImagingFactory_CreatePalette_Proxy_W(IWICImagingFactory
*pFactory
,
274 IWICPalette
**ppIPalette
)
276 return IWICImagingFactory_CreatePalette(pFactory
, ppIPalette
);
279 HRESULT WINAPI
IWICImagingFactory_CreateQueryWriterFromReader_Proxy_W(IWICImagingFactory
*pFactory
,
280 IWICMetadataQueryReader
*pIQueryReader
, const GUID
*pguidVendor
,
281 IWICMetadataQueryWriter
**ppIQueryWriter
)
283 return IWICImagingFactory_CreateQueryWriterFromReader(pFactory
, pIQueryReader
, pguidVendor
, ppIQueryWriter
);
286 HRESULT WINAPI
IWICImagingFactory_CreateQueryWriter_Proxy_W(IWICImagingFactory
*pFactory
,
287 REFGUID guidMetadataFormat
, const GUID
*pguidVendor
, IWICMetadataQueryWriter
**ppIQueryWriter
)
289 return IWICImagingFactory_CreateQueryWriter(pFactory
, guidMetadataFormat
, pguidVendor
, ppIQueryWriter
);
292 HRESULT WINAPI
IWICImagingFactory_CreateStream_Proxy_W(IWICImagingFactory
*pFactory
,
293 IWICStream
**ppIWICStream
)
295 return IWICImagingFactory_CreateStream(pFactory
, ppIWICStream
);
298 HRESULT WINAPI
IWICMetadataQueryReader_GetContainerFormat_Proxy_W(IWICMetadataQueryReader
*iface
,
299 GUID
*pguidContainerFormat
)
301 return IWICMetadataQueryReader_GetContainerFormat(iface
, pguidContainerFormat
);
304 HRESULT WINAPI
IWICMetadataQueryReader_GetLocation_Proxy_W(IWICMetadataQueryReader
*iface
,
305 UINT cchMaxLength
, WCHAR
*wzNamespace
, UINT
*pcchActualLength
)
307 return IWICMetadataQueryReader_GetLocation(iface
, cchMaxLength
, wzNamespace
, pcchActualLength
);
310 HRESULT WINAPI
IWICMetadataQueryReader_GetMetadataByName_Proxy_W(IWICMetadataQueryReader
*iface
,
311 LPCWSTR wzName
, PROPVARIANT
*pvarValue
)
313 return IWICMetadataQueryReader_GetMetadataByName(iface
, wzName
, pvarValue
);
316 HRESULT WINAPI
IWICMetadataQueryReader_GetEnumerator_Proxy_W(IWICMetadataQueryReader
*iface
,
317 IEnumString
**ppIEnumString
)
319 return IWICMetadataQueryReader_GetEnumerator(iface
, ppIEnumString
);
322 HRESULT WINAPI
IWICMetadataQueryWriter_SetMetadataByName_Proxy_W(IWICMetadataQueryWriter
*iface
,
323 LPCWSTR wzName
, const PROPVARIANT
*pvarValue
)
325 return IWICMetadataQueryWriter_SetMetadataByName(iface
, wzName
, pvarValue
);
328 HRESULT WINAPI
IWICMetadataQueryWriter_RemoveMetadataByName_Proxy_W(IWICMetadataQueryWriter
*iface
,
331 return IWICMetadataQueryWriter_RemoveMetadataByName(iface
, wzName
);
334 HRESULT WINAPI
IWICPalette_InitializePredefined_Proxy_W(IWICPalette
*iface
,
335 WICBitmapPaletteType ePaletteType
, BOOL fAddTransparentColor
)
337 return IWICPalette_InitializePredefined(iface
, ePaletteType
, fAddTransparentColor
);
340 HRESULT WINAPI
IWICPalette_InitializeCustom_Proxy_W(IWICPalette
*iface
,
341 WICColor
*pColors
, UINT colorCount
)
343 return IWICPalette_InitializeCustom(iface
, pColors
, colorCount
);
346 HRESULT WINAPI
IWICPalette_InitializeFromBitmap_Proxy_W(IWICPalette
*iface
,
347 IWICBitmapSource
*pISurface
, UINT colorCount
, BOOL fAddTransparentColor
)
349 return IWICPalette_InitializeFromBitmap(iface
, pISurface
, colorCount
, fAddTransparentColor
);
352 HRESULT WINAPI
IWICPalette_InitializeFromPalette_Proxy_W(IWICPalette
*iface
,
353 IWICPalette
*pIPalette
)
355 return IWICPalette_InitializeFromPalette(iface
, pIPalette
);
358 HRESULT WINAPI
IWICPalette_GetType_Proxy_W(IWICPalette
*iface
,
359 WICBitmapPaletteType
*pePaletteType
)
361 return IWICPalette_GetType(iface
, pePaletteType
);
364 HRESULT WINAPI
IWICPalette_GetColorCount_Proxy_W(IWICPalette
*iface
,
367 return IWICPalette_GetColorCount(iface
, pcCount
);
370 HRESULT WINAPI
IWICPalette_GetColors_Proxy_W(IWICPalette
*iface
,
371 UINT colorCount
, WICColor
*pColors
, UINT
*pcActualColors
)
373 return IWICPalette_GetColors(iface
, colorCount
, pColors
, pcActualColors
);
376 HRESULT WINAPI
IWICPalette_HasAlpha_Proxy_W(IWICPalette
*iface
,
379 return IWICPalette_HasAlpha(iface
, pfHasAlpha
);
382 HRESULT WINAPI
WICCreateImagingFactory_Proxy(UINT SDKVersion
, IWICImagingFactory
**ppIImagingFactory
)
384 TRACE("%x, %p\n", SDKVersion
, ppIImagingFactory
);
386 return ImagingFactory_CreateInstance(NULL
, &IID_IWICImagingFactory
, (void**)ppIImagingFactory
);