user32/tests: Add a test for sending WM_SIZE message to edit control.
[wine.git] / include / wincodec.idl
blob639d92511e492ce02270ad7c22c3fa1a17e0e07a
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);")
196 cpp_quote("DEFINE_GUID(GUID_WICPixelFormat32bppRGB, 0xd98c6b95,0x3efe,0x47d6,0xbb,0x25,0xeb,0x17,0x48,0xab,0x0c,0xf1);")
197 cpp_quote("DEFINE_GUID(GUID_WICPixelFormat32bppRGBA, 0xf5c7ad2d,0x6a8d,0x43dd,0xa7,0xa8,0xa2,0x99,0x35,0x26,0x1a,0xe9);")
198 cpp_quote("DEFINE_GUID(GUID_WICPixelFormat32bppPRGBA, 0x3cc4a650,0xa527,0x4d37,0xa9,0x16,0x31,0x42,0xc7,0xeb,0xed,0xba);")
200 cpp_quote("DEFINE_GUID(GUID_WICPixelFormat48bppRGB, 0x6fddc324,0x4e03,0x4bfe,0xb1,0x85,0x3d,0x77,0x76,0x8d,0xc9,0x15);")
201 cpp_quote("DEFINE_GUID(GUID_WICPixelFormat64bppRGBA, 0x6fddc324,0x4e03,0x4bfe,0xb1,0x85,0x3d,0x77,0x76,0x8d,0xc9,0x16);")
202 cpp_quote("DEFINE_GUID(GUID_WICPixelFormat64bppPRGBA, 0x6fddc324,0x4e03,0x4bfe,0xb1,0x85,0x3d,0x77,0x76,0x8d,0xc9,0x17);")
204 cpp_quote("DEFINE_GUID(GUID_WICPixelFormat32bppCMYK, 0x6fddc324,0x4e03,0x4fbe,0xb1,0x85,0x3d,0x77,0x76,0x8d,0xc9,0x1c);")
206 typedef struct WICRect {
207 INT X;
208 INT Y;
209 INT Width;
210 INT Height;
211 } WICRect;
213 typedef struct WICBitmapPattern {
214 ULARGE_INTEGER Position;
215 ULONG Length;
216 BYTE *Pattern;
217 BYTE *Mask;
218 BOOL EndOfStream;
219 } WICBitmapPattern;
221 typedef UINT32 WICColor;
223 interface IWICPalette;
226 object,
227 uuid(3c613a02-34b2-44ea-9a7c-45aea9c6fd6d)
229 interface IWICColorContext : IUnknown
231 HRESULT InitializeFromFilename(
232 [in] LPCWSTR wzFilename);
234 HRESULT InitializeFromMemory(
235 [in, size_is(cbBufferSize)] const BYTE *pbBuffer,
236 [in] UINT cbBufferSize);
238 HRESULT InitializeFromExifColorSpace(
239 [in] UINT value);
241 HRESULT GetType(
242 [out] WICColorContextType *pType);
244 HRESULT GetProfileBytes(
245 [in] UINT cbBuffer,
246 [in, out, unique, size_is(cbBuffer)] BYTE *pbBuffer,
247 [out] UINT *pcbActual);
249 HRESULT GetExifColorSpace(
250 [out] UINT *pValue);
254 object,
255 uuid(00000120-a8f2-4877-ba0a-fd2b6645fb94)
257 interface IWICBitmapSource : IUnknown
259 HRESULT GetSize(
260 [out] UINT *puiWidth,
261 [out] UINT *puiHeight);
263 HRESULT GetPixelFormat(
264 [out] WICPixelFormatGUID *pPixelFormat);
266 HRESULT GetResolution(
267 [out] double *pDpiX,
268 [out] double *pDpiY);
270 HRESULT CopyPalette(
271 [in] IWICPalette *pIPalette);
273 HRESULT CopyPixels(
274 [in] const WICRect *prc,
275 [in] UINT cbStride,
276 [in] UINT cbBufferSize,
277 [out, size_is(cbBufferSize)] BYTE *pbBuffer);
281 object,
282 uuid(00000123-a8f2-4877-ba0a-fd2b6645fb94)
284 interface IWICBitmapLock : IUnknown
286 HRESULT GetSize(
287 [out] UINT *pWidth,
288 [out] UINT *pHeight);
290 HRESULT GetStride(
291 [out] UINT *pcbStride);
293 HRESULT GetDataPointer(
294 [out] UINT *pcbBufferSize,
295 [out, size_is(,*pcbBufferSize)] BYTE **ppbData);
297 HRESULT GetPixelFormat(
298 [out] WICPixelFormatGUID *pPixelFormat);
302 object,
303 uuid(5009834f-2d6a-41ce-9e1b-17c5aff7a782)
305 interface IWICBitmapFlipRotator : IWICBitmapSource
307 HRESULT Initialize(
308 [in] IWICBitmapSource *pISource,
309 [in] WICBitmapTransformOptions options);
313 object,
314 uuid(00000121-a8f2-4877-ba0a-fd2b6645fb94)
316 interface IWICBitmap : IWICBitmapSource
318 HRESULT Lock(
319 [in] const WICRect *prcLock,
320 [in] DWORD flags,
321 [out] IWICBitmapLock **ppILock);
323 HRESULT SetPalette(
324 [in] IWICPalette *pIPalette);
326 HRESULT SetResolution(
327 [in] double dpiX,
328 [in] double dpiY);
332 object,
333 uuid(00000040-a8f2-4877-ba0a-fd2b6645fb94)
335 interface IWICPalette : IUnknown
337 HRESULT InitializePredefined(
338 [in] WICBitmapPaletteType ePaletteType,
339 [in] BOOL fAddTransparentColor);
341 HRESULT InitializeCustom(
342 [in, size_is(colorCount)] WICColor *pColors,
343 [in] UINT colorCount);
345 HRESULT InitializeFromBitmap(
346 [in] IWICBitmapSource *pISurface,
347 [in] UINT colorCount,
348 [in] BOOL fAddTransparentColor);
350 HRESULT InitializeFromPalette(
351 [in] IWICPalette *pIPalette);
353 HRESULT GetType(
354 [out] WICBitmapPaletteType *pePaletteType);
356 HRESULT GetColorCount(
357 [out] UINT *pcCount);
359 HRESULT GetColors(
360 [in] UINT colorCount,
361 [out, size_is(colorCount)] WICColor *pColors,
362 [out] UINT *pcActualColors);
364 HRESULT IsBlackWhite(
365 [out] BOOL *pfIsBlackWhite);
367 HRESULT IsGrayscale(
368 [out] BOOL *pfIsGrayscale);
370 HRESULT HasAlpha(
371 [out] BOOL *pfHasAlpha);
375 object,
376 uuid(23bc3f0a-698b-4357-886b-f24d50671334)
378 interface IWICComponentInfo : IUnknown
380 HRESULT GetComponentType(
381 [out] WICComponentType *pType);
383 HRESULT GetCLSID(
384 [out] CLSID *pclsid);
386 HRESULT GetSigningStatus(
387 [out] DWORD *pStatus);
389 HRESULT GetAuthor(
390 [in] UINT cchAuthor,
391 [in, out, unique, size_is(cchAuthor)] WCHAR *wzAuthor,
392 [out] UINT *pcchActual);
394 HRESULT GetVendorGUID(
395 [out] GUID *pguidVendor);
397 HRESULT GetVersion(
398 [in] UINT cchVersion,
399 [in, out, unique, size_is(cchVersion)] WCHAR *wzVersion,
400 [out] UINT *pcchActual);
402 HRESULT GetSpecVersion(
403 [in] UINT cchSpecVersion,
404 [in, out, unique, size_is(cchSpecVersion)] WCHAR *wzSpecVersion,
405 [out] UINT *pcchActual);
407 HRESULT GetFriendlyName(
408 [in] UINT cchFriendlyName,
409 [in, out, unique, size_is(cchFriendlyName)] WCHAR *wzFriendlyName,
410 [out] UINT *pcchActual);
414 object,
415 uuid(30989668-e1c9-4597-b395-458eedb808df)
417 interface IWICMetadataQueryReader : IUnknown
419 HRESULT GetContainerFormat(
420 [out] GUID *pguidContainerFormat);
422 HRESULT GetLocation(
423 [in] UINT cchMaxLength,
424 [in, out, unique, size_is(cchMaxLength)] WCHAR *wzNamespace,
425 [out] UINT *pcchActualLength);
427 HRESULT GetMetadataByName(
428 [in] LPCWSTR wzName,
429 [in, out, unique] PROPVARIANT *pvarValue);
431 HRESULT GetEnumerator(
432 [out] IEnumString **ppIEnumString);
436 object,
437 uuid(a721791a-0def-4d06-bd91-2118bf1db10b)
439 interface IWICMetadataQueryWriter : IWICMetadataQueryReader
441 HRESULT SetMetadataByName(
442 [in] LPCWSTR wzName,
443 [in] const PROPVARIANT *pvarValue);
445 HRESULT RemoveMetadataByName(
446 [in] LPCWSTR wzName);
450 object,
451 uuid(3b16811b-6a43-4ec9-a813-3d930c13b940)
453 interface IWICBitmapFrameDecode : IWICBitmapSource
455 HRESULT GetMetadataQueryReader(
456 [out] IWICMetadataQueryReader **ppIMetadataQueryReader);
458 HRESULT GetColorContexts(
459 [in] UINT cCount,
460 [in, out, unique, size_is(cCount)] IWICColorContext **ppIColorContexts,
461 [out] UINT *pcActualCount);
463 HRESULT GetThumbnail(
464 [out] IWICBitmapSource **ppIThumbnail);
468 object,
469 uuid(e8eda601-3d48-431a-ab44-69059be88bbe)
471 interface IWICPixelFormatInfo : IWICComponentInfo
473 HRESULT GetFormatGUID(
474 [out] GUID* pFormat);
476 HRESULT GetColorContext(
477 [out] IWICColorContext **ppIColorContext);
479 HRESULT GetBitsPerPixel(
480 [out] UINT *puiBitsPerPixel);
482 HRESULT GetChannelCount(
483 [out] UINT *puiChannelCount);
485 HRESULT GetChannelMask(
486 [in] UINT uiChannelIndex,
487 [in] UINT cbMaskBuffer,
488 [in, out, unique, size_is(cbMaskBuffer)] BYTE *pbMaskBuffer,
489 [out] UINT *pcbActual);
493 object,
494 uuid(a9db33a2-af5f-43c7-b679-74f5984b5aa4)
496 interface IWICPixelFormatInfo2 : IWICPixelFormatInfo
498 HRESULT SupportsTransparency(
499 [out] BOOL *pfSupportsTransparency);
501 HRESULT GetNumericRepresentation(
502 [out] WICPixelFormatNumericRepresentation *pNumericRepresentation);
506 object,
507 uuid(e87a44c4-b76e-4c47-8b09-298eb12a2714)
509 interface IWICBitmapCodecInfo : IWICComponentInfo
511 HRESULT GetContainerFormat(
512 [out] GUID *pguidContainerFormat);
514 HRESULT GetPixelFormats(
515 [in] UINT cFormats,
516 [in, out, unique, size_is(cFormats)] GUID *pguidPixelFormats,
517 [out] UINT *pcActual);
519 HRESULT GetColorManagementVersion(
520 [in] UINT cchColorManagementVersion,
521 [in, out, unique, size_is(cchColorManagementVersion)] WCHAR *wzColorManagementVersion,
522 [out] UINT *pcchActual);
524 HRESULT GetDeviceManufacturer(
525 [in] UINT cchDeviceManufacturer,
526 [in, out, unique, size_is(cchDeviceManufacturer)] WCHAR *wzDeviceManufacturer,
527 [out] UINT *pcchActual);
529 HRESULT GetDeviceModels(
530 [in] UINT cchDeviceModels,
531 [in, out, unique, size_is(cchDeviceModels)] WCHAR *wzDeviceModels,
532 [out] UINT *pcchActual);
534 HRESULT GetMimeTypes(
535 [in] UINT cchMimeTypes,
536 [in, out, unique, size_is(cchMimeTypes)] WCHAR *wzMimeTypes,
537 [out] UINT *pcchActual);
539 HRESULT GetFileExtensions(
540 [in] UINT cchFileExtensions,
541 [in, out, unique, size_is(cchFileExtensions)] WCHAR *wzFileExtensions,
542 [out] UINT *pcchActual);
544 HRESULT DoesSupportAnimation(
545 [out] BOOL *pfSupportAnimation);
547 HRESULT DoesSupportChromaKey(
548 [out] BOOL *pfSupportChromaKey);
550 HRESULT DoesSupportLossless(
551 [out] BOOL *pfSupportLossless);
553 HRESULT DoesSupportMultiframe(
554 [out] BOOL *pfSupportMultiframe);
556 HRESULT MatchesMimeType(
557 [in] LPCWSTR wzMimeType,
558 [out] BOOL *pfMatches);
561 interface IWICBitmapDecoder;
564 object,
565 uuid(d8cd007f-d08f-4191-9bfc-236ea7f0e4b5)
567 interface IWICBitmapDecoderInfo : IWICBitmapCodecInfo
569 [local]
570 HRESULT GetPatterns(
571 [in] UINT cbSizePatterns,
572 [in, out, unique] WICBitmapPattern *pPatterns,
573 [in, out, unique] UINT *pcPatterns,
574 [in, out, unique] UINT *pcbPatternsActual);
576 HRESULT MatchesPattern(
577 [in] IStream *pIStream,
578 [out] BOOL *pfMatches);
580 HRESULT CreateInstance(
581 [out] IWICBitmapDecoder **ppIBitmapDecoder);
585 object,
586 uuid(9edde9e7-8dee-47ea-99df-e6faf2ed44bf)
588 interface IWICBitmapDecoder : IUnknown
590 HRESULT QueryCapability(
591 [in] IStream *pIStream,
592 [out] DWORD *pdwCapability);
594 HRESULT Initialize(
595 [in] IStream *pIStream,
596 [in] WICDecodeOptions cacheOptions);
598 HRESULT GetContainerFormat(
599 [out] GUID *pguidContainerFormat);
601 HRESULT GetDecoderInfo(
602 [out] IWICBitmapDecoderInfo **ppIDecoderInfo);
604 HRESULT CopyPalette(
605 [in] IWICPalette *pIPalette);
607 HRESULT GetMetadataQueryReader(
608 [out] IWICMetadataQueryReader **ppIMetadataQueryReader);
610 HRESULT GetPreview(
611 [out] IWICBitmapSource **ppIBitmapSource);
613 HRESULT GetColorContexts(
614 [in] UINT cCount,
615 [in, out, unique, size_is(cCount)] IWICColorContext **ppIColorContexts,
616 [out] UINT *pcActualCount);
618 HRESULT GetThumbnail(
619 [out] IWICBitmapSource **ppIThumbnail);
621 HRESULT GetFrameCount(
622 [out] UINT *pCount);
624 HRESULT GetFrame(
625 [in] UINT index,
626 [out] IWICBitmapFrameDecode **ppIBitmapFrame);
630 object,
631 uuid(00000105-a8f2-4877-ba0a-fd2b6645fb94)
633 interface IWICBitmapFrameEncode : IUnknown
635 HRESULT Initialize(
636 [in, unique] IPropertyBag2 *pIEncoderOptions);
638 HRESULT SetSize(
639 [in] UINT uiWidth,
640 [in] UINT uiHeight);
642 HRESULT SetResolution(
643 [in] double dpiX,
644 [in] double dpiY);
646 HRESULT SetPixelFormat(
647 [in, out] WICPixelFormatGUID *pPixelFormat);
649 HRESULT SetColorContexts(
650 [in] UINT cCount,
651 [in, size_is(cCount)] IWICColorContext **ppIColorContext);
653 HRESULT SetPalette(
654 [in] IWICPalette *pIPalette);
656 HRESULT SetThumbnail(
657 [in] IWICBitmapSource *pIThumbnail);
659 HRESULT WritePixels(
660 [in] UINT lineCount,
661 [in] UINT cbStride,
662 [in] UINT cbBufferSize,
663 [in, size_is(cbBufferSize)] BYTE *pbPixels);
665 HRESULT WriteSource(
666 [in] IWICBitmapSource *pIBitmapSource,
667 [in, unique] WICRect *prc);
669 HRESULT Commit();
671 HRESULT GetMetadataQueryWriter(
672 IWICMetadataQueryWriter **ppIMetadataQueryWriter);
675 interface IWICBitmapEncoder;
678 object,
679 uuid(94c9b4ee-a09f-4f92-8a1e-4a9bce7e76fb)
681 interface IWICBitmapEncoderInfo : IWICBitmapCodecInfo
683 HRESULT CreateInstance(
684 [out] IWICBitmapEncoder **ppIBitmapEncoder);
688 object,
689 uuid(00000103-a8f2-4877-ba0a-fd2b6645fb94)
691 interface IWICBitmapEncoder : IUnknown
693 HRESULT Initialize(
694 [in] IStream *pIStream,
695 [in] WICBitmapEncoderCacheOption cacheOption);
697 HRESULT GetContainerFormat(
698 [out] GUID *pguidContainerFormat);
700 HRESULT GetEncoderInfo(
701 [out] IWICBitmapEncoderInfo **ppIEncoderInfo);
703 HRESULT SetColorContexts(
704 [in] UINT cCount,
705 [in, size_is(cCount)] IWICColorContext **ppIColorContext);
707 HRESULT SetPalette(
708 [in] IWICPalette *pIPalette);
710 HRESULT SetThumbnail(
711 [in] IWICBitmapSource *pIThumbnail);
713 HRESULT SetPreview(
714 [in] IWICBitmapSource *pIPreview);
716 HRESULT CreateNewFrame(
717 [out] IWICBitmapFrameEncode **ppIFrameEncode,
718 [in, out, unique] IPropertyBag2 **ppIEncoderOptions);
720 HRESULT Commit();
722 HRESULT GetMetadataQueryWriter(
723 [out] IWICMetadataQueryWriter **ppIMetadataQueryWriter);
727 object,
728 uuid(00000301-a8f2-4877-ba0a-fd2b6645fb94)
730 interface IWICFormatConverter : IWICBitmapSource
732 HRESULT Initialize(
733 [in] IWICBitmapSource *pISource,
734 [in] REFWICPixelFormatGUID dstFormat,
735 [in] WICBitmapDitherType dither,
736 [in] IWICPalette *pIPalette,
737 [in] double alphaThresholdPercent,
738 [in] WICBitmapPaletteType paletteTranslate);
740 HRESULT CanConvert(
741 [in] REFWICPixelFormatGUID srcPixelFormat,
742 [in] REFWICPixelFormatGUID dstPixelFormat,
743 [out] BOOL *pfCanConvert);
747 object,
748 uuid(9f34fb65-13f4-4f15-bc57-3726b5e53d9f)
750 interface IWICFormatConverterInfo : IWICComponentInfo
752 HRESULT GetPixelFormats(
753 [in] UINT cFormats,
754 [in, out, size_is(cFormats)] WICPixelFormatGUID *pPixelFormatGUIDs,
755 [out] UINT *pcActual);
757 HRESULT CreateInstance(
758 [out] IWICFormatConverter **ppIConverter);
762 object,
763 uuid(135ff860-22b7-4ddf-b0f6-218f4f299a43)
765 interface IWICStream : IStream
767 HRESULT InitializeFromIStream(
768 [in] IStream *pIStream);
770 HRESULT InitializeFromFilename(
771 [in] LPCWSTR wzFileName,
772 [in] DWORD dwAccessMode);
774 HRESULT InitializeFromMemory(
775 [in, size_is(cbBufferSize)] BYTE *pbBuffer,
776 [in] DWORD cbBufferSize);
778 HRESULT InitializeFromIStreamRegion(
779 [in] IStream *pIStream,
780 [in] ULARGE_INTEGER ulOffset,
781 [in] ULARGE_INTEGER ulMaxSize);
785 object,
786 uuid(00000302-a8f2-4877-ba0a-fd2b6645fb94)
788 interface IWICBitmapScaler : IWICBitmapSource
790 HRESULT Initialize(
791 [in] IWICBitmapSource *pISource,
792 [in] UINT uiWidth,
793 [in] UINT uiHeight,
794 [in] WICBitmapInterpolationMode mode);
798 object,
799 uuid(e4fbcf03-223d-4e81-9333-d635556dd1b5)
801 interface IWICBitmapClipper : IWICBitmapSource
803 HRESULT Initialize(
804 [in] IWICBitmapSource *pISource,
805 [in] const WICRect *prc);
809 object,
810 uuid(b66f034f-d0e2-40ab-b436-6de39e321a94)
812 interface IWICColorTransform : IWICBitmapSource
814 HRESULT Initialize(
815 [in] IWICBitmapSource *pIBitmapSource,
816 [in] IWICColorContext *pIContextSource,
817 [in] IWICColorContext *pIContextDest,
818 [in] REFWICPixelFormatGUID pixelFmtDest);
822 object,
823 uuid(b84e2c09-78c9-4ac4-8bd3-524ae1663a2f)
825 interface IWICFastMetadataEncoder : IUnknown
827 HRESULT Commit();
829 HRESULT GetMetadataQueryWriter(
830 [out] IWICMetadataQueryWriter **ppIMetadataQueryWriter);
833 cpp_quote("DEFINE_GUID(CLSID_WICImagingFactory, 0xcacaf262,0x9370,0x4615,0xa1,0x3b,0x9f,0x55,0x39,0xda,0x4c,0x0a);")
836 object,
837 uuid(ec5ec8a9-c395-4314-9c77-54d7a935ff70)
839 interface IWICImagingFactory : IUnknown
841 HRESULT CreateDecoderFromFilename(
842 [in] LPCWSTR wzFilename,
843 [in, unique] const GUID *pguidVendor,
844 [in] DWORD dwDesiredAccess,
845 [in] WICDecodeOptions metadataOptions,
846 [out, retval] IWICBitmapDecoder **ppIDecoder);
848 HRESULT CreateDecoderFromStream(
849 [in] IStream *pIStream,
850 [in, unique] const GUID *pguidVendor,
851 [in] WICDecodeOptions metadataOptions,
852 [out, retval] IWICBitmapDecoder **ppIDecoder);
854 HRESULT CreateDecoderFromFileHandle(
855 [in] ULONG_PTR hFile,
856 [in, unique] const GUID *pguidVendor,
857 [in] WICDecodeOptions metadataOptions,
858 [out, retval] IWICBitmapDecoder **ppIDecoder);
860 HRESULT CreateComponentInfo(
861 [in] REFCLSID clsidComponent,
862 [out] IWICComponentInfo **ppIInfo);
864 HRESULT CreateDecoder(
865 [in] REFGUID guidContainerFormat,
866 [in, unique] const GUID *pguidVendor,
867 [out, retval] IWICBitmapDecoder **ppIDecoder);
869 HRESULT CreateEncoder(
870 [in] REFGUID guidContainerFormat,
871 [in, unique] const GUID *pguidVendor,
872 [out, retval] IWICBitmapEncoder **ppIEncoder);
874 HRESULT CreatePalette(
875 [out] IWICPalette **ppIPalette);
877 HRESULT CreateFormatConverter(
878 [out] IWICFormatConverter **ppIFormatConverter);
880 HRESULT CreateBitmapScaler(
881 [out] IWICBitmapScaler **ppIBitmapScaler);
883 HRESULT CreateBitmapClipper(
884 [out] IWICBitmapClipper **ppIBitmapClipper);
886 HRESULT CreateBitmapFlipRotator(
887 [out] IWICBitmapFlipRotator **ppIBitmapFlipRotator);
889 HRESULT CreateStream(
890 [out] IWICStream **ppIWICStream);
892 HRESULT CreateColorContext(
893 [out] IWICColorContext **ppIWICColorContext);
895 HRESULT CreateColorTransformer(
896 [out] IWICColorTransform **ppIWICColorTransform);
898 HRESULT CreateBitmap(
899 [in] UINT uiWidth,
900 [in] UINT uiHeight,
901 [in] REFWICPixelFormatGUID pixelFormat,
902 [in] WICBitmapCreateCacheOption option,
903 [out] IWICBitmap **ppIBitmap);
905 HRESULT CreateBitmapFromSource(
906 [in] IWICBitmapSource *piBitmapSource,
907 [in] WICBitmapCreateCacheOption option,
908 [out] IWICBitmap **ppIBitmap);
910 HRESULT CreateBitmapFromSourceRect(
911 [in] IWICBitmapSource *piBitmapSource,
912 [in] UINT x,
913 [in] UINT y,
914 [in] UINT width,
915 [in] UINT height,
916 [out] IWICBitmap **ppIBitmap);
918 HRESULT CreateBitmapFromMemory(
919 [in] UINT uiWidth,
920 [in] UINT uiHeight,
921 [in] REFWICPixelFormatGUID pixelFormat,
922 [in] UINT cbStride,
923 [in] UINT cbBufferSize,
924 [in, size_is(cbBufferSize)] BYTE *pbBuffer,
925 [out] IWICBitmap **ppIBitmap);
927 HRESULT CreateBitmapFromHBITMAP(
928 [in] HBITMAP hBitmap,
929 [in, unique] HPALETTE hPalette,
930 [in] WICBitmapAlphaChannelOption options,
931 [out] IWICBitmap **ppIBitmap);
933 HRESULT CreateBitmapFromHICON(
934 [in] HICON hIcon,
935 [out] IWICBitmap **ppIBitmap);
937 HRESULT CreateComponentEnumerator(
938 [in] DWORD componentTypes,
939 [in] DWORD options,
940 [out] IEnumUnknown **ppIEnumUnknown);
942 HRESULT CreateFastMetadataEncoderFromDecoder(
943 [in] IWICBitmapDecoder *pIDecoder,
944 [out] IWICFastMetadataEncoder **ppIFastEncoder);
946 HRESULT CreateFastMetadataEncoderFromFrameDecode(
947 [in] IWICBitmapFrameDecode *pIFrameDecoder,
948 [out] IWICFastMetadataEncoder **ppIFastEncoder);
950 HRESULT CreateQueryWriter(
951 [in] REFGUID guidMetadataFormat,
952 [in, unique] const GUID *pguidVendor,
953 [out] IWICMetadataQueryWriter **ppIQueryWriter);
955 HRESULT CreateQueryWriterFromReader(
956 [in] IWICMetadataQueryReader *pIQueryReader,
957 [in, unique] const GUID *pguidVendor,
958 [out] IWICMetadataQueryWriter **ppIQueryWriter);
962 local,
963 object,
964 uuid(dc2bb46d-3f07-481e-8625-220c4aedbb33)
966 interface IWICEnumMetadataItem : IUnknown
968 HRESULT Next(
969 [in] ULONG celt,
970 [in, out, unique, size_is(celt)] PROPVARIANT *rgeltSchema,
971 [in, out, size_is(celt)] PROPVARIANT *rgeltId,
972 [in, out, optional, size_is(celt)] PROPVARIANT *rgeltValue,
973 [out, optional] ULONG *pceltFetched);
975 HRESULT Skip(
976 [in] ULONG celt);
978 HRESULT Reset();
980 HRESULT Clone(
981 [out] IWICEnumMetadataItem **ppIEnumMetadataItem);
984 cpp_quote("HRESULT WINAPI WICConvertBitmapSource(REFWICPixelFormatGUID dstFormat, IWICBitmapSource *pISrc, IWICBitmapSource **ppIDst);")
986 cpp_quote("DEFINE_GUID(CLSID_WICBmpDecoder, 0x6b462062,0x7cbf,0x400d,0x9f,0xdb,0x81,0x3d,0xd1,0x0f,0x27,0x78);")
987 cpp_quote("DEFINE_GUID(CLSID_WICPngDecoder, 0x389ea17b,0x5078,0x4cde,0xb6,0xef,0x25,0xc1,0x51,0x75,0xc7,0x51);")
988 cpp_quote("DEFINE_GUID(CLSID_WICIcoDecoder, 0xc61bfcdf,0x2e0f,0x4aad,0xa8,0xd7,0xe0,0x6b,0xaf,0xeb,0xcd,0xfe);")
989 cpp_quote("DEFINE_GUID(CLSID_WICJpegDecoder, 0x9456a480,0xe88b,0x43ea,0x9e,0x73,0x0b,0x2d,0x9b,0x71,0xb1,0xca);")
990 cpp_quote("DEFINE_GUID(CLSID_WICGifDecoder, 0x381dda3c,0x9ce9,0x4834,0xa2,0x3e,0x1f,0x98,0xf8,0xfc,0x52,0xbe);")
991 cpp_quote("DEFINE_GUID(CLSID_WICTiffDecoder, 0xb54e85d9,0xfe23,0x499f,0x8b,0x88,0x6a,0xce,0xa7,0x13,0x75,0x2b);")
992 cpp_quote("DEFINE_GUID(CLSID_WICWmpDecoder, 0xa26cec36,0x234c,0x4950,0xae,0x16,0xe3,0x4a,0xac,0xe7,0x1d,0x0d);")
994 cpp_quote("DEFINE_GUID(CLSID_WICBmpEncoder, 0x69be8bb4,0xd66d,0x47c8,0x86,0x5a,0xed,0x15,0x89,0x43,0x37,0x82);")
995 cpp_quote("DEFINE_GUID(CLSID_WICPngEncoder, 0x27949969,0x876a,0x41d7,0x94,0x47,0x56,0x8f,0x6a,0x35,0xa4,0xdc);")
996 cpp_quote("DEFINE_GUID(CLSID_WICJpegEncoder, 0x1a34f5c1,0x4a5a,0x46dc,0xb6,0x44,0x1f,0x45,0x67,0xe7,0xa6,0x76);")
997 cpp_quote("DEFINE_GUID(CLSID_WICGifEncoder, 0x114f5598,0x0b22,0x40a0,0x86,0xa1,0xc8,0x3e,0xa4,0x95,0xad,0xbd);")
998 cpp_quote("DEFINE_GUID(CLSID_WICTiffEncoder, 0x0131be10,0x2001,0x4c5f,0xa9,0xb0,0xcc,0x88,0xfa,0xb6,0x4c,0xe8);")
999 cpp_quote("DEFINE_GUID(CLSID_WICWmpEncoder, 0xac4ce3cb,0xe1c1,0x44cd,0x82,0x15,0x5a,0x16,0x65,0x50,0x9e,0xc2);")
1001 cpp_quote("DEFINE_GUID(CLSID_WICDefaultFormatConverter, 0x1a3f11dc,0xb514,0x4b17,0x8c,0x5f,0x21,0x54,0x51,0x38,0x52,0xf1);")
1003 cpp_quote("DEFINE_GUID(GUID_ContainerFormatBmp, 0x0af1d87e,0xfcfe,0x4188,0xbd,0xeb,0xa7,0x90,0x64,0x71,0xcb,0xe3);")
1004 cpp_quote("DEFINE_GUID(GUID_ContainerFormatPng, 0x1b7cfaf4,0x713f,0x473c,0xbb,0xcd,0x61,0x37,0x42,0x5f,0xae,0xaf);")
1005 cpp_quote("DEFINE_GUID(GUID_ContainerFormatIco, 0xa3a860c4,0x338f,0x4c17,0x91,0x9a,0xfb,0xa4,0xb5,0x62,0x8f,0x21);")
1006 cpp_quote("DEFINE_GUID(GUID_ContainerFormatJpeg, 0x19e4a5aa,0x5662,0x4fc5,0xa0,0xc0,0x17,0x58,0x02,0x8e,0x10,0x57);")
1007 cpp_quote("DEFINE_GUID(GUID_ContainerFormatTiff, 0x163bcc30,0xe2e9,0x4f0b,0x96,0x1d,0xa3,0xe9,0xfd,0xb7,0x88,0xa3);")
1008 cpp_quote("DEFINE_GUID(GUID_ContainerFormatGif, 0x1f8a5601,0x7d4d,0x4cbd,0x9c,0x82,0x1b,0xc8,0xd4,0xee,0xb9,0xa5);")
1009 cpp_quote("DEFINE_GUID(GUID_ContainerFormatWmp, 0x57a37caa,0x367a,0x4540,0x91,0x6b,0xf1,0x83,0xc5,0x09,0x3a,0x4b);")
1011 cpp_quote("DEFINE_GUID(GUID_VendorMicrosoft, 0xf0e749ca,0xedef,0x4589,0xa7,0x3a,0xee,0x0e,0x62,0x6a,0x2a,0x2b);")
1013 cpp_quote("DEFINE_GUID(CLSID_WICImagingCategories, 0xfae3d380,0xfea4,0x4623,0x8c,0x75,0xc6,0xb6,0x11,0x10,0xb6,0x81);")
1014 cpp_quote("DEFINE_GUID(CATID_WICBitmapDecoders, 0x7ed96837,0x96f0,0x4812,0xb2,0x11,0xf1,0x3c,0x24,0x11,0x7e,0xd3);")
1015 cpp_quote("DEFINE_GUID(CATID_WICBitmapEncoders, 0xac757296,0x3522,0x4e11,0x98,0x62,0xc1,0x7b,0xe5,0xa1,0x76,0x7e);")
1016 cpp_quote("DEFINE_GUID(CATID_WICFormatConverters, 0x7835eae8,0xbf14,0x49d1,0x93,0xce,0x53,0x3a,0x40,0x7b,0x22,0x48);")
1017 cpp_quote("DEFINE_GUID(CATID_WICMetadataReader, 0x05af94d8,0x7174,0x4cd2,0xbe,0x4a,0x41,0x24,0xb8,0x0e,0xe4,0xb8);")
1018 cpp_quote("DEFINE_GUID(CATID_WICPixelFormats, 0x2b46e70f,0xcda7,0x473e,0x89,0xf6,0xdc,0x96,0x30,0xa2,0x39,0x0b);")