d3d10: Add support for parsing blend states.
[wine/multimedia.git] / include / wincodec.idl
blobab1e49012f677cbfdafbb0048e5327a9be76f55a
1 /*
2 * Copyright 2009 Vincent Povirk for CodeWeavers
4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Lesser General Public
6 * License as published by the Free Software Foundation; either
7 * version 2.1 of the License, or (at your option) any later version.
9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * Lesser General Public License for more details.
14 * You should have received a copy of the GNU Lesser General Public
15 * License along with this library; if not, write to the Free Software
16 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
19 import "wtypes.idl";
20 import "propidl.idl";
21 import "ocidl.idl";
23 cpp_quote("#define WINCODEC_SDK_VERSION 0x0236")
25 #define CODEC_FORCE_DWORD 0x7fffffff
27 typedef enum WICDecodeOptions {
28 WICDecodeMetadataCacheOnDemand = 0x00000000,
29 WICDecodeMetadataCacheOnLoad = 0x00000001,
30 WICMETADATACACHEOPTION_FORCE_DWORD = CODEC_FORCE_DWORD
31 } WICDecodeOptions;
33 typedef enum WICBitmapCreateCacheOption {
34 WICBitmapNoCache = 0x00000000,
35 WICBitmapCacheOnDemand = 0x00000001,
36 WICBitmapCacheOnLoad = 0x00000002,
37 WICBITMAPCREATECACHEOPTION_FORCE_DWORD = CODEC_FORCE_DWORD
38 } WICBitmapCreateCacheOption;
40 typedef enum WICBitmapAlphaChannelOption {
41 WICBitmapUseAlpha = 0x00000000,
42 WICBitmapUsePremultipliedAlpha = 0x00000001,
43 WICBitmapIgnoreAlpha = 0x00000002,
44 WICBITMAPALPHACHANNELOPTIONS_FORCE_DWORD = CODEC_FORCE_DWORD
45 } WICBitmapAlphaChannelOption;
47 typedef enum WICBitmapDecoderCapabilities {
48 WICBitmapDecoderCapabilitySameEncoder = 0x00000001,
49 WICBitmapDecoderCapabilityCanDecodeAllImages = 0x00000002,
50 WICBitmapDecoderCapabilityCanDecodeSomeImages = 0x00000004,
51 WICBitmapDecoderCapabilityCanEnumerateMetadata = 0x00000008,
52 WICBitmapDecoderCapabilityCanDecodeThumbnail = 0x00000010,
53 } WICBitmapDecoderCapabilities;
55 typedef enum WICBitmapDitherType {
56 WICBitmapDitherTypeNone = 0x00000000,
57 WICBitmapDitherTypeSolid = 0x00000000,
58 WICBitmapDitherTypeOrdered4x4 = 0x00000001,
59 WICBitmapDitherTypeOrdered8x8 = 0x00000002,
60 WICBitmapDitherTypeOrdered16x16 = 0x00000003,
61 WICBitmapDitherTypeSpiral4x4 = 0x00000004,
62 WICBitmapDitherTypeSpiral8x8 = 0x00000005,
63 WICBitmapDitherTypeDualSpiral4x4 = 0x00000006,
64 WICBitmapDitherTypeDualSpiral8x8 = 0x00000007,
65 WICBitmapDitherTypeErrorDiffusion = 0x00000008,
66 WICBITMAPDITHERTYPE_FORCE_DWORD = CODEC_FORCE_DWORD
67 } WICBitmapDitherType;
69 typedef enum WICBitmapEncoderCacheOption {
70 WICBitmapEncoderCacheInMemory = 0x00000000,
71 WICBitmapEncoderCacheTempFile = 0x00000001,
72 WICBitmapEncoderNoCache = 0x00000002,
73 WICBITMAPENCODERCACHEOPTION_FORCE_DWORD = CODEC_FORCE_DWORD
74 } WICBitmapEncoderCacheOption;
76 typedef enum WICBitmapInterpolationMode {
77 WICBitmapInterpolationModeNearestNeighbor = 0x00000000,
78 WICBitmapInterpolationModeLinear = 0x00000001,
79 WICBitmapInterpolationModeCubic = 0x00000002,
80 WICBitmapInterpolationModeFant = 0x00000003,
81 WICBITMAPINTERPOLATIONMODE_FORCE_DWORD = CODEC_FORCE_DWORD
82 } WICBitmapInterpolationMode;
84 typedef enum WICBitmapPaletteType {
85 WICBitmapPaletteTypeCustom = 0x00000000,
86 WICBitmapPaletteTypeMedianCut = 0x00000001,
87 WICBitmapPaletteTypeFixedBW = 0x00000002,
88 WICBitmapPaletteTypeFixedHalftone8 = 0x00000003,
89 WICBitmapPaletteTypeFixedHalftone27 = 0x00000004,
90 WICBitmapPaletteTypeFixedHalftone64 = 0x00000005,
91 WICBitmapPaletteTypeFixedHalftone125 = 0x00000006,
92 WICBitmapPaletteTypeFixedHalftone216 = 0x00000007,
93 WICBitmapPaletteTypeFixedWebPalette = WICBitmapPaletteTypeFixedHalftone216,
94 WICBitmapPaletteTypeFixedHalftone252 = 0x00000008,
95 WICBitmapPaletteTypeFixedHalftone256 = 0x00000009,
96 WICBitmapPaletteTypeFixedGray4 = 0x0000000A,
97 WICBitmapPaletteTypeFixedGray16 = 0x0000000B,
98 WICBitmapPaletteTypeFixedGray256 = 0x0000000C,
99 WICBITMAPPALETTETYPE_FORCE_DWORD = CODEC_FORCE_DWORD
100 } WICBitmapPaletteType;
102 typedef enum WICBitmapTransformOptions {
103 WICBitmapTransformRotate0 = 0x00000000,
104 WICBitmapTransformRotate90 = 0x00000001,
105 WICBitmapTransformRotate180 = 0x00000002,
106 WICBitmapTransformRotate270 = 0x00000003,
107 WICBitmapTransformFlipHorizontal = 0x00000008,
108 WICBitmapTransformFlipVertical = 0x00000010,
109 WICBITMAPTRANSFORMOPTIONS_FORCE_DWORD = CODEC_FORCE_DWORD
110 } WICBitmapTransformOptions;
112 typedef enum WICColorContextType {
113 WICColorContextUninitialized = 0x00000000,
114 WICColorContextProfile = 0x00000001,
115 WICColorContextExifColorSpace = 0x00000002
116 } WICColorContextType;
118 typedef enum WICComponentType {
119 WICDecoder = 0x00000001,
120 WICEncoder = 0x00000002,
121 WICPixelFormatConverter = 0x00000004,
122 WICMetadataReader = 0x00000008,
123 WICMetadataWriter = 0x00000010,
124 WICPixelFormat = 0x00000020,
125 WICCOMPONENTTYPE_FORCE_DWORD = CODEC_FORCE_DWORD
126 } WICComponentType;
128 typedef enum WICComponentSigning {
129 WICComponentSigned = 0x00000001,
130 WICComponentUnsigned = 0x00000002,
131 WICComponentSafe = 0x00000004,
132 WICComponentDisabled = 0x80000000
133 } WICComponentSigning;
135 typedef enum WICComponentEnumerateOptions {
136 WICComponentEnumerateDefault = 0x00000000,
137 WICComponentEnumerateRefresh = 0x00000001,
138 WICComponentEnumerateBuiltInOnly = 0x20000000,
139 WICComponentEnumerateUnsigned = 0x40000000,
140 WICComponentEnumerateDisabled = 0x80000000
141 } WICComponentEnumerateOptions;
143 typedef enum WICPixelFormatNumericRepresentation {
144 WICPixelFormatNumericRepresentationUnspecified = 0x00000000,
145 WICPixelFormatNumericRepresentationIndexed = 0x00000001,
146 WICPixelFormatNumericRepresentationUnsignedInteger = 0x00000002,
147 WICPixelFormatNumericRepresentationSignedInteger = 0x00000003,
148 WICPixelFormatNumericRepresentationFixed = 0x00000004,
149 WICPixelFormatNumericRepresentationFloat = 0x00000005,
150 WICPIXELFORMATNUMERICREPRESENTATION_FORCE_DWORD = CODEC_FORCE_DWORD
151 } WICPixelFormatNumericRepresentation;
153 typedef GUID WICPixelFormatGUID;
154 typedef REFGUID REFWICPixelFormatGUID;
156 cpp_quote("DEFINE_GUID(GUID_WICPixelFormatDontCare, 0x6fddc324,0x4e03,0x4bfe,0xb1,0x85,0x3d,0x77,0x76,0x8d,0xc9,0x00);")
157 cpp_quote("#define GUID_WICPixelFormatUndefined GUID_WICPixelFormatDontCare")
159 cpp_quote("DEFINE_GUID(GUID_WICPixelFormat1bppIndexed, 0x6fddc324,0x4e03,0x4bfe,0xb1,0x85,0x3d,0x77,0x76,0x8d,0xc9,0x01);")
160 cpp_quote("DEFINE_GUID(GUID_WICPixelFormat2bppIndexed, 0x6fddc324,0x4e03,0x4bfe,0xb1,0x85,0x3d,0x77,0x76,0x8d,0xc9,0x02);")
161 cpp_quote("DEFINE_GUID(GUID_WICPixelFormat4bppIndexed, 0x6fddc324,0x4e03,0x4bfe,0xb1,0x85,0x3d,0x77,0x76,0x8d,0xc9,0x03);")
162 cpp_quote("DEFINE_GUID(GUID_WICPixelFormat8bppIndexed, 0x6fddc324,0x4e03,0x4bfe,0xb1,0x85,0x3d,0x77,0x76,0x8d,0xc9,0x04);")
164 cpp_quote("DEFINE_GUID(GUID_WICPixelFormatBlackWhite, 0x6fddc324,0x4e03,0x4bfe,0xb1,0x85,0x3d,0x77,0x76,0x8d,0xc9,0x05);")
165 cpp_quote("DEFINE_GUID(GUID_WICPixelFormat2bppGray, 0x6fddc324,0x4e03,0x4bfe,0xb1,0x85,0x3d,0x77,0x76,0x8d,0xc9,0x06);")
166 cpp_quote("DEFINE_GUID(GUID_WICPixelFormat4bppGray, 0x6fddc324,0x4e03,0x4bfe,0xb1,0x85,0x3d,0x77,0x76,0x8d,0xc9,0x07);")
167 cpp_quote("DEFINE_GUID(GUID_WICPixelFormat8bppGray, 0x6fddc324,0x4e03,0x4bfe,0xb1,0x85,0x3d,0x77,0x76,0x8d,0xc9,0x08);")
168 cpp_quote("DEFINE_GUID(GUID_WICPixelFormat16bppGray, 0x6fddc324,0x4e03,0x4bfe,0xb1,0x85,0x3d,0x77,0x76,0x8d,0xc9,0x0b);")
170 cpp_quote("DEFINE_GUID(GUID_WICPixelFormat16bppBGR555, 0x6fddc324,0x4e03,0x4bfe,0xb1,0x85,0x3d,0x77,0x76,0x8d,0xc9,0x09);")
171 cpp_quote("DEFINE_GUID(GUID_WICPixelFormat16bppBGR565, 0x6fddc324,0x4e03,0x4bfe,0xb1,0x85,0x3d,0x77,0x76,0x8d,0xc9,0x0a);")
172 cpp_quote("DEFINE_GUID(GUID_WICPixelFormat16bppBGRA5551, 0x05ec7c2b,0xf1e6,0x4961,0xad,0x46,0xe1,0xcc,0x81,0x0a,0x87,0xd2);")
173 cpp_quote("DEFINE_GUID(GUID_WICPixelFormat24bppBGR, 0x6fddc324,0x4e03,0x4bfe,0xb1,0x85,0x3d,0x77,0x76,0x8d,0xc9,0x0c);")
174 cpp_quote("DEFINE_GUID(GUID_WICPixelFormat32bppBGR, 0x6fddc324,0x4e03,0x4bfe,0xb1,0x85,0x3d,0x77,0x76,0x8d,0xc9,0x0e);")
175 cpp_quote("DEFINE_GUID(GUID_WICPixelFormat32bppBGRA, 0x6fddc324,0x4e03,0x4bfe,0xb1,0x85,0x3d,0x77,0x76,0x8d,0xc9,0x0f);")
176 cpp_quote("DEFINE_GUID(GUID_WICPixelFormat32bppPBGRA, 0x6fddc324,0x4e03,0x4bfe,0xb1,0x85,0x3d,0x77,0x76,0x8d,0xc9,0x10);")
178 cpp_quote("DEFINE_GUID(GUID_WICPixelFormat48bppRGB, 0x6fddc324,0x4e03,0x4bfe,0xb1,0x85,0x3d,0x77,0x76,0x8d,0xc9,0x15);")
179 cpp_quote("DEFINE_GUID(GUID_WICPixelFormat64bppRGBA, 0x6fddc324,0x4e03,0x4bfe,0xb1,0x85,0x3d,0x77,0x76,0x8d,0xc9,0x16);")
180 cpp_quote("DEFINE_GUID(GUID_WICPixelFormat64bppPRGBA, 0x6fddc324,0x4e03,0x4bfe,0xb1,0x85,0x3d,0x77,0x76,0x8d,0xc9,0x17);")
182 cpp_quote("DEFINE_GUID(GUID_WICPixelFormat32bppCMYK, 0x6fddc324,0x4e03,0x4fbe,0xb1,0x85,0x3d,0x77,0x76,0x8d,0xc9,0x1c);")
184 typedef struct WICRect {
185 INT X;
186 INT Y;
187 INT Width;
188 INT Height;
189 } WICRect;
191 typedef struct WICBitmapPattern {
192 ULARGE_INTEGER Position;
193 ULONG Length;
194 BYTE *Pattern;
195 BYTE *Mask;
196 BOOL EndOfStream;
197 } WICBitmapPattern;
199 typedef UINT32 WICColor;
201 cpp_quote("#define WINCODEC_ERR_WRONGSTATE 0x88982f04")
202 cpp_quote("#define WINCODEC_ERR_VALUEOUTOFRANGE 0x88982f05")
203 cpp_quote("#define WINCODEC_ERR_NOTINITIALIZED 0x88982f0c")
204 cpp_quote("#define WINCODEC_ERR_PROPERTYNOTFOUND 0x88982f40")
205 cpp_quote("#define WINCODEC_ERR_CODECNOTHUMBNAIL 0x88982f44")
206 cpp_quote("#define WINCODEC_ERR_PALETTEUNAVAILABLE 0x88982f45")
207 cpp_quote("#define WINCODEC_ERR_COMPONENTNOTFOUND 0x88982f50")
208 cpp_quote("#define WINCODEC_ERR_FRAMEMISSING 0x88982f62")
209 cpp_quote("#define WINCODEC_ERR_BADMETADATAHEADER 0x88982f63")
210 cpp_quote("#define WINCODEC_ERR_UNSUPPORTEDPIXELFORMAT 0x88982f80")
211 cpp_quote("#define WINCODEC_ERR_UNSUPPORTEDOPERATION 0x88982f81")
212 cpp_quote("#define WINCODEC_ERR_INSUFFICIENTBUFFER 0x88982f8c")
214 interface IWICPalette;
217 object,
218 uuid(3c613a02-34b2-44ea-9a7c-45aea9c6fd6d)
220 interface IWICColorContext : IUnknown
222 HRESULT InitializeFromFilename(
223 [in] LPCWSTR wzFilename);
225 HRESULT InitializeFromMemory(
226 [in, size_is(cbBufferSize)] const BYTE *pbBuffer,
227 [in] UINT cbBufferSize);
229 HRESULT InitializeFromExifColorSpace(
230 [in] UINT value);
232 HRESULT GetType(
233 [out] WICColorContextType *pType);
235 HRESULT GetProfileBytes(
236 [in] UINT cbBuffer,
237 [in, out, unique, size_is(cbBuffer)] BYTE *pbBuffer,
238 [out] UINT *pcbActual);
240 HRESULT GetExifColorSpace(
241 [out] UINT *pValue);
245 object,
246 uuid(00000120-a8f2-4877-ba0a-fd2b6645fb94)
248 interface IWICBitmapSource : IUnknown
250 HRESULT GetSize(
251 [out] UINT *puiWidth,
252 [out] UINT *puiHeight);
254 HRESULT GetPixelFormat(
255 [out] WICPixelFormatGUID *pPixelFormat);
257 HRESULT GetResolution(
258 [out] double *pDpiX,
259 [out] double *pDpiY);
261 HRESULT CopyPalette(
262 [in] IWICPalette *pIPalette);
264 HRESULT CopyPixels(
265 [in] const WICRect *prc,
266 [in] UINT cbStride,
267 [in] UINT cbBufferSize,
268 [out, size_is(cbBufferSize)] BYTE *pbBuffer);
272 object,
273 uuid(00000123-a8f2-4877-ba0a-fd2b6645fb94)
275 interface IWICBitmapLock : IUnknown
277 HRESULT GetSize(
278 [out] UINT *pWidth,
279 [out] UINT *pHeight);
281 HRESULT GetStride(
282 [out] UINT *pcbStride);
284 HRESULT GetDataPointer(
285 [out] UINT *pcbBufferSize,
286 [out, size_is(,*pcbBufferSize)] BYTE **ppbData);
288 HRESULT GetPixelFormat(
289 [out] WICPixelFormatGUID *pPixelFormat);
293 object,
294 uuid(5009834f-2d6a-41ce-9e1b-17c5aff7a782)
296 interface IWICBitmapFlipRotator : IWICBitmapSource
298 HRESULT Initialize(
299 [in] IWICBitmapSource *pISource,
300 [in] WICBitmapTransformOptions options);
304 object,
305 uuid(00000121-a8f2-4877-ba0a-fd2b6645fb94)
307 interface IWICBitmap : IWICBitmapSource
309 HRESULT Lock(
310 [in] const WICRect *prcLock,
311 [in] DWORD flags,
312 [out] IWICBitmapLock **ppILock);
314 HRESULT SetPalette(
315 [in] IWICPalette *pIPalette);
317 HRESULT SetResolution(
318 [in] double dpiX,
319 [in] double dpiY);
323 object,
324 uuid(00000040-a8f2-4877-ba0a-fd2b6645fb94)
326 interface IWICPalette : IUnknown
328 HRESULT InitializePredefined(
329 [in] WICBitmapPaletteType ePaletteType,
330 [in] BOOL fAddTransparentColor);
332 HRESULT InitializeCustom(
333 [in, size_is(colorCount)] WICColor *pColors,
334 [in] UINT colorCount);
336 HRESULT InitializeFromBitmap(
337 [in] IWICBitmapSource *pISurface,
338 [in] UINT colorCount,
339 [in] BOOL fAddTransparentColor);
341 HRESULT InitializeFromPalette(
342 [in] IWICPalette *pIPalette);
344 HRESULT GetType(
345 [out] WICBitmapPaletteType *pePaletteType);
347 HRESULT GetColorCount(
348 [out] UINT *pcCount);
350 HRESULT GetColors(
351 [in] UINT colorCount,
352 [out, size_is(colorCount)] WICColor *pColors,
353 [out] UINT *pcActualColors);
355 HRESULT IsBlackWhite(
356 [out] BOOL *pfIsBlackWhite);
358 HRESULT IsGrayscale(
359 [out] BOOL *pfIsGrayscale);
361 HRESULT HasAlpha(
362 [out] BOOL *pfHasAlpha);
366 object,
367 uuid(23bc3f0a-698b-4357-886b-f24d50671334)
369 interface IWICComponentInfo : IUnknown
371 HRESULT GetComponentType(
372 [out] WICComponentType *pType);
374 HRESULT GetCLSID(
375 [out] CLSID *pclsid);
377 HRESULT GetSigningStatus(
378 [out] DWORD *pStatus);
380 HRESULT GetAuthor(
381 [in] UINT cchAuthor,
382 [in, out, unique, size_is(cchAuthor)] WCHAR *wzAuthor,
383 [out] UINT *pcchActual);
385 HRESULT GetVendorGUID(
386 [out] GUID *pguidVendor);
388 HRESULT GetVersion(
389 [in] UINT cchVersion,
390 [in, out, unique, size_is(cchVersion)] WCHAR *wzVersion,
391 [out] UINT *pcchActual);
393 HRESULT GetSpecVersion(
394 [in] UINT cchSpecVersion,
395 [in, out, unique, size_is(cchSpecVersion)] WCHAR *wzSpecVersion,
396 [out] UINT *pcchActual);
398 HRESULT GetFriendlyName(
399 [in] UINT cchFriendlyName,
400 [in, out, unique, size_is(cchFriendlyName)] WCHAR *wzFriendlyName,
401 [out] UINT *pcchActual);
405 object,
406 uuid(30989668-e1c9-4597-b395-458eedb808df)
408 interface IWICMetadataQueryReader : IUnknown
410 HRESULT GetContainerFormat(
411 [out] GUID *pguidContainerFormat);
413 HRESULT GetLocation(
414 [in] UINT cchMaxLength,
415 [in, out, unique, size_is(cchMaxLength)] WCHAR *wzNamespace,
416 [out] UINT *pcchActualLength);
418 HRESULT GetMetadataByName(
419 [in] LPCWSTR wzName,
420 [in, out, unique] PROPVARIANT *pvarValue);
422 HRESULT GetEnumerator(
423 [out] IEnumString **ppIEnumString);
427 object,
428 uuid(a721791a-0def-4d06-bd91-2118bf1db10b)
430 interface IWICMetadataQueryWriter : IWICMetadataQueryReader
432 HRESULT SetMetadataByName(
433 [in] LPCWSTR wzName,
434 [in] const PROPVARIANT *pvarValue);
436 HRESULT RemoveMetadataByName(
437 [in] LPCWSTR wzName);
441 object,
442 uuid(3b16811b-6a43-4ec9-a813-3d930c13b940)
444 interface IWICBitmapFrameDecode : IWICBitmapSource
446 HRESULT GetMetadataQueryReader(
447 [out] IWICMetadataQueryReader **ppIMetadataQueryReader);
449 HRESULT GetColorContexts(
450 [in] UINT cCount,
451 [in, out, unique, size_is(cCount)] IWICColorContext **ppIColorContexts,
452 [out] UINT *pcActualCount);
454 HRESULT GetThumbnail(
455 [out] IWICBitmapSource **ppIThumbnail);
459 object,
460 uuid(e8eda601-3d48-431a-ab44-69059be88bbe)
462 interface IWICPixelFormatInfo : IWICComponentInfo
464 HRESULT GetFormatGUID(
465 [out] GUID* pFormat);
467 HRESULT GetColorContext(
468 [out] IWICColorContext **ppIColorContext);
470 HRESULT GetBitsPerPixel(
471 [out] UINT *puiBitsPerPixel);
473 HRESULT GetChannelCount(
474 [out] UINT *puiChannelCount);
476 HRESULT GetChannelMask(
477 [in] UINT uiChannelIndex,
478 [in] UINT cbMaskBuffer,
479 [in, out, unique, size_is(cbMaskBuffer)] BYTE *pbMaskBuffer,
480 [out] UINT *pcbActual);
484 object,
485 uuid(a9db33a2-af5f-43c7-b679-74f5984b5aa4)
487 interface IWICPixelFormatInfo2 : IWICPixelFormatInfo
489 HRESULT SupportsTransparency(
490 [out] BOOL *pfSupportsTransparency);
492 HRESULT GetNumericRepresentation(
493 [out] WICPixelFormatNumericRepresentation *pNumericRepresentation);
497 object,
498 uuid(e87a44c4-b76e-4c47-8b09-298eb12a2714)
500 interface IWICBitmapCodecInfo : IWICComponentInfo
502 HRESULT GetContainerFormat(
503 [out] GUID *pguidContainerFormat);
505 HRESULT GetPixelFormats(
506 [in] UINT cFormats,
507 [in, out, unique, size_is(cFormats)] GUID *pguidPixelFormats,
508 [out] UINT *pcActual);
510 HRESULT GetColorManagementVersion(
511 [in] UINT cchColorManagementVersion,
512 [in, out, unique, size_is(cchColorManagementVersion)] WCHAR *wzColorManagementVersion,
513 [out] UINT *pcchActual);
515 HRESULT GetDeviceManufacturer(
516 [in] UINT cchDeviceManufacturer,
517 [in, out, unique, size_is(cchDeviceManufacturer)] WCHAR *wzDeviceManufacturer,
518 [out] UINT *pcchActual);
520 HRESULT GetDeviceModels(
521 [in] UINT cchDeviceModels,
522 [in, out, unique, size_is(cchDeviceModels)] WCHAR *wzDeviceModels,
523 [out] UINT *pcchActual);
525 HRESULT GetMimeTypes(
526 [in] UINT cchMimeTypes,
527 [in, out, unique, size_is(cchMimeTypes)] WCHAR *wzMimeTypes,
528 [out] UINT *pcchActual);
530 HRESULT GetFileExtensions(
531 [in] UINT cchFileExtensions,
532 [in, out, unique, size_is(cchFileExtensions)] WCHAR *wzFileExtensions,
533 [out] UINT *pcchActual);
535 HRESULT DoesSupportAnimation(
536 [out] BOOL *pfSupportAnimation);
538 HRESULT DoesSupportChromaKey(
539 [out] BOOL *pfSupportChromaKey);
541 HRESULT DoesSupportLossless(
542 [out] BOOL *pfSupportLossless);
544 HRESULT DoesSupportMultiframe(
545 [out] BOOL *pfSupportMultiframe);
547 HRESULT MatchesMimeType(
548 [in] LPCWSTR wzMimeType,
549 [out] BOOL *pfMatches);
552 interface IWICBitmapDecoder;
555 object,
556 uuid(d8cd007f-d08f-4191-9bfc-236ea7f0e4b5)
558 interface IWICBitmapDecoderInfo : IWICBitmapCodecInfo
560 [local]
561 HRESULT GetPatterns(
562 [in] UINT cbSizePatterns,
563 [in, out, unique] WICBitmapPattern *pPatterns,
564 [in, out, unique] UINT *pcPatterns,
565 [in, out, unique] UINT *pcbPatternsActual);
567 HRESULT MatchesPattern(
568 [in] IStream *pIStream,
569 [out] BOOL *pfMatches);
571 HRESULT CreateInstance(
572 [out] IWICBitmapDecoder **ppIBitmapDecoder);
576 object,
577 uuid(9edde9e7-8dee-47ea-99df-e6faf2ed44bf)
579 interface IWICBitmapDecoder : IUnknown
581 HRESULT QueryCapability(
582 [in] IStream *pIStream,
583 [out] DWORD *pdwCapability);
585 HRESULT Initialize(
586 [in] IStream *pIStream,
587 [in] WICDecodeOptions cacheOptions);
589 HRESULT GetContainerFormat(
590 [out] GUID *pguidContainerFormat);
592 HRESULT GetDecoderInfo(
593 [out] IWICBitmapDecoderInfo **ppIDecoderInfo);
595 HRESULT CopyPalette(
596 [in] IWICPalette *pIPalette);
598 HRESULT GetMetadataQueryReader(
599 [out] IWICMetadataQueryReader **ppIMetadataQueryReader);
601 HRESULT GetPreview(
602 [out] IWICBitmapSource **ppIBitmapSource);
604 HRESULT GetColorContexts(
605 [in] UINT cCount,
606 [in, out, unique, size_is(cCount)] IWICColorContext **ppIColorContexts,
607 [out] UINT *pcActualCount);
609 HRESULT GetThumbnail(
610 [out] IWICBitmapSource **ppIThumbnail);
612 HRESULT GetFrameCount(
613 [out] UINT *pCount);
615 HRESULT GetFrame(
616 [in] UINT index,
617 [out] IWICBitmapFrameDecode **ppIBitmapFrame);
621 object,
622 uuid(00000105-a8f2-4877-ba0a-fd2b6645fb94)
624 interface IWICBitmapFrameEncode : IUnknown
626 HRESULT Initialize(
627 [in, unique] IPropertyBag2 *pIEncoderOptions);
629 HRESULT SetSize(
630 [in] UINT uiWidth,
631 [in] UINT uiHeight);
633 HRESULT SetResolution(
634 [in] double dpiX,
635 [in] double dpiY);
637 HRESULT SetPixelFormat(
638 [in, out] WICPixelFormatGUID *pPixelFormat);
640 HRESULT SetColorContexts(
641 [in] UINT cCount,
642 [in, size_is(cCount)] IWICColorContext **ppIColorContext);
644 HRESULT SetPalette(
645 [in] IWICPalette *pIPalette);
647 HRESULT SetThumbnail(
648 [in] IWICBitmapSource *pIThumbnail);
650 HRESULT WritePixels(
651 [in] UINT lineCount,
652 [in] UINT cbStride,
653 [in] UINT cbBufferSize,
654 [in, size_is(cbBufferSize)] BYTE *pbPixels);
656 HRESULT WriteSource(
657 [in] IWICBitmapSource *pIBitmapSource,
658 [in, unique] WICRect *prc);
660 HRESULT Commit();
662 HRESULT GetMetadataQueryWriter(
663 IWICMetadataQueryWriter **ppIMetadataQueryWriter);
666 interface IWICBitmapEncoder;
669 object,
670 uuid(94c9b4ee-a09f-4f92-8a1e-4a9bce7e76fb)
672 interface IWICBitmapEncoderInfo : IWICBitmapCodecInfo
674 HRESULT CreateInstance(
675 [out] IWICBitmapEncoder **ppIBitmapEncoder);
679 object,
680 uuid(00000103-a8f2-4877-ba0a-fd2b6645fb94)
682 interface IWICBitmapEncoder : IUnknown
684 HRESULT Initialize(
685 [in] IStream *pIStream,
686 [in] WICBitmapEncoderCacheOption cacheOption);
688 HRESULT GetContainerFormat(
689 [out] GUID *pguidContainerFormat);
691 HRESULT GetEncoderInfo(
692 [out] IWICBitmapEncoderInfo **ppIEncoderInfo);
694 HRESULT SetColorContexts(
695 [in] UINT cCount,
696 [in, size_is(cCount)] IWICColorContext **ppIColorContext);
698 HRESULT SetPalette(
699 [in] IWICPalette *pIPalette);
701 HRESULT SetThumbnail(
702 [in] IWICBitmapSource *pIThumbnail);
704 HRESULT SetPreview(
705 [in] IWICBitmapSource *pIPreview);
707 HRESULT CreateNewFrame(
708 [out] IWICBitmapFrameEncode **ppIFrameEncode,
709 [in, out, unique] IPropertyBag2 **ppIEncoderOptions);
711 HRESULT Commit();
713 HRESULT GetMetadataQueryWriter(
714 [out] IWICMetadataQueryWriter **ppIMetadataQueryWriter);
718 object,
719 uuid(00000301-a8f2-4877-ba0a-fd2b6645fb94)
721 interface IWICFormatConverter : IWICBitmapSource
723 HRESULT Initialize(
724 [in] IWICBitmapSource *pISource,
725 [in] REFWICPixelFormatGUID dstFormat,
726 [in] WICBitmapDitherType dither,
727 [in] IWICPalette *pIPalette,
728 [in] double alphaThresholdPercent,
729 [in] WICBitmapPaletteType paletteTranslate);
731 HRESULT CanConvert(
732 [in] REFWICPixelFormatGUID srcPixelFormat,
733 [in] REFWICPixelFormatGUID dstPixelFormat,
734 [out] BOOL *pfCanConvert);
738 object,
739 uuid(9f34fb65-13f4-4f15-bc57-3726b5e53d9f)
741 interface IWICFormatConverterInfo : IWICComponentInfo
743 HRESULT GetPixelFormats(
744 [in] UINT cFormats,
745 [in, out, size_is(cFormats)] WICPixelFormatGUID *pPixelFormatGUIDs,
746 [out] UINT *pcActual);
748 HRESULT CreateInstance(
749 [out] IWICFormatConverter **ppIConverter);
753 object,
754 uuid(135ff860-22b7-4ddf-b0f6-218f4f299a43)
756 interface IWICStream : IStream
758 HRESULT InitializeFromIStream(
759 [in] IStream *pIStream);
761 HRESULT InitializeFromFilename(
762 [in] LPCWSTR wzFileName,
763 [in] DWORD dwAccessMode);
765 HRESULT InitializeFromMemory(
766 [in, size_is(cbBufferSize)] BYTE *pbBuffer,
767 [in] DWORD cbBufferSize);
769 HRESULT InitializeFromIStreamRegion(
770 [in] IStream *pIStream,
771 [in] ULARGE_INTEGER ulOffset,
772 [in] ULARGE_INTEGER ulMaxSize);
776 object,
777 uuid(00000302-a8f2-4877-ba0a-fd2b6645fb94)
779 interface IWICBitmapScaler : IWICBitmapSource
781 HRESULT Initialize(
782 [in] IWICBitmapSource *pISource,
783 [in] UINT uiWidth,
784 [in] UINT uiHeight,
785 [in] WICBitmapInterpolationMode mode);
789 object,
790 uuid(e4fbcf03-223d-4e81-9333-d635556dd1b5)
792 interface IWICBitmapClipper : IWICBitmapSource
794 HRESULT Initialize(
795 [in] IWICBitmapSource *pISource,
796 [in] const WICRect *prc);
800 object,
801 uuid(b66f034f-d0e2-40ab-b436-6de39e321a94)
803 interface IWICColorTransform : IWICBitmapSource
805 HRESULT Initialize(
806 [in] IWICBitmapSource *pIBitmapSource,
807 [in] IWICColorContext *pIContextSource,
808 [in] IWICColorContext *pIContextDest,
809 [in] REFWICPixelFormatGUID pixelFmtDest);
813 object,
814 uuid(b84e2c09-78c9-4ac4-8bd3-524ae1663a2f)
816 interface IWICFastMetadataEncoder : IUnknown
818 HRESULT Commit();
820 HRESULT GetMetadataQueryWriter(
821 [out] IWICMetadataQueryWriter **ppIMetadataQueryWriter);
824 cpp_quote("DEFINE_GUID(CLSID_WICImagingFactory, 0xcacaf262,0x9370,0x4615,0xa1,0x3b,0x9f,0x55,0x39,0xda,0x4c,0x0a);")
827 object,
828 uuid(ec5ec8a9-c395-4314-9c77-54d7a935ff70)
830 interface IWICImagingFactory : IUnknown
832 HRESULT CreateDecoderFromFilename(
833 [in] LPCWSTR wzFilename,
834 [in, unique] const GUID *pguidVendor,
835 [in] DWORD dwDesiredAccess,
836 [in] WICDecodeOptions metadataOptions,
837 [out, retval] IWICBitmapDecoder **ppIDecoder);
839 HRESULT CreateDecoderFromStream(
840 [in] IStream *pIStream,
841 [in, unique] const GUID *pguidVendor,
842 [in] WICDecodeOptions metadataOptions,
843 [out, retval] IWICBitmapDecoder **ppIDecoder);
845 HRESULT CreateDecoderFromFileHandle(
846 [in] ULONG_PTR hFile,
847 [in, unique] const GUID *pguidVendor,
848 [in] WICDecodeOptions metadataOptions,
849 [out, retval] IWICBitmapDecoder **ppIDecoder);
851 HRESULT CreateComponentInfo(
852 [in] REFCLSID clsidComponent,
853 [out] IWICComponentInfo **ppIInfo);
855 HRESULT CreateDecoder(
856 [in] REFGUID guidContainerFormat,
857 [in, unique] const GUID *pguidVendor,
858 [out, retval] IWICBitmapDecoder **ppIDecoder);
860 HRESULT CreateEncoder(
861 [in] REFGUID guidContainerFormat,
862 [in, unique] const GUID *pguidVendor,
863 [out, retval] IWICBitmapEncoder **ppIEncoder);
865 HRESULT CreatePalette(
866 [out] IWICPalette **ppIPalette);
868 HRESULT CreateFormatConverter(
869 [out] IWICFormatConverter **ppIFormatConverter);
871 HRESULT CreateBitmapScaler(
872 [out] IWICBitmapScaler **ppIBitmapScaler);
874 HRESULT CreateBitmapClipper(
875 [out] IWICBitmapClipper **ppIBitmapClipper);
877 HRESULT CreateBitmapFlipRotator(
878 [out] IWICBitmapFlipRotator **ppIBitmapFlipRotator);
880 HRESULT CreateStream(
881 [out] IWICStream **ppIWICStream);
883 HRESULT CreateColorContext(
884 [out] IWICColorContext **ppIWICColorContext);
886 HRESULT CreateColorTransformer(
887 [out] IWICColorTransform **ppIWICColorTransform);
889 HRESULT CreateBitmap(
890 [in] UINT uiWidth,
891 [in] UINT uiHeight,
892 [in] REFWICPixelFormatGUID pixelFormat,
893 [in] WICBitmapCreateCacheOption option,
894 [out] IWICBitmap **ppIBitmap);
896 HRESULT CreateBitmapFromSource(
897 [in] IWICBitmapSource *piBitmapSource,
898 [in] WICBitmapCreateCacheOption option,
899 [out] IWICBitmap **ppIBitmap);
901 HRESULT CreateBitmapFromSourceRect(
902 [in] IWICBitmapSource *piBitmapSource,
903 [in] UINT x,
904 [in] UINT y,
905 [in] UINT width,
906 [in] UINT height,
907 [out] IWICBitmap **ppIBitmap);
909 HRESULT CreateBitmapFromMemory(
910 [in] UINT uiWidth,
911 [in] UINT uiHeight,
912 [in] REFWICPixelFormatGUID pixelFormat,
913 [in] UINT cbStride,
914 [in] UINT cbBufferSize,
915 [in, size_is(cbBufferSize)] BYTE *pbBuffer,
916 [out] IWICBitmap **ppIBitmap);
918 HRESULT CreateBitmapFromHBITMAP(
919 [in] HBITMAP hBitmap,
920 [in, unique] HPALETTE hPalette,
921 [in] WICBitmapAlphaChannelOption options,
922 [out] IWICBitmap **ppIBitmap);
924 HRESULT CreateBitmapFromHICON(
925 [in] HICON hIcon,
926 [out] IWICBitmap **ppIBitmap);
928 HRESULT CreateComponentEnumerator(
929 [in] DWORD componentTypes,
930 [in] DWORD options,
931 [out] IEnumUnknown **ppIEnumUnknown);
933 HRESULT CreateFastMetadataEncoderFromDecoder(
934 [in] IWICBitmapDecoder *pIDecoder,
935 [out] IWICFastMetadataEncoder **ppIFastEncoder);
937 HRESULT CreateFastMetadataEncoderFromFrameDecode(
938 [in] IWICBitmapFrameDecode *pIFrameDecoder,
939 [out] IWICFastMetadataEncoder **ppIFastEncoder);
941 HRESULT CreateQueryWriter(
942 [in] REFGUID guidMetadataFormat,
943 [in, unique] const GUID *pguidVendor,
944 [out] IWICMetadataQueryWriter **ppIQueryWriter);
946 HRESULT CreateQueryWriterFromReader(
947 [in] IWICMetadataQueryReader *pIQueryReader,
948 [in, unique] const GUID *pguidVendor,
949 [out] IWICMetadataQueryWriter **ppIQueryWriter);
953 local,
954 object,
955 uuid(dc2bb46d-3f07-481e-8625-220c4aedbb33)
957 interface IWICEnumMetadataItem : IUnknown
959 HRESULT Next(
960 [in] ULONG celt,
961 [in, out, unique, size_is(celt)] PROPVARIANT *rgeltSchema,
962 [in, out, size_is(celt)] PROPVARIANT *rgeltId,
963 [in, out, optional, size_is(celt)] PROPVARIANT *rgeltValue,
964 [out, optional] ULONG *pceltFetched);
966 HRESULT Skip(
967 [in] ULONG celt);
969 HRESULT Reset();
971 HRESULT Clone(
972 [out] IWICEnumMetadataItem **ppIEnumMetadataItem);
975 cpp_quote("HRESULT WINAPI WICConvertBitmapSource(REFWICPixelFormatGUID dstFormat, IWICBitmapSource *pISrc, IWICBitmapSource **ppIDst);")
977 cpp_quote("DEFINE_GUID(CLSID_WICBmpDecoder, 0x6b462062,0x7cbf,0x400d,0x9f,0xdb,0x81,0x3d,0xd1,0x0f,0x27,0x78);")
978 cpp_quote("DEFINE_GUID(CLSID_WICPngDecoder, 0x389ea17b,0x5078,0x4cde,0xb6,0xef,0x25,0xc1,0x51,0x75,0xc7,0x51);")
979 cpp_quote("DEFINE_GUID(CLSID_WICIcoDecoder, 0xc61bfcdf,0x2e0f,0x4aad,0xa8,0xd7,0xe0,0x6b,0xaf,0xeb,0xcd,0xfe);")
980 cpp_quote("DEFINE_GUID(CLSID_WICJpegDecoder, 0x9456a480,0xe88b,0x43ea,0x9e,0x73,0x0b,0x2d,0x9b,0x71,0xb1,0xca);")
981 cpp_quote("DEFINE_GUID(CLSID_WICGifDecoder, 0x381dda3c,0x9ce9,0x4834,0xa2,0x3e,0x1f,0x98,0xf8,0xfc,0x52,0xbe);")
982 cpp_quote("DEFINE_GUID(CLSID_WICTiffDecoder, 0xb54e85d9,0xfe23,0x499f,0x8b,0x88,0x6a,0xce,0xa7,0x13,0x75,0x2b);")
983 cpp_quote("DEFINE_GUID(CLSID_WICWmpDecoder, 0xa26cec36,0x234c,0x4950,0xae,0x16,0xe3,0x4a,0xac,0xe7,0x1d,0x0d);")
985 cpp_quote("DEFINE_GUID(CLSID_WICBmpEncoder, 0x69be8bb4,0xd66d,0x47c8,0x86,0x5a,0xed,0x15,0x89,0x43,0x37,0x82);")
986 cpp_quote("DEFINE_GUID(CLSID_WICPngEncoder, 0x27949969,0x876a,0x41d7,0x94,0x47,0x56,0x8f,0x6a,0x35,0xa4,0xdc);")
987 cpp_quote("DEFINE_GUID(CLSID_WICJpegEncoder, 0x1a34f5c1,0x4a5a,0x46dc,0xb6,0x44,0x1f,0x45,0x67,0xe7,0xa6,0x76);")
988 cpp_quote("DEFINE_GUID(CLSID_WICGifEncoder, 0x114f5598,0x0b22,0x40a0,0x86,0xa1,0xc8,0x3e,0xa4,0x95,0xad,0xbd);")
989 cpp_quote("DEFINE_GUID(CLSID_WICTiffEncoder, 0x0131be10,0x2001,0x4c5f,0xa9,0xb0,0xcc,0x88,0xfa,0xb6,0x4c,0xe8);")
990 cpp_quote("DEFINE_GUID(CLSID_WICWmpEncoder, 0xac4ce3cb,0xe1c1,0x44cd,0x82,0x15,0x5a,0x16,0x65,0x50,0x9e,0xc2);")
992 cpp_quote("DEFINE_GUID(CLSID_WICDefaultFormatConverter, 0x1a3f11dc,0xb514,0x4b17,0x8c,0x5f,0x21,0x54,0x51,0x38,0x52,0xf1);")
994 cpp_quote("DEFINE_GUID(GUID_ContainerFormatBmp, 0x0af1d87e,0xfcfe,0x4188,0xbd,0xeb,0xa7,0x90,0x64,0x71,0xcb,0xe3);")
995 cpp_quote("DEFINE_GUID(GUID_ContainerFormatPng, 0x1b7cfaf4,0x713f,0x473c,0xbb,0xcd,0x61,0x37,0x42,0x5f,0xae,0xaf);")
996 cpp_quote("DEFINE_GUID(GUID_ContainerFormatIco, 0xa3a860c4,0x338f,0x4c17,0x91,0x9a,0xfb,0xa4,0xb5,0x62,0x8f,0x21);")
997 cpp_quote("DEFINE_GUID(GUID_ContainerFormatJpeg, 0x19e4a5aa,0x5662,0x4fc5,0xa0,0xc0,0x17,0x58,0x02,0x8e,0x10,0x57);")
998 cpp_quote("DEFINE_GUID(GUID_ContainerFormatTiff, 0x163bcc30,0xe2e9,0x4f0b,0x96,0x1d,0xa3,0xe9,0xfd,0xb7,0x88,0xa3);")
999 cpp_quote("DEFINE_GUID(GUID_ContainerFormatGif, 0x1f8a5601,0x7d4d,0x4cbd,0x9c,0x82,0x1b,0xc8,0xd4,0xee,0xb9,0xa5);")
1000 cpp_quote("DEFINE_GUID(GUID_ContainerFormatWmp, 0x57a37caa,0x367a,0x4540,0x91,0x6b,0xf1,0x83,0xc5,0x09,0x3a,0x4b);")
1002 cpp_quote("DEFINE_GUID(GUID_VendorMicrosoft, 0xf0e749ca,0xedef,0x4589,0xa7,0x3a,0xee,0x0e,0x62,0x6a,0x2a,0x2b);")
1004 cpp_quote("DEFINE_GUID(CLSID_WICImagingCategories, 0xfae3d380,0xfea4,0x4623,0x8c,0x75,0xc6,0xb6,0x11,0x10,0xb6,0x81);")
1005 cpp_quote("DEFINE_GUID(CATID_WICBitmapDecoders, 0x7ed96837,0x96f0,0x4812,0xb2,0x11,0xf1,0x3c,0x24,0x11,0x7e,0xd3);")
1006 cpp_quote("DEFINE_GUID(CATID_WICBitmapEncoders, 0xac757296,0x3522,0x4e11,0x98,0x62,0xc1,0x7b,0xe5,0xa1,0x76,0x7e);")
1007 cpp_quote("DEFINE_GUID(CATID_WICFormatConverters, 0x7835eae8,0xbf14,0x49d1,0x93,0xce,0x53,0x3a,0x40,0x7b,0x22,0x48);")
1008 cpp_quote("DEFINE_GUID(CATID_WICMetadataReader, 0x05af94d8,0x7174,0x4cd2,0xbe,0x4a,0x41,0x24,0xb8,0x0e,0xe4,0xb8);")
1009 cpp_quote("DEFINE_GUID(CATID_WICPixelFormats, 0x2b46e70f,0xcda7,0x473e,0x89,0xf6,0xdc,0x96,0x30,0xa2,0x39,0x0b);")