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 IWICBitmapCodecInfo_GetContainerFormat_Proxy_W(IWICBitmapCodecInfo *iface,
40 GUID *pguidContainerFormat)
42 return IWICBitmapCodecInfo_GetContainerFormat(iface, pguidContainerFormat);
45 HRESULT WINAPI IWICBitmapCodecInfo_GetDeviceManufacturer_Proxy_W(IWICBitmapCodecInfo *iface,
46 UINT cchDeviceManufacturer, WCHAR *wzDeviceManufacturer, UINT *pcchActual)
48 return IWICBitmapCodecInfo_GetDeviceManufacturer(iface, cchDeviceManufacturer, wzDeviceManufacturer, pcchActual);
51 HRESULT WINAPI IWICBitmapCodecInfo_GetDeviceModels_Proxy_W(IWICBitmapCodecInfo *iface,
52 UINT cchDeviceModels, WCHAR *wzDeviceModels, UINT *pcchActual)
54 return IWICBitmapCodecInfo_GetDeviceModels(iface, cchDeviceModels, wzDeviceModels, pcchActual);
57 HRESULT WINAPI IWICBitmapCodecInfo_GetMimeTypes_Proxy_W(IWICBitmapCodecInfo *iface,
58 UINT cchMimeTypes, WCHAR *wzMimeTypes, UINT *pcchActual)
60 return IWICBitmapCodecInfo_GetMimeTypes(iface, cchMimeTypes, wzMimeTypes, pcchActual);
63 HRESULT WINAPI IWICBitmapCodecInfo_GetFileExtensions_Proxy_W(IWICBitmapCodecInfo *iface,
64 UINT cchFileExtensions, WCHAR *wzFileExtensions, UINT *pcchActual)
66 return IWICBitmapCodecInfo_GetFileExtensions(iface, cchFileExtensions, wzFileExtensions, pcchActual);
69 HRESULT WINAPI IWICBitmapCodecInfo_DoesSupportAnimation_Proxy_W(IWICBitmapCodecInfo *iface,
70 BOOL *pfSupportAnimation)
72 return IWICBitmapCodecInfo_DoesSupportAnimation(iface, pfSupportAnimation);
75 HRESULT WINAPI IWICBitmapCodecInfo_DoesSupportLossless_Proxy_W(IWICBitmapCodecInfo *iface,
76 BOOL *pfSupportLossless)
78 return IWICBitmapCodecInfo_DoesSupportLossless(iface, pfSupportLossless);
81 HRESULT WINAPI IWICBitmapCodecInfo_DoesSupportMultiframe_Proxy_W(IWICBitmapCodecInfo *iface,
82 BOOL *pfSupportMultiframe)
84 return IWICBitmapCodecInfo_DoesSupportMultiframe(iface, pfSupportMultiframe);
87 HRESULT WINAPI IWICBitmapDecoder_GetDecoderInfo_Proxy_W(IWICBitmapDecoder *iface,
88 IWICBitmapDecoderInfo **ppIDecoderInfo)
90 return IWICBitmapDecoder_GetDecoderInfo(iface, ppIDecoderInfo);
93 HRESULT WINAPI IWICBitmapDecoder_CopyPalette_Proxy_W(IWICBitmapDecoder *iface,
94 IWICPalette *pIPalette)
96 return IWICBitmapDecoder_CopyPalette(iface, pIPalette);
99 HRESULT WINAPI IWICBitmapDecoder_GetMetadataQueryReader_Proxy_W(IWICBitmapDecoder *iface,
100 IWICMetadataQueryReader **ppIMetadataQueryReader)
102 return IWICBitmapDecoder_GetMetadataQueryReader(iface, ppIMetadataQueryReader);
105 HRESULT WINAPI IWICBitmapDecoder_GetPreview_Proxy_W(IWICBitmapDecoder *iface,
106 IWICBitmapSource **ppIBitmapSource)
108 return IWICBitmapDecoder_GetPreview(iface, ppIBitmapSource);
111 HRESULT WINAPI IWICBitmapDecoder_GetColorContexts_Proxy_W(IWICBitmapDecoder *iface,
112 UINT cCount, IWICColorContext **ppIColorContexts, UINT *pcActualCount)
114 return IWICBitmapDecoder_GetColorContexts(iface, cCount, ppIColorContexts, pcActualCount);
117 HRESULT WINAPI IWICBitmapDecoder_GetThumbnail_Proxy_W(IWICBitmapDecoder *iface,
118 IWICBitmapSource **ppIThumbnail)
120 return IWICBitmapDecoder_GetThumbnail(iface, ppIThumbnail);
123 HRESULT WINAPI IWICBitmapDecoder_GetFrameCount_Proxy_W(IWICBitmapDecoder *iface,
126 return IWICBitmapDecoder_GetFrameCount(iface, pCount);
129 HRESULT WINAPI IWICBitmapDecoder_GetFrame_Proxy_W(IWICBitmapDecoder *iface,
130 UINT index, IWICBitmapFrameDecode **ppIBitmapFrame)
132 return IWICBitmapDecoder_GetFrame(iface, index, ppIBitmapFrame);
135 HRESULT WINAPI IWICBitmapFlipRotator_Initialize_Proxy_W(IWICBitmapFlipRotator *iface,
136 IWICBitmapSource *pISource, WICBitmapTransformOptions options)
138 return IWICBitmapFlipRotator_Initialize(iface, pISource, options);
141 HRESULT WINAPI IWICBitmapLock_GetDataPointer_Proxy_W(IWICBitmapLock *iface,
142 UINT *pcbBufferSize, BYTE **ppbData)
144 return IWICBitmapLock_GetDataPointer(iface, pcbBufferSize, ppbData);
147 HRESULT WINAPI IWICBitmapLock_GetStride_Proxy_W(IWICBitmapLock *iface,
150 return IWICBitmapLock_GetStride(iface, pcbStride);
153 HRESULT WINAPI IWICBitmapSource_GetSize_Proxy_W(IWICBitmapSource *iface,
154 UINT *puiWidth, UINT *puiHeight)
156 return IWICBitmapSource_GetSize(iface, puiWidth, puiHeight);
159 HRESULT WINAPI IWICBitmapSource_GetPixelFormat_Proxy_W(IWICBitmapSource *iface,
160 WICPixelFormatGUID *pPixelFormat)
162 return IWICBitmapSource_GetPixelFormat(iface, pPixelFormat);
165 HRESULT WINAPI IWICBitmapSource_GetResolution_Proxy_W(IWICBitmapSource *iface,
166 double *pDpiX, double *pDpiY)
168 return IWICBitmapSource_GetResolution(iface, pDpiX, pDpiY);
171 HRESULT WINAPI IWICBitmapSource_CopyPalette_Proxy_W(IWICBitmapSource *iface,
172 IWICPalette *pIPalette)
174 return IWICBitmapSource_CopyPalette(iface, pIPalette);
177 HRESULT WINAPI IWICBitmapSource_CopyPixels_Proxy_W(IWICBitmapSource *iface,
178 const WICRect *prc, UINT cbStride, UINT cbBufferSize, BYTE *pbBuffer)
180 return IWICBitmapSource_CopyPixels(iface, prc, cbStride, cbBufferSize, pbBuffer);
183 HRESULT WINAPI IWICBitmap_Lock_Proxy_W(IWICBitmap *iface,
184 const WICRect *prcLock, DWORD flags, IWICBitmapLock **ppILock)
186 return IWICBitmap_Lock(iface, prcLock, flags, ppILock);
189 HRESULT WINAPI IWICBitmap_SetPalette_Proxy_W(IWICBitmap *iface,
190 IWICPalette *pIPalette)
192 return IWICBitmap_SetPalette(iface, pIPalette);
195 HRESULT WINAPI IWICBitmap_SetResolution_Proxy_W(IWICBitmap *iface,
196 double dpiX, double dpiY)
198 return IWICBitmap_SetResolution(iface, dpiX, dpiY);
201 HRESULT WINAPI IWICColorContext_InitializeFromMemory_Proxy_W(IWICColorContext *iface,
202 const BYTE *pbBuffer, UINT cbBufferSize)
204 return IWICColorContext_InitializeFromMemory(iface, pbBuffer, cbBufferSize);
207 HRESULT WINAPI IWICComponentInfo_GetCLSID_Proxy_W(IWICComponentInfo *iface,
210 return IWICComponentInfo_GetCLSID(iface, pclsid);
213 HRESULT WINAPI IWICComponentInfo_GetAuthor_Proxy_W(IWICComponentInfo *iface,
214 UINT cchAuthor, WCHAR *wzAuthor, UINT *pcchActual)
216 return IWICComponentInfo_GetAuthor(iface, cchAuthor, wzAuthor, pcchActual);
219 HRESULT WINAPI IWICComponentInfo_GetVersion_Proxy_W(IWICComponentInfo *iface,
220 UINT cchVersion, WCHAR *wzVersion, UINT *pcchActual)
222 return IWICComponentInfo_GetVersion(iface, cchVersion, wzVersion, pcchActual);
225 HRESULT WINAPI IWICComponentInfo_GetSpecVersion_Proxy_W(IWICComponentInfo *iface,
226 UINT cchSpecVersion, WCHAR *wzSpecVersion, UINT *pcchActual)
228 return IWICComponentInfo_GetSpecVersion(iface, cchSpecVersion, wzSpecVersion, pcchActual);
231 HRESULT WINAPI IWICComponentInfo_GetFriendlyName_Proxy_W(IWICComponentInfo *iface,
232 UINT cchFriendlyName, WCHAR *wzFriendlyName, UINT *pcchActual)
234 return IWICComponentInfo_GetFriendlyName(iface, cchFriendlyName, wzFriendlyName, pcchActual);
237 HRESULT WINAPI IWICFastMetadataEncoder_Commit_Proxy_W(IWICFastMetadataEncoder *iface)
239 return IWICFastMetadataEncoder_Commit(iface);
242 HRESULT WINAPI IWICFastMetadataEncoder_GetMetadataQueryWriter_Proxy_W(IWICFastMetadataEncoder *iface,
243 IWICMetadataQueryWriter **ppIMetadataQueryWriter)
245 return IWICFastMetadataEncoder_GetMetadataQueryWriter(iface, ppIMetadataQueryWriter);
248 HRESULT WINAPI IWICBitmapFrameDecode_GetMetadataQueryReader_Proxy_W(IWICBitmapFrameDecode *iface,
249 IWICMetadataQueryReader **ppIMetadataQueryReader)
251 return IWICBitmapFrameDecode_GetMetadataQueryReader(iface, ppIMetadataQueryReader);
254 HRESULT WINAPI IWICBitmapFrameDecode_GetColorContexts_Proxy_W(IWICBitmapFrameDecode *iface,
255 UINT cCount, IWICColorContext **ppIColorContexts, UINT *pcActualCount)
257 return IWICBitmapFrameDecode_GetColorContexts(iface, cCount, ppIColorContexts, pcActualCount);
260 HRESULT WINAPI IWICBitmapFrameDecode_GetThumbnail_Proxy_W(IWICBitmapFrameDecode *iface,
261 IWICBitmapSource **ppIThumbnail)
263 return IWICBitmapFrameDecode_GetThumbnail(iface, ppIThumbnail);
266 HRESULT WINAPI IWICImagingFactory_CreateBitmapClipper_Proxy_W(IWICImagingFactory *pFactory,
267 IWICBitmapClipper **ppIBitmapClipper)
269 return IWICImagingFactory_CreateBitmapClipper(pFactory, ppIBitmapClipper);
272 HRESULT WINAPI IWICImagingFactory_CreateBitmapFlipRotator_Proxy_W(IWICImagingFactory *pFactory,
273 IWICBitmapFlipRotator **ppIBitmapFlipRotator)
275 return IWICImagingFactory_CreateBitmapFlipRotator(pFactory, ppIBitmapFlipRotator);
278 HRESULT WINAPI IWICImagingFactory_CreateBitmapFromHBITMAP_Proxy_W(IWICImagingFactory *pFactory,
279 HBITMAP hBitmap, HPALETTE hPalette, WICBitmapAlphaChannelOption options, IWICBitmap **ppIBitmap)
281 return IWICImagingFactory_CreateBitmapFromHBITMAP(pFactory, hBitmap, hPalette, options, ppIBitmap);
284 HRESULT WINAPI IWICImagingFactory_CreateBitmapFromHICON_Proxy_W(IWICImagingFactory *pFactory,
285 HICON hIcon, IWICBitmap **ppIBitmap)
287 return IWICImagingFactory_CreateBitmapFromHICON(pFactory, hIcon, ppIBitmap);
290 HRESULT WINAPI IWICImagingFactory_CreateBitmapFromMemory_Proxy_W(IWICImagingFactory *pFactory,
291 UINT uiWidth, UINT uiHeight, REFWICPixelFormatGUID pixelFormat, UINT cbStride,
292 UINT cbBufferSize, BYTE *pbBuffer, IWICBitmap **ppIBitmap)
294 return IWICImagingFactory_CreateBitmapFromMemory(pFactory, uiWidth, uiHeight,
295 pixelFormat, cbStride, cbBufferSize, pbBuffer, ppIBitmap);
298 HRESULT WINAPI IWICImagingFactory_CreateBitmapFromSource_Proxy_W(IWICImagingFactory *pFactory,
299 IWICBitmapSource *piBitmapSource, WICBitmapCreateCacheOption option, IWICBitmap **ppIBitmap)
301 return IWICImagingFactory_CreateBitmapFromSource(pFactory, piBitmapSource, option, ppIBitmap);
304 HRESULT WINAPI IWICImagingFactory_CreateBitmapScaler_Proxy_W(IWICImagingFactory *pFactory,
305 IWICBitmapScaler **ppIBitmapScaler)
307 return IWICImagingFactory_CreateBitmapScaler(pFactory, ppIBitmapScaler);
310 HRESULT WINAPI IWICImagingFactory_CreateBitmap_Proxy_W(IWICImagingFactory *pFactory,
311 UINT uiWidth, UINT uiHeight, REFWICPixelFormatGUID pixelFormat,
312 WICBitmapCreateCacheOption option, IWICBitmap **ppIBitmap)
314 return IWICImagingFactory_CreateBitmap(pFactory, uiWidth, uiHeight,
315 pixelFormat, option, ppIBitmap);
318 HRESULT WINAPI IWICImagingFactory_CreateComponentInfo_Proxy_W(IWICImagingFactory *pFactory,
319 REFCLSID clsidComponent, IWICComponentInfo **ppIInfo)
321 return IWICImagingFactory_CreateComponentInfo(pFactory, clsidComponent, ppIInfo);
324 HRESULT WINAPI IWICImagingFactory_CreateDecoderFromFileHandle_Proxy_W(IWICImagingFactory *pFactory,
325 ULONG_PTR hFile, const GUID *pguidVendor, WICDecodeOptions metadataOptions, IWICBitmapDecoder **ppIDecoder)
327 return IWICImagingFactory_CreateDecoderFromFileHandle(pFactory, hFile, pguidVendor, metadataOptions, ppIDecoder);
330 HRESULT WINAPI IWICImagingFactory_CreateDecoderFromFilename_Proxy_W(IWICImagingFactory *pFactory,
331 LPCWSTR wzFilename, const GUID *pguidVendor, DWORD dwDesiredAccess,
332 WICDecodeOptions metadataOptions, IWICBitmapDecoder **ppIDecoder)
334 return IWICImagingFactory_CreateDecoderFromFilename(pFactory, wzFilename,
335 pguidVendor, dwDesiredAccess, metadataOptions, ppIDecoder);
338 HRESULT WINAPI IWICImagingFactory_CreateDecoderFromStream_Proxy_W(IWICImagingFactory *pFactory,
339 IStream *pIStream, const GUID *pguidVendor,
340 WICDecodeOptions metadataOptions, IWICBitmapDecoder **ppIDecoder)
342 return IWICImagingFactory_CreateDecoderFromStream(pFactory, pIStream, pguidVendor, metadataOptions, ppIDecoder);
345 HRESULT WINAPI IWICImagingFactory_CreateEncoder_Proxy_W(IWICImagingFactory *pFactory,
346 REFGUID guidContainerFormat, const GUID *pguidVendor, IWICBitmapEncoder **ppIEncoder)
348 return IWICImagingFactory_CreateEncoder(pFactory, guidContainerFormat, pguidVendor, ppIEncoder);
351 HRESULT WINAPI IWICImagingFactory_CreateFastMetadataEncoderFromDecoder_Proxy_W(IWICImagingFactory *pFactory,
352 IWICBitmapDecoder *pIDecoder, IWICFastMetadataEncoder **ppIFastEncoder)
354 return IWICImagingFactory_CreateFastMetadataEncoderFromDecoder(pFactory, pIDecoder, ppIFastEncoder);
357 HRESULT WINAPI IWICImagingFactory_CreateFastMetadataEncoderFromFrameDecode_Proxy_W(IWICImagingFactory *pFactory,
358 IWICBitmapFrameDecode *pIFrameDecoder, IWICFastMetadataEncoder **ppIFastEncoder)
360 return IWICImagingFactory_CreateFastMetadataEncoderFromFrameDecode(pFactory, pIFrameDecoder, ppIFastEncoder);
363 HRESULT WINAPI IWICImagingFactory_CreateFormatConverter_Proxy_W(IWICImagingFactory *pFactory,
364 IWICFormatConverter **ppIFormatConverter)
366 return IWICImagingFactory_CreateFormatConverter(pFactory, ppIFormatConverter);
369 HRESULT WINAPI IWICImagingFactory_CreatePalette_Proxy_W(IWICImagingFactory *pFactory,
370 IWICPalette **ppIPalette)
372 return IWICImagingFactory_CreatePalette(pFactory, ppIPalette);
375 HRESULT WINAPI IWICImagingFactory_CreateQueryWriterFromReader_Proxy_W(IWICImagingFactory *pFactory,
376 IWICMetadataQueryReader *pIQueryReader, const GUID *pguidVendor,
377 IWICMetadataQueryWriter **ppIQueryWriter)
379 return IWICImagingFactory_CreateQueryWriterFromReader(pFactory, pIQueryReader, pguidVendor, ppIQueryWriter);
382 HRESULT WINAPI IWICImagingFactory_CreateQueryWriter_Proxy_W(IWICImagingFactory *pFactory,
383 REFGUID guidMetadataFormat, const GUID *pguidVendor, IWICMetadataQueryWriter **ppIQueryWriter)
385 return IWICImagingFactory_CreateQueryWriter(pFactory, guidMetadataFormat, pguidVendor, ppIQueryWriter);
388 HRESULT WINAPI IWICImagingFactory_CreateStream_Proxy_W(IWICImagingFactory *pFactory,
389 IWICStream **ppIWICStream)
391 return IWICImagingFactory_CreateStream(pFactory, ppIWICStream);
394 HRESULT WINAPI IWICMetadataQueryReader_GetContainerFormat_Proxy_W(IWICMetadataQueryReader *iface,
395 GUID *pguidContainerFormat)
397 return IWICMetadataQueryReader_GetContainerFormat(iface, pguidContainerFormat);
400 HRESULT WINAPI IWICMetadataQueryReader_GetLocation_Proxy_W(IWICMetadataQueryReader *iface,
401 UINT cchMaxLength, WCHAR *wzNamespace, UINT *pcchActualLength)
403 return IWICMetadataQueryReader_GetLocation(iface, cchMaxLength, wzNamespace, pcchActualLength);
406 HRESULT WINAPI IWICMetadataQueryReader_GetMetadataByName_Proxy_W(IWICMetadataQueryReader *iface,
407 LPCWSTR wzName, PROPVARIANT *pvarValue)
409 return IWICMetadataQueryReader_GetMetadataByName(iface, wzName, pvarValue);
412 HRESULT WINAPI IWICMetadataQueryReader_GetEnumerator_Proxy_W(IWICMetadataQueryReader *iface,
413 IEnumString **ppIEnumString)
415 return IWICMetadataQueryReader_GetEnumerator(iface, ppIEnumString);
418 HRESULT WINAPI IWICMetadataQueryWriter_SetMetadataByName_Proxy_W(IWICMetadataQueryWriter *iface,
419 LPCWSTR wzName, const PROPVARIANT *pvarValue)
421 return IWICMetadataQueryWriter_SetMetadataByName(iface, wzName, pvarValue);
424 HRESULT WINAPI IWICMetadataQueryWriter_RemoveMetadataByName_Proxy_W(IWICMetadataQueryWriter *iface,
427 return IWICMetadataQueryWriter_RemoveMetadataByName(iface, wzName);
430 HRESULT WINAPI IWICPalette_InitializePredefined_Proxy_W(IWICPalette *iface,
431 WICBitmapPaletteType ePaletteType, BOOL fAddTransparentColor)
433 return IWICPalette_InitializePredefined(iface, ePaletteType, fAddTransparentColor);
436 HRESULT WINAPI IWICPalette_InitializeCustom_Proxy_W(IWICPalette *iface,
437 WICColor *pColors, UINT colorCount)
439 return IWICPalette_InitializeCustom(iface, pColors, colorCount);
442 HRESULT WINAPI IWICPalette_InitializeFromBitmap_Proxy_W(IWICPalette *iface,
443 IWICBitmapSource *pISurface, UINT colorCount, BOOL fAddTransparentColor)
445 return IWICPalette_InitializeFromBitmap(iface, pISurface, colorCount, fAddTransparentColor);
448 HRESULT WINAPI IWICPalette_InitializeFromPalette_Proxy_W(IWICPalette *iface,
449 IWICPalette *pIPalette)
451 return IWICPalette_InitializeFromPalette(iface, pIPalette);
454 HRESULT WINAPI IWICPalette_GetType_Proxy_W(IWICPalette *iface,
455 WICBitmapPaletteType *pePaletteType)
457 return IWICPalette_GetType(iface, pePaletteType);
460 HRESULT WINAPI IWICPalette_GetColorCount_Proxy_W(IWICPalette *iface,
463 return IWICPalette_GetColorCount(iface, pcCount);
466 HRESULT WINAPI IWICPalette_GetColors_Proxy_W(IWICPalette *iface,
467 UINT colorCount, WICColor *pColors, UINT *pcActualColors)
469 return IWICPalette_GetColors(iface, colorCount, pColors, pcActualColors);
472 HRESULT WINAPI IWICPalette_HasAlpha_Proxy_W(IWICPalette *iface,
475 return IWICPalette_HasAlpha(iface, pfHasAlpha);
478 HRESULT WINAPI WICCreateImagingFactory_Proxy(UINT SDKVersion, IWICImagingFactory **ppIImagingFactory)
480 TRACE("%x, %p\n", SDKVersion, ppIImagingFactory);
482 return ImagingFactory_CreateInstance(NULL, &IID_IWICImagingFactory, (void**)ppIImagingFactory);