shell32: Add support for the OS X 'My Stuff' folders.
[wine/zf.git] / include / wincodec.idl
blob4e1d039dc85246849756f0b4c02e8de320420774
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 GUID WICPixelFormatGUID;
172 typedef REFGUID REFWICPixelFormatGUID;
174 cpp_quote("DEFINE_GUID(GUID_WICPixelFormatDontCare, 0x6fddc324,0x4e03,0x4bfe,0xb1,0x85,0x3d,0x77,0x76,0x8d,0xc9,0x00);")
175 cpp_quote("#define GUID_WICPixelFormatUndefined GUID_WICPixelFormatDontCare")
177 cpp_quote("DEFINE_GUID(GUID_WICPixelFormat1bppIndexed, 0x6fddc324,0x4e03,0x4bfe,0xb1,0x85,0x3d,0x77,0x76,0x8d,0xc9,0x01);")
178 cpp_quote("DEFINE_GUID(GUID_WICPixelFormat2bppIndexed, 0x6fddc324,0x4e03,0x4bfe,0xb1,0x85,0x3d,0x77,0x76,0x8d,0xc9,0x02);")
179 cpp_quote("DEFINE_GUID(GUID_WICPixelFormat4bppIndexed, 0x6fddc324,0x4e03,0x4bfe,0xb1,0x85,0x3d,0x77,0x76,0x8d,0xc9,0x03);")
180 cpp_quote("DEFINE_GUID(GUID_WICPixelFormat8bppIndexed, 0x6fddc324,0x4e03,0x4bfe,0xb1,0x85,0x3d,0x77,0x76,0x8d,0xc9,0x04);")
182 cpp_quote("DEFINE_GUID(GUID_WICPixelFormatBlackWhite, 0x6fddc324,0x4e03,0x4bfe,0xb1,0x85,0x3d,0x77,0x76,0x8d,0xc9,0x05);")
183 cpp_quote("DEFINE_GUID(GUID_WICPixelFormat2bppGray, 0x6fddc324,0x4e03,0x4bfe,0xb1,0x85,0x3d,0x77,0x76,0x8d,0xc9,0x06);")
184 cpp_quote("DEFINE_GUID(GUID_WICPixelFormat4bppGray, 0x6fddc324,0x4e03,0x4bfe,0xb1,0x85,0x3d,0x77,0x76,0x8d,0xc9,0x07);")
185 cpp_quote("DEFINE_GUID(GUID_WICPixelFormat8bppGray, 0x6fddc324,0x4e03,0x4bfe,0xb1,0x85,0x3d,0x77,0x76,0x8d,0xc9,0x08);")
186 cpp_quote("DEFINE_GUID(GUID_WICPixelFormat16bppGray, 0x6fddc324,0x4e03,0x4bfe,0xb1,0x85,0x3d,0x77,0x76,0x8d,0xc9,0x0b);")
188 cpp_quote("DEFINE_GUID(GUID_WICPixelFormat16bppBGR555, 0x6fddc324,0x4e03,0x4bfe,0xb1,0x85,0x3d,0x77,0x76,0x8d,0xc9,0x09);")
189 cpp_quote("DEFINE_GUID(GUID_WICPixelFormat16bppBGR565, 0x6fddc324,0x4e03,0x4bfe,0xb1,0x85,0x3d,0x77,0x76,0x8d,0xc9,0x0a);")
190 cpp_quote("DEFINE_GUID(GUID_WICPixelFormat16bppBGRA5551, 0x05ec7c2b,0xf1e6,0x4961,0xad,0x46,0xe1,0xcc,0x81,0x0a,0x87,0xd2);")
191 cpp_quote("DEFINE_GUID(GUID_WICPixelFormat24bppBGR, 0x6fddc324,0x4e03,0x4bfe,0xb1,0x85,0x3d,0x77,0x76,0x8d,0xc9,0x0c);")
192 cpp_quote("DEFINE_GUID(GUID_WICPixelFormat24bppRGB, 0x6fddc324,0x4e03,0x4bfe,0xb1,0x85,0x3d,0x77,0x76,0x8d,0xc9,0x0d);")
193 cpp_quote("DEFINE_GUID(GUID_WICPixelFormat32bppBGR, 0x6fddc324,0x4e03,0x4bfe,0xb1,0x85,0x3d,0x77,0x76,0x8d,0xc9,0x0e);")
194 cpp_quote("DEFINE_GUID(GUID_WICPixelFormat32bppBGRA, 0x6fddc324,0x4e03,0x4bfe,0xb1,0x85,0x3d,0x77,0x76,0x8d,0xc9,0x0f);")
195 cpp_quote("DEFINE_GUID(GUID_WICPixelFormat32bppPBGRA, 0x6fddc324,0x4e03,0x4bfe,0xb1,0x85,0x3d,0x77,0x76,0x8d,0xc9,0x10);")
197 cpp_quote("DEFINE_GUID(GUID_WICPixelFormat48bppRGB, 0x6fddc324,0x4e03,0x4bfe,0xb1,0x85,0x3d,0x77,0x76,0x8d,0xc9,0x15);")
198 cpp_quote("DEFINE_GUID(GUID_WICPixelFormat64bppRGBA, 0x6fddc324,0x4e03,0x4bfe,0xb1,0x85,0x3d,0x77,0x76,0x8d,0xc9,0x16);")
199 cpp_quote("DEFINE_GUID(GUID_WICPixelFormat64bppPRGBA, 0x6fddc324,0x4e03,0x4bfe,0xb1,0x85,0x3d,0x77,0x76,0x8d,0xc9,0x17);")
201 cpp_quote("DEFINE_GUID(GUID_WICPixelFormat32bppCMYK, 0x6fddc324,0x4e03,0x4fbe,0xb1,0x85,0x3d,0x77,0x76,0x8d,0xc9,0x1c);")
203 typedef struct WICRect {
204 INT X;
205 INT Y;
206 INT Width;
207 INT Height;
208 } WICRect;
210 typedef struct WICBitmapPattern {
211 ULARGE_INTEGER Position;
212 ULONG Length;
213 BYTE *Pattern;
214 BYTE *Mask;
215 BOOL EndOfStream;
216 } WICBitmapPattern;
218 typedef UINT32 WICColor;
220 cpp_quote("#define WINCODEC_ERR_WRONGSTATE 0x88982f04")
221 cpp_quote("#define WINCODEC_ERR_VALUEOUTOFRANGE 0x88982f05")
222 cpp_quote("#define WINCODEC_ERR_NOTINITIALIZED 0x88982f0c")
223 cpp_quote("#define WINCODEC_ERR_ALREADYLOCKED 0x88982f0d")
224 cpp_quote("#define WINCODEC_ERR_PROPERTYNOTFOUND 0x88982f40")
225 cpp_quote("#define WINCODEC_ERR_CODECNOTHUMBNAIL 0x88982f44")
226 cpp_quote("#define WINCODEC_ERR_PALETTEUNAVAILABLE 0x88982f45")
227 cpp_quote("#define WINCODEC_ERR_COMPONENTNOTFOUND 0x88982f50")
228 cpp_quote("#define WINCODEC_ERR_BADIMAGE 0x88982f60")
229 cpp_quote("#define WINCODEC_ERR_FRAMEMISSING 0x88982f62")
230 cpp_quote("#define WINCODEC_ERR_BADMETADATAHEADER 0x88982f63")
231 cpp_quote("#define WINCODEC_ERR_UNSUPPORTEDPIXELFORMAT 0x88982f80")
232 cpp_quote("#define WINCODEC_ERR_UNSUPPORTEDOPERATION 0x88982f81")
233 cpp_quote("#define WINCODEC_ERR_INSUFFICIENTBUFFER 0x88982f8c")
234 cpp_quote("#define WINCODEC_ERR_PROPERTYUNEXPECTEDTYPE 0x88982f8e")
235 cpp_quote("#define WINCODEC_ERR_WIN32ERROR 0x88982f94")
237 interface IWICPalette;
240 object,
241 uuid(3c613a02-34b2-44ea-9a7c-45aea9c6fd6d)
243 interface IWICColorContext : IUnknown
245 HRESULT InitializeFromFilename(
246 [in] LPCWSTR wzFilename);
248 HRESULT InitializeFromMemory(
249 [in, size_is(cbBufferSize)] const BYTE *pbBuffer,
250 [in] UINT cbBufferSize);
252 HRESULT InitializeFromExifColorSpace(
253 [in] UINT value);
255 HRESULT GetType(
256 [out] WICColorContextType *pType);
258 HRESULT GetProfileBytes(
259 [in] UINT cbBuffer,
260 [in, out, unique, size_is(cbBuffer)] BYTE *pbBuffer,
261 [out] UINT *pcbActual);
263 HRESULT GetExifColorSpace(
264 [out] UINT *pValue);
268 object,
269 uuid(00000120-a8f2-4877-ba0a-fd2b6645fb94)
271 interface IWICBitmapSource : IUnknown
273 HRESULT GetSize(
274 [out] UINT *puiWidth,
275 [out] UINT *puiHeight);
277 HRESULT GetPixelFormat(
278 [out] WICPixelFormatGUID *pPixelFormat);
280 HRESULT GetResolution(
281 [out] double *pDpiX,
282 [out] double *pDpiY);
284 HRESULT CopyPalette(
285 [in] IWICPalette *pIPalette);
287 HRESULT CopyPixels(
288 [in] const WICRect *prc,
289 [in] UINT cbStride,
290 [in] UINT cbBufferSize,
291 [out, size_is(cbBufferSize)] BYTE *pbBuffer);
295 object,
296 uuid(00000123-a8f2-4877-ba0a-fd2b6645fb94)
298 interface IWICBitmapLock : IUnknown
300 HRESULT GetSize(
301 [out] UINT *pWidth,
302 [out] UINT *pHeight);
304 HRESULT GetStride(
305 [out] UINT *pcbStride);
307 HRESULT GetDataPointer(
308 [out] UINT *pcbBufferSize,
309 [out, size_is(,*pcbBufferSize)] BYTE **ppbData);
311 HRESULT GetPixelFormat(
312 [out] WICPixelFormatGUID *pPixelFormat);
316 object,
317 uuid(5009834f-2d6a-41ce-9e1b-17c5aff7a782)
319 interface IWICBitmapFlipRotator : IWICBitmapSource
321 HRESULT Initialize(
322 [in] IWICBitmapSource *pISource,
323 [in] WICBitmapTransformOptions options);
327 object,
328 uuid(00000121-a8f2-4877-ba0a-fd2b6645fb94)
330 interface IWICBitmap : IWICBitmapSource
332 HRESULT Lock(
333 [in] const WICRect *prcLock,
334 [in] DWORD flags,
335 [out] IWICBitmapLock **ppILock);
337 HRESULT SetPalette(
338 [in] IWICPalette *pIPalette);
340 HRESULT SetResolution(
341 [in] double dpiX,
342 [in] double dpiY);
346 object,
347 uuid(00000040-a8f2-4877-ba0a-fd2b6645fb94)
349 interface IWICPalette : IUnknown
351 HRESULT InitializePredefined(
352 [in] WICBitmapPaletteType ePaletteType,
353 [in] BOOL fAddTransparentColor);
355 HRESULT InitializeCustom(
356 [in, size_is(colorCount)] WICColor *pColors,
357 [in] UINT colorCount);
359 HRESULT InitializeFromBitmap(
360 [in] IWICBitmapSource *pISurface,
361 [in] UINT colorCount,
362 [in] BOOL fAddTransparentColor);
364 HRESULT InitializeFromPalette(
365 [in] IWICPalette *pIPalette);
367 HRESULT GetType(
368 [out] WICBitmapPaletteType *pePaletteType);
370 HRESULT GetColorCount(
371 [out] UINT *pcCount);
373 HRESULT GetColors(
374 [in] UINT colorCount,
375 [out, size_is(colorCount)] WICColor *pColors,
376 [out] UINT *pcActualColors);
378 HRESULT IsBlackWhite(
379 [out] BOOL *pfIsBlackWhite);
381 HRESULT IsGrayscale(
382 [out] BOOL *pfIsGrayscale);
384 HRESULT HasAlpha(
385 [out] BOOL *pfHasAlpha);
389 object,
390 uuid(23bc3f0a-698b-4357-886b-f24d50671334)
392 interface IWICComponentInfo : IUnknown
394 HRESULT GetComponentType(
395 [out] WICComponentType *pType);
397 HRESULT GetCLSID(
398 [out] CLSID *pclsid);
400 HRESULT GetSigningStatus(
401 [out] DWORD *pStatus);
403 HRESULT GetAuthor(
404 [in] UINT cchAuthor,
405 [in, out, unique, size_is(cchAuthor)] WCHAR *wzAuthor,
406 [out] UINT *pcchActual);
408 HRESULT GetVendorGUID(
409 [out] GUID *pguidVendor);
411 HRESULT GetVersion(
412 [in] UINT cchVersion,
413 [in, out, unique, size_is(cchVersion)] WCHAR *wzVersion,
414 [out] UINT *pcchActual);
416 HRESULT GetSpecVersion(
417 [in] UINT cchSpecVersion,
418 [in, out, unique, size_is(cchSpecVersion)] WCHAR *wzSpecVersion,
419 [out] UINT *pcchActual);
421 HRESULT GetFriendlyName(
422 [in] UINT cchFriendlyName,
423 [in, out, unique, size_is(cchFriendlyName)] WCHAR *wzFriendlyName,
424 [out] UINT *pcchActual);
428 object,
429 uuid(30989668-e1c9-4597-b395-458eedb808df)
431 interface IWICMetadataQueryReader : IUnknown
433 HRESULT GetContainerFormat(
434 [out] GUID *pguidContainerFormat);
436 HRESULT GetLocation(
437 [in] UINT cchMaxLength,
438 [in, out, unique, size_is(cchMaxLength)] WCHAR *wzNamespace,
439 [out] UINT *pcchActualLength);
441 HRESULT GetMetadataByName(
442 [in] LPCWSTR wzName,
443 [in, out, unique] PROPVARIANT *pvarValue);
445 HRESULT GetEnumerator(
446 [out] IEnumString **ppIEnumString);
450 object,
451 uuid(a721791a-0def-4d06-bd91-2118bf1db10b)
453 interface IWICMetadataQueryWriter : IWICMetadataQueryReader
455 HRESULT SetMetadataByName(
456 [in] LPCWSTR wzName,
457 [in] const PROPVARIANT *pvarValue);
459 HRESULT RemoveMetadataByName(
460 [in] LPCWSTR wzName);
464 object,
465 uuid(3b16811b-6a43-4ec9-a813-3d930c13b940)
467 interface IWICBitmapFrameDecode : IWICBitmapSource
469 HRESULT GetMetadataQueryReader(
470 [out] IWICMetadataQueryReader **ppIMetadataQueryReader);
472 HRESULT GetColorContexts(
473 [in] UINT cCount,
474 [in, out, unique, size_is(cCount)] IWICColorContext **ppIColorContexts,
475 [out] UINT *pcActualCount);
477 HRESULT GetThumbnail(
478 [out] IWICBitmapSource **ppIThumbnail);
482 object,
483 uuid(e8eda601-3d48-431a-ab44-69059be88bbe)
485 interface IWICPixelFormatInfo : IWICComponentInfo
487 HRESULT GetFormatGUID(
488 [out] GUID* pFormat);
490 HRESULT GetColorContext(
491 [out] IWICColorContext **ppIColorContext);
493 HRESULT GetBitsPerPixel(
494 [out] UINT *puiBitsPerPixel);
496 HRESULT GetChannelCount(
497 [out] UINT *puiChannelCount);
499 HRESULT GetChannelMask(
500 [in] UINT uiChannelIndex,
501 [in] UINT cbMaskBuffer,
502 [in, out, unique, size_is(cbMaskBuffer)] BYTE *pbMaskBuffer,
503 [out] UINT *pcbActual);
507 object,
508 uuid(a9db33a2-af5f-43c7-b679-74f5984b5aa4)
510 interface IWICPixelFormatInfo2 : IWICPixelFormatInfo
512 HRESULT SupportsTransparency(
513 [out] BOOL *pfSupportsTransparency);
515 HRESULT GetNumericRepresentation(
516 [out] WICPixelFormatNumericRepresentation *pNumericRepresentation);
520 object,
521 uuid(e87a44c4-b76e-4c47-8b09-298eb12a2714)
523 interface IWICBitmapCodecInfo : IWICComponentInfo
525 HRESULT GetContainerFormat(
526 [out] GUID *pguidContainerFormat);
528 HRESULT GetPixelFormats(
529 [in] UINT cFormats,
530 [in, out, unique, size_is(cFormats)] GUID *pguidPixelFormats,
531 [out] UINT *pcActual);
533 HRESULT GetColorManagementVersion(
534 [in] UINT cchColorManagementVersion,
535 [in, out, unique, size_is(cchColorManagementVersion)] WCHAR *wzColorManagementVersion,
536 [out] UINT *pcchActual);
538 HRESULT GetDeviceManufacturer(
539 [in] UINT cchDeviceManufacturer,
540 [in, out, unique, size_is(cchDeviceManufacturer)] WCHAR *wzDeviceManufacturer,
541 [out] UINT *pcchActual);
543 HRESULT GetDeviceModels(
544 [in] UINT cchDeviceModels,
545 [in, out, unique, size_is(cchDeviceModels)] WCHAR *wzDeviceModels,
546 [out] UINT *pcchActual);
548 HRESULT GetMimeTypes(
549 [in] UINT cchMimeTypes,
550 [in, out, unique, size_is(cchMimeTypes)] WCHAR *wzMimeTypes,
551 [out] UINT *pcchActual);
553 HRESULT GetFileExtensions(
554 [in] UINT cchFileExtensions,
555 [in, out, unique, size_is(cchFileExtensions)] WCHAR *wzFileExtensions,
556 [out] UINT *pcchActual);
558 HRESULT DoesSupportAnimation(
559 [out] BOOL *pfSupportAnimation);
561 HRESULT DoesSupportChromaKey(
562 [out] BOOL *pfSupportChromaKey);
564 HRESULT DoesSupportLossless(
565 [out] BOOL *pfSupportLossless);
567 HRESULT DoesSupportMultiframe(
568 [out] BOOL *pfSupportMultiframe);
570 HRESULT MatchesMimeType(
571 [in] LPCWSTR wzMimeType,
572 [out] BOOL *pfMatches);
575 interface IWICBitmapDecoder;
578 object,
579 uuid(d8cd007f-d08f-4191-9bfc-236ea7f0e4b5)
581 interface IWICBitmapDecoderInfo : IWICBitmapCodecInfo
583 [local]
584 HRESULT GetPatterns(
585 [in] UINT cbSizePatterns,
586 [in, out, unique] WICBitmapPattern *pPatterns,
587 [in, out, unique] UINT *pcPatterns,
588 [in, out, unique] UINT *pcbPatternsActual);
590 HRESULT MatchesPattern(
591 [in] IStream *pIStream,
592 [out] BOOL *pfMatches);
594 HRESULT CreateInstance(
595 [out] IWICBitmapDecoder **ppIBitmapDecoder);
599 object,
600 uuid(9edde9e7-8dee-47ea-99df-e6faf2ed44bf)
602 interface IWICBitmapDecoder : IUnknown
604 HRESULT QueryCapability(
605 [in] IStream *pIStream,
606 [out] DWORD *pdwCapability);
608 HRESULT Initialize(
609 [in] IStream *pIStream,
610 [in] WICDecodeOptions cacheOptions);
612 HRESULT GetContainerFormat(
613 [out] GUID *pguidContainerFormat);
615 HRESULT GetDecoderInfo(
616 [out] IWICBitmapDecoderInfo **ppIDecoderInfo);
618 HRESULT CopyPalette(
619 [in] IWICPalette *pIPalette);
621 HRESULT GetMetadataQueryReader(
622 [out] IWICMetadataQueryReader **ppIMetadataQueryReader);
624 HRESULT GetPreview(
625 [out] IWICBitmapSource **ppIBitmapSource);
627 HRESULT GetColorContexts(
628 [in] UINT cCount,
629 [in, out, unique, size_is(cCount)] IWICColorContext **ppIColorContexts,
630 [out] UINT *pcActualCount);
632 HRESULT GetThumbnail(
633 [out] IWICBitmapSource **ppIThumbnail);
635 HRESULT GetFrameCount(
636 [out] UINT *pCount);
638 HRESULT GetFrame(
639 [in] UINT index,
640 [out] IWICBitmapFrameDecode **ppIBitmapFrame);
644 object,
645 uuid(00000105-a8f2-4877-ba0a-fd2b6645fb94)
647 interface IWICBitmapFrameEncode : IUnknown
649 HRESULT Initialize(
650 [in, unique] IPropertyBag2 *pIEncoderOptions);
652 HRESULT SetSize(
653 [in] UINT uiWidth,
654 [in] UINT uiHeight);
656 HRESULT SetResolution(
657 [in] double dpiX,
658 [in] double dpiY);
660 HRESULT SetPixelFormat(
661 [in, out] WICPixelFormatGUID *pPixelFormat);
663 HRESULT SetColorContexts(
664 [in] UINT cCount,
665 [in, size_is(cCount)] IWICColorContext **ppIColorContext);
667 HRESULT SetPalette(
668 [in] IWICPalette *pIPalette);
670 HRESULT SetThumbnail(
671 [in] IWICBitmapSource *pIThumbnail);
673 HRESULT WritePixels(
674 [in] UINT lineCount,
675 [in] UINT cbStride,
676 [in] UINT cbBufferSize,
677 [in, size_is(cbBufferSize)] BYTE *pbPixels);
679 HRESULT WriteSource(
680 [in] IWICBitmapSource *pIBitmapSource,
681 [in, unique] WICRect *prc);
683 HRESULT Commit();
685 HRESULT GetMetadataQueryWriter(
686 IWICMetadataQueryWriter **ppIMetadataQueryWriter);
689 interface IWICBitmapEncoder;
692 object,
693 uuid(94c9b4ee-a09f-4f92-8a1e-4a9bce7e76fb)
695 interface IWICBitmapEncoderInfo : IWICBitmapCodecInfo
697 HRESULT CreateInstance(
698 [out] IWICBitmapEncoder **ppIBitmapEncoder);
702 object,
703 uuid(00000103-a8f2-4877-ba0a-fd2b6645fb94)
705 interface IWICBitmapEncoder : IUnknown
707 HRESULT Initialize(
708 [in] IStream *pIStream,
709 [in] WICBitmapEncoderCacheOption cacheOption);
711 HRESULT GetContainerFormat(
712 [out] GUID *pguidContainerFormat);
714 HRESULT GetEncoderInfo(
715 [out] IWICBitmapEncoderInfo **ppIEncoderInfo);
717 HRESULT SetColorContexts(
718 [in] UINT cCount,
719 [in, size_is(cCount)] IWICColorContext **ppIColorContext);
721 HRESULT SetPalette(
722 [in] IWICPalette *pIPalette);
724 HRESULT SetThumbnail(
725 [in] IWICBitmapSource *pIThumbnail);
727 HRESULT SetPreview(
728 [in] IWICBitmapSource *pIPreview);
730 HRESULT CreateNewFrame(
731 [out] IWICBitmapFrameEncode **ppIFrameEncode,
732 [in, out, unique] IPropertyBag2 **ppIEncoderOptions);
734 HRESULT Commit();
736 HRESULT GetMetadataQueryWriter(
737 [out] IWICMetadataQueryWriter **ppIMetadataQueryWriter);
741 object,
742 uuid(00000301-a8f2-4877-ba0a-fd2b6645fb94)
744 interface IWICFormatConverter : IWICBitmapSource
746 HRESULT Initialize(
747 [in] IWICBitmapSource *pISource,
748 [in] REFWICPixelFormatGUID dstFormat,
749 [in] WICBitmapDitherType dither,
750 [in] IWICPalette *pIPalette,
751 [in] double alphaThresholdPercent,
752 [in] WICBitmapPaletteType paletteTranslate);
754 HRESULT CanConvert(
755 [in] REFWICPixelFormatGUID srcPixelFormat,
756 [in] REFWICPixelFormatGUID dstPixelFormat,
757 [out] BOOL *pfCanConvert);
761 object,
762 uuid(9f34fb65-13f4-4f15-bc57-3726b5e53d9f)
764 interface IWICFormatConverterInfo : IWICComponentInfo
766 HRESULT GetPixelFormats(
767 [in] UINT cFormats,
768 [in, out, size_is(cFormats)] WICPixelFormatGUID *pPixelFormatGUIDs,
769 [out] UINT *pcActual);
771 HRESULT CreateInstance(
772 [out] IWICFormatConverter **ppIConverter);
776 object,
777 uuid(135ff860-22b7-4ddf-b0f6-218f4f299a43)
779 interface IWICStream : IStream
781 HRESULT InitializeFromIStream(
782 [in] IStream *pIStream);
784 HRESULT InitializeFromFilename(
785 [in] LPCWSTR wzFileName,
786 [in] DWORD dwAccessMode);
788 HRESULT InitializeFromMemory(
789 [in, size_is(cbBufferSize)] BYTE *pbBuffer,
790 [in] DWORD cbBufferSize);
792 HRESULT InitializeFromIStreamRegion(
793 [in] IStream *pIStream,
794 [in] ULARGE_INTEGER ulOffset,
795 [in] ULARGE_INTEGER ulMaxSize);
799 object,
800 uuid(00000302-a8f2-4877-ba0a-fd2b6645fb94)
802 interface IWICBitmapScaler : IWICBitmapSource
804 HRESULT Initialize(
805 [in] IWICBitmapSource *pISource,
806 [in] UINT uiWidth,
807 [in] UINT uiHeight,
808 [in] WICBitmapInterpolationMode mode);
812 object,
813 uuid(e4fbcf03-223d-4e81-9333-d635556dd1b5)
815 interface IWICBitmapClipper : IWICBitmapSource
817 HRESULT Initialize(
818 [in] IWICBitmapSource *pISource,
819 [in] const WICRect *prc);
823 object,
824 uuid(b66f034f-d0e2-40ab-b436-6de39e321a94)
826 interface IWICColorTransform : IWICBitmapSource
828 HRESULT Initialize(
829 [in] IWICBitmapSource *pIBitmapSource,
830 [in] IWICColorContext *pIContextSource,
831 [in] IWICColorContext *pIContextDest,
832 [in] REFWICPixelFormatGUID pixelFmtDest);
836 object,
837 uuid(b84e2c09-78c9-4ac4-8bd3-524ae1663a2f)
839 interface IWICFastMetadataEncoder : IUnknown
841 HRESULT Commit();
843 HRESULT GetMetadataQueryWriter(
844 [out] IWICMetadataQueryWriter **ppIMetadataQueryWriter);
847 cpp_quote("DEFINE_GUID(CLSID_WICImagingFactory, 0xcacaf262,0x9370,0x4615,0xa1,0x3b,0x9f,0x55,0x39,0xda,0x4c,0x0a);")
850 object,
851 uuid(ec5ec8a9-c395-4314-9c77-54d7a935ff70)
853 interface IWICImagingFactory : IUnknown
855 HRESULT CreateDecoderFromFilename(
856 [in] LPCWSTR wzFilename,
857 [in, unique] const GUID *pguidVendor,
858 [in] DWORD dwDesiredAccess,
859 [in] WICDecodeOptions metadataOptions,
860 [out, retval] IWICBitmapDecoder **ppIDecoder);
862 HRESULT CreateDecoderFromStream(
863 [in] IStream *pIStream,
864 [in, unique] const GUID *pguidVendor,
865 [in] WICDecodeOptions metadataOptions,
866 [out, retval] IWICBitmapDecoder **ppIDecoder);
868 HRESULT CreateDecoderFromFileHandle(
869 [in] ULONG_PTR hFile,
870 [in, unique] const GUID *pguidVendor,
871 [in] WICDecodeOptions metadataOptions,
872 [out, retval] IWICBitmapDecoder **ppIDecoder);
874 HRESULT CreateComponentInfo(
875 [in] REFCLSID clsidComponent,
876 [out] IWICComponentInfo **ppIInfo);
878 HRESULT CreateDecoder(
879 [in] REFGUID guidContainerFormat,
880 [in, unique] const GUID *pguidVendor,
881 [out, retval] IWICBitmapDecoder **ppIDecoder);
883 HRESULT CreateEncoder(
884 [in] REFGUID guidContainerFormat,
885 [in, unique] const GUID *pguidVendor,
886 [out, retval] IWICBitmapEncoder **ppIEncoder);
888 HRESULT CreatePalette(
889 [out] IWICPalette **ppIPalette);
891 HRESULT CreateFormatConverter(
892 [out] IWICFormatConverter **ppIFormatConverter);
894 HRESULT CreateBitmapScaler(
895 [out] IWICBitmapScaler **ppIBitmapScaler);
897 HRESULT CreateBitmapClipper(
898 [out] IWICBitmapClipper **ppIBitmapClipper);
900 HRESULT CreateBitmapFlipRotator(
901 [out] IWICBitmapFlipRotator **ppIBitmapFlipRotator);
903 HRESULT CreateStream(
904 [out] IWICStream **ppIWICStream);
906 HRESULT CreateColorContext(
907 [out] IWICColorContext **ppIWICColorContext);
909 HRESULT CreateColorTransformer(
910 [out] IWICColorTransform **ppIWICColorTransform);
912 HRESULT CreateBitmap(
913 [in] UINT uiWidth,
914 [in] UINT uiHeight,
915 [in] REFWICPixelFormatGUID pixelFormat,
916 [in] WICBitmapCreateCacheOption option,
917 [out] IWICBitmap **ppIBitmap);
919 HRESULT CreateBitmapFromSource(
920 [in] IWICBitmapSource *piBitmapSource,
921 [in] WICBitmapCreateCacheOption option,
922 [out] IWICBitmap **ppIBitmap);
924 HRESULT CreateBitmapFromSourceRect(
925 [in] IWICBitmapSource *piBitmapSource,
926 [in] UINT x,
927 [in] UINT y,
928 [in] UINT width,
929 [in] UINT height,
930 [out] IWICBitmap **ppIBitmap);
932 HRESULT CreateBitmapFromMemory(
933 [in] UINT uiWidth,
934 [in] UINT uiHeight,
935 [in] REFWICPixelFormatGUID pixelFormat,
936 [in] UINT cbStride,
937 [in] UINT cbBufferSize,
938 [in, size_is(cbBufferSize)] BYTE *pbBuffer,
939 [out] IWICBitmap **ppIBitmap);
941 HRESULT CreateBitmapFromHBITMAP(
942 [in] HBITMAP hBitmap,
943 [in, unique] HPALETTE hPalette,
944 [in] WICBitmapAlphaChannelOption options,
945 [out] IWICBitmap **ppIBitmap);
947 HRESULT CreateBitmapFromHICON(
948 [in] HICON hIcon,
949 [out] IWICBitmap **ppIBitmap);
951 HRESULT CreateComponentEnumerator(
952 [in] DWORD componentTypes,
953 [in] DWORD options,
954 [out] IEnumUnknown **ppIEnumUnknown);
956 HRESULT CreateFastMetadataEncoderFromDecoder(
957 [in] IWICBitmapDecoder *pIDecoder,
958 [out] IWICFastMetadataEncoder **ppIFastEncoder);
960 HRESULT CreateFastMetadataEncoderFromFrameDecode(
961 [in] IWICBitmapFrameDecode *pIFrameDecoder,
962 [out] IWICFastMetadataEncoder **ppIFastEncoder);
964 HRESULT CreateQueryWriter(
965 [in] REFGUID guidMetadataFormat,
966 [in, unique] const GUID *pguidVendor,
967 [out] IWICMetadataQueryWriter **ppIQueryWriter);
969 HRESULT CreateQueryWriterFromReader(
970 [in] IWICMetadataQueryReader *pIQueryReader,
971 [in, unique] const GUID *pguidVendor,
972 [out] IWICMetadataQueryWriter **ppIQueryWriter);
976 local,
977 object,
978 uuid(dc2bb46d-3f07-481e-8625-220c4aedbb33)
980 interface IWICEnumMetadataItem : IUnknown
982 HRESULT Next(
983 [in] ULONG celt,
984 [in, out, unique, size_is(celt)] PROPVARIANT *rgeltSchema,
985 [in, out, size_is(celt)] PROPVARIANT *rgeltId,
986 [in, out, optional, size_is(celt)] PROPVARIANT *rgeltValue,
987 [out, optional] ULONG *pceltFetched);
989 HRESULT Skip(
990 [in] ULONG celt);
992 HRESULT Reset();
994 HRESULT Clone(
995 [out] IWICEnumMetadataItem **ppIEnumMetadataItem);
998 cpp_quote("HRESULT WINAPI WICConvertBitmapSource(REFWICPixelFormatGUID dstFormat, IWICBitmapSource *pISrc, IWICBitmapSource **ppIDst);")
1000 cpp_quote("DEFINE_GUID(CLSID_WICBmpDecoder, 0x6b462062,0x7cbf,0x400d,0x9f,0xdb,0x81,0x3d,0xd1,0x0f,0x27,0x78);")
1001 cpp_quote("DEFINE_GUID(CLSID_WICPngDecoder, 0x389ea17b,0x5078,0x4cde,0xb6,0xef,0x25,0xc1,0x51,0x75,0xc7,0x51);")
1002 cpp_quote("DEFINE_GUID(CLSID_WICIcoDecoder, 0xc61bfcdf,0x2e0f,0x4aad,0xa8,0xd7,0xe0,0x6b,0xaf,0xeb,0xcd,0xfe);")
1003 cpp_quote("DEFINE_GUID(CLSID_WICJpegDecoder, 0x9456a480,0xe88b,0x43ea,0x9e,0x73,0x0b,0x2d,0x9b,0x71,0xb1,0xca);")
1004 cpp_quote("DEFINE_GUID(CLSID_WICGifDecoder, 0x381dda3c,0x9ce9,0x4834,0xa2,0x3e,0x1f,0x98,0xf8,0xfc,0x52,0xbe);")
1005 cpp_quote("DEFINE_GUID(CLSID_WICTiffDecoder, 0xb54e85d9,0xfe23,0x499f,0x8b,0x88,0x6a,0xce,0xa7,0x13,0x75,0x2b);")
1006 cpp_quote("DEFINE_GUID(CLSID_WICWmpDecoder, 0xa26cec36,0x234c,0x4950,0xae,0x16,0xe3,0x4a,0xac,0xe7,0x1d,0x0d);")
1008 cpp_quote("DEFINE_GUID(CLSID_WICBmpEncoder, 0x69be8bb4,0xd66d,0x47c8,0x86,0x5a,0xed,0x15,0x89,0x43,0x37,0x82);")
1009 cpp_quote("DEFINE_GUID(CLSID_WICPngEncoder, 0x27949969,0x876a,0x41d7,0x94,0x47,0x56,0x8f,0x6a,0x35,0xa4,0xdc);")
1010 cpp_quote("DEFINE_GUID(CLSID_WICJpegEncoder, 0x1a34f5c1,0x4a5a,0x46dc,0xb6,0x44,0x1f,0x45,0x67,0xe7,0xa6,0x76);")
1011 cpp_quote("DEFINE_GUID(CLSID_WICGifEncoder, 0x114f5598,0x0b22,0x40a0,0x86,0xa1,0xc8,0x3e,0xa4,0x95,0xad,0xbd);")
1012 cpp_quote("DEFINE_GUID(CLSID_WICTiffEncoder, 0x0131be10,0x2001,0x4c5f,0xa9,0xb0,0xcc,0x88,0xfa,0xb6,0x4c,0xe8);")
1013 cpp_quote("DEFINE_GUID(CLSID_WICWmpEncoder, 0xac4ce3cb,0xe1c1,0x44cd,0x82,0x15,0x5a,0x16,0x65,0x50,0x9e,0xc2);")
1015 cpp_quote("DEFINE_GUID(CLSID_WICDefaultFormatConverter, 0x1a3f11dc,0xb514,0x4b17,0x8c,0x5f,0x21,0x54,0x51,0x38,0x52,0xf1);")
1017 cpp_quote("DEFINE_GUID(GUID_ContainerFormatBmp, 0x0af1d87e,0xfcfe,0x4188,0xbd,0xeb,0xa7,0x90,0x64,0x71,0xcb,0xe3);")
1018 cpp_quote("DEFINE_GUID(GUID_ContainerFormatPng, 0x1b7cfaf4,0x713f,0x473c,0xbb,0xcd,0x61,0x37,0x42,0x5f,0xae,0xaf);")
1019 cpp_quote("DEFINE_GUID(GUID_ContainerFormatIco, 0xa3a860c4,0x338f,0x4c17,0x91,0x9a,0xfb,0xa4,0xb5,0x62,0x8f,0x21);")
1020 cpp_quote("DEFINE_GUID(GUID_ContainerFormatJpeg, 0x19e4a5aa,0x5662,0x4fc5,0xa0,0xc0,0x17,0x58,0x02,0x8e,0x10,0x57);")
1021 cpp_quote("DEFINE_GUID(GUID_ContainerFormatTiff, 0x163bcc30,0xe2e9,0x4f0b,0x96,0x1d,0xa3,0xe9,0xfd,0xb7,0x88,0xa3);")
1022 cpp_quote("DEFINE_GUID(GUID_ContainerFormatGif, 0x1f8a5601,0x7d4d,0x4cbd,0x9c,0x82,0x1b,0xc8,0xd4,0xee,0xb9,0xa5);")
1023 cpp_quote("DEFINE_GUID(GUID_ContainerFormatWmp, 0x57a37caa,0x367a,0x4540,0x91,0x6b,0xf1,0x83,0xc5,0x09,0x3a,0x4b);")
1025 cpp_quote("DEFINE_GUID(GUID_VendorMicrosoft, 0xf0e749ca,0xedef,0x4589,0xa7,0x3a,0xee,0x0e,0x62,0x6a,0x2a,0x2b);")
1027 cpp_quote("DEFINE_GUID(CLSID_WICImagingCategories, 0xfae3d380,0xfea4,0x4623,0x8c,0x75,0xc6,0xb6,0x11,0x10,0xb6,0x81);")
1028 cpp_quote("DEFINE_GUID(CATID_WICBitmapDecoders, 0x7ed96837,0x96f0,0x4812,0xb2,0x11,0xf1,0x3c,0x24,0x11,0x7e,0xd3);")
1029 cpp_quote("DEFINE_GUID(CATID_WICBitmapEncoders, 0xac757296,0x3522,0x4e11,0x98,0x62,0xc1,0x7b,0xe5,0xa1,0x76,0x7e);")
1030 cpp_quote("DEFINE_GUID(CATID_WICFormatConverters, 0x7835eae8,0xbf14,0x49d1,0x93,0xce,0x53,0x3a,0x40,0x7b,0x22,0x48);")
1031 cpp_quote("DEFINE_GUID(CATID_WICMetadataReader, 0x05af94d8,0x7174,0x4cd2,0xbe,0x4a,0x41,0x24,0xb8,0x0e,0xe4,0xb8);")
1032 cpp_quote("DEFINE_GUID(CATID_WICPixelFormats, 0x2b46e70f,0xcda7,0x473e,0x89,0xf6,0xdc,0x96,0x30,0xa2,0x39,0x0b);")