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
24 #define CODEC_FORCE_DWORD 0x7fffffff
26 typedef enum WICDecodeOptions {
27 WICDecodeMetadataCacheOnDemand = 0x00000000,
28 WICDecodeMetadataCacheOnLoad = 0x00000001,
29 WICMETADATACACHEOPTION_FORCE_DWORD = CODEC_FORCE_DWORD
32 typedef enum WICBitmapCreateCacheOption {
33 WICBitmapNoCache = 0x00000000,
34 WICBitmapCacheOnDemand = 0x00000001,
35 WICBitmapCacheOnLoad = 0x00000002,
36 WICBITMAPCREATECACHEOPTION_FORCE_DWORD = CODEC_FORCE_DWORD
37 } WICBitmapCreateCacheOption;
39 typedef enum WICBitmapAlphaChannelOption {
40 WICBitmapUseAlpha = 0x00000000,
41 WICBitmapUsePremultipliedAlpha = 0x00000001,
42 WICBitmapIgnoreAlpha = 0x00000002,
43 WICBITMAPALPHACHANNELOPTIONS_FORCE_DWORD = CODEC_FORCE_DWORD
44 } WICBitmapAlphaChannelOption;
46 typedef enum WICBitmapDecoderCapabilities {
47 WICBitmapDecoderCapabilitySameEncoder = 0x00000001,
48 WICBitmapDecoderCapabilityCanDecodeAllImages = 0x00000002,
49 WICBitmapDecoderCapabilityCanDecodeSomeImages = 0x00000004,
50 WICBitmapDecoderCapabilityCanEnumerateMetadata = 0x00000008,
51 WICBitmapDecoderCapabilityCanDecodeThumbnail = 0x00000010,
52 } WICBitmapDecoderCapabilities;
54 typedef enum WICBitmapDitherType {
55 WICBitmapDitherTypeNone = 0x00000000,
56 WICBitmapDitherTypeSolid = 0x00000000,
57 WICBitmapDitherTypeOrdered4x4 = 0x00000001,
58 WICBitmapDitherTypeOrdered8x8 = 0x00000002,
59 WICBitmapDitherTypeOrdered16x16 = 0x00000003,
60 WICBitmapDitherTypeSpiral4x4 = 0x00000004,
61 WICBitmapDitherTypeSpiral8x8 = 0x00000005,
62 WICBitmapDitherTypeDualSpiral4x4 = 0x00000006,
63 WICBitmapDitherTypeDualSpiral8x8 = 0x00000007,
64 WICBitmapDitherTypeErrorDiffusion = 0x00000008,
65 WICBITMAPDITHERTYPE_FORCE_DWORD = CODEC_FORCE_DWORD
66 } WICBitmapDitherType;
68 typedef enum WICBitmapEncoderCacheOption {
69 WICBitmapEncoderCacheInMemory = 0x00000000,
70 WICBitmapEncoderCacheTempFile = 0x00000001,
71 WICBitmapEncoderNoCache = 0x00000002,
72 WICBITMAPENCODERCACHEOPTION_FORCE_DWORD = CODEC_FORCE_DWORD
73 } WICBitmapEncoderCacheOption;
75 typedef enum WICBitmapInterpolationMode {
76 WICBitmapInterpolationModeNearestNeighbor = 0x00000000,
77 WICBitmapInterpolationModeLinear = 0x00000001,
78 WICBitmapInterpolationModeCubic = 0x00000002,
79 WICBitmapInterpolationModeFaint = 0x00000003,
80 WICBITMAPINTERPOLATIONMODE_FORCE_DWORD = CODEC_FORCE_DWORD
81 } WICBitmapInterpolationMode;
83 typedef enum WICBitmapPaletteType {
84 WICBitmapPaletteTypeCustom = 0x00000000,
85 WICBitmapPaletteTypeMedianCut = 0x00000001,
86 WICBitmapPaletteTypeFixedBW = 0x00000002,
87 WICBitmapPaletteTypeFixedHalftone8 = 0x00000003,
88 WICBitmapPaletteTypeFixedHalftone27 = 0x00000004,
89 WICBitmapPaletteTypeFixedHalftone64 = 0x00000005,
90 WICBitmapPaletteTypeFixedHalftone125 = 0x00000006,
91 WICBitmapPaletteTypeFixedHalftone216 = 0x00000007,
92 WICBitmapPaletteTypeFixedWebPalette = WICBitmapPaletteTypeFixedHalftone216,
93 WICBitmapPaletteTypeFixedHalftone252 = 0x00000008,
94 WICBitmapPaletteTypeFixedHalftone256 = 0x00000009,
95 WICBitmapPaletteTypeFixedGray4 = 0x0000000A,
96 WICBitmapPaletteTypeFixedGray16 = 0x0000000B,
97 WICBitmapPaletteTypeFixedGray256 = 0x0000000C,
98 WICBITMAPPALETTETYPE_FORCE_DWORD = CODEC_FORCE_DWORD
99 } WICBitmapPaletteType;
101 typedef enum WICBitmapTransformOptions {
102 WICBitmapTransformRotate0 = 0x00000000,
103 WICBitmapTransformRotate90 = 0x00000001,
104 WICBitmapTransformRotate180 = 0x00000002,
105 WICBitmapTransformRotate270 = 0x00000003,
106 WICBitmapTransformFlipHorizontal = 0x00000008,
107 WICBitmapTransformFlipVertical = 0x00000010,
108 WICBITMAPTRANSFORMOPTIONS_FORCE_DWORD = CODEC_FORCE_DWORD
109 } WICBitmapTransformOptions;
111 typedef enum WICColorContextType {
112 WICColorContextUninitialized = 0x00000000,
113 WICColorContextProfile = 0x00000001,
114 WICColorContextExifColorSpace = 0x00000002
115 } WICColorContextType;
117 typedef enum WICComponentType {
118 WICDecoder = 0x00000001,
119 WICEncoder = 0x00000002,
120 WICPixelFormatConverter = 0x00000004,
121 WICMetadataReader = 0x00000008,
122 WICMetadataWriter = 0x00000010,
123 WICPixelFormat = 0x00000020,
124 WICCOMPONENTTYPE_FORCE_DWORD = CODEC_FORCE_DWORD
127 typedef enum WICComponentSigning {
128 WICComponentSigned = 0x00000001,
129 WICComponentUnsigned = 0x00000002,
130 WICComponentSafe = 0x00000004,
131 WICComponentDisabled = 0x80000000
132 } WICComponentSigning;
134 typedef enum WICComponentEnumerateOptions {
135 WICComponentEnumerateDefault = 0x00000000,
136 WICComponentEnumerateRefresh = 0x00000001,
137 WICComponentEnumerateBuiltInOnly = 0x20000000,
138 WICComponentEnumerateUnsigned = 0x40000000,
139 WICComponentEnumerateDisabled = 0x80000000
140 } WICComponentEnumerateOptions;
142 typedef GUID WICPixelFormatGUID;
143 typedef REFGUID REFWICPixelFormatGUID;
145 cpp_quote("DEFINE_GUID(GUID_WICPixelFormatDontCare, 0x6fddc324,0x4e03,0x4bfe,0xb1,0x85,0x3d,0x77,0x76,0x8d,0xc9,0x00);")
146 cpp_quote("#define GUID_WICPixelFormatUndefined GUID_WICPixelFormatDontCare")
148 cpp_quote("DEFINE_GUID(GUID_WICPixelFormat1bppIndexed, 0x6fddc324,0x4e03,0x4bfe,0xb1,0x85,0x3d,0x77,0x76,0x8d,0xc9,0x01);")
149 cpp_quote("DEFINE_GUID(GUID_WICPixelFormat2bppIndexed, 0x6fddc324,0x4e03,0x4bfe,0xb1,0x85,0x3d,0x77,0x76,0x8d,0xc9,0x02);")
150 cpp_quote("DEFINE_GUID(GUID_WICPixelFormat4bppIndexed, 0x6fddc324,0x4e03,0x4bfe,0xb1,0x85,0x3d,0x77,0x76,0x8d,0xc9,0x03);")
151 cpp_quote("DEFINE_GUID(GUID_WICPixelFormat8bppIndexed, 0x6fddc324,0x4e03,0x4bfe,0xb1,0x85,0x3d,0x77,0x76,0x8d,0xc9,0x04);")
153 cpp_quote("DEFINE_GUID(GUID_WICPixelFormatBlackWhite, 0x6fddc324,0x4e03,0x4bfe,0xb1,0x85,0x3d,0x77,0x76,0x8d,0xc9,0x05);")
154 cpp_quote("DEFINE_GUID(GUID_WICPixelFormat2bppGray, 0x6fddc324,0x4e03,0x4bfe,0xb1,0x85,0x3d,0x77,0x76,0x8d,0xc9,0x06);")
155 cpp_quote("DEFINE_GUID(GUID_WICPixelFormat4bppGray, 0x6fddc324,0x4e03,0x4bfe,0xb1,0x85,0x3d,0x77,0x76,0x8d,0xc9,0x07);")
156 cpp_quote("DEFINE_GUID(GUID_WICPixelFormat8bppGray, 0x6fddc324,0x4e03,0x4bfe,0xb1,0x85,0x3d,0x77,0x76,0x8d,0xc9,0x08);")
157 cpp_quote("DEFINE_GUID(GUID_WICPixelFormat16bppGray, 0x6fddc324,0x4e03,0x4bfe,0xb1,0x85,0x3d,0x77,0x76,0x8d,0xc9,0x0b);")
159 cpp_quote("DEFINE_GUID(GUID_WICPixelFormat16bppBGR555, 0x6fddc324,0x4e03,0x4bfe,0xb1,0x85,0x3d,0x77,0x76,0x8d,0xc9,0x09);")
160 cpp_quote("DEFINE_GUID(GUID_WICPixelFormat16bppBGR565, 0x6fddc324,0x4e03,0x4bfe,0xb1,0x85,0x3d,0x77,0x76,0x8d,0xc9,0x0a);")
161 cpp_quote("DEFINE_GUID(GUID_WICPixelFormat24bppBGR, 0x6fddc324,0x4e03,0x4bfe,0xb1,0x85,0x3d,0x77,0x76,0x8d,0xc9,0x0c);")
162 cpp_quote("DEFINE_GUID(GUID_WICPixelFormat32bppBGR, 0x6fddc324,0x4e03,0x4bfe,0xb1,0x85,0x3d,0x77,0x76,0x8d,0xc9,0x0e);")
163 cpp_quote("DEFINE_GUID(GUID_WICPixelFormat32bppBGRA, 0x6fddc324,0x4e03,0x4bfe,0xb1,0x85,0x3d,0x77,0x76,0x8d,0xc9,0x0f);")
164 cpp_quote("DEFINE_GUID(GUID_WICPixelFormat32bppPBGRA, 0x6fddc324,0x4e03,0x4bfe,0xb1,0x85,0x3d,0x77,0x76,0x8d,0xc9,0x10);")
166 cpp_quote("DEFINE_GUID(GUID_WICPixelFormat48bppRGB, 0x6fddc324,0x4e03,0x4bfe,0xb1,0x85,0x3d,0x77,0x76,0x8d,0xc9,0x15);")
167 cpp_quote("DEFINE_GUID(GUID_WICPixelFormat64bppRGBA, 0x6fddc324,0x4e03,0x4bfe,0xb1,0x85,0x3d,0x77,0x76,0x8d,0xc9,0x16);")
169 typedef struct WICRect {
176 typedef struct WICBitmapPattern {
177 ULARGE_INTEGER Position;
184 typedef UINT32 WICColor;
186 cpp_quote("#define WINCODEC_ERR_WRONGSTATE 0x88982f04")
187 cpp_quote("#define WINCODEC_ERR_VALUEOUTOFRANGE 0x88982f05")
188 cpp_quote("#define WINCODEC_ERR_NOTINITIALIZED 0x88982f0c")
189 cpp_quote("#define WINCODEC_ERR_CODECNOTHUMBNAIL 0x88982f44")
190 cpp_quote("#define WINCODEC_ERR_PALETTEUNAVAILABLE 0x88982f45")
191 cpp_quote("#define WINCODEC_ERR_COMPONENTNOTFOUND 0x88982f50")
192 cpp_quote("#define WINCODEC_ERR_FRAMEMISSING 0x88982f62")
193 cpp_quote("#define WINCODEC_ERR_UNSUPPORTEDPIXELFORMAT 0x88982f80")
194 cpp_quote("#define WINCODEC_ERR_UNSUPPORTEDOPERATION 0x88982f81")
195 cpp_quote("#define WINCODEC_ERR_INSUFFICIENTBUFFER 0x88982f8c")
197 interface IWICPalette;
198 interface IWICColorTransform;
199 interface IWICFastMetadataEncoder;
200 interface IWICMetadataQueryReader;
201 interface IWICMetadataQueryWriter;
205 uuid(3c613a02-34b2-44ea-9a7c-45aea9c6fd6d)
207 interface IWICColorContext : IUnknown
209 HRESULT InitializeFromFilename(
210 [in] LPCWSTR wzFilename);
212 HRESULT InitializeFromMemory(
213 [in, size_is(cbBufferSize)] const BYTE *pbBuffer,
214 [in] UINT cbBufferSize);
216 HRESULT InitializeFromExifColorSpace(
220 [out] WICColorContextType *pType);
222 HRESULT GetProfileBytes(
224 [in, out, unique, size_is(cbBuffer)] BYTE *pbBuffer,
225 [out] UINT *pcbActual);
227 HRESULT GetExifColorSpace(
233 uuid(00000120-a8f2-4877-ba0a-fd2b6645fb94)
235 interface IWICBitmapSource : IUnknown
238 [out] UINT *puiWidth,
239 [out] UINT *puiHeight);
241 HRESULT GetPixelFormat(
242 [out] WICPixelFormatGUID *pPixelFormat);
244 HRESULT GetResolution(
246 [out] double *pDpiY);
249 [in] IWICPalette *pIPalette);
252 [in] const WICRect *prc,
254 [in] UINT cbBufferSize,
255 [out, size_is(cbBufferSize)] BYTE *pbBuffer);
260 uuid(00000123-a8f2-4877-ba0a-fd2b6645fb94)
262 interface IWICBitmapLock : IUnknown
266 [out] UINT *pHeight);
269 [out] UINT *pcbStride);
271 HRESULT GetDataPointer(
272 [out] UINT *pcbBufferSize,
273 [out, size_is(,*pcbBufferSize)] BYTE **ppbData);
275 HRESULT GetPixelFormat(
276 [out] WICPixelFormatGUID *pPixelFormat);
281 uuid(5009834f-2d6a-41ce-9e1b-17c5aff7a782)
283 interface IWICBitmapFlipRotator : IWICBitmapSource
286 [in] IWICBitmapSource *pISource,
287 [in] WICBitmapTransformOptions options);
292 uuid(00000121-a8f2-4877-ba0a-fd2b6645fb94)
294 interface IWICBitmap : IWICBitmapSource
297 [in] const WICRect *prcLock,
299 [out] IWICBitmapLock **ppILock);
302 [in] IWICPalette *pIPalette);
304 HRESULT SetResolution(
311 uuid(00000040-a8f2-4877-ba0a-fd2b6645fb94)
313 interface IWICPalette : IUnknown
315 HRESULT InitializePredefined(
316 [in] WICBitmapPaletteType ePaletteType,
317 [in] BOOL fAddTransparentColor);
319 HRESULT InitializeCustom(
320 [in, size_is(colorCount)] WICColor *pColors,
321 [in] UINT colorCount);
323 HRESULT InitializeFromBitmap(
324 [in] IWICBitmapSource *pISurface,
325 [in] UINT colorCount,
326 [in] BOOL fAddTransparentColor);
328 HRESULT InitializeFromPalette(
329 [in] IWICPalette *pIPalette);
332 [out] WICBitmapPaletteType *pePaletteType);
334 HRESULT GetColorCount(
335 [out] UINT *pcCount);
338 [in] UINT colorCount,
339 [out, size_is(colorCount)] WICColor *pColors,
340 [out] UINT *pcActualColors);
342 HRESULT IsBlackWhite(
343 [out] BOOL *pfIsBlackWhite);
346 [out] BOOL *pfIsGrayscale);
349 [out] BOOL *pfHasAlpha);
354 uuid(23bc3f0a-698b-4357-886b-f24d50671334)
356 interface IWICComponentInfo : IUnknown
358 HRESULT GetComponentType(
359 [out] WICComponentType *pType);
362 [out] CLSID *pclsid);
364 HRESULT GetSigningStatus(
365 [out] DWORD *pStatus);
369 [in, out, unique, size_is(cchAuthor)] WCHAR *wzAuthor,
370 [out] UINT *pcchActual);
372 HRESULT GetVendorGUID(
373 [out] GUID *pguidVendor);
376 [in] UINT cchVersion,
377 [in, out, unique, size_is(cchVersion)] WCHAR *wzVersion,
378 [out] UINT *pcchActual);
380 HRESULT GetSpecVersion(
381 [in] UINT cchSpecVersion,
382 [in, out, unique, size_is(cchSpecVersion)] WCHAR *wzSpecVersion,
383 [out] UINT *pcchActual);
385 HRESULT GetFriendlyName(
386 [in] UINT cchFriendlyName,
387 [in, out, unique, size_is(cchFriendlyName)] WCHAR *wzFriendlyName,
388 [out] UINT *pcchActual);
393 uuid(3b16811b-6a43-4ec9-a813-3d930c13b940)
395 interface IWICBitmapFrameDecode : IWICBitmapSource
397 HRESULT GetMetadataQueryReader(
398 [out] IWICMetadataQueryReader **ppIMetadataQueryReader);
400 HRESULT GetColorContexts(
402 [in, out, unique, size_is(cCount)] IWICColorContext **ppIColorContexts,
403 [out] UINT *pcActualCount);
405 HRESULT GetThumbnail(
406 [out] IWICBitmapSource **ppIThumbnail);
411 uuid(e87a44c4-b76e-4c47-8b09-298eb12a2714)
413 interface IWICBitmapCodecInfo : IWICComponentInfo
415 HRESULT GetContainerFormat(
416 [out] GUID *pguidContainerFormat);
418 HRESULT GetPixelFormats(
420 [in, out, unique, size_is(cFormats)] GUID *pguidPixelFormats,
421 [out] UINT *pcActual);
423 HRESULT GetColorManagementVersion(
424 [in] UINT cchColorManagementVersion,
425 [in, out, unique, size_is(cchColorManagementVersion)] WCHAR *wzColorManagementVersion,
426 [out] UINT *pcchActual);
428 HRESULT GetDeviceManufacturer(
429 [in] UINT cchDeviceManufacturer,
430 [in, out, unique, size_is(cchDeviceManufacturer)] WCHAR *wzDeviceManufacturer,
431 [out] UINT *pcchActual);
433 HRESULT GetDeviceModels(
434 [in] UINT cchDeviceModels,
435 [in, out, unique, size_is(cchDeviceModels)] WCHAR *wzDeviceModels,
436 [out] UINT *pcchActual);
438 HRESULT GetMimeTypes(
439 [in] UINT cchMimeTypes,
440 [in, out, unique, size_is(cchMimeTypes)] WCHAR *wzMimeTypes,
441 [out] UINT *pcchActual);
443 HRESULT GetFileExtensions(
444 [in] UINT cchFileExtensions,
445 [in, out, unique, size_is(cchFileExtensions)] WCHAR *wzFileExtensions,
446 [out] UINT *pcchActual);
448 HRESULT DoesSupportAnimation(
449 [out] BOOL *pfSupportAnimation);
451 HRESULT DoesSupportChromaKey(
452 [out] BOOL *pfSupportChromaKey);
454 HRESULT DoesSupportLossless(
455 [out] BOOL *pfSupportLossless);
457 HRESULT DoesSupportMultiframe(
458 [out] BOOL *pfSupportMultiframe);
460 HRESULT MatchesMimeType(
461 [in] LPCWSTR wzMimeType,
462 [out] BOOL *pfMatches);
465 interface IWICBitmapDecoder;
469 uuid(d8cd007f-d08f-4191-9bfc-236ea7f0e4b5)
471 interface IWICBitmapDecoderInfo : IWICBitmapCodecInfo
475 [in] UINT cbSizePatterns,
476 [in, out, unique] WICBitmapPattern *pPatterns,
477 [in, out, unique] UINT *pcPatterns,
478 [in, out, unique] UINT *pcbPatternsActual);
480 HRESULT MatchesPattern(
481 [in] IStream *pIStream,
482 [out] BOOL *pfMatches);
484 HRESULT CreateInstance(
485 [out] IWICBitmapDecoder **ppIBitmapDecoder);
490 uuid(9edde9e7-8dee-47ea-99df-e6faf2ed44bf)
492 interface IWICBitmapDecoder : IUnknown
494 HRESULT QueryCapability(
495 [in] IStream *pIStream,
496 [out] DWORD *pdwCapability);
499 [in] IStream *pIStream,
500 [in] WICDecodeOptions cacheOptions);
502 HRESULT GetContainerFormat(
503 [out] GUID *pguidContainerFormat);
505 HRESULT GetDecoderInfo(
506 [out] IWICBitmapDecoderInfo **ppIDecoderInfo);
509 [in] IWICPalette *pIPalette);
511 HRESULT GetMetadataQueryReader(
512 [out] IWICMetadataQueryReader **ppIMetadataQueryReader);
515 [out] IWICBitmapSource **ppIBitmapSource);
517 HRESULT GetColorContexts(
519 [in, out, unique, size_is(cCount)] IWICColorContext **ppIColorContexts,
520 [out] UINT *pcActualCount);
522 HRESULT GetThumbnail(
523 [out] IWICBitmapSource **ppIThumbnail);
525 HRESULT GetFrameCount(
530 [out] IWICBitmapFrameDecode **ppIBitmapFrame);
535 uuid(00000105-a8f2-4877-ba0a-fd2b6645fb94)
537 interface IWICBitmapFrameEncode : IUnknown
540 [in, unique] IPropertyBag2 *pIEncoderOptions);
546 HRESULT SetResolution(
550 HRESULT SetPixelFormat(
551 [in, out] WICPixelFormatGUID *pPixelFormat);
553 HRESULT SetColorContexts(
555 [in, size_is(cCount)] IWICColorContext **ppIColorContext);
558 [in] IWICPalette *pIPalette);
560 HRESULT SetThumbnail(
561 [in] IWICBitmapSource *pIThumbnail);
566 [in] UINT cbBufferSize,
567 [in, size_is(cbBufferSize)] BYTE *pbPixels);
570 [in] IWICBitmapSource *pIBitmapSource,
571 [in, unique] WICRect *prc);
575 HRESULT GetMetadataQueryWriter(
576 IWICMetadataQueryWriter **ppIMetadataQueryWriter);
579 interface IWICBitmapEncoder;
583 uuid(94c9b4ee-a09f-4f92-8a1e-4a9bce7e76fb)
585 interface IWICBitmapEncoderInfo : IWICBitmapCodecInfo
587 HRESULT CreateInstance(
588 [out] IWICBitmapEncoder **ppIBitmapEncoder);
593 uuid(00000103-a8f2-4877-ba0a-fd2b6645fb94)
595 interface IWICBitmapEncoder : IUnknown
598 [in] IStream *pIStream,
599 [in] WICBitmapEncoderCacheOption cacheOption);
601 HRESULT GetContainerFormat(
602 [out] GUID *pguidContainerFormat);
604 HRESULT GetEncoderInfo(
605 [out] IWICBitmapEncoderInfo **ppIEncoderInfo);
607 HRESULT SetColorContexts(
609 [in, size_is(cCount)] IWICColorContext **ppIColorContext);
612 [in] IWICPalette *pIPalette);
614 HRESULT SetThumbnail(
615 [in] IWICBitmapSource *pIThumbnail);
618 [in] IWICBitmapSource *pIPreview);
620 HRESULT CreateNewFrame(
621 [out] IWICBitmapFrameEncode **ppIFrameEncode,
622 [in, out, unique] IPropertyBag2 **ppIEncoderOptions);
626 HRESULT GetMetadataQueryWriter(
627 [out] IWICMetadataQueryWriter **ppIMetadataQueryWriter);
632 uuid(00000301-a8f2-4877-ba0a-fd2b6645fb94)
634 interface IWICFormatConverter : IWICBitmapSource
637 [in] IWICBitmapSource *pISource,
638 [in] REFWICPixelFormatGUID dstFormat,
639 [in] WICBitmapDitherType dither,
640 [in] IWICPalette *pIPalette,
641 [in] double alphaThresholdPercent,
642 [in] WICBitmapPaletteType paletteTranslate);
645 [in] REFWICPixelFormatGUID srcPixelFormat,
646 [in] REFWICPixelFormatGUID dstPixelFormat,
647 [out] BOOL *pfCanConvert);
652 uuid(9f34fb65-13f4-4f15-bc57-3726b5e53d9f)
654 interface IWICFormatConverterInfo : IWICComponentInfo
656 HRESULT GetPixelFormats(
658 [in, out, size_is(cFormats)] WICPixelFormatGUID *pPixelFormatGUIDs,
659 [out] UINT *pcActual);
661 HRESULT CreateInstance(
662 [out] IWICFormatConverter **ppIConverter);
667 uuid(135ff860-22b7-4ddf-b0f6-218f4f299a43)
669 interface IWICStream : IStream
671 HRESULT InitializeFromIStream(
672 [in] IStream *pIStream);
674 HRESULT InitializeFromFilename(
675 [in] LPCWSTR wzFileName,
676 [in] DWORD dwAccessMode);
678 HRESULT InitializeFromMemory(
679 [in, size_is(cbBufferSize)] BYTE *pbBuffer,
680 [in] DWORD cbBufferSize);
682 HRESULT InitializeFromIStreamRegion(
683 [in] IStream *pIStream,
684 [in] ULARGE_INTEGER ulOffset,
685 [in] ULARGE_INTEGER ulMaxSize);
690 uuid(00000302-a8f2-4877-ba0a-fd2b6645fb94)
692 interface IWICBitmapScaler : IWICBitmapSource
695 [in] IWICBitmapSource *pISource,
698 [in] WICBitmapInterpolationMode mode);
703 uuid(e4fbcf03-223d-4e81-9333-d635556dd1b5)
705 interface IWICBitmapClipper : IWICBitmapSource
708 [in] IWICBitmapSource *pISource,
709 [in] const WICRect *prc);
712 cpp_quote("DEFINE_GUID(CLSID_WICImagingFactory, 0xcacaf262,0x9370,0x4615,0xa1,0x3b,0x9f,0x55,0x39,0xda,0x4c,0x0a);")
716 uuid(ec5ec8a9-c395-4314-9c77-54d7a935ff70)
718 interface IWICImagingFactory : IUnknown
720 HRESULT CreateDecoderFromFilename(
721 [in] LPCWSTR wzFilename,
722 [in, unique] const GUID *pguidVendor,
723 [in] DWORD dwDesiredAccess,
724 [in] WICDecodeOptions metadataOptions,
725 [out, retval] IWICBitmapDecoder **ppIDecoder);
727 HRESULT CreateDecoderFromStream(
728 [in] IStream *pIStream,
729 [in, unique] const GUID *pguidVendor,
730 [in] WICDecodeOptions metadataOptions,
731 [out, retval] IWICBitmapDecoder **ppIDecoder);
733 HRESULT CreateDecoderFromFileHandle(
734 [in] ULONG_PTR hFile,
735 [in, unique] const GUID *pguidVendor,
736 [in] WICDecodeOptions metadataOptions,
737 [out, retval] IWICBitmapDecoder **ppIDecoder);
739 HRESULT CreateComponentInfo(
740 [in] REFCLSID clsidComponent,
741 [out] IWICComponentInfo **ppIInfo);
743 HRESULT CreateDecoder(
744 [in] REFGUID guidContainerFormat,
745 [in, unique] const GUID *pguidVendor,
746 [out, retval] IWICBitmapDecoder **ppIDecoder);
748 HRESULT CreateEncoder(
749 [in] REFGUID guidContainerFormat,
750 [in, unique] const GUID *pguidVendor,
751 [out, retval] IWICBitmapEncoder **ppIEncoder);
753 HRESULT CreatePalette(
754 [out] IWICPalette **ppIPalette);
756 HRESULT CreateFormatConverter(
757 [out] IWICFormatConverter **ppIFormatConverter);
759 HRESULT CreateBitmapScaler(
760 [out] IWICBitmapScaler **ppIBitmapScaler);
762 HRESULT CreateBitmapClipper(
763 [out] IWICBitmapClipper **ppIBitmapClipper);
765 HRESULT CreateBitmapFlipRotator(
766 [out] IWICBitmapFlipRotator **ppIBitmapFlipRotator);
768 HRESULT CreateStream(
769 [out] IWICStream **ppIWICStream);
771 HRESULT CreateColorContext(
772 [out] IWICColorContext **ppIWICColorContext);
774 HRESULT CreateColorTransformer(
775 [out] IWICColorTransform **ppIWICColorTransform);
777 HRESULT CreateBitmap(
780 [in] REFWICPixelFormatGUID pixelFormat,
781 [in] WICBitmapCreateCacheOption option,
782 [out] IWICBitmap **ppIBitmap);
784 HRESULT CreateBitmapFromSource(
785 [in] IWICBitmapSource *piBitmapSource,
786 [in] WICBitmapCreateCacheOption option,
787 [out] IWICBitmap **ppIBitmap);
789 HRESULT CreateBitmapFromSourceRect(
790 [in] IWICBitmapSource *piBitmapSource,
795 [out] IWICBitmap **ppIBitmap);
797 HRESULT CreateBitmapFromMemory(
800 [in] REFWICPixelFormatGUID pixelFormat,
802 [in] UINT cbBufferSize,
803 [in, size_is(cbBufferSize)] BYTE *pbBuffer,
804 [out] IWICBitmap **ppIBitmap);
806 HRESULT CreateBitmapFromHBITMAP(
807 [in] HBITMAP hBitmap,
808 [in, unique] HPALETTE hPalette,
809 [in] WICBitmapAlphaChannelOption options,
810 [out] IWICBitmap **ppIBitmap);
812 HRESULT CreateBitmapFromHICON(
814 [out] IWICBitmap **ppIBitmap);
816 HRESULT CreateComponentEnumerator(
817 [in] DWORD componentTypes,
819 [out] IEnumUnknown **ppIEnumUnknown);
821 HRESULT CreateFastMetadataEncoderFromDecoder(
822 [in] IWICBitmapDecoder *pIDecoder,
823 [out] IWICFastMetadataEncoder **ppIFastEncoder);
825 HRESULT CreateFastMetadataEncoderFromFrameDecode(
826 [in] IWICBitmapFrameDecode *pIFrameDecoder,
827 [out] IWICFastMetadataEncoder **ppIFastEncoder);
829 HRESULT CreateQueryWriter(
830 [in] REFGUID guidMetadataFormat,
831 [in, unique] const GUID *pguidVendor,
832 [out] IWICMetadataQueryWriter **ppIQueryWriter);
834 HRESULT CreateQueryWriterFromReader(
835 [in] IWICMetadataQueryReader *pIQueryReader,
836 [in, unique] const GUID *pguidVendor,
837 [out] IWICMetadataQueryWriter **ppIQueryWriter);
840 cpp_quote("HRESULT WINAPI WICConvertBitmapSource(REFWICPixelFormatGUID dstFormat, IWICBitmapSource *pISrc, IWICBitmapSource **ppIDst);")
842 cpp_quote("DEFINE_GUID(CLSID_WICBmpDecoder, 0x6b462062,0x7cbf,0x400d,0x9f,0xdb,0x81,0x3d,0xd1,0x0f,0x27,0x78);")
843 cpp_quote("DEFINE_GUID(CLSID_WICPngDecoder, 0x389ea17b,0x5078,0x4cde,0xb6,0xef,0x25,0xc1,0x51,0x75,0xc7,0x51);")
844 cpp_quote("DEFINE_GUID(CLSID_WICIcoDecoder, 0xc61bfcdf,0x2e0f,0x4aad,0xa8,0xd7,0xe0,0x6b,0xaf,0xeb,0xcd,0xfe);")
845 cpp_quote("DEFINE_GUID(CLSID_WICJpegDecoder, 0x9456a480,0xe88b,0x43ea,0x9e,0x73,0x0b,0x2d,0x9b,0x71,0xb1,0xca);")
846 cpp_quote("DEFINE_GUID(CLSID_WICGifDecoder, 0x381dda3c,0x9ce9,0x4834,0xa2,0x3e,0x1f,0x98,0xf8,0xfc,0x52,0xbe);")
847 cpp_quote("DEFINE_GUID(CLSID_WICTiffDecoder, 0xb54e85d9,0xfe23,0x499f,0x8b,0x88,0x6a,0xce,0xa7,0x13,0x75,0x2b);")
848 cpp_quote("DEFINE_GUID(CLSID_WICWmpDecoder, 0xa26cec36,0x234c,0x4950,0xae,0x16,0xe3,0x4a,0xac,0xe7,0x1d,0x0d);")
850 cpp_quote("DEFINE_GUID(CLSID_WICBmpEncoder, 0x69be8bb4,0xd66d,0x47c8,0x86,0x5a,0xed,0x15,0x89,0x43,0x37,0x82);")
851 cpp_quote("DEFINE_GUID(CLSID_WICPngEncoder, 0x27949969,0x876a,0x41d7,0x94,0x47,0x56,0x8f,0x6a,0x35,0xa4,0xdc);")
852 cpp_quote("DEFINE_GUID(CLSID_WICJpegEncoder, 0x1a34f5c1,0x4a5a,0x46dc,0xb6,0x44,0x1f,0x45,0x67,0xe7,0xa6,0x76);")
853 cpp_quote("DEFINE_GUID(CLSID_WICGifEncoder, 0x114f5598,0x0b22,0x40a0,0x86,0xa1,0xc8,0x3e,0xa4,0x95,0xad,0xbd);")
854 cpp_quote("DEFINE_GUID(CLSID_WICTiffEncoder, 0x0131be10,0x2001,0x4c5f,0xa9,0xb0,0xcc,0x88,0xfa,0xb6,0x4c,0xe8);")
855 cpp_quote("DEFINE_GUID(CLSID_WICWmpEncoder, 0xac4ce3cb,0xe1c1,0x44cd,0x82,0x15,0x5a,0x16,0x65,0x50,0x9e,0xc2);")
857 cpp_quote("DEFINE_GUID(CLSID_WICDefaultFormatConverter, 0x1a3f11dc,0xb514,0x4b17,0x8c,0x5f,0x21,0x54,0x51,0x38,0x52,0xf1);")
859 cpp_quote("DEFINE_GUID(GUID_ContainerFormatBmp, 0x0af1d87e,0xfcfe,0x4188,0xbd,0xeb,0xa7,0x90,0x64,0x71,0xcb,0xe3);")
860 cpp_quote("DEFINE_GUID(GUID_ContainerFormatPng, 0x1b7cfaf4,0x713f,0x473c,0xbb,0xcd,0x61,0x37,0x42,0x5f,0xae,0xaf);")
861 cpp_quote("DEFINE_GUID(GUID_ContainerFormatIco, 0xa3a860c4,0x338f,0x4c17,0x91,0x9a,0xfb,0xa4,0xb5,0x62,0x8f,0x21);")
862 cpp_quote("DEFINE_GUID(GUID_ContainerFormatJpeg, 0x19e4a5aa,0x5662,0x4fc5,0xa0,0xc0,0x17,0x58,0x02,0x8e,0x10,0x57);")
863 cpp_quote("DEFINE_GUID(GUID_ContainerFormatTiff, 0x163bcc30,0xe2e9,0x4f0b,0x96,0x1d,0xa3,0xe9,0xfd,0xb7,0x88,0xa3);")
864 cpp_quote("DEFINE_GUID(GUID_ContainerFormatGif, 0x1f8a5601,0x7d4d,0x4cbd,0x9c,0x82,0x1b,0xc8,0xd4,0xee,0xb9,0xa5);")
865 cpp_quote("DEFINE_GUID(GUID_ContainerFormatWmp, 0x57a37caa,0x367a,0x4540,0x91,0x6b,0xf1,0x83,0xc5,0x09,0x3a,0x4b);")
867 cpp_quote("DEFINE_GUID(GUID_VendorMicrosoft, 0xf0e749ca,0xedef,0x4589,0xa7,0x3a,0xee,0x0e,0x62,0x6a,0x2a,0x2b);")
869 cpp_quote("DEFINE_GUID(CATID_WICBitmapDecoders, 0x7ed96837,0x96f0,0x4812,0xb2,0x11,0xf1,0x3c,0x24,0x11,0x7e,0xd3);")
870 cpp_quote("DEFINE_GUID(CATID_WICBitmapEncoders, 0xac757296,0x3522,0x4e11,0x98,0x62,0xc1,0x7b,0xe5,0xa1,0x76,0x7e);")
871 cpp_quote("DEFINE_GUID(CATID_WICFormatConverters, 0x7835eae8,0xbf14,0x49d1,0x93,0xce,0x53,0x3a,0x40,0x7b,0x22,0x48);")