d3dcompiler: Handle simple struct initializers.
[wine.git] / include / wincodec.idl
bloba878b2f276cba3973bc39801c02bcc2572a9e519
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 WICBitmapLockFlags {
85 WICBitmapLockRead = 0x00000001,
86 WICBitmapLockWrite = 0x00000002,
87 WICBITMAPLOCKFLAGS_FORCE_DWORD = CODEC_FORCE_DWORD
88 } WICBitmapLockFlags;
90 typedef enum WICBitmapPaletteType {
91 WICBitmapPaletteTypeCustom = 0x00000000,
92 WICBitmapPaletteTypeMedianCut = 0x00000001,
93 WICBitmapPaletteTypeFixedBW = 0x00000002,
94 WICBitmapPaletteTypeFixedHalftone8 = 0x00000003,
95 WICBitmapPaletteTypeFixedHalftone27 = 0x00000004,
96 WICBitmapPaletteTypeFixedHalftone64 = 0x00000005,
97 WICBitmapPaletteTypeFixedHalftone125 = 0x00000006,
98 WICBitmapPaletteTypeFixedHalftone216 = 0x00000007,
99 WICBitmapPaletteTypeFixedWebPalette = WICBitmapPaletteTypeFixedHalftone216,
100 WICBitmapPaletteTypeFixedHalftone252 = 0x00000008,
101 WICBitmapPaletteTypeFixedHalftone256 = 0x00000009,
102 WICBitmapPaletteTypeFixedGray4 = 0x0000000A,
103 WICBitmapPaletteTypeFixedGray16 = 0x0000000B,
104 WICBitmapPaletteTypeFixedGray256 = 0x0000000C,
105 WICBITMAPPALETTETYPE_FORCE_DWORD = CODEC_FORCE_DWORD
106 } WICBitmapPaletteType;
108 typedef enum WICBitmapTransformOptions {
109 WICBitmapTransformRotate0 = 0x00000000,
110 WICBitmapTransformRotate90 = 0x00000001,
111 WICBitmapTransformRotate180 = 0x00000002,
112 WICBitmapTransformRotate270 = 0x00000003,
113 WICBitmapTransformFlipHorizontal = 0x00000008,
114 WICBitmapTransformFlipVertical = 0x00000010,
115 WICBITMAPTRANSFORMOPTIONS_FORCE_DWORD = CODEC_FORCE_DWORD
116 } WICBitmapTransformOptions;
118 typedef enum WICColorContextType {
119 WICColorContextUninitialized = 0x00000000,
120 WICColorContextProfile = 0x00000001,
121 WICColorContextExifColorSpace = 0x00000002
122 } WICColorContextType;
124 typedef enum WICComponentType {
125 WICDecoder = 0x00000001,
126 WICEncoder = 0x00000002,
127 WICPixelFormatConverter = 0x00000004,
128 WICMetadataReader = 0x00000008,
129 WICMetadataWriter = 0x00000010,
130 WICPixelFormat = 0x00000020,
131 WICCOMPONENTTYPE_FORCE_DWORD = CODEC_FORCE_DWORD
132 } WICComponentType;
134 typedef enum WICComponentSigning {
135 WICComponentSigned = 0x00000001,
136 WICComponentUnsigned = 0x00000002,
137 WICComponentSafe = 0x00000004,
138 WICComponentDisabled = 0x80000000
139 } WICComponentSigning;
141 typedef enum WICComponentEnumerateOptions {
142 WICComponentEnumerateDefault = 0x00000000,
143 WICComponentEnumerateRefresh = 0x00000001,
144 WICComponentEnumerateBuiltInOnly = 0x20000000,
145 WICComponentEnumerateUnsigned = 0x40000000,
146 WICComponentEnumerateDisabled = 0x80000000
147 } WICComponentEnumerateOptions;
149 typedef enum WICPixelFormatNumericRepresentation {
150 WICPixelFormatNumericRepresentationUnspecified = 0x00000000,
151 WICPixelFormatNumericRepresentationIndexed = 0x00000001,
152 WICPixelFormatNumericRepresentationUnsignedInteger = 0x00000002,
153 WICPixelFormatNumericRepresentationSignedInteger = 0x00000003,
154 WICPixelFormatNumericRepresentationFixed = 0x00000004,
155 WICPixelFormatNumericRepresentationFloat = 0x00000005,
156 WICPIXELFORMATNUMERICREPRESENTATION_FORCE_DWORD = CODEC_FORCE_DWORD
157 } WICPixelFormatNumericRepresentation;
159 typedef GUID WICPixelFormatGUID;
160 typedef REFGUID REFWICPixelFormatGUID;
162 cpp_quote("DEFINE_GUID(GUID_WICPixelFormatDontCare, 0x6fddc324,0x4e03,0x4bfe,0xb1,0x85,0x3d,0x77,0x76,0x8d,0xc9,0x00);")
163 cpp_quote("#define GUID_WICPixelFormatUndefined GUID_WICPixelFormatDontCare")
165 cpp_quote("DEFINE_GUID(GUID_WICPixelFormat1bppIndexed, 0x6fddc324,0x4e03,0x4bfe,0xb1,0x85,0x3d,0x77,0x76,0x8d,0xc9,0x01);")
166 cpp_quote("DEFINE_GUID(GUID_WICPixelFormat2bppIndexed, 0x6fddc324,0x4e03,0x4bfe,0xb1,0x85,0x3d,0x77,0x76,0x8d,0xc9,0x02);")
167 cpp_quote("DEFINE_GUID(GUID_WICPixelFormat4bppIndexed, 0x6fddc324,0x4e03,0x4bfe,0xb1,0x85,0x3d,0x77,0x76,0x8d,0xc9,0x03);")
168 cpp_quote("DEFINE_GUID(GUID_WICPixelFormat8bppIndexed, 0x6fddc324,0x4e03,0x4bfe,0xb1,0x85,0x3d,0x77,0x76,0x8d,0xc9,0x04);")
170 cpp_quote("DEFINE_GUID(GUID_WICPixelFormatBlackWhite, 0x6fddc324,0x4e03,0x4bfe,0xb1,0x85,0x3d,0x77,0x76,0x8d,0xc9,0x05);")
171 cpp_quote("DEFINE_GUID(GUID_WICPixelFormat2bppGray, 0x6fddc324,0x4e03,0x4bfe,0xb1,0x85,0x3d,0x77,0x76,0x8d,0xc9,0x06);")
172 cpp_quote("DEFINE_GUID(GUID_WICPixelFormat4bppGray, 0x6fddc324,0x4e03,0x4bfe,0xb1,0x85,0x3d,0x77,0x76,0x8d,0xc9,0x07);")
173 cpp_quote("DEFINE_GUID(GUID_WICPixelFormat8bppGray, 0x6fddc324,0x4e03,0x4bfe,0xb1,0x85,0x3d,0x77,0x76,0x8d,0xc9,0x08);")
174 cpp_quote("DEFINE_GUID(GUID_WICPixelFormat16bppGray, 0x6fddc324,0x4e03,0x4bfe,0xb1,0x85,0x3d,0x77,0x76,0x8d,0xc9,0x0b);")
176 cpp_quote("DEFINE_GUID(GUID_WICPixelFormat16bppBGR555, 0x6fddc324,0x4e03,0x4bfe,0xb1,0x85,0x3d,0x77,0x76,0x8d,0xc9,0x09);")
177 cpp_quote("DEFINE_GUID(GUID_WICPixelFormat16bppBGR565, 0x6fddc324,0x4e03,0x4bfe,0xb1,0x85,0x3d,0x77,0x76,0x8d,0xc9,0x0a);")
178 cpp_quote("DEFINE_GUID(GUID_WICPixelFormat16bppBGRA5551, 0x05ec7c2b,0xf1e6,0x4961,0xad,0x46,0xe1,0xcc,0x81,0x0a,0x87,0xd2);")
179 cpp_quote("DEFINE_GUID(GUID_WICPixelFormat24bppBGR, 0x6fddc324,0x4e03,0x4bfe,0xb1,0x85,0x3d,0x77,0x76,0x8d,0xc9,0x0c);")
180 cpp_quote("DEFINE_GUID(GUID_WICPixelFormat32bppBGR, 0x6fddc324,0x4e03,0x4bfe,0xb1,0x85,0x3d,0x77,0x76,0x8d,0xc9,0x0e);")
181 cpp_quote("DEFINE_GUID(GUID_WICPixelFormat32bppBGRA, 0x6fddc324,0x4e03,0x4bfe,0xb1,0x85,0x3d,0x77,0x76,0x8d,0xc9,0x0f);")
182 cpp_quote("DEFINE_GUID(GUID_WICPixelFormat32bppPBGRA, 0x6fddc324,0x4e03,0x4bfe,0xb1,0x85,0x3d,0x77,0x76,0x8d,0xc9,0x10);")
184 cpp_quote("DEFINE_GUID(GUID_WICPixelFormat48bppRGB, 0x6fddc324,0x4e03,0x4bfe,0xb1,0x85,0x3d,0x77,0x76,0x8d,0xc9,0x15);")
185 cpp_quote("DEFINE_GUID(GUID_WICPixelFormat64bppRGBA, 0x6fddc324,0x4e03,0x4bfe,0xb1,0x85,0x3d,0x77,0x76,0x8d,0xc9,0x16);")
186 cpp_quote("DEFINE_GUID(GUID_WICPixelFormat64bppPRGBA, 0x6fddc324,0x4e03,0x4bfe,0xb1,0x85,0x3d,0x77,0x76,0x8d,0xc9,0x17);")
188 cpp_quote("DEFINE_GUID(GUID_WICPixelFormat32bppCMYK, 0x6fddc324,0x4e03,0x4fbe,0xb1,0x85,0x3d,0x77,0x76,0x8d,0xc9,0x1c);")
190 typedef struct WICRect {
191 INT X;
192 INT Y;
193 INT Width;
194 INT Height;
195 } WICRect;
197 typedef struct WICBitmapPattern {
198 ULARGE_INTEGER Position;
199 ULONG Length;
200 BYTE *Pattern;
201 BYTE *Mask;
202 BOOL EndOfStream;
203 } WICBitmapPattern;
205 typedef UINT32 WICColor;
207 cpp_quote("#define WINCODEC_ERR_WRONGSTATE 0x88982f04")
208 cpp_quote("#define WINCODEC_ERR_VALUEOUTOFRANGE 0x88982f05")
209 cpp_quote("#define WINCODEC_ERR_NOTINITIALIZED 0x88982f0c")
210 cpp_quote("#define WINCODEC_ERR_ALREADYLOCKED 0x88982f0d")
211 cpp_quote("#define WINCODEC_ERR_PROPERTYNOTFOUND 0x88982f40")
212 cpp_quote("#define WINCODEC_ERR_CODECNOTHUMBNAIL 0x88982f44")
213 cpp_quote("#define WINCODEC_ERR_PALETTEUNAVAILABLE 0x88982f45")
214 cpp_quote("#define WINCODEC_ERR_COMPONENTNOTFOUND 0x88982f50")
215 cpp_quote("#define WINCODEC_ERR_FRAMEMISSING 0x88982f62")
216 cpp_quote("#define WINCODEC_ERR_BADMETADATAHEADER 0x88982f63")
217 cpp_quote("#define WINCODEC_ERR_UNSUPPORTEDPIXELFORMAT 0x88982f80")
218 cpp_quote("#define WINCODEC_ERR_UNSUPPORTEDOPERATION 0x88982f81")
219 cpp_quote("#define WINCODEC_ERR_INSUFFICIENTBUFFER 0x88982f8c")
221 interface IWICPalette;
224 object,
225 uuid(3c613a02-34b2-44ea-9a7c-45aea9c6fd6d)
227 interface IWICColorContext : IUnknown
229 HRESULT InitializeFromFilename(
230 [in] LPCWSTR wzFilename);
232 HRESULT InitializeFromMemory(
233 [in, size_is(cbBufferSize)] const BYTE *pbBuffer,
234 [in] UINT cbBufferSize);
236 HRESULT InitializeFromExifColorSpace(
237 [in] UINT value);
239 HRESULT GetType(
240 [out] WICColorContextType *pType);
242 HRESULT GetProfileBytes(
243 [in] UINT cbBuffer,
244 [in, out, unique, size_is(cbBuffer)] BYTE *pbBuffer,
245 [out] UINT *pcbActual);
247 HRESULT GetExifColorSpace(
248 [out] UINT *pValue);
252 object,
253 uuid(00000120-a8f2-4877-ba0a-fd2b6645fb94)
255 interface IWICBitmapSource : IUnknown
257 HRESULT GetSize(
258 [out] UINT *puiWidth,
259 [out] UINT *puiHeight);
261 HRESULT GetPixelFormat(
262 [out] WICPixelFormatGUID *pPixelFormat);
264 HRESULT GetResolution(
265 [out] double *pDpiX,
266 [out] double *pDpiY);
268 HRESULT CopyPalette(
269 [in] IWICPalette *pIPalette);
271 HRESULT CopyPixels(
272 [in] const WICRect *prc,
273 [in] UINT cbStride,
274 [in] UINT cbBufferSize,
275 [out, size_is(cbBufferSize)] BYTE *pbBuffer);
279 object,
280 uuid(00000123-a8f2-4877-ba0a-fd2b6645fb94)
282 interface IWICBitmapLock : IUnknown
284 HRESULT GetSize(
285 [out] UINT *pWidth,
286 [out] UINT *pHeight);
288 HRESULT GetStride(
289 [out] UINT *pcbStride);
291 HRESULT GetDataPointer(
292 [out] UINT *pcbBufferSize,
293 [out, size_is(,*pcbBufferSize)] BYTE **ppbData);
295 HRESULT GetPixelFormat(
296 [out] WICPixelFormatGUID *pPixelFormat);
300 object,
301 uuid(5009834f-2d6a-41ce-9e1b-17c5aff7a782)
303 interface IWICBitmapFlipRotator : IWICBitmapSource
305 HRESULT Initialize(
306 [in] IWICBitmapSource *pISource,
307 [in] WICBitmapTransformOptions options);
311 object,
312 uuid(00000121-a8f2-4877-ba0a-fd2b6645fb94)
314 interface IWICBitmap : IWICBitmapSource
316 HRESULT Lock(
317 [in] const WICRect *prcLock,
318 [in] DWORD flags,
319 [out] IWICBitmapLock **ppILock);
321 HRESULT SetPalette(
322 [in] IWICPalette *pIPalette);
324 HRESULT SetResolution(
325 [in] double dpiX,
326 [in] double dpiY);
330 object,
331 uuid(00000040-a8f2-4877-ba0a-fd2b6645fb94)
333 interface IWICPalette : IUnknown
335 HRESULT InitializePredefined(
336 [in] WICBitmapPaletteType ePaletteType,
337 [in] BOOL fAddTransparentColor);
339 HRESULT InitializeCustom(
340 [in, size_is(colorCount)] WICColor *pColors,
341 [in] UINT colorCount);
343 HRESULT InitializeFromBitmap(
344 [in] IWICBitmapSource *pISurface,
345 [in] UINT colorCount,
346 [in] BOOL fAddTransparentColor);
348 HRESULT InitializeFromPalette(
349 [in] IWICPalette *pIPalette);
351 HRESULT GetType(
352 [out] WICBitmapPaletteType *pePaletteType);
354 HRESULT GetColorCount(
355 [out] UINT *pcCount);
357 HRESULT GetColors(
358 [in] UINT colorCount,
359 [out, size_is(colorCount)] WICColor *pColors,
360 [out] UINT *pcActualColors);
362 HRESULT IsBlackWhite(
363 [out] BOOL *pfIsBlackWhite);
365 HRESULT IsGrayscale(
366 [out] BOOL *pfIsGrayscale);
368 HRESULT HasAlpha(
369 [out] BOOL *pfHasAlpha);
373 object,
374 uuid(23bc3f0a-698b-4357-886b-f24d50671334)
376 interface IWICComponentInfo : IUnknown
378 HRESULT GetComponentType(
379 [out] WICComponentType *pType);
381 HRESULT GetCLSID(
382 [out] CLSID *pclsid);
384 HRESULT GetSigningStatus(
385 [out] DWORD *pStatus);
387 HRESULT GetAuthor(
388 [in] UINT cchAuthor,
389 [in, out, unique, size_is(cchAuthor)] WCHAR *wzAuthor,
390 [out] UINT *pcchActual);
392 HRESULT GetVendorGUID(
393 [out] GUID *pguidVendor);
395 HRESULT GetVersion(
396 [in] UINT cchVersion,
397 [in, out, unique, size_is(cchVersion)] WCHAR *wzVersion,
398 [out] UINT *pcchActual);
400 HRESULT GetSpecVersion(
401 [in] UINT cchSpecVersion,
402 [in, out, unique, size_is(cchSpecVersion)] WCHAR *wzSpecVersion,
403 [out] UINT *pcchActual);
405 HRESULT GetFriendlyName(
406 [in] UINT cchFriendlyName,
407 [in, out, unique, size_is(cchFriendlyName)] WCHAR *wzFriendlyName,
408 [out] UINT *pcchActual);
412 object,
413 uuid(30989668-e1c9-4597-b395-458eedb808df)
415 interface IWICMetadataQueryReader : IUnknown
417 HRESULT GetContainerFormat(
418 [out] GUID *pguidContainerFormat);
420 HRESULT GetLocation(
421 [in] UINT cchMaxLength,
422 [in, out, unique, size_is(cchMaxLength)] WCHAR *wzNamespace,
423 [out] UINT *pcchActualLength);
425 HRESULT GetMetadataByName(
426 [in] LPCWSTR wzName,
427 [in, out, unique] PROPVARIANT *pvarValue);
429 HRESULT GetEnumerator(
430 [out] IEnumString **ppIEnumString);
434 object,
435 uuid(a721791a-0def-4d06-bd91-2118bf1db10b)
437 interface IWICMetadataQueryWriter : IWICMetadataQueryReader
439 HRESULT SetMetadataByName(
440 [in] LPCWSTR wzName,
441 [in] const PROPVARIANT *pvarValue);
443 HRESULT RemoveMetadataByName(
444 [in] LPCWSTR wzName);
448 object,
449 uuid(3b16811b-6a43-4ec9-a813-3d930c13b940)
451 interface IWICBitmapFrameDecode : IWICBitmapSource
453 HRESULT GetMetadataQueryReader(
454 [out] IWICMetadataQueryReader **ppIMetadataQueryReader);
456 HRESULT GetColorContexts(
457 [in] UINT cCount,
458 [in, out, unique, size_is(cCount)] IWICColorContext **ppIColorContexts,
459 [out] UINT *pcActualCount);
461 HRESULT GetThumbnail(
462 [out] IWICBitmapSource **ppIThumbnail);
466 object,
467 uuid(e8eda601-3d48-431a-ab44-69059be88bbe)
469 interface IWICPixelFormatInfo : IWICComponentInfo
471 HRESULT GetFormatGUID(
472 [out] GUID* pFormat);
474 HRESULT GetColorContext(
475 [out] IWICColorContext **ppIColorContext);
477 HRESULT GetBitsPerPixel(
478 [out] UINT *puiBitsPerPixel);
480 HRESULT GetChannelCount(
481 [out] UINT *puiChannelCount);
483 HRESULT GetChannelMask(
484 [in] UINT uiChannelIndex,
485 [in] UINT cbMaskBuffer,
486 [in, out, unique, size_is(cbMaskBuffer)] BYTE *pbMaskBuffer,
487 [out] UINT *pcbActual);
491 object,
492 uuid(a9db33a2-af5f-43c7-b679-74f5984b5aa4)
494 interface IWICPixelFormatInfo2 : IWICPixelFormatInfo
496 HRESULT SupportsTransparency(
497 [out] BOOL *pfSupportsTransparency);
499 HRESULT GetNumericRepresentation(
500 [out] WICPixelFormatNumericRepresentation *pNumericRepresentation);
504 object,
505 uuid(e87a44c4-b76e-4c47-8b09-298eb12a2714)
507 interface IWICBitmapCodecInfo : IWICComponentInfo
509 HRESULT GetContainerFormat(
510 [out] GUID *pguidContainerFormat);
512 HRESULT GetPixelFormats(
513 [in] UINT cFormats,
514 [in, out, unique, size_is(cFormats)] GUID *pguidPixelFormats,
515 [out] UINT *pcActual);
517 HRESULT GetColorManagementVersion(
518 [in] UINT cchColorManagementVersion,
519 [in, out, unique, size_is(cchColorManagementVersion)] WCHAR *wzColorManagementVersion,
520 [out] UINT *pcchActual);
522 HRESULT GetDeviceManufacturer(
523 [in] UINT cchDeviceManufacturer,
524 [in, out, unique, size_is(cchDeviceManufacturer)] WCHAR *wzDeviceManufacturer,
525 [out] UINT *pcchActual);
527 HRESULT GetDeviceModels(
528 [in] UINT cchDeviceModels,
529 [in, out, unique, size_is(cchDeviceModels)] WCHAR *wzDeviceModels,
530 [out] UINT *pcchActual);
532 HRESULT GetMimeTypes(
533 [in] UINT cchMimeTypes,
534 [in, out, unique, size_is(cchMimeTypes)] WCHAR *wzMimeTypes,
535 [out] UINT *pcchActual);
537 HRESULT GetFileExtensions(
538 [in] UINT cchFileExtensions,
539 [in, out, unique, size_is(cchFileExtensions)] WCHAR *wzFileExtensions,
540 [out] UINT *pcchActual);
542 HRESULT DoesSupportAnimation(
543 [out] BOOL *pfSupportAnimation);
545 HRESULT DoesSupportChromaKey(
546 [out] BOOL *pfSupportChromaKey);
548 HRESULT DoesSupportLossless(
549 [out] BOOL *pfSupportLossless);
551 HRESULT DoesSupportMultiframe(
552 [out] BOOL *pfSupportMultiframe);
554 HRESULT MatchesMimeType(
555 [in] LPCWSTR wzMimeType,
556 [out] BOOL *pfMatches);
559 interface IWICBitmapDecoder;
562 object,
563 uuid(d8cd007f-d08f-4191-9bfc-236ea7f0e4b5)
565 interface IWICBitmapDecoderInfo : IWICBitmapCodecInfo
567 [local]
568 HRESULT GetPatterns(
569 [in] UINT cbSizePatterns,
570 [in, out, unique] WICBitmapPattern *pPatterns,
571 [in, out, unique] UINT *pcPatterns,
572 [in, out, unique] UINT *pcbPatternsActual);
574 HRESULT MatchesPattern(
575 [in] IStream *pIStream,
576 [out] BOOL *pfMatches);
578 HRESULT CreateInstance(
579 [out] IWICBitmapDecoder **ppIBitmapDecoder);
583 object,
584 uuid(9edde9e7-8dee-47ea-99df-e6faf2ed44bf)
586 interface IWICBitmapDecoder : IUnknown
588 HRESULT QueryCapability(
589 [in] IStream *pIStream,
590 [out] DWORD *pdwCapability);
592 HRESULT Initialize(
593 [in] IStream *pIStream,
594 [in] WICDecodeOptions cacheOptions);
596 HRESULT GetContainerFormat(
597 [out] GUID *pguidContainerFormat);
599 HRESULT GetDecoderInfo(
600 [out] IWICBitmapDecoderInfo **ppIDecoderInfo);
602 HRESULT CopyPalette(
603 [in] IWICPalette *pIPalette);
605 HRESULT GetMetadataQueryReader(
606 [out] IWICMetadataQueryReader **ppIMetadataQueryReader);
608 HRESULT GetPreview(
609 [out] IWICBitmapSource **ppIBitmapSource);
611 HRESULT GetColorContexts(
612 [in] UINT cCount,
613 [in, out, unique, size_is(cCount)] IWICColorContext **ppIColorContexts,
614 [out] UINT *pcActualCount);
616 HRESULT GetThumbnail(
617 [out] IWICBitmapSource **ppIThumbnail);
619 HRESULT GetFrameCount(
620 [out] UINT *pCount);
622 HRESULT GetFrame(
623 [in] UINT index,
624 [out] IWICBitmapFrameDecode **ppIBitmapFrame);
628 object,
629 uuid(00000105-a8f2-4877-ba0a-fd2b6645fb94)
631 interface IWICBitmapFrameEncode : IUnknown
633 HRESULT Initialize(
634 [in, unique] IPropertyBag2 *pIEncoderOptions);
636 HRESULT SetSize(
637 [in] UINT uiWidth,
638 [in] UINT uiHeight);
640 HRESULT SetResolution(
641 [in] double dpiX,
642 [in] double dpiY);
644 HRESULT SetPixelFormat(
645 [in, out] WICPixelFormatGUID *pPixelFormat);
647 HRESULT SetColorContexts(
648 [in] UINT cCount,
649 [in, size_is(cCount)] IWICColorContext **ppIColorContext);
651 HRESULT SetPalette(
652 [in] IWICPalette *pIPalette);
654 HRESULT SetThumbnail(
655 [in] IWICBitmapSource *pIThumbnail);
657 HRESULT WritePixels(
658 [in] UINT lineCount,
659 [in] UINT cbStride,
660 [in] UINT cbBufferSize,
661 [in, size_is(cbBufferSize)] BYTE *pbPixels);
663 HRESULT WriteSource(
664 [in] IWICBitmapSource *pIBitmapSource,
665 [in, unique] WICRect *prc);
667 HRESULT Commit();
669 HRESULT GetMetadataQueryWriter(
670 IWICMetadataQueryWriter **ppIMetadataQueryWriter);
673 interface IWICBitmapEncoder;
676 object,
677 uuid(94c9b4ee-a09f-4f92-8a1e-4a9bce7e76fb)
679 interface IWICBitmapEncoderInfo : IWICBitmapCodecInfo
681 HRESULT CreateInstance(
682 [out] IWICBitmapEncoder **ppIBitmapEncoder);
686 object,
687 uuid(00000103-a8f2-4877-ba0a-fd2b6645fb94)
689 interface IWICBitmapEncoder : IUnknown
691 HRESULT Initialize(
692 [in] IStream *pIStream,
693 [in] WICBitmapEncoderCacheOption cacheOption);
695 HRESULT GetContainerFormat(
696 [out] GUID *pguidContainerFormat);
698 HRESULT GetEncoderInfo(
699 [out] IWICBitmapEncoderInfo **ppIEncoderInfo);
701 HRESULT SetColorContexts(
702 [in] UINT cCount,
703 [in, size_is(cCount)] IWICColorContext **ppIColorContext);
705 HRESULT SetPalette(
706 [in] IWICPalette *pIPalette);
708 HRESULT SetThumbnail(
709 [in] IWICBitmapSource *pIThumbnail);
711 HRESULT SetPreview(
712 [in] IWICBitmapSource *pIPreview);
714 HRESULT CreateNewFrame(
715 [out] IWICBitmapFrameEncode **ppIFrameEncode,
716 [in, out, unique] IPropertyBag2 **ppIEncoderOptions);
718 HRESULT Commit();
720 HRESULT GetMetadataQueryWriter(
721 [out] IWICMetadataQueryWriter **ppIMetadataQueryWriter);
725 object,
726 uuid(00000301-a8f2-4877-ba0a-fd2b6645fb94)
728 interface IWICFormatConverter : IWICBitmapSource
730 HRESULT Initialize(
731 [in] IWICBitmapSource *pISource,
732 [in] REFWICPixelFormatGUID dstFormat,
733 [in] WICBitmapDitherType dither,
734 [in] IWICPalette *pIPalette,
735 [in] double alphaThresholdPercent,
736 [in] WICBitmapPaletteType paletteTranslate);
738 HRESULT CanConvert(
739 [in] REFWICPixelFormatGUID srcPixelFormat,
740 [in] REFWICPixelFormatGUID dstPixelFormat,
741 [out] BOOL *pfCanConvert);
745 object,
746 uuid(9f34fb65-13f4-4f15-bc57-3726b5e53d9f)
748 interface IWICFormatConverterInfo : IWICComponentInfo
750 HRESULT GetPixelFormats(
751 [in] UINT cFormats,
752 [in, out, size_is(cFormats)] WICPixelFormatGUID *pPixelFormatGUIDs,
753 [out] UINT *pcActual);
755 HRESULT CreateInstance(
756 [out] IWICFormatConverter **ppIConverter);
760 object,
761 uuid(135ff860-22b7-4ddf-b0f6-218f4f299a43)
763 interface IWICStream : IStream
765 HRESULT InitializeFromIStream(
766 [in] IStream *pIStream);
768 HRESULT InitializeFromFilename(
769 [in] LPCWSTR wzFileName,
770 [in] DWORD dwAccessMode);
772 HRESULT InitializeFromMemory(
773 [in, size_is(cbBufferSize)] BYTE *pbBuffer,
774 [in] DWORD cbBufferSize);
776 HRESULT InitializeFromIStreamRegion(
777 [in] IStream *pIStream,
778 [in] ULARGE_INTEGER ulOffset,
779 [in] ULARGE_INTEGER ulMaxSize);
783 object,
784 uuid(00000302-a8f2-4877-ba0a-fd2b6645fb94)
786 interface IWICBitmapScaler : IWICBitmapSource
788 HRESULT Initialize(
789 [in] IWICBitmapSource *pISource,
790 [in] UINT uiWidth,
791 [in] UINT uiHeight,
792 [in] WICBitmapInterpolationMode mode);
796 object,
797 uuid(e4fbcf03-223d-4e81-9333-d635556dd1b5)
799 interface IWICBitmapClipper : IWICBitmapSource
801 HRESULT Initialize(
802 [in] IWICBitmapSource *pISource,
803 [in] const WICRect *prc);
807 object,
808 uuid(b66f034f-d0e2-40ab-b436-6de39e321a94)
810 interface IWICColorTransform : IWICBitmapSource
812 HRESULT Initialize(
813 [in] IWICBitmapSource *pIBitmapSource,
814 [in] IWICColorContext *pIContextSource,
815 [in] IWICColorContext *pIContextDest,
816 [in] REFWICPixelFormatGUID pixelFmtDest);
820 object,
821 uuid(b84e2c09-78c9-4ac4-8bd3-524ae1663a2f)
823 interface IWICFastMetadataEncoder : IUnknown
825 HRESULT Commit();
827 HRESULT GetMetadataQueryWriter(
828 [out] IWICMetadataQueryWriter **ppIMetadataQueryWriter);
831 cpp_quote("DEFINE_GUID(CLSID_WICImagingFactory, 0xcacaf262,0x9370,0x4615,0xa1,0x3b,0x9f,0x55,0x39,0xda,0x4c,0x0a);")
834 object,
835 uuid(ec5ec8a9-c395-4314-9c77-54d7a935ff70)
837 interface IWICImagingFactory : IUnknown
839 HRESULT CreateDecoderFromFilename(
840 [in] LPCWSTR wzFilename,
841 [in, unique] const GUID *pguidVendor,
842 [in] DWORD dwDesiredAccess,
843 [in] WICDecodeOptions metadataOptions,
844 [out, retval] IWICBitmapDecoder **ppIDecoder);
846 HRESULT CreateDecoderFromStream(
847 [in] IStream *pIStream,
848 [in, unique] const GUID *pguidVendor,
849 [in] WICDecodeOptions metadataOptions,
850 [out, retval] IWICBitmapDecoder **ppIDecoder);
852 HRESULT CreateDecoderFromFileHandle(
853 [in] ULONG_PTR hFile,
854 [in, unique] const GUID *pguidVendor,
855 [in] WICDecodeOptions metadataOptions,
856 [out, retval] IWICBitmapDecoder **ppIDecoder);
858 HRESULT CreateComponentInfo(
859 [in] REFCLSID clsidComponent,
860 [out] IWICComponentInfo **ppIInfo);
862 HRESULT CreateDecoder(
863 [in] REFGUID guidContainerFormat,
864 [in, unique] const GUID *pguidVendor,
865 [out, retval] IWICBitmapDecoder **ppIDecoder);
867 HRESULT CreateEncoder(
868 [in] REFGUID guidContainerFormat,
869 [in, unique] const GUID *pguidVendor,
870 [out, retval] IWICBitmapEncoder **ppIEncoder);
872 HRESULT CreatePalette(
873 [out] IWICPalette **ppIPalette);
875 HRESULT CreateFormatConverter(
876 [out] IWICFormatConverter **ppIFormatConverter);
878 HRESULT CreateBitmapScaler(
879 [out] IWICBitmapScaler **ppIBitmapScaler);
881 HRESULT CreateBitmapClipper(
882 [out] IWICBitmapClipper **ppIBitmapClipper);
884 HRESULT CreateBitmapFlipRotator(
885 [out] IWICBitmapFlipRotator **ppIBitmapFlipRotator);
887 HRESULT CreateStream(
888 [out] IWICStream **ppIWICStream);
890 HRESULT CreateColorContext(
891 [out] IWICColorContext **ppIWICColorContext);
893 HRESULT CreateColorTransformer(
894 [out] IWICColorTransform **ppIWICColorTransform);
896 HRESULT CreateBitmap(
897 [in] UINT uiWidth,
898 [in] UINT uiHeight,
899 [in] REFWICPixelFormatGUID pixelFormat,
900 [in] WICBitmapCreateCacheOption option,
901 [out] IWICBitmap **ppIBitmap);
903 HRESULT CreateBitmapFromSource(
904 [in] IWICBitmapSource *piBitmapSource,
905 [in] WICBitmapCreateCacheOption option,
906 [out] IWICBitmap **ppIBitmap);
908 HRESULT CreateBitmapFromSourceRect(
909 [in] IWICBitmapSource *piBitmapSource,
910 [in] UINT x,
911 [in] UINT y,
912 [in] UINT width,
913 [in] UINT height,
914 [out] IWICBitmap **ppIBitmap);
916 HRESULT CreateBitmapFromMemory(
917 [in] UINT uiWidth,
918 [in] UINT uiHeight,
919 [in] REFWICPixelFormatGUID pixelFormat,
920 [in] UINT cbStride,
921 [in] UINT cbBufferSize,
922 [in, size_is(cbBufferSize)] BYTE *pbBuffer,
923 [out] IWICBitmap **ppIBitmap);
925 HRESULT CreateBitmapFromHBITMAP(
926 [in] HBITMAP hBitmap,
927 [in, unique] HPALETTE hPalette,
928 [in] WICBitmapAlphaChannelOption options,
929 [out] IWICBitmap **ppIBitmap);
931 HRESULT CreateBitmapFromHICON(
932 [in] HICON hIcon,
933 [out] IWICBitmap **ppIBitmap);
935 HRESULT CreateComponentEnumerator(
936 [in] DWORD componentTypes,
937 [in] DWORD options,
938 [out] IEnumUnknown **ppIEnumUnknown);
940 HRESULT CreateFastMetadataEncoderFromDecoder(
941 [in] IWICBitmapDecoder *pIDecoder,
942 [out] IWICFastMetadataEncoder **ppIFastEncoder);
944 HRESULT CreateFastMetadataEncoderFromFrameDecode(
945 [in] IWICBitmapFrameDecode *pIFrameDecoder,
946 [out] IWICFastMetadataEncoder **ppIFastEncoder);
948 HRESULT CreateQueryWriter(
949 [in] REFGUID guidMetadataFormat,
950 [in, unique] const GUID *pguidVendor,
951 [out] IWICMetadataQueryWriter **ppIQueryWriter);
953 HRESULT CreateQueryWriterFromReader(
954 [in] IWICMetadataQueryReader *pIQueryReader,
955 [in, unique] const GUID *pguidVendor,
956 [out] IWICMetadataQueryWriter **ppIQueryWriter);
960 local,
961 object,
962 uuid(dc2bb46d-3f07-481e-8625-220c4aedbb33)
964 interface IWICEnumMetadataItem : IUnknown
966 HRESULT Next(
967 [in] ULONG celt,
968 [in, out, unique, size_is(celt)] PROPVARIANT *rgeltSchema,
969 [in, out, size_is(celt)] PROPVARIANT *rgeltId,
970 [in, out, optional, size_is(celt)] PROPVARIANT *rgeltValue,
971 [out, optional] ULONG *pceltFetched);
973 HRESULT Skip(
974 [in] ULONG celt);
976 HRESULT Reset();
978 HRESULT Clone(
979 [out] IWICEnumMetadataItem **ppIEnumMetadataItem);
982 cpp_quote("HRESULT WINAPI WICConvertBitmapSource(REFWICPixelFormatGUID dstFormat, IWICBitmapSource *pISrc, IWICBitmapSource **ppIDst);")
984 cpp_quote("DEFINE_GUID(CLSID_WICBmpDecoder, 0x6b462062,0x7cbf,0x400d,0x9f,0xdb,0x81,0x3d,0xd1,0x0f,0x27,0x78);")
985 cpp_quote("DEFINE_GUID(CLSID_WICPngDecoder, 0x389ea17b,0x5078,0x4cde,0xb6,0xef,0x25,0xc1,0x51,0x75,0xc7,0x51);")
986 cpp_quote("DEFINE_GUID(CLSID_WICIcoDecoder, 0xc61bfcdf,0x2e0f,0x4aad,0xa8,0xd7,0xe0,0x6b,0xaf,0xeb,0xcd,0xfe);")
987 cpp_quote("DEFINE_GUID(CLSID_WICJpegDecoder, 0x9456a480,0xe88b,0x43ea,0x9e,0x73,0x0b,0x2d,0x9b,0x71,0xb1,0xca);")
988 cpp_quote("DEFINE_GUID(CLSID_WICGifDecoder, 0x381dda3c,0x9ce9,0x4834,0xa2,0x3e,0x1f,0x98,0xf8,0xfc,0x52,0xbe);")
989 cpp_quote("DEFINE_GUID(CLSID_WICTiffDecoder, 0xb54e85d9,0xfe23,0x499f,0x8b,0x88,0x6a,0xce,0xa7,0x13,0x75,0x2b);")
990 cpp_quote("DEFINE_GUID(CLSID_WICWmpDecoder, 0xa26cec36,0x234c,0x4950,0xae,0x16,0xe3,0x4a,0xac,0xe7,0x1d,0x0d);")
992 cpp_quote("DEFINE_GUID(CLSID_WICBmpEncoder, 0x69be8bb4,0xd66d,0x47c8,0x86,0x5a,0xed,0x15,0x89,0x43,0x37,0x82);")
993 cpp_quote("DEFINE_GUID(CLSID_WICPngEncoder, 0x27949969,0x876a,0x41d7,0x94,0x47,0x56,0x8f,0x6a,0x35,0xa4,0xdc);")
994 cpp_quote("DEFINE_GUID(CLSID_WICJpegEncoder, 0x1a34f5c1,0x4a5a,0x46dc,0xb6,0x44,0x1f,0x45,0x67,0xe7,0xa6,0x76);")
995 cpp_quote("DEFINE_GUID(CLSID_WICGifEncoder, 0x114f5598,0x0b22,0x40a0,0x86,0xa1,0xc8,0x3e,0xa4,0x95,0xad,0xbd);")
996 cpp_quote("DEFINE_GUID(CLSID_WICTiffEncoder, 0x0131be10,0x2001,0x4c5f,0xa9,0xb0,0xcc,0x88,0xfa,0xb6,0x4c,0xe8);")
997 cpp_quote("DEFINE_GUID(CLSID_WICWmpEncoder, 0xac4ce3cb,0xe1c1,0x44cd,0x82,0x15,0x5a,0x16,0x65,0x50,0x9e,0xc2);")
999 cpp_quote("DEFINE_GUID(CLSID_WICDefaultFormatConverter, 0x1a3f11dc,0xb514,0x4b17,0x8c,0x5f,0x21,0x54,0x51,0x38,0x52,0xf1);")
1001 cpp_quote("DEFINE_GUID(GUID_ContainerFormatBmp, 0x0af1d87e,0xfcfe,0x4188,0xbd,0xeb,0xa7,0x90,0x64,0x71,0xcb,0xe3);")
1002 cpp_quote("DEFINE_GUID(GUID_ContainerFormatPng, 0x1b7cfaf4,0x713f,0x473c,0xbb,0xcd,0x61,0x37,0x42,0x5f,0xae,0xaf);")
1003 cpp_quote("DEFINE_GUID(GUID_ContainerFormatIco, 0xa3a860c4,0x338f,0x4c17,0x91,0x9a,0xfb,0xa4,0xb5,0x62,0x8f,0x21);")
1004 cpp_quote("DEFINE_GUID(GUID_ContainerFormatJpeg, 0x19e4a5aa,0x5662,0x4fc5,0xa0,0xc0,0x17,0x58,0x02,0x8e,0x10,0x57);")
1005 cpp_quote("DEFINE_GUID(GUID_ContainerFormatTiff, 0x163bcc30,0xe2e9,0x4f0b,0x96,0x1d,0xa3,0xe9,0xfd,0xb7,0x88,0xa3);")
1006 cpp_quote("DEFINE_GUID(GUID_ContainerFormatGif, 0x1f8a5601,0x7d4d,0x4cbd,0x9c,0x82,0x1b,0xc8,0xd4,0xee,0xb9,0xa5);")
1007 cpp_quote("DEFINE_GUID(GUID_ContainerFormatWmp, 0x57a37caa,0x367a,0x4540,0x91,0x6b,0xf1,0x83,0xc5,0x09,0x3a,0x4b);")
1009 cpp_quote("DEFINE_GUID(GUID_VendorMicrosoft, 0xf0e749ca,0xedef,0x4589,0xa7,0x3a,0xee,0x0e,0x62,0x6a,0x2a,0x2b);")
1011 cpp_quote("DEFINE_GUID(CLSID_WICImagingCategories, 0xfae3d380,0xfea4,0x4623,0x8c,0x75,0xc6,0xb6,0x11,0x10,0xb6,0x81);")
1012 cpp_quote("DEFINE_GUID(CATID_WICBitmapDecoders, 0x7ed96837,0x96f0,0x4812,0xb2,0x11,0xf1,0x3c,0x24,0x11,0x7e,0xd3);")
1013 cpp_quote("DEFINE_GUID(CATID_WICBitmapEncoders, 0xac757296,0x3522,0x4e11,0x98,0x62,0xc1,0x7b,0xe5,0xa1,0x76,0x7e);")
1014 cpp_quote("DEFINE_GUID(CATID_WICFormatConverters, 0x7835eae8,0xbf14,0x49d1,0x93,0xce,0x53,0x3a,0x40,0x7b,0x22,0x48);")
1015 cpp_quote("DEFINE_GUID(CATID_WICMetadataReader, 0x05af94d8,0x7174,0x4cd2,0xbe,0x4a,0x41,0x24,0xb8,0x0e,0xe4,0xb8);")
1016 cpp_quote("DEFINE_GUID(CATID_WICPixelFormats, 0x2b46e70f,0xcda7,0x473e,0x89,0xf6,0xdc,0x96,0x30,0xa2,0x39,0x0b);")