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 WICComponentType {
102 WICDecoder = 0x00000001,
103 WICEncoder = 0x00000002,
104 WICPixelFormatConverter = 0x00000004,
105 WICMetadataReader = 0x00000008,
106 WICMetadataWriter = 0x00000010,
107 WICPixelFormat = 0x00000020,
108 WICCOMPONENTTYPE_FORCE_DWORD = CODEC_FORCE_DWORD
111 typedef enum WICComponentSigning {
112 WICComponentSigned = 0x00000001,
113 WICComponentUnsigned = 0x00000002,
114 WICComponentSafe = 0x00000004,
115 WICComponentDisabled = 0x80000000
116 } WICComponentSigning;
118 typedef enum WICComponentEnumerateOptions {
119 WICComponentEnumerateDefault = 0x00000000,
120 WICComponentEnumerateRefresh = 0x00000001,
121 WICComponentEnumerateBuiltInOnly = 0x20000000,
122 WICComponentEnumerateUnsigned = 0x40000000,
123 WICComponentEnumerateDisabled = 0x80000000
124 } WICComponentEnumerateOptions;
126 typedef GUID WICPixelFormatGUID;
127 typedef REFGUID REFWICPixelFormatGUID;
129 cpp_quote("DEFINE_GUID(GUID_WICPixelFormatDontCare, 0x6fddc324,0x4e03,0x4bfe,0xb1,0x85,0x3d,0x77,0x76,0x8d,0xc9,0x00);")
130 cpp_quote("#define GUID_WICPixelFormatUndefined GUID_WICPixelFormatDontCare")
132 cpp_quote("DEFINE_GUID(GUID_WICPixelFormat1bppIndexed, 0x6fddc324,0x4e03,0x4bfe,0xb1,0x85,0x3d,0x77,0x76,0x8d,0xc9,0x01);")
133 cpp_quote("DEFINE_GUID(GUID_WICPixelFormat2bppIndexed, 0x6fddc324,0x4e03,0x4bfe,0xb1,0x85,0x3d,0x77,0x76,0x8d,0xc9,0x02);")
134 cpp_quote("DEFINE_GUID(GUID_WICPixelFormat4bppIndexed, 0x6fddc324,0x4e03,0x4bfe,0xb1,0x85,0x3d,0x77,0x76,0x8d,0xc9,0x03);")
135 cpp_quote("DEFINE_GUID(GUID_WICPixelFormat8bppIndexed, 0x6fddc324,0x4e03,0x4bfe,0xb1,0x85,0x3d,0x77,0x76,0x8d,0xc9,0x04);")
137 cpp_quote("DEFINE_GUID(GUID_WICPixelFormatBlackWhite, 0x6fddc324,0x4e03,0x4bfe,0xb1,0x85,0x3d,0x77,0x76,0x8d,0xc9,0x05);")
138 cpp_quote("DEFINE_GUID(GUID_WICPixelFormat2bppGray, 0x6fddc324,0x4e03,0x4bfe,0xb1,0x85,0x3d,0x77,0x76,0x8d,0xc9,0x06);")
139 cpp_quote("DEFINE_GUID(GUID_WICPixelFormat4bppGray, 0x6fddc324,0x4e03,0x4bfe,0xb1,0x85,0x3d,0x77,0x76,0x8d,0xc9,0x07);")
140 cpp_quote("DEFINE_GUID(GUID_WICPixelFormat8bppGray, 0x6fddc324,0x4e03,0x4bfe,0xb1,0x85,0x3d,0x77,0x76,0x8d,0xc9,0x08);")
141 cpp_quote("DEFINE_GUID(GUID_WICPixelFormat16bppGray, 0x6fddc324,0x4e03,0x4bfe,0xb1,0x85,0x3d,0x77,0x76,0x8d,0xc9,0x0b);")
143 cpp_quote("DEFINE_GUID(GUID_WICPixelFormat16bppBGR555, 0x6fddc324,0x4e03,0x4bfe,0xb1,0x85,0x3d,0x77,0x76,0x8d,0xc9,0x09);")
144 cpp_quote("DEFINE_GUID(GUID_WICPixelFormat16bppBGR565, 0x6fddc324,0x4e03,0x4bfe,0xb1,0x85,0x3d,0x77,0x76,0x8d,0xc9,0x0a);")
145 cpp_quote("DEFINE_GUID(GUID_WICPixelFormat24bppBGR, 0x6fddc324,0x4e03,0x4bfe,0xb1,0x85,0x3d,0x77,0x76,0x8d,0xc9,0x0c);")
146 cpp_quote("DEFINE_GUID(GUID_WICPixelFormat32bppBGR, 0x6fddc324,0x4e03,0x4bfe,0xb1,0x85,0x3d,0x77,0x76,0x8d,0xc9,0x0e);")
147 cpp_quote("DEFINE_GUID(GUID_WICPixelFormat32bppBGRA, 0x6fddc324,0x4e03,0x4bfe,0xb1,0x85,0x3d,0x77,0x76,0x8d,0xc9,0x0f);")
148 cpp_quote("DEFINE_GUID(GUID_WICPixelFormat32bppPBGRA, 0x6fddc324,0x4e03,0x4bfe,0xb1,0x85,0x3d,0x77,0x76,0x8d,0xc9,0x10);")
150 cpp_quote("DEFINE_GUID(GUID_WICPixelFormat48bppRGB, 0x6fddc324,0x4e03,0x4bfe,0xb1,0x85,0x3d,0x77,0x76,0x8d,0xc9,0x15);")
151 cpp_quote("DEFINE_GUID(GUID_WICPixelFormat64bppRGBA, 0x6fddc324,0x4e03,0x4bfe,0xb1,0x85,0x3d,0x77,0x76,0x8d,0xc9,0x16);")
153 typedef struct WICRect {
160 typedef struct WICBitmapPattern {
161 ULARGE_INTEGER Position;
168 typedef UINT32 WICColor;
170 cpp_quote("#define WINCODEC_ERR_WRONGSTATE 0x88982f04")
171 cpp_quote("#define WINCODEC_ERR_NOTINITIALIZED 0x88982f0c")
172 cpp_quote("#define WINCODEC_ERR_CODECNOTHUMBNAIL 0x88982f44")
173 cpp_quote("#define WINCODEC_ERR_PALETTEUNAVAILABLE 0x88982f45")
174 cpp_quote("#define WINCODEC_ERR_COMPONENTNOTFOUND 0x88982f50")
175 cpp_quote("#define WINCODEC_ERR_FRAMEMISSING 0x88982f62")
176 cpp_quote("#define WINCODEC_ERR_UNSUPPORTEDPIXELFORMAT 0x88982f80")
177 cpp_quote("#define WINCODEC_ERR_UNSUPPORTEDOPERATION 0x88982f81")
178 cpp_quote("#define WINCODEC_ERR_INSUFFICIENTBUFFER 0x88982f8c")
180 interface IWICPalette;
181 interface IWICBitmapFlipRotator;
182 interface IWICColorContext;
183 interface IWICColorTransform;
184 interface IWICFastMetadataEncoder;
185 interface IWICMetadataQueryReader;
186 interface IWICMetadataQueryWriter;
190 uuid(00000120-a8f2-4877-ba0a-fd2b6645fb94)
192 interface IWICBitmapSource : IUnknown
195 [out] UINT *puiWidth,
196 [out] UINT *puiHeight);
198 HRESULT GetPixelFormat(
199 [out] WICPixelFormatGUID *pPixelFormat);
201 HRESULT GetResolution(
203 [out] double *pDpiY);
206 [in] IWICPalette *pIPalette);
209 [in] const WICRect *prc,
211 [in] UINT cbBufferSize,
212 [out, size_is(cbBufferSize)] BYTE *pbBuffer);
217 uuid(00000123-a8f2-4877-ba0a-fd2b6645fb94)
219 interface IWICBitmapLock : IUnknown
223 [out] UINT *pHeight);
226 [out] UINT *pcbStride);
228 HRESULT GetDataPointer(
229 [out] UINT *pcbBufferSize,
230 [out, size_is(,*pcbBufferSize)] BYTE **ppbData);
232 HRESULT GetPixelFormat(
233 [out] WICPixelFormatGUID *pPixelFormat);
238 uuid(00000121-a8f2-4877-ba0a-fd2b6645fb94)
240 interface IWICBitmap : IWICBitmapSource
243 [in] const WICRect *prcLock,
245 [out] IWICBitmapLock **ppILock);
248 [in] IWICPalette *pIPalette);
250 HRESULT SetResolution(
257 uuid(00000040-a8f2-4877-ba0a-fd2b6645fb94)
259 interface IWICPalette : IUnknown
261 HRESULT InitializePredefined(
262 [in] WICBitmapPaletteType ePaletteType,
263 [in] BOOL fAddTransparentColor);
265 HRESULT InitializeCustom(
266 [in, size_is(colorCount)] WICColor *pColors,
267 [in] UINT colorCount);
269 HRESULT InitializeFromBitmap(
270 [in] IWICBitmapSource *pISurface,
271 [in] UINT colorCount,
272 [in] BOOL fAddTransparentColor);
274 HRESULT InitializeFromPalette(
275 [in] IWICPalette *pIPalette);
278 [out] WICBitmapPaletteType *pePaletteType);
280 HRESULT GetColorCount(
281 [out] UINT *pcCount);
284 [in] UINT colorCount,
285 [out, size_is(colorCount)] WICColor *pColors,
286 [out] UINT *pcActualColors);
288 HRESULT IsBlackWhite(
289 [out] BOOL *pfIsBlackWhite);
292 [out] BOOL *pfIsGrayscale);
295 [out] BOOL *pfHasAlpha);
300 uuid(23bc3f0a-698b-4357-886b-f24d50671334)
302 interface IWICComponentInfo : IUnknown
304 HRESULT GetComponentType(
305 [out] WICComponentType *pType);
308 [out] CLSID *pclsid);
310 HRESULT GetSigningStatus(
311 [out] DWORD *pStatus);
315 [in, out, unique, size_is(cchAuthor)] WCHAR *wzAuthor,
316 [out] UINT *pcchActual);
318 HRESULT GetVendorGUID(
319 [out] GUID *pguidVendor);
322 [in] UINT cchVersion,
323 [in, out, unique, size_is(cchVersion)] WCHAR *wzVersion,
324 [out] UINT *pcchActual);
326 HRESULT GetSpecVersion(
327 [in] UINT cchSpecVersion,
328 [in, out, unique, size_is(cchSpecVersion)] WCHAR *wzSpecVersion,
329 [out] UINT *pcchActual);
331 HRESULT GetFriendlyName(
332 [in] UINT cchFriendlyName,
333 [in, out, unique, size_is(cchFriendlyName)] WCHAR *wzFriendlyName,
334 [out] UINT *pcchActual);
339 uuid(3b16811b-6a43-4ec9-a813-3d930c13b940)
341 interface IWICBitmapFrameDecode : IWICBitmapSource
343 HRESULT GetMetadataQueryReader(
344 [out] IWICMetadataQueryReader **ppIMetadataQueryReader);
346 HRESULT GetColorContexts(
348 [in, out, unique, size_is(cCount)] IWICColorContext **ppIColorContexts,
349 [out] UINT *pcActualCount);
351 HRESULT GetThumbnail(
352 [out] IWICBitmapSource **ppIThumbnail);
357 uuid(e87a44c4-b76e-4c47-8b09-298eb12a2714)
359 interface IWICBitmapCodecInfo : IWICComponentInfo
361 HRESULT GetContainerFormat(
362 [out] GUID *pguidContainerFormat);
364 HRESULT GetPixelFormats(
366 [in, out, unique, size_is(cFormats)] GUID *pguidPixelFormats,
367 [out] UINT *pcActual);
369 HRESULT GetColorManagementVersion(
370 [in] UINT cchColorManagementVersion,
371 [in, out, unique, size_is(cchColorManagementVersion)] WCHAR *wzColorManagementVersion,
372 [out] UINT *pcchActual);
374 HRESULT GetDeviceManufacturer(
375 [in] UINT cchDeviceManufacturer,
376 [in, out, unique, size_is(cchDeviceManufacturer)] WCHAR *wzDeviceManufacturer,
377 [out] UINT *pcchActual);
379 HRESULT GetDeviceModels(
380 [in] UINT cchDeviceModels,
381 [in, out, unique, size_is(cchDeviceModels)] WCHAR *wzDeviceModels,
382 [out] UINT *pcchActual);
384 HRESULT GetMimeTypes(
385 [in] UINT cchMimeTypes,
386 [in, out, unique, size_is(cchMimeTypes)] WCHAR *wzMimeTypes,
387 [out] UINT *pcchActual);
389 HRESULT GetFileExtensions(
390 [in] UINT cchFileExtensions,
391 [in, out, unique, size_is(cchFileExtensions)] WCHAR *wzFileExtensions,
392 [out] UINT *pcchActual);
394 HRESULT DoesSupportAnimation(
395 [out] BOOL *pfSupportAnimation);
397 HRESULT DoesSupportChromaKey(
398 [out] BOOL *pfSupportChromaKey);
400 HRESULT DoesSupportLossless(
401 [out] BOOL *pfSupportLossless);
403 HRESULT DoesSupportMultiframe(
404 [out] BOOL *pfSupportMultiframe);
406 HRESULT MatchesMimeType(
407 [in] LPCWSTR wzMimeType,
408 [out] BOOL *pfMatches);
411 interface IWICBitmapDecoder;
415 uuid(d8cd007f-d08f-4191-9bfc-236ea7f0e4b5)
417 interface IWICBitmapDecoderInfo : IWICBitmapCodecInfo
421 [in] UINT cbSizePatterns,
422 [in, out, unique] WICBitmapPattern *pPatterns,
423 [in, out, unique] UINT *pcPatterns,
424 [in, out, unique] UINT *pcbPatternsActual);
426 HRESULT MatchesPattern(
427 [in] IStream *pIStream,
428 [out] BOOL *pfMatches);
430 HRESULT CreateInstance(
431 [out] IWICBitmapDecoder **ppIBitmapDecoder);
436 uuid(9edde9e7-8dee-47ea-99df-e6faf2ed44bf)
438 interface IWICBitmapDecoder : IUnknown
440 HRESULT QueryCapability(
441 [in] IStream *pIStream,
442 [out] DWORD *pdwCapability);
445 [in] IStream *pIStream,
446 [in] WICDecodeOptions cacheOptions);
448 HRESULT GetContainerFormat(
449 [out] GUID *pguidContainerFormat);
451 HRESULT GetDecoderInfo(
452 [out] IWICBitmapDecoderInfo **ppIDecoderInfo);
455 [in] IWICPalette *pIPalette);
457 HRESULT GetMetadataQueryReader(
458 [out] IWICMetadataQueryReader **ppIMetadataQueryReader);
461 [out] IWICBitmapSource **ppIBitmapSource);
463 HRESULT GetColorContexts(
465 [in, out, unique, size_is(cCount)] IWICColorContext **ppIColorContexts,
466 [out] UINT *pcActualCount);
468 HRESULT GetThumbnail(
469 [out] IWICBitmapSource **ppIThumbnail);
471 HRESULT GetFrameCount(
476 [out] IWICBitmapFrameDecode **ppIBitmapFrame);
481 uuid(00000105-a8f2-4877-ba0a-fd2b6645fb94)
483 interface IWICBitmapFrameEncode : IUnknown
486 [in, unique] IPropertyBag2 *pIEncoderOptions);
492 HRESULT SetResolution(
496 HRESULT SetPixelFormat(
497 [in, out] WICPixelFormatGUID *pPixelFormat);
499 HRESULT SetColorContexts(
501 [in, size_is(cCount)] IWICColorContext **ppIColorContext);
504 [in] IWICPalette *pIPalette);
506 HRESULT SetThumbnail(
507 [in] IWICBitmapSource *pIThumbnail);
512 [in] UINT cbBufferSize,
513 [in, size_is(cbBufferSize)] BYTE *pbPixels);
516 [in] IWICBitmapSource *pIBitmapSource,
517 [in, unique] WICRect *prc);
521 HRESULT GetMetadataQueryWriter(
522 IWICMetadataQueryWriter **ppIMetadataQueryWriter);
525 interface IWICBitmapEncoder;
529 uuid(94c9b4ee-a09f-4f92-8a1e-4a9bce7e76fb)
531 interface IWICBitmapEncoderInfo : IWICBitmapCodecInfo
533 HRESULT CreateInstance(
534 [out] IWICBitmapEncoder **ppIBitmapEncoder);
539 uuid(00000103-a8f2-4877-ba0a-fd2b6645fb94)
541 interface IWICBitmapEncoder : IUnknown
544 [in] IStream *pIStream,
545 [in] WICBitmapEncoderCacheOption cacheOption);
547 HRESULT GetContainerFormat(
548 [out] GUID *pguidContainerFormat);
550 HRESULT GetEncoderInfo(
551 [out] IWICBitmapEncoderInfo **ppIEncoderInfo);
553 HRESULT SetColorContexts(
555 [in, size_is(cCount)] IWICColorContext **ppIColorContext);
558 [in] IWICPalette *pIPalette);
560 HRESULT SetThumbnail(
561 [in] IWICBitmapSource *pIThumbnail);
564 [in] IWICBitmapSource *pIPreview);
566 HRESULT CreateNewFrame(
567 [out] IWICBitmapFrameEncode **ppIFrameEncode,
568 [in, out, unique] IPropertyBag2 **ppIEncoderOptions);
572 HRESULT GetMetadataQueryWriter(
573 [out] IWICMetadataQueryWriter **ppIMetadataQueryWriter);
578 uuid(00000301-a8f2-4877-ba0a-fd2b6645fb94)
580 interface IWICFormatConverter : IWICBitmapSource
583 [in] IWICBitmapSource *pISource,
584 [in] REFWICPixelFormatGUID dstFormat,
585 [in] WICBitmapDitherType dither,
586 [in] IWICPalette *pIPalette,
587 [in] double alphaThresholdPercent,
588 [in] WICBitmapPaletteType paletteTranslate);
591 [in] REFWICPixelFormatGUID srcPixelFormat,
592 [in] REFWICPixelFormatGUID dstPixelFormat,
593 [out] BOOL *pfCanConvert);
598 uuid(9f34fb65-13f4-4f15-bc57-3726b5e53d9f)
600 interface IWICFormatConverterInfo : IWICComponentInfo
602 HRESULT GetPixelFormats(
604 [in, out, size_is(cFormats)] WICPixelFormatGUID *pPixelFormatGUIDs,
605 [out] UINT *pcActual);
607 HRESULT CreateInstance(
608 [out] IWICFormatConverter **ppIConverter);
613 uuid(135ff860-22b7-4ddf-b0f6-218f4f299a43)
615 interface IWICStream : IStream
617 HRESULT InitializeFromIStream(
618 [in] IStream *pIStream);
620 HRESULT InitializeFromFilename(
621 [in] LPCWSTR wzFileName,
622 [in] DWORD dwAccessMode);
624 HRESULT InitializeFromMemory(
625 [in, size_is(cbBufferSize)] BYTE *pbBuffer,
626 [in] DWORD cbBufferSize);
628 HRESULT InitializeFromIStreamRegion(
629 [in] IStream *pIStream,
630 [in] ULARGE_INTEGER ulOffset,
631 [in] ULARGE_INTEGER ulMaxSize);
636 uuid(00000302-a8f2-4877-ba0a-fd2b6645fb94)
638 interface IWICBitmapScaler : IWICBitmapSource
641 [in] IWICBitmapSource *pISource,
644 [in] WICBitmapInterpolationMode mode);
649 uuid(e4fbcf03-223d-4e81-9333-d635556dd1b5)
651 interface IWICBitmapClipper : IWICBitmapSource
654 [in] IWICBitmapSource *pISource,
655 [in] const WICRect *prc);
658 cpp_quote("DEFINE_GUID(CLSID_WICImagingFactory, 0xcacaf262,0x9370,0x4615,0xa1,0x3b,0x9f,0x55,0x39,0xda,0x4c,0x0a);")
662 uuid(ec5ec8a9-c395-4314-9c77-54d7a935ff70)
664 interface IWICImagingFactory : IUnknown
666 HRESULT CreateDecoderFromFilename(
667 [in] LPCWSTR wzFilename,
668 [in, unique] const GUID *pguidVendor,
669 [in] DWORD dwDesiredAccess,
670 [in] WICDecodeOptions metadataOptions,
671 [out, retval] IWICBitmapDecoder **ppIDecoder);
673 HRESULT CreateDecoderFromStream(
674 [in] IStream *pIStream,
675 [in, unique] const GUID *pguidVendor,
676 [in] WICDecodeOptions metadataOptions,
677 [out, retval] IWICBitmapDecoder **ppIDecoder);
679 HRESULT CreateDecoderFromFileHandle(
680 [in] ULONG_PTR hFile,
681 [in, unique] const GUID *pguidVendor,
682 [in] WICDecodeOptions metadataOptions,
683 [out, retval] IWICBitmapDecoder **ppIDecoder);
685 HRESULT CreateComponentInfo(
686 [in] REFCLSID clsidComponent,
687 [out] IWICComponentInfo **ppIInfo);
689 HRESULT CreateDecoder(
690 [in] REFGUID guidContainerFormat,
691 [in, unique] const GUID *pguidVendor,
692 [out, retval] IWICBitmapDecoder **ppIDecoder);
694 HRESULT CreateEncoder(
695 [in] REFGUID guidContainerFormat,
696 [in, unique] const GUID *pguidVendor,
697 [out, retval] IWICBitmapEncoder **ppIEncoder);
699 HRESULT CreatePalette(
700 [out] IWICPalette **ppIPalette);
702 HRESULT CreateFormatConverter(
703 [out] IWICFormatConverter **ppIFormatConverter);
705 HRESULT CreateBitmapScaler(
706 [out] IWICBitmapScaler **ppIBitmapScaler);
708 HRESULT CreateBitmapClipper(
709 [out] IWICBitmapClipper **ppIBitmapClipper);
711 HRESULT CreateBitmapFlipRotator(
712 [out] IWICBitmapFlipRotator **ppIBitmapFlipRotator);
714 HRESULT CreateStream(
715 [out] IWICStream **ppIWICStream);
717 HRESULT CreateColorContext(
718 [out] IWICColorContext **ppIWICColorContext);
720 HRESULT CreateColorTransformer(
721 [out] IWICColorTransform **ppIWICColorTransform);
723 HRESULT CreateBitmap(
726 [in] REFWICPixelFormatGUID pixelFormat,
727 [in] WICBitmapCreateCacheOption option,
728 [out] IWICBitmap **ppIBitmap);
730 HRESULT CreateBitmapFromSource(
731 [in] IWICBitmapSource *piBitmapSource,
732 [in] WICBitmapCreateCacheOption option,
733 [out] IWICBitmap **ppIBitmap);
735 HRESULT CreateBitmapFromSourceRect(
736 [in] IWICBitmapSource *piBitmapSource,
741 [out] IWICBitmap **ppIBitmap);
743 HRESULT CreateBitmapFromMemory(
746 [in] REFWICPixelFormatGUID pixelFormat,
748 [in] UINT cbBufferSize,
749 [in, size_is(cbBufferSize)] BYTE *pbBuffer,
750 [out] IWICBitmap **ppIBitmap);
752 HRESULT CreateBitmapFromHBITMAP(
753 [in] HBITMAP hBitmap,
754 [in, unique] HPALETTE hPalette,
755 [in] WICBitmapAlphaChannelOption options,
756 [out] IWICBitmap **ppIBitmap);
758 HRESULT CreateBitmapFromHICON(
760 [out] IWICBitmap **ppIBitmap);
762 HRESULT CreateComponentEnumerator(
763 [in] DWORD componentTypes,
765 [out] IEnumUnknown **ppIEnumUnknown);
767 HRESULT CreateFastMetadataEncoderFromDecoder(
768 [in] IWICBitmapDecoder *pIDecoder,
769 [out] IWICFastMetadataEncoder **ppIFastEncoder);
771 HRESULT CreateFastMetadataEncoderFromFrameDecode(
772 [in] IWICBitmapFrameDecode *pIFrameDecoder,
773 [out] IWICFastMetadataEncoder **ppIFastEncoder);
775 HRESULT CreateQueryWriter(
776 [in] REFGUID guidMetadataFormat,
777 [in, unique] const GUID *pguidVendor,
778 [out] IWICMetadataQueryWriter **ppIQueryWriter);
780 HRESULT CreateQueryWriterFromReader(
781 [in] IWICMetadataQueryReader *pIQueryReader,
782 [in, unique] const GUID *pguidVendor,
783 [out] IWICMetadataQueryWriter **ppIQueryWriter);
786 cpp_quote("HRESULT WINAPI WICConvertBitmapSource(REFWICPixelFormatGUID dstFormat, IWICBitmapSource *pISrc, IWICBitmapSource **ppIDst);")
788 cpp_quote("DEFINE_GUID(CLSID_WICBmpDecoder, 0x6b462062,0x7cbf,0x400d,0x9f,0xdb,0x81,0x3d,0xd1,0x0f,0x27,0x78);")
789 cpp_quote("DEFINE_GUID(CLSID_WICPngDecoder, 0x389ea17b,0x5078,0x4cde,0xb6,0xef,0x25,0xc1,0x51,0x75,0xc7,0x51);")
790 cpp_quote("DEFINE_GUID(CLSID_WICIcoDecoder, 0xc61bfcdf,0x2e0f,0x4aad,0xa8,0xd7,0xe0,0x6b,0xaf,0xeb,0xcd,0xfe);")
791 cpp_quote("DEFINE_GUID(CLSID_WICJpegDecoder, 0x9456a480,0xe88b,0x43ea,0x9e,0x73,0x0b,0x2d,0x9b,0x71,0xb1,0xca);")
792 cpp_quote("DEFINE_GUID(CLSID_WICGifDecoder, 0x381dda3c,0x9ce9,0x4834,0xa2,0x3e,0x1f,0x98,0xf8,0xfc,0x52,0xbe);")
793 cpp_quote("DEFINE_GUID(CLSID_WICTiffDecoder, 0xb54e85d9,0xfe23,0x499f,0x8b,0x88,0x6a,0xce,0xa7,0x13,0x75,0x2b);")
794 cpp_quote("DEFINE_GUID(CLSID_WICWmpDecoder, 0xa26cec36,0x234c,0x4950,0xae,0x16,0xe3,0x4a,0xac,0xe7,0x1d,0x0d);")
796 cpp_quote("DEFINE_GUID(CLSID_WICBmpEncoder, 0x69be8bb4,0xd66d,0x47c8,0x86,0x5a,0xed,0x15,0x89,0x43,0x37,0x82);")
797 cpp_quote("DEFINE_GUID(CLSID_WICPngEncoder, 0x27949969,0x876a,0x41d7,0x94,0x47,0x56,0x8f,0x6a,0x35,0xa4,0xdc);")
798 cpp_quote("DEFINE_GUID(CLSID_WICJpegEncoder, 0x1a34f5c1,0x4a5a,0x46dc,0xb6,0x44,0x1f,0x45,0x67,0xe7,0xa6,0x76);")
799 cpp_quote("DEFINE_GUID(CLSID_WICGifEncoder, 0x114f5598,0x0b22,0x40a0,0x86,0xa1,0xc8,0x3e,0xa4,0x95,0xad,0xbd);")
800 cpp_quote("DEFINE_GUID(CLSID_WICTiffEncoder, 0x0131be10,0x2001,0x4c5f,0xa9,0xb0,0xcc,0x88,0xfa,0xb6,0x4c,0xe8);")
801 cpp_quote("DEFINE_GUID(CLSID_WICWmpEncoder, 0xac4ce3cb,0xe1c1,0x44cd,0x82,0x15,0x5a,0x16,0x65,0x50,0x9e,0xc2);")
803 cpp_quote("DEFINE_GUID(CLSID_WICDefaultFormatConverter, 0x1a3f11dc,0xb514,0x4b17,0x8c,0x5f,0x21,0x54,0x51,0x38,0x52,0xf1);")
805 cpp_quote("DEFINE_GUID(GUID_ContainerFormatBmp, 0x0af1d87e,0xfcfe,0x4188,0xbd,0xeb,0xa7,0x90,0x64,0x71,0xcb,0xe3);")
806 cpp_quote("DEFINE_GUID(GUID_ContainerFormatPng, 0x1b7cfaf4,0x713f,0x473c,0xbb,0xcd,0x61,0x37,0x42,0x5f,0xae,0xaf);")
807 cpp_quote("DEFINE_GUID(GUID_ContainerFormatIco, 0xa3a860c4,0x338f,0x4c17,0x91,0x9a,0xfb,0xa4,0xb5,0x62,0x8f,0x21);")
808 cpp_quote("DEFINE_GUID(GUID_ContainerFormatJpeg, 0x19e4a5aa,0x5662,0x4fc5,0xa0,0xc0,0x17,0x58,0x02,0x8e,0x10,0x57);")
809 cpp_quote("DEFINE_GUID(GUID_ContainerFormatTiff, 0x163bcc30,0xe2e9,0x4f0b,0x96,0x1d,0xa3,0xe9,0xfd,0xb7,0x88,0xa3);")
810 cpp_quote("DEFINE_GUID(GUID_ContainerFormatGif, 0x1f8a5601,0x7d4d,0x4cbd,0x9c,0x82,0x1b,0xc8,0xd4,0xee,0xb9,0xa5);")
811 cpp_quote("DEFINE_GUID(GUID_ContainerFormatWmp, 0x57a37caa,0x367a,0x4540,0x91,0x6b,0xf1,0x83,0xc5,0x09,0x3a,0x4b);")
813 cpp_quote("DEFINE_GUID(GUID_VendorMicrosoft, 0xf0e749ca,0xedef,0x4589,0xa7,0x3a,0xee,0x0e,0x62,0x6a,0x2a,0x2b);")
815 cpp_quote("DEFINE_GUID(CATID_WICBitmapDecoders, 0x7ed96837,0x96f0,0x4812,0xb2,0x11,0xf1,0x3c,0x24,0x11,0x7e,0xd3);")
816 cpp_quote("DEFINE_GUID(CATID_WICBitmapEncoders, 0xac757296,0x3522,0x4e11,0x98,0x62,0xc1,0x7b,0xe5,0xa1,0x76,0x7e);")
817 cpp_quote("DEFINE_GUID(CATID_WICFormatConverters, 0x7835eae8,0xbf14,0x49d1,0x93,0xce,0x53,0x3a,0x40,0x7b,0x22,0x48);")