xmllite/tests: Fix a memory leak (Valgrind).
[wine.git] / include / wincodec.idl
blob406fe6b4113db95ae7ca5686053c5a42e3d25348
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 enum WICTiffCompressionOption {
160 WICTiffCompressionDontCare = 0x00000000,
161 WICTiffCompressionNone = 0x00000001,
162 WICTiffCompressionCCITT3 = 0x00000002,
163 WICTiffCompressionCCITT4 = 0x00000003,
164 WICTiffCompressionLZW = 0x00000004,
165 WICTiffCompressionRLE = 0x00000005,
166 WICTiffCompressionZIP = 0x00000006,
167 WICTiffCompressionLZWHDifferencing = 0x00000007,
168 WICTIFFCOMPRESSIONOPTION_FORCE_DWORD = CODEC_FORCE_DWORD
169 } WICTiffCompressionOption;
171 typedef enum WICPngFilterOption {
172 WICPngFilterUnspecified = 0,
173 WICPngFilterNone = 1,
174 WICPngFilterSub = 2,
175 WICPngFilterUp = 3,
176 WICPngFilterAverage = 4,
177 WICPngFilterPaeth = 5,
178 WICPngFilterAdaptive = 6,
179 WICPNFFILTEROPTION_FORCE_DWORD = CODEC_FORCE_DWORD
180 } WICPngFilterOption;
182 typedef GUID WICPixelFormatGUID;
183 typedef REFGUID REFWICPixelFormatGUID;
185 cpp_quote("DEFINE_GUID(GUID_WICPixelFormatDontCare, 0x6fddc324,0x4e03,0x4bfe,0xb1,0x85,0x3d,0x77,0x76,0x8d,0xc9,0x00);")
186 cpp_quote("#define GUID_WICPixelFormatUndefined GUID_WICPixelFormatDontCare")
188 cpp_quote("DEFINE_GUID(GUID_WICPixelFormat1bppIndexed, 0x6fddc324,0x4e03,0x4bfe,0xb1,0x85,0x3d,0x77,0x76,0x8d,0xc9,0x01);")
189 cpp_quote("DEFINE_GUID(GUID_WICPixelFormat2bppIndexed, 0x6fddc324,0x4e03,0x4bfe,0xb1,0x85,0x3d,0x77,0x76,0x8d,0xc9,0x02);")
190 cpp_quote("DEFINE_GUID(GUID_WICPixelFormat4bppIndexed, 0x6fddc324,0x4e03,0x4bfe,0xb1,0x85,0x3d,0x77,0x76,0x8d,0xc9,0x03);")
191 cpp_quote("DEFINE_GUID(GUID_WICPixelFormat8bppIndexed, 0x6fddc324,0x4e03,0x4bfe,0xb1,0x85,0x3d,0x77,0x76,0x8d,0xc9,0x04);")
193 cpp_quote("DEFINE_GUID(GUID_WICPixelFormatBlackWhite, 0x6fddc324,0x4e03,0x4bfe,0xb1,0x85,0x3d,0x77,0x76,0x8d,0xc9,0x05);")
194 cpp_quote("DEFINE_GUID(GUID_WICPixelFormat2bppGray, 0x6fddc324,0x4e03,0x4bfe,0xb1,0x85,0x3d,0x77,0x76,0x8d,0xc9,0x06);")
195 cpp_quote("DEFINE_GUID(GUID_WICPixelFormat4bppGray, 0x6fddc324,0x4e03,0x4bfe,0xb1,0x85,0x3d,0x77,0x76,0x8d,0xc9,0x07);")
196 cpp_quote("DEFINE_GUID(GUID_WICPixelFormat8bppGray, 0x6fddc324,0x4e03,0x4bfe,0xb1,0x85,0x3d,0x77,0x76,0x8d,0xc9,0x08);")
197 cpp_quote("DEFINE_GUID(GUID_WICPixelFormat16bppGray, 0x6fddc324,0x4e03,0x4bfe,0xb1,0x85,0x3d,0x77,0x76,0x8d,0xc9,0x0b);")
199 cpp_quote("DEFINE_GUID(GUID_WICPixelFormat16bppBGR555, 0x6fddc324,0x4e03,0x4bfe,0xb1,0x85,0x3d,0x77,0x76,0x8d,0xc9,0x09);")
200 cpp_quote("DEFINE_GUID(GUID_WICPixelFormat16bppBGR565, 0x6fddc324,0x4e03,0x4bfe,0xb1,0x85,0x3d,0x77,0x76,0x8d,0xc9,0x0a);")
201 cpp_quote("DEFINE_GUID(GUID_WICPixelFormat16bppBGRA5551, 0x05ec7c2b,0xf1e6,0x4961,0xad,0x46,0xe1,0xcc,0x81,0x0a,0x87,0xd2);")
202 cpp_quote("DEFINE_GUID(GUID_WICPixelFormat24bppBGR, 0x6fddc324,0x4e03,0x4bfe,0xb1,0x85,0x3d,0x77,0x76,0x8d,0xc9,0x0c);")
203 cpp_quote("DEFINE_GUID(GUID_WICPixelFormat24bppRGB, 0x6fddc324,0x4e03,0x4bfe,0xb1,0x85,0x3d,0x77,0x76,0x8d,0xc9,0x0d);")
204 cpp_quote("DEFINE_GUID(GUID_WICPixelFormat32bppBGR, 0x6fddc324,0x4e03,0x4bfe,0xb1,0x85,0x3d,0x77,0x76,0x8d,0xc9,0x0e);")
205 cpp_quote("DEFINE_GUID(GUID_WICPixelFormat32bppBGRA, 0x6fddc324,0x4e03,0x4bfe,0xb1,0x85,0x3d,0x77,0x76,0x8d,0xc9,0x0f);")
206 cpp_quote("DEFINE_GUID(GUID_WICPixelFormat32bppPBGRA, 0x6fddc324,0x4e03,0x4bfe,0xb1,0x85,0x3d,0x77,0x76,0x8d,0xc9,0x10);")
207 cpp_quote("DEFINE_GUID(GUID_WICPixelFormat32bppRGB, 0xd98c6b95,0x3efe,0x47d6,0xbb,0x25,0xeb,0x17,0x48,0xab,0x0c,0xf1);")
208 cpp_quote("DEFINE_GUID(GUID_WICPixelFormat32bppRGBA, 0xf5c7ad2d,0x6a8d,0x43dd,0xa7,0xa8,0xa2,0x99,0x35,0x26,0x1a,0xe9);")
209 cpp_quote("DEFINE_GUID(GUID_WICPixelFormat32bppPRGBA, 0x3cc4a650,0xa527,0x4d37,0xa9,0x16,0x31,0x42,0xc7,0xeb,0xed,0xba);")
210 cpp_quote("DEFINE_GUID(GUID_WICPixelFormat32bppGrayFloat, 0x6fddc324,0x4e03,0x4bfe,0xb1,0x85,0x3d,0x77,0x76,0x8d,0xc9,0x11);")
212 cpp_quote("DEFINE_GUID(GUID_WICPixelFormat48bppRGB, 0x6fddc324,0x4e03,0x4bfe,0xb1,0x85,0x3d,0x77,0x76,0x8d,0xc9,0x15);")
213 cpp_quote("DEFINE_GUID(GUID_WICPixelFormat64bppRGBA, 0x6fddc324,0x4e03,0x4bfe,0xb1,0x85,0x3d,0x77,0x76,0x8d,0xc9,0x16);")
214 cpp_quote("DEFINE_GUID(GUID_WICPixelFormat64bppPRGBA, 0x6fddc324,0x4e03,0x4bfe,0xb1,0x85,0x3d,0x77,0x76,0x8d,0xc9,0x17);")
216 cpp_quote("DEFINE_GUID(GUID_WICPixelFormat32bppCMYK, 0x6fddc324,0x4e03,0x4fbe,0xb1,0x85,0x3d,0x77,0x76,0x8d,0xc9,0x1c);")
218 typedef struct WICRect {
219 INT X;
220 INT Y;
221 INT Width;
222 INT Height;
223 } WICRect;
225 typedef struct WICBitmapPattern {
226 ULARGE_INTEGER Position;
227 ULONG Length;
228 BYTE *Pattern;
229 BYTE *Mask;
230 BOOL EndOfStream;
231 } WICBitmapPattern;
233 typedef UINT32 WICColor;
235 interface IWICPalette;
238 object,
239 uuid(3c613a02-34b2-44ea-9a7c-45aea9c6fd6d)
241 interface IWICColorContext : IUnknown
243 HRESULT InitializeFromFilename(
244 [in] LPCWSTR wzFilename);
246 HRESULT InitializeFromMemory(
247 [in, size_is(cbBufferSize)] const BYTE *pbBuffer,
248 [in] UINT cbBufferSize);
250 HRESULT InitializeFromExifColorSpace(
251 [in] UINT value);
253 HRESULT GetType(
254 [out] WICColorContextType *pType);
256 HRESULT GetProfileBytes(
257 [in] UINT cbBuffer,
258 [in, out, unique, size_is(cbBuffer)] BYTE *pbBuffer,
259 [out] UINT *pcbActual);
261 HRESULT GetExifColorSpace(
262 [out] UINT *pValue);
266 object,
267 uuid(00000120-a8f2-4877-ba0a-fd2b6645fb94)
269 interface IWICBitmapSource : IUnknown
271 HRESULT GetSize(
272 [out] UINT *puiWidth,
273 [out] UINT *puiHeight);
275 HRESULT GetPixelFormat(
276 [out] WICPixelFormatGUID *pPixelFormat);
278 HRESULT GetResolution(
279 [out] double *pDpiX,
280 [out] double *pDpiY);
282 HRESULT CopyPalette(
283 [in] IWICPalette *pIPalette);
285 HRESULT CopyPixels(
286 [in] const WICRect *prc,
287 [in] UINT cbStride,
288 [in] UINT cbBufferSize,
289 [out, size_is(cbBufferSize)] BYTE *pbBuffer);
293 object,
294 uuid(00000123-a8f2-4877-ba0a-fd2b6645fb94)
296 interface IWICBitmapLock : IUnknown
298 HRESULT GetSize(
299 [out] UINT *pWidth,
300 [out] UINT *pHeight);
302 HRESULT GetStride(
303 [out] UINT *pcbStride);
305 HRESULT GetDataPointer(
306 [out] UINT *pcbBufferSize,
307 [out, size_is(,*pcbBufferSize)] BYTE **ppbData);
309 HRESULT GetPixelFormat(
310 [out] WICPixelFormatGUID *pPixelFormat);
314 object,
315 uuid(5009834f-2d6a-41ce-9e1b-17c5aff7a782)
317 interface IWICBitmapFlipRotator : IWICBitmapSource
319 HRESULT Initialize(
320 [in] IWICBitmapSource *pISource,
321 [in] WICBitmapTransformOptions options);
325 object,
326 uuid(00000121-a8f2-4877-ba0a-fd2b6645fb94)
328 interface IWICBitmap : IWICBitmapSource
330 HRESULT Lock(
331 [in] const WICRect *prcLock,
332 [in] DWORD flags,
333 [out] IWICBitmapLock **ppILock);
335 HRESULT SetPalette(
336 [in] IWICPalette *pIPalette);
338 HRESULT SetResolution(
339 [in] double dpiX,
340 [in] double dpiY);
344 object,
345 uuid(00000040-a8f2-4877-ba0a-fd2b6645fb94)
347 interface IWICPalette : IUnknown
349 HRESULT InitializePredefined(
350 [in] WICBitmapPaletteType ePaletteType,
351 [in] BOOL fAddTransparentColor);
353 HRESULT InitializeCustom(
354 [in, size_is(colorCount)] WICColor *pColors,
355 [in] UINT colorCount);
357 HRESULT InitializeFromBitmap(
358 [in] IWICBitmapSource *pISurface,
359 [in] UINT colorCount,
360 [in] BOOL fAddTransparentColor);
362 HRESULT InitializeFromPalette(
363 [in] IWICPalette *pIPalette);
365 HRESULT GetType(
366 [out] WICBitmapPaletteType *pePaletteType);
368 HRESULT GetColorCount(
369 [out] UINT *pcCount);
371 HRESULT GetColors(
372 [in] UINT colorCount,
373 [out, size_is(colorCount)] WICColor *pColors,
374 [out] UINT *pcActualColors);
376 HRESULT IsBlackWhite(
377 [out] BOOL *pfIsBlackWhite);
379 HRESULT IsGrayscale(
380 [out] BOOL *pfIsGrayscale);
382 HRESULT HasAlpha(
383 [out] BOOL *pfHasAlpha);
387 object,
388 uuid(23bc3f0a-698b-4357-886b-f24d50671334)
390 interface IWICComponentInfo : IUnknown
392 HRESULT GetComponentType(
393 [out] WICComponentType *pType);
395 HRESULT GetCLSID(
396 [out] CLSID *pclsid);
398 HRESULT GetSigningStatus(
399 [out] DWORD *pStatus);
401 HRESULT GetAuthor(
402 [in] UINT cchAuthor,
403 [in, out, unique, size_is(cchAuthor)] WCHAR *wzAuthor,
404 [out] UINT *pcchActual);
406 HRESULT GetVendorGUID(
407 [out] GUID *pguidVendor);
409 HRESULT GetVersion(
410 [in] UINT cchVersion,
411 [in, out, unique, size_is(cchVersion)] WCHAR *wzVersion,
412 [out] UINT *pcchActual);
414 HRESULT GetSpecVersion(
415 [in] UINT cchSpecVersion,
416 [in, out, unique, size_is(cchSpecVersion)] WCHAR *wzSpecVersion,
417 [out] UINT *pcchActual);
419 HRESULT GetFriendlyName(
420 [in] UINT cchFriendlyName,
421 [in, out, unique, size_is(cchFriendlyName)] WCHAR *wzFriendlyName,
422 [out] UINT *pcchActual);
426 object,
427 uuid(30989668-e1c9-4597-b395-458eedb808df)
429 interface IWICMetadataQueryReader : IUnknown
431 HRESULT GetContainerFormat(
432 [out] GUID *pguidContainerFormat);
434 HRESULT GetLocation(
435 [in] UINT cchMaxLength,
436 [in, out, unique, size_is(cchMaxLength)] WCHAR *wzNamespace,
437 [out] UINT *pcchActualLength);
439 HRESULT GetMetadataByName(
440 [in] LPCWSTR wzName,
441 [in, out, unique] PROPVARIANT *pvarValue);
443 HRESULT GetEnumerator(
444 [out] IEnumString **ppIEnumString);
448 object,
449 uuid(a721791a-0def-4d06-bd91-2118bf1db10b)
451 interface IWICMetadataQueryWriter : IWICMetadataQueryReader
453 HRESULT SetMetadataByName(
454 [in] LPCWSTR wzName,
455 [in] const PROPVARIANT *pvarValue);
457 HRESULT RemoveMetadataByName(
458 [in] LPCWSTR wzName);
462 object,
463 uuid(3b16811b-6a43-4ec9-a813-3d930c13b940)
465 interface IWICBitmapFrameDecode : IWICBitmapSource
467 HRESULT GetMetadataQueryReader(
468 [out] IWICMetadataQueryReader **ppIMetadataQueryReader);
470 HRESULT GetColorContexts(
471 [in] UINT cCount,
472 [in, out, unique, size_is(cCount)] IWICColorContext **ppIColorContexts,
473 [out] UINT *pcActualCount);
475 HRESULT GetThumbnail(
476 [out] IWICBitmapSource **ppIThumbnail);
480 object,
481 uuid(e8eda601-3d48-431a-ab44-69059be88bbe)
483 interface IWICPixelFormatInfo : IWICComponentInfo
485 HRESULT GetFormatGUID(
486 [out] GUID* pFormat);
488 HRESULT GetColorContext(
489 [out] IWICColorContext **ppIColorContext);
491 HRESULT GetBitsPerPixel(
492 [out] UINT *puiBitsPerPixel);
494 HRESULT GetChannelCount(
495 [out] UINT *puiChannelCount);
497 HRESULT GetChannelMask(
498 [in] UINT uiChannelIndex,
499 [in] UINT cbMaskBuffer,
500 [in, out, unique, size_is(cbMaskBuffer)] BYTE *pbMaskBuffer,
501 [out] UINT *pcbActual);
505 object,
506 uuid(a9db33a2-af5f-43c7-b679-74f5984b5aa4)
508 interface IWICPixelFormatInfo2 : IWICPixelFormatInfo
510 HRESULT SupportsTransparency(
511 [out] BOOL *pfSupportsTransparency);
513 HRESULT GetNumericRepresentation(
514 [out] WICPixelFormatNumericRepresentation *pNumericRepresentation);
518 object,
519 uuid(e87a44c4-b76e-4c47-8b09-298eb12a2714)
521 interface IWICBitmapCodecInfo : IWICComponentInfo
523 HRESULT GetContainerFormat(
524 [out] GUID *pguidContainerFormat);
526 HRESULT GetPixelFormats(
527 [in] UINT cFormats,
528 [in, out, unique, size_is(cFormats)] GUID *pguidPixelFormats,
529 [out] UINT *pcActual);
531 HRESULT GetColorManagementVersion(
532 [in] UINT cchColorManagementVersion,
533 [in, out, unique, size_is(cchColorManagementVersion)] WCHAR *wzColorManagementVersion,
534 [out] UINT *pcchActual);
536 HRESULT GetDeviceManufacturer(
537 [in] UINT cchDeviceManufacturer,
538 [in, out, unique, size_is(cchDeviceManufacturer)] WCHAR *wzDeviceManufacturer,
539 [out] UINT *pcchActual);
541 HRESULT GetDeviceModels(
542 [in] UINT cchDeviceModels,
543 [in, out, unique, size_is(cchDeviceModels)] WCHAR *wzDeviceModels,
544 [out] UINT *pcchActual);
546 HRESULT GetMimeTypes(
547 [in] UINT cchMimeTypes,
548 [in, out, unique, size_is(cchMimeTypes)] WCHAR *wzMimeTypes,
549 [out] UINT *pcchActual);
551 HRESULT GetFileExtensions(
552 [in] UINT cchFileExtensions,
553 [in, out, unique, size_is(cchFileExtensions)] WCHAR *wzFileExtensions,
554 [out] UINT *pcchActual);
556 HRESULT DoesSupportAnimation(
557 [out] BOOL *pfSupportAnimation);
559 HRESULT DoesSupportChromaKey(
560 [out] BOOL *pfSupportChromaKey);
562 HRESULT DoesSupportLossless(
563 [out] BOOL *pfSupportLossless);
565 HRESULT DoesSupportMultiframe(
566 [out] BOOL *pfSupportMultiframe);
568 HRESULT MatchesMimeType(
569 [in] LPCWSTR wzMimeType,
570 [out] BOOL *pfMatches);
573 interface IWICBitmapDecoder;
576 object,
577 uuid(d8cd007f-d08f-4191-9bfc-236ea7f0e4b5)
579 interface IWICBitmapDecoderInfo : IWICBitmapCodecInfo
581 [local]
582 HRESULT GetPatterns(
583 [in] UINT cbSizePatterns,
584 [in, out, unique] WICBitmapPattern *pPatterns,
585 [in, out, unique] UINT *pcPatterns,
586 [in, out, unique] UINT *pcbPatternsActual);
588 HRESULT MatchesPattern(
589 [in] IStream *pIStream,
590 [out] BOOL *pfMatches);
592 HRESULT CreateInstance(
593 [out] IWICBitmapDecoder **ppIBitmapDecoder);
597 object,
598 uuid(9edde9e7-8dee-47ea-99df-e6faf2ed44bf)
600 interface IWICBitmapDecoder : IUnknown
602 HRESULT QueryCapability(
603 [in] IStream *pIStream,
604 [out] DWORD *pdwCapability);
606 HRESULT Initialize(
607 [in] IStream *pIStream,
608 [in] WICDecodeOptions cacheOptions);
610 HRESULT GetContainerFormat(
611 [out] GUID *pguidContainerFormat);
613 HRESULT GetDecoderInfo(
614 [out] IWICBitmapDecoderInfo **ppIDecoderInfo);
616 HRESULT CopyPalette(
617 [in] IWICPalette *pIPalette);
619 HRESULT GetMetadataQueryReader(
620 [out] IWICMetadataQueryReader **ppIMetadataQueryReader);
622 HRESULT GetPreview(
623 [out] IWICBitmapSource **ppIBitmapSource);
625 HRESULT GetColorContexts(
626 [in] UINT cCount,
627 [in, out, unique, size_is(cCount)] IWICColorContext **ppIColorContexts,
628 [out] UINT *pcActualCount);
630 HRESULT GetThumbnail(
631 [out] IWICBitmapSource **ppIThumbnail);
633 HRESULT GetFrameCount(
634 [out] UINT *pCount);
636 HRESULT GetFrame(
637 [in] UINT index,
638 [out] IWICBitmapFrameDecode **ppIBitmapFrame);
642 object,
643 uuid(00000105-a8f2-4877-ba0a-fd2b6645fb94)
645 interface IWICBitmapFrameEncode : IUnknown
647 HRESULT Initialize(
648 [in, unique] IPropertyBag2 *pIEncoderOptions);
650 HRESULT SetSize(
651 [in] UINT uiWidth,
652 [in] UINT uiHeight);
654 HRESULT SetResolution(
655 [in] double dpiX,
656 [in] double dpiY);
658 HRESULT SetPixelFormat(
659 [in, out] WICPixelFormatGUID *pPixelFormat);
661 HRESULT SetColorContexts(
662 [in] UINT cCount,
663 [in, size_is(cCount)] IWICColorContext **ppIColorContext);
665 HRESULT SetPalette(
666 [in] IWICPalette *pIPalette);
668 HRESULT SetThumbnail(
669 [in] IWICBitmapSource *pIThumbnail);
671 HRESULT WritePixels(
672 [in] UINT lineCount,
673 [in] UINT cbStride,
674 [in] UINT cbBufferSize,
675 [in, size_is(cbBufferSize)] BYTE *pbPixels);
677 HRESULT WriteSource(
678 [in] IWICBitmapSource *pIBitmapSource,
679 [in, unique] WICRect *prc);
681 HRESULT Commit();
683 HRESULT GetMetadataQueryWriter(
684 IWICMetadataQueryWriter **ppIMetadataQueryWriter);
687 interface IWICBitmapEncoder;
690 object,
691 uuid(94c9b4ee-a09f-4f92-8a1e-4a9bce7e76fb)
693 interface IWICBitmapEncoderInfo : IWICBitmapCodecInfo
695 HRESULT CreateInstance(
696 [out] IWICBitmapEncoder **ppIBitmapEncoder);
700 object,
701 uuid(00000103-a8f2-4877-ba0a-fd2b6645fb94)
703 interface IWICBitmapEncoder : IUnknown
705 HRESULT Initialize(
706 [in] IStream *pIStream,
707 [in] WICBitmapEncoderCacheOption cacheOption);
709 HRESULT GetContainerFormat(
710 [out] GUID *pguidContainerFormat);
712 HRESULT GetEncoderInfo(
713 [out] IWICBitmapEncoderInfo **ppIEncoderInfo);
715 HRESULT SetColorContexts(
716 [in] UINT cCount,
717 [in, size_is(cCount)] IWICColorContext **ppIColorContext);
719 HRESULT SetPalette(
720 [in] IWICPalette *pIPalette);
722 HRESULT SetThumbnail(
723 [in] IWICBitmapSource *pIThumbnail);
725 HRESULT SetPreview(
726 [in] IWICBitmapSource *pIPreview);
728 HRESULT CreateNewFrame(
729 [out] IWICBitmapFrameEncode **ppIFrameEncode,
730 [in, out, unique] IPropertyBag2 **ppIEncoderOptions);
732 HRESULT Commit();
734 HRESULT GetMetadataQueryWriter(
735 [out] IWICMetadataQueryWriter **ppIMetadataQueryWriter);
739 object,
740 uuid(00000301-a8f2-4877-ba0a-fd2b6645fb94)
742 interface IWICFormatConverter : IWICBitmapSource
744 HRESULT Initialize(
745 [in] IWICBitmapSource *pISource,
746 [in] REFWICPixelFormatGUID dstFormat,
747 [in] WICBitmapDitherType dither,
748 [in] IWICPalette *pIPalette,
749 [in] double alphaThresholdPercent,
750 [in] WICBitmapPaletteType paletteTranslate);
752 HRESULT CanConvert(
753 [in] REFWICPixelFormatGUID srcPixelFormat,
754 [in] REFWICPixelFormatGUID dstPixelFormat,
755 [out] BOOL *pfCanConvert);
759 object,
760 uuid(9f34fb65-13f4-4f15-bc57-3726b5e53d9f)
762 interface IWICFormatConverterInfo : IWICComponentInfo
764 HRESULT GetPixelFormats(
765 [in] UINT cFormats,
766 [in, out, size_is(cFormats)] WICPixelFormatGUID *pPixelFormatGUIDs,
767 [out] UINT *pcActual);
769 HRESULT CreateInstance(
770 [out] IWICFormatConverter **ppIConverter);
774 object,
775 uuid(135ff860-22b7-4ddf-b0f6-218f4f299a43)
777 interface IWICStream : IStream
779 HRESULT InitializeFromIStream(
780 [in] IStream *pIStream);
782 HRESULT InitializeFromFilename(
783 [in] LPCWSTR wzFileName,
784 [in] DWORD dwAccessMode);
786 HRESULT InitializeFromMemory(
787 [in, size_is(cbBufferSize)] BYTE *pbBuffer,
788 [in] DWORD cbBufferSize);
790 HRESULT InitializeFromIStreamRegion(
791 [in] IStream *pIStream,
792 [in] ULARGE_INTEGER ulOffset,
793 [in] ULARGE_INTEGER ulMaxSize);
797 object,
798 uuid(00000302-a8f2-4877-ba0a-fd2b6645fb94)
800 interface IWICBitmapScaler : IWICBitmapSource
802 HRESULT Initialize(
803 [in] IWICBitmapSource *pISource,
804 [in] UINT uiWidth,
805 [in] UINT uiHeight,
806 [in] WICBitmapInterpolationMode mode);
810 object,
811 uuid(e4fbcf03-223d-4e81-9333-d635556dd1b5)
813 interface IWICBitmapClipper : IWICBitmapSource
815 HRESULT Initialize(
816 [in] IWICBitmapSource *pISource,
817 [in] const WICRect *prc);
821 object,
822 uuid(b66f034f-d0e2-40ab-b436-6de39e321a94)
824 interface IWICColorTransform : IWICBitmapSource
826 HRESULT Initialize(
827 [in] IWICBitmapSource *pIBitmapSource,
828 [in] IWICColorContext *pIContextSource,
829 [in] IWICColorContext *pIContextDest,
830 [in] REFWICPixelFormatGUID pixelFmtDest);
834 object,
835 uuid(b84e2c09-78c9-4ac4-8bd3-524ae1663a2f)
837 interface IWICFastMetadataEncoder : IUnknown
839 HRESULT Commit();
841 HRESULT GetMetadataQueryWriter(
842 [out] IWICMetadataQueryWriter **ppIMetadataQueryWriter);
845 cpp_quote("DEFINE_GUID(CLSID_WICImagingFactory, 0xcacaf262,0x9370,0x4615,0xa1,0x3b,0x9f,0x55,0x39,0xda,0x4c,0x0a);")
848 object,
849 uuid(ec5ec8a9-c395-4314-9c77-54d7a935ff70)
851 interface IWICImagingFactory : IUnknown
853 HRESULT CreateDecoderFromFilename(
854 [in] LPCWSTR wzFilename,
855 [in, unique] const GUID *pguidVendor,
856 [in] DWORD dwDesiredAccess,
857 [in] WICDecodeOptions metadataOptions,
858 [out, retval] IWICBitmapDecoder **ppIDecoder);
860 HRESULT CreateDecoderFromStream(
861 [in] IStream *pIStream,
862 [in, unique] const GUID *pguidVendor,
863 [in] WICDecodeOptions metadataOptions,
864 [out, retval] IWICBitmapDecoder **ppIDecoder);
866 HRESULT CreateDecoderFromFileHandle(
867 [in] ULONG_PTR hFile,
868 [in, unique] const GUID *pguidVendor,
869 [in] WICDecodeOptions metadataOptions,
870 [out, retval] IWICBitmapDecoder **ppIDecoder);
872 HRESULT CreateComponentInfo(
873 [in] REFCLSID clsidComponent,
874 [out] IWICComponentInfo **ppIInfo);
876 HRESULT CreateDecoder(
877 [in] REFGUID guidContainerFormat,
878 [in, unique] const GUID *pguidVendor,
879 [out, retval] IWICBitmapDecoder **ppIDecoder);
881 HRESULT CreateEncoder(
882 [in] REFGUID guidContainerFormat,
883 [in, unique] const GUID *pguidVendor,
884 [out, retval] IWICBitmapEncoder **ppIEncoder);
886 HRESULT CreatePalette(
887 [out] IWICPalette **ppIPalette);
889 HRESULT CreateFormatConverter(
890 [out] IWICFormatConverter **ppIFormatConverter);
892 HRESULT CreateBitmapScaler(
893 [out] IWICBitmapScaler **ppIBitmapScaler);
895 HRESULT CreateBitmapClipper(
896 [out] IWICBitmapClipper **ppIBitmapClipper);
898 HRESULT CreateBitmapFlipRotator(
899 [out] IWICBitmapFlipRotator **ppIBitmapFlipRotator);
901 HRESULT CreateStream(
902 [out] IWICStream **ppIWICStream);
904 HRESULT CreateColorContext(
905 [out] IWICColorContext **ppIWICColorContext);
907 HRESULT CreateColorTransformer(
908 [out] IWICColorTransform **ppIWICColorTransform);
910 HRESULT CreateBitmap(
911 [in] UINT uiWidth,
912 [in] UINT uiHeight,
913 [in] REFWICPixelFormatGUID pixelFormat,
914 [in] WICBitmapCreateCacheOption option,
915 [out] IWICBitmap **ppIBitmap);
917 HRESULT CreateBitmapFromSource(
918 [in] IWICBitmapSource *piBitmapSource,
919 [in] WICBitmapCreateCacheOption option,
920 [out] IWICBitmap **ppIBitmap);
922 HRESULT CreateBitmapFromSourceRect(
923 [in] IWICBitmapSource *piBitmapSource,
924 [in] UINT x,
925 [in] UINT y,
926 [in] UINT width,
927 [in] UINT height,
928 [out] IWICBitmap **ppIBitmap);
930 HRESULT CreateBitmapFromMemory(
931 [in] UINT uiWidth,
932 [in] UINT uiHeight,
933 [in] REFWICPixelFormatGUID pixelFormat,
934 [in] UINT cbStride,
935 [in] UINT cbBufferSize,
936 [in, size_is(cbBufferSize)] BYTE *pbBuffer,
937 [out] IWICBitmap **ppIBitmap);
939 HRESULT CreateBitmapFromHBITMAP(
940 [in] HBITMAP hBitmap,
941 [in, unique] HPALETTE hPalette,
942 [in] WICBitmapAlphaChannelOption options,
943 [out] IWICBitmap **ppIBitmap);
945 HRESULT CreateBitmapFromHICON(
946 [in] HICON hIcon,
947 [out] IWICBitmap **ppIBitmap);
949 HRESULT CreateComponentEnumerator(
950 [in] DWORD componentTypes,
951 [in] DWORD options,
952 [out] IEnumUnknown **ppIEnumUnknown);
954 HRESULT CreateFastMetadataEncoderFromDecoder(
955 [in] IWICBitmapDecoder *pIDecoder,
956 [out] IWICFastMetadataEncoder **ppIFastEncoder);
958 HRESULT CreateFastMetadataEncoderFromFrameDecode(
959 [in] IWICBitmapFrameDecode *pIFrameDecoder,
960 [out] IWICFastMetadataEncoder **ppIFastEncoder);
962 HRESULT CreateQueryWriter(
963 [in] REFGUID guidMetadataFormat,
964 [in, unique] const GUID *pguidVendor,
965 [out] IWICMetadataQueryWriter **ppIQueryWriter);
967 HRESULT CreateQueryWriterFromReader(
968 [in] IWICMetadataQueryReader *pIQueryReader,
969 [in, unique] const GUID *pguidVendor,
970 [out] IWICMetadataQueryWriter **ppIQueryWriter);
974 local,
975 object,
976 uuid(dc2bb46d-3f07-481e-8625-220c4aedbb33)
978 interface IWICEnumMetadataItem : IUnknown
980 HRESULT Next(
981 [in] ULONG celt,
982 [in, out, unique, size_is(celt)] PROPVARIANT *rgeltSchema,
983 [in, out, size_is(celt)] PROPVARIANT *rgeltId,
984 [in, out, optional, size_is(celt)] PROPVARIANT *rgeltValue,
985 [out, optional] ULONG *pceltFetched);
987 HRESULT Skip(
988 [in] ULONG celt);
990 HRESULT Reset();
992 HRESULT Clone(
993 [out] IWICEnumMetadataItem **ppIEnumMetadataItem);
996 cpp_quote("HRESULT WINAPI WICConvertBitmapSource(REFWICPixelFormatGUID dstFormat, IWICBitmapSource *pISrc, IWICBitmapSource **ppIDst);")
998 cpp_quote("DEFINE_GUID(CLSID_WICBmpDecoder, 0x6b462062,0x7cbf,0x400d,0x9f,0xdb,0x81,0x3d,0xd1,0x0f,0x27,0x78);")
999 cpp_quote("DEFINE_GUID(CLSID_WICPngDecoder, 0x389ea17b,0x5078,0x4cde,0xb6,0xef,0x25,0xc1,0x51,0x75,0xc7,0x51);")
1000 cpp_quote("DEFINE_GUID(CLSID_WICIcoDecoder, 0xc61bfcdf,0x2e0f,0x4aad,0xa8,0xd7,0xe0,0x6b,0xaf,0xeb,0xcd,0xfe);")
1001 cpp_quote("DEFINE_GUID(CLSID_WICJpegDecoder, 0x9456a480,0xe88b,0x43ea,0x9e,0x73,0x0b,0x2d,0x9b,0x71,0xb1,0xca);")
1002 cpp_quote("DEFINE_GUID(CLSID_WICGifDecoder, 0x381dda3c,0x9ce9,0x4834,0xa2,0x3e,0x1f,0x98,0xf8,0xfc,0x52,0xbe);")
1003 cpp_quote("DEFINE_GUID(CLSID_WICTiffDecoder, 0xb54e85d9,0xfe23,0x499f,0x8b,0x88,0x6a,0xce,0xa7,0x13,0x75,0x2b);")
1004 cpp_quote("DEFINE_GUID(CLSID_WICWmpDecoder, 0xa26cec36,0x234c,0x4950,0xae,0x16,0xe3,0x4a,0xac,0xe7,0x1d,0x0d);")
1006 cpp_quote("DEFINE_GUID(CLSID_WICBmpEncoder, 0x69be8bb4,0xd66d,0x47c8,0x86,0x5a,0xed,0x15,0x89,0x43,0x37,0x82);")
1007 cpp_quote("DEFINE_GUID(CLSID_WICPngEncoder, 0x27949969,0x876a,0x41d7,0x94,0x47,0x56,0x8f,0x6a,0x35,0xa4,0xdc);")
1008 cpp_quote("DEFINE_GUID(CLSID_WICJpegEncoder, 0x1a34f5c1,0x4a5a,0x46dc,0xb6,0x44,0x1f,0x45,0x67,0xe7,0xa6,0x76);")
1009 cpp_quote("DEFINE_GUID(CLSID_WICGifEncoder, 0x114f5598,0x0b22,0x40a0,0x86,0xa1,0xc8,0x3e,0xa4,0x95,0xad,0xbd);")
1010 cpp_quote("DEFINE_GUID(CLSID_WICTiffEncoder, 0x0131be10,0x2001,0x4c5f,0xa9,0xb0,0xcc,0x88,0xfa,0xb6,0x4c,0xe8);")
1011 cpp_quote("DEFINE_GUID(CLSID_WICWmpEncoder, 0xac4ce3cb,0xe1c1,0x44cd,0x82,0x15,0x5a,0x16,0x65,0x50,0x9e,0xc2);")
1013 cpp_quote("DEFINE_GUID(CLSID_WICDefaultFormatConverter, 0x1a3f11dc,0xb514,0x4b17,0x8c,0x5f,0x21,0x54,0x51,0x38,0x52,0xf1);")
1015 cpp_quote("DEFINE_GUID(GUID_ContainerFormatBmp, 0x0af1d87e,0xfcfe,0x4188,0xbd,0xeb,0xa7,0x90,0x64,0x71,0xcb,0xe3);")
1016 cpp_quote("DEFINE_GUID(GUID_ContainerFormatPng, 0x1b7cfaf4,0x713f,0x473c,0xbb,0xcd,0x61,0x37,0x42,0x5f,0xae,0xaf);")
1017 cpp_quote("DEFINE_GUID(GUID_ContainerFormatIco, 0xa3a860c4,0x338f,0x4c17,0x91,0x9a,0xfb,0xa4,0xb5,0x62,0x8f,0x21);")
1018 cpp_quote("DEFINE_GUID(GUID_ContainerFormatJpeg, 0x19e4a5aa,0x5662,0x4fc5,0xa0,0xc0,0x17,0x58,0x02,0x8e,0x10,0x57);")
1019 cpp_quote("DEFINE_GUID(GUID_ContainerFormatTiff, 0x163bcc30,0xe2e9,0x4f0b,0x96,0x1d,0xa3,0xe9,0xfd,0xb7,0x88,0xa3);")
1020 cpp_quote("DEFINE_GUID(GUID_ContainerFormatGif, 0x1f8a5601,0x7d4d,0x4cbd,0x9c,0x82,0x1b,0xc8,0xd4,0xee,0xb9,0xa5);")
1021 cpp_quote("DEFINE_GUID(GUID_ContainerFormatWmp, 0x57a37caa,0x367a,0x4540,0x91,0x6b,0xf1,0x83,0xc5,0x09,0x3a,0x4b);")
1023 cpp_quote("DEFINE_GUID(GUID_VendorMicrosoft, 0xf0e749ca,0xedef,0x4589,0xa7,0x3a,0xee,0x0e,0x62,0x6a,0x2a,0x2b);")
1025 cpp_quote("DEFINE_GUID(CLSID_WICImagingCategories, 0xfae3d380,0xfea4,0x4623,0x8c,0x75,0xc6,0xb6,0x11,0x10,0xb6,0x81);")
1026 cpp_quote("DEFINE_GUID(CATID_WICBitmapDecoders, 0x7ed96837,0x96f0,0x4812,0xb2,0x11,0xf1,0x3c,0x24,0x11,0x7e,0xd3);")
1027 cpp_quote("DEFINE_GUID(CATID_WICBitmapEncoders, 0xac757296,0x3522,0x4e11,0x98,0x62,0xc1,0x7b,0xe5,0xa1,0x76,0x7e);")
1028 cpp_quote("DEFINE_GUID(CATID_WICFormatConverters, 0x7835eae8,0xbf14,0x49d1,0x93,0xce,0x53,0x3a,0x40,0x7b,0x22,0x48);")
1029 cpp_quote("DEFINE_GUID(CATID_WICMetadataReader, 0x05af94d8,0x7174,0x4cd2,0xbe,0x4a,0x41,0x24,0xb8,0x0e,0xe4,0xb8);")
1030 cpp_quote("DEFINE_GUID(CATID_WICPixelFormats, 0x2b46e70f,0xcda7,0x473e,0x89,0xf6,0xdc,0x96,0x30,0xa2,0x39,0x0b);")