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 WICComponentType
{
112 WICDecoder
= 0x00000001,
113 WICEncoder
= 0x00000002,
114 WICPixelFormatConverter
= 0x00000004,
115 WICMetadataReader
= 0x00000008,
116 WICMetadataWriter
= 0x00000010,
117 WICPixelFormat
= 0x00000020,
118 WICCOMPONENTTYPE_FORCE_DWORD
= CODEC_FORCE_DWORD
121 typedef enum WICComponentSigning
{
122 WICComponentSigned
= 0x00000001,
123 WICComponentUnsigned
= 0x00000002,
124 WICComponentSafe
= 0x00000004,
125 WICComponentDisabled
= 0x80000000
126 } WICComponentSigning
;
128 typedef enum WICComponentEnumerateOptions
{
129 WICComponentEnumerateDefault
= 0x00000000,
130 WICComponentEnumerateRefresh
= 0x00000001,
131 WICComponentEnumerateBuiltInOnly
= 0x20000000,
132 WICComponentEnumerateUnsigned
= 0x40000000,
133 WICComponentEnumerateDisabled
= 0x80000000
134 } WICComponentEnumerateOptions
;
136 typedef GUID WICPixelFormatGUID
;
137 typedef REFGUID REFWICPixelFormatGUID
;
139 cpp_quote
("DEFINE_GUID(GUID_WICPixelFormatDontCare, 0x6fddc324,0x4e03,0x4bfe,0xb1,0x85,0x3d,0x77,0x76,0x8d,0xc9,0x00);")
140 cpp_quote
("#define GUID_WICPixelFormatUndefined GUID_WICPixelFormatDontCare")
142 cpp_quote
("DEFINE_GUID(GUID_WICPixelFormat1bppIndexed, 0x6fddc324,0x4e03,0x4bfe,0xb1,0x85,0x3d,0x77,0x76,0x8d,0xc9,0x01);")
143 cpp_quote
("DEFINE_GUID(GUID_WICPixelFormat2bppIndexed, 0x6fddc324,0x4e03,0x4bfe,0xb1,0x85,0x3d,0x77,0x76,0x8d,0xc9,0x02);")
144 cpp_quote
("DEFINE_GUID(GUID_WICPixelFormat4bppIndexed, 0x6fddc324,0x4e03,0x4bfe,0xb1,0x85,0x3d,0x77,0x76,0x8d,0xc9,0x03);")
145 cpp_quote
("DEFINE_GUID(GUID_WICPixelFormat8bppIndexed, 0x6fddc324,0x4e03,0x4bfe,0xb1,0x85,0x3d,0x77,0x76,0x8d,0xc9,0x04);")
147 cpp_quote
("DEFINE_GUID(GUID_WICPixelFormatBlackWhite, 0x6fddc324,0x4e03,0x4bfe,0xb1,0x85,0x3d,0x77,0x76,0x8d,0xc9,0x05);")
148 cpp_quote
("DEFINE_GUID(GUID_WICPixelFormat2bppGray, 0x6fddc324,0x4e03,0x4bfe,0xb1,0x85,0x3d,0x77,0x76,0x8d,0xc9,0x06);")
149 cpp_quote
("DEFINE_GUID(GUID_WICPixelFormat4bppGray, 0x6fddc324,0x4e03,0x4bfe,0xb1,0x85,0x3d,0x77,0x76,0x8d,0xc9,0x07);")
150 cpp_quote
("DEFINE_GUID(GUID_WICPixelFormat8bppGray, 0x6fddc324,0x4e03,0x4bfe,0xb1,0x85,0x3d,0x77,0x76,0x8d,0xc9,0x08);")
151 cpp_quote
("DEFINE_GUID(GUID_WICPixelFormat16bppGray, 0x6fddc324,0x4e03,0x4bfe,0xb1,0x85,0x3d,0x77,0x76,0x8d,0xc9,0x0b);")
153 cpp_quote
("DEFINE_GUID(GUID_WICPixelFormat16bppBGR555, 0x6fddc324,0x4e03,0x4bfe,0xb1,0x85,0x3d,0x77,0x76,0x8d,0xc9,0x09);")
154 cpp_quote
("DEFINE_GUID(GUID_WICPixelFormat16bppBGR565, 0x6fddc324,0x4e03,0x4bfe,0xb1,0x85,0x3d,0x77,0x76,0x8d,0xc9,0x0a);")
155 cpp_quote
("DEFINE_GUID(GUID_WICPixelFormat24bppBGR, 0x6fddc324,0x4e03,0x4bfe,0xb1,0x85,0x3d,0x77,0x76,0x8d,0xc9,0x0c);")
156 cpp_quote
("DEFINE_GUID(GUID_WICPixelFormat32bppBGR, 0x6fddc324,0x4e03,0x4bfe,0xb1,0x85,0x3d,0x77,0x76,0x8d,0xc9,0x0e);")
157 cpp_quote
("DEFINE_GUID(GUID_WICPixelFormat32bppBGRA, 0x6fddc324,0x4e03,0x4bfe,0xb1,0x85,0x3d,0x77,0x76,0x8d,0xc9,0x0f);")
158 cpp_quote
("DEFINE_GUID(GUID_WICPixelFormat32bppPBGRA, 0x6fddc324,0x4e03,0x4bfe,0xb1,0x85,0x3d,0x77,0x76,0x8d,0xc9,0x10);")
160 cpp_quote
("DEFINE_GUID(GUID_WICPixelFormat48bppRGB, 0x6fddc324,0x4e03,0x4bfe,0xb1,0x85,0x3d,0x77,0x76,0x8d,0xc9,0x15);")
161 cpp_quote
("DEFINE_GUID(GUID_WICPixelFormat64bppRGBA, 0x6fddc324,0x4e03,0x4bfe,0xb1,0x85,0x3d,0x77,0x76,0x8d,0xc9,0x16);")
163 typedef struct WICRect
{
170 typedef struct WICBitmapPattern
{
171 ULARGE_INTEGER Position
;
178 typedef UINT32 WICColor
;
180 cpp_quote
("#define WINCODEC_ERR_WRONGSTATE 0x88982f04")
181 cpp_quote
("#define WINCODEC_ERR_NOTINITIALIZED 0x88982f0c")
182 cpp_quote
("#define WINCODEC_ERR_CODECNOTHUMBNAIL 0x88982f44")
183 cpp_quote
("#define WINCODEC_ERR_PALETTEUNAVAILABLE 0x88982f45")
184 cpp_quote
("#define WINCODEC_ERR_COMPONENTNOTFOUND 0x88982f50")
185 cpp_quote
("#define WINCODEC_ERR_FRAMEMISSING 0x88982f62")
186 cpp_quote
("#define WINCODEC_ERR_UNSUPPORTEDPIXELFORMAT 0x88982f80")
187 cpp_quote
("#define WINCODEC_ERR_UNSUPPORTEDOPERATION 0x88982f81")
188 cpp_quote
("#define WINCODEC_ERR_INSUFFICIENTBUFFER 0x88982f8c")
190 interface IWICPalette
;
191 interface IWICColorContext
;
192 interface IWICColorTransform
;
193 interface IWICFastMetadataEncoder
;
194 interface IWICMetadataQueryReader
;
195 interface IWICMetadataQueryWriter
;
199 uuid(00000120-a8f2
-4877-ba0a
-fd2b6645fb94
)
201 interface IWICBitmapSource
: IUnknown
204 [out] UINT
*puiWidth
,
205 [out] UINT
*puiHeight
);
207 HRESULT GetPixelFormat
(
208 [out] WICPixelFormatGUID
*pPixelFormat
);
210 HRESULT GetResolution
(
212 [out] double *pDpiY
);
215 [in] IWICPalette
*pIPalette
);
218 [in] const WICRect
*prc
,
220 [in] UINT cbBufferSize
,
221 [out, size_is(cbBufferSize
)] BYTE *pbBuffer
);
226 uuid(00000123-a8f2
-4877-ba0a
-fd2b6645fb94
)
228 interface IWICBitmapLock
: IUnknown
232 [out] UINT
*pHeight
);
235 [out] UINT
*pcbStride
);
237 HRESULT GetDataPointer
(
238 [out] UINT
*pcbBufferSize
,
239 [out, size_is(,*pcbBufferSize
)] BYTE **ppbData
);
241 HRESULT GetPixelFormat
(
242 [out] WICPixelFormatGUID
*pPixelFormat
);
247 uuid(5009834f
-2d6a
-41ce
-9e1b
-17c5aff7a782
)
249 interface IWICBitmapFlipRotator
: IWICBitmapSource
252 [in] IWICBitmapSource
*pISource
,
253 [in] WICBitmapTransformOptions options
);
258 uuid(00000121-a8f2
-4877-ba0a
-fd2b6645fb94
)
260 interface IWICBitmap
: IWICBitmapSource
263 [in] const WICRect
*prcLock
,
265 [out] IWICBitmapLock
**ppILock
);
268 [in] IWICPalette
*pIPalette
);
270 HRESULT SetResolution
(
277 uuid(00000040-a8f2
-4877-ba0a
-fd2b6645fb94
)
279 interface IWICPalette
: IUnknown
281 HRESULT InitializePredefined
(
282 [in] WICBitmapPaletteType ePaletteType
,
283 [in] BOOL fAddTransparentColor
);
285 HRESULT InitializeCustom
(
286 [in, size_is(colorCount
)] WICColor
*pColors
,
287 [in] UINT colorCount
);
289 HRESULT InitializeFromBitmap
(
290 [in] IWICBitmapSource
*pISurface
,
291 [in] UINT colorCount
,
292 [in] BOOL fAddTransparentColor
);
294 HRESULT InitializeFromPalette
(
295 [in] IWICPalette
*pIPalette
);
298 [out] WICBitmapPaletteType
*pePaletteType
);
300 HRESULT GetColorCount
(
301 [out] UINT
*pcCount
);
304 [in] UINT colorCount
,
305 [out, size_is(colorCount
)] WICColor
*pColors
,
306 [out] UINT
*pcActualColors
);
308 HRESULT IsBlackWhite
(
309 [out] BOOL
*pfIsBlackWhite
);
312 [out] BOOL
*pfIsGrayscale
);
315 [out] BOOL
*pfHasAlpha
);
320 uuid(23bc3f0a
-698b
-4357-886b
-f24d50671334
)
322 interface IWICComponentInfo
: IUnknown
324 HRESULT GetComponentType
(
325 [out] WICComponentType
*pType
);
328 [out] CLSID
*pclsid
);
330 HRESULT GetSigningStatus
(
331 [out] DWORD
*pStatus
);
335 [in, out, unique, size_is(cchAuthor
)] WCHAR
*wzAuthor
,
336 [out] UINT
*pcchActual
);
338 HRESULT GetVendorGUID
(
339 [out] GUID
*pguidVendor
);
342 [in] UINT cchVersion
,
343 [in, out, unique, size_is(cchVersion
)] WCHAR
*wzVersion
,
344 [out] UINT
*pcchActual
);
346 HRESULT GetSpecVersion
(
347 [in] UINT cchSpecVersion
,
348 [in, out, unique, size_is(cchSpecVersion
)] WCHAR
*wzSpecVersion
,
349 [out] UINT
*pcchActual
);
351 HRESULT GetFriendlyName
(
352 [in] UINT cchFriendlyName
,
353 [in, out, unique, size_is(cchFriendlyName
)] WCHAR
*wzFriendlyName
,
354 [out] UINT
*pcchActual
);
359 uuid(3b16811b
-6a43
-4ec9
-a813
-3d930c13b940
)
361 interface IWICBitmapFrameDecode
: IWICBitmapSource
363 HRESULT GetMetadataQueryReader
(
364 [out] IWICMetadataQueryReader
**ppIMetadataQueryReader
);
366 HRESULT GetColorContexts
(
368 [in, out, unique, size_is(cCount
)] IWICColorContext
**ppIColorContexts
,
369 [out] UINT
*pcActualCount
);
371 HRESULT GetThumbnail
(
372 [out] IWICBitmapSource
**ppIThumbnail
);
377 uuid(e87a44c4
-b76e
-4c47
-8b09
-298eb12a2714
)
379 interface IWICBitmapCodecInfo
: IWICComponentInfo
381 HRESULT GetContainerFormat
(
382 [out] GUID
*pguidContainerFormat
);
384 HRESULT GetPixelFormats
(
386 [in, out, unique, size_is(cFormats
)] GUID
*pguidPixelFormats
,
387 [out] UINT
*pcActual
);
389 HRESULT GetColorManagementVersion
(
390 [in] UINT cchColorManagementVersion
,
391 [in, out, unique, size_is(cchColorManagementVersion
)] WCHAR
*wzColorManagementVersion
,
392 [out] UINT
*pcchActual
);
394 HRESULT GetDeviceManufacturer
(
395 [in] UINT cchDeviceManufacturer
,
396 [in, out, unique, size_is(cchDeviceManufacturer
)] WCHAR
*wzDeviceManufacturer
,
397 [out] UINT
*pcchActual
);
399 HRESULT GetDeviceModels
(
400 [in] UINT cchDeviceModels
,
401 [in, out, unique, size_is(cchDeviceModels
)] WCHAR
*wzDeviceModels
,
402 [out] UINT
*pcchActual
);
404 HRESULT GetMimeTypes
(
405 [in] UINT cchMimeTypes
,
406 [in, out, unique, size_is(cchMimeTypes
)] WCHAR
*wzMimeTypes
,
407 [out] UINT
*pcchActual
);
409 HRESULT GetFileExtensions
(
410 [in] UINT cchFileExtensions
,
411 [in, out, unique, size_is(cchFileExtensions
)] WCHAR
*wzFileExtensions
,
412 [out] UINT
*pcchActual
);
414 HRESULT DoesSupportAnimation
(
415 [out] BOOL
*pfSupportAnimation
);
417 HRESULT DoesSupportChromaKey
(
418 [out] BOOL
*pfSupportChromaKey
);
420 HRESULT DoesSupportLossless
(
421 [out] BOOL
*pfSupportLossless
);
423 HRESULT DoesSupportMultiframe
(
424 [out] BOOL
*pfSupportMultiframe
);
426 HRESULT MatchesMimeType
(
427 [in] LPCWSTR wzMimeType
,
428 [out] BOOL
*pfMatches
);
431 interface IWICBitmapDecoder
;
435 uuid(d8cd007f
-d08f
-4191-9bfc
-236ea7f0e4b5
)
437 interface IWICBitmapDecoderInfo
: IWICBitmapCodecInfo
441 [in] UINT cbSizePatterns
,
442 [in, out, unique] WICBitmapPattern
*pPatterns
,
443 [in, out, unique] UINT
*pcPatterns
,
444 [in, out, unique] UINT
*pcbPatternsActual
);
446 HRESULT MatchesPattern
(
447 [in] IStream
*pIStream
,
448 [out] BOOL
*pfMatches
);
450 HRESULT CreateInstance
(
451 [out] IWICBitmapDecoder
**ppIBitmapDecoder
);
456 uuid(9edde9e7
-8dee
-47ea
-99df
-e6faf2ed44bf
)
458 interface IWICBitmapDecoder
: IUnknown
460 HRESULT QueryCapability
(
461 [in] IStream
*pIStream
,
462 [out] DWORD
*pdwCapability
);
465 [in] IStream
*pIStream
,
466 [in] WICDecodeOptions cacheOptions
);
468 HRESULT GetContainerFormat
(
469 [out] GUID
*pguidContainerFormat
);
471 HRESULT GetDecoderInfo
(
472 [out] IWICBitmapDecoderInfo
**ppIDecoderInfo
);
475 [in] IWICPalette
*pIPalette
);
477 HRESULT GetMetadataQueryReader
(
478 [out] IWICMetadataQueryReader
**ppIMetadataQueryReader
);
481 [out] IWICBitmapSource
**ppIBitmapSource
);
483 HRESULT GetColorContexts
(
485 [in, out, unique, size_is(cCount
)] IWICColorContext
**ppIColorContexts
,
486 [out] UINT
*pcActualCount
);
488 HRESULT GetThumbnail
(
489 [out] IWICBitmapSource
**ppIThumbnail
);
491 HRESULT GetFrameCount
(
496 [out] IWICBitmapFrameDecode
**ppIBitmapFrame
);
501 uuid(00000105-a8f2
-4877-ba0a
-fd2b6645fb94
)
503 interface IWICBitmapFrameEncode
: IUnknown
506 [in, unique] IPropertyBag2
*pIEncoderOptions
);
512 HRESULT SetResolution
(
516 HRESULT SetPixelFormat
(
517 [in, out] WICPixelFormatGUID
*pPixelFormat
);
519 HRESULT SetColorContexts
(
521 [in, size_is(cCount
)] IWICColorContext
**ppIColorContext
);
524 [in] IWICPalette
*pIPalette
);
526 HRESULT SetThumbnail
(
527 [in] IWICBitmapSource
*pIThumbnail
);
532 [in] UINT cbBufferSize
,
533 [in, size_is(cbBufferSize
)] BYTE *pbPixels
);
536 [in] IWICBitmapSource
*pIBitmapSource
,
537 [in, unique] WICRect
*prc
);
541 HRESULT GetMetadataQueryWriter
(
542 IWICMetadataQueryWriter
**ppIMetadataQueryWriter
);
545 interface IWICBitmapEncoder
;
549 uuid(94c9b4ee
-a09f
-4f92
-8a1e
-4a9bce7e76fb
)
551 interface IWICBitmapEncoderInfo
: IWICBitmapCodecInfo
553 HRESULT CreateInstance
(
554 [out] IWICBitmapEncoder
**ppIBitmapEncoder
);
559 uuid(00000103-a8f2
-4877-ba0a
-fd2b6645fb94
)
561 interface IWICBitmapEncoder
: IUnknown
564 [in] IStream
*pIStream
,
565 [in] WICBitmapEncoderCacheOption cacheOption
);
567 HRESULT GetContainerFormat
(
568 [out] GUID
*pguidContainerFormat
);
570 HRESULT GetEncoderInfo
(
571 [out] IWICBitmapEncoderInfo
**ppIEncoderInfo
);
573 HRESULT SetColorContexts
(
575 [in, size_is(cCount
)] IWICColorContext
**ppIColorContext
);
578 [in] IWICPalette
*pIPalette
);
580 HRESULT SetThumbnail
(
581 [in] IWICBitmapSource
*pIThumbnail
);
584 [in] IWICBitmapSource
*pIPreview
);
586 HRESULT CreateNewFrame
(
587 [out] IWICBitmapFrameEncode
**ppIFrameEncode
,
588 [in, out, unique] IPropertyBag2
**ppIEncoderOptions
);
592 HRESULT GetMetadataQueryWriter
(
593 [out] IWICMetadataQueryWriter
**ppIMetadataQueryWriter
);
598 uuid(00000301-a8f2
-4877-ba0a
-fd2b6645fb94
)
600 interface IWICFormatConverter
: IWICBitmapSource
603 [in] IWICBitmapSource
*pISource
,
604 [in] REFWICPixelFormatGUID dstFormat
,
605 [in] WICBitmapDitherType dither
,
606 [in] IWICPalette
*pIPalette
,
607 [in] double alphaThresholdPercent
,
608 [in] WICBitmapPaletteType paletteTranslate
);
611 [in] REFWICPixelFormatGUID srcPixelFormat
,
612 [in] REFWICPixelFormatGUID dstPixelFormat
,
613 [out] BOOL
*pfCanConvert
);
618 uuid(9f34fb65
-13f4
-4f15
-bc57
-3726b5e53d9f
)
620 interface IWICFormatConverterInfo
: IWICComponentInfo
622 HRESULT GetPixelFormats
(
624 [in, out, size_is(cFormats
)] WICPixelFormatGUID
*pPixelFormatGUIDs
,
625 [out] UINT
*pcActual
);
627 HRESULT CreateInstance
(
628 [out] IWICFormatConverter
**ppIConverter
);
633 uuid(135ff860
-22b7
-4ddf
-b0f6
-218f4f299a43
)
635 interface IWICStream
: IStream
637 HRESULT InitializeFromIStream
(
638 [in] IStream
*pIStream
);
640 HRESULT InitializeFromFilename
(
641 [in] LPCWSTR wzFileName
,
642 [in] DWORD dwAccessMode
);
644 HRESULT InitializeFromMemory
(
645 [in, size_is(cbBufferSize
)] BYTE *pbBuffer
,
646 [in] DWORD cbBufferSize
);
648 HRESULT InitializeFromIStreamRegion
(
649 [in] IStream
*pIStream
,
650 [in] ULARGE_INTEGER ulOffset
,
651 [in] ULARGE_INTEGER ulMaxSize
);
656 uuid(00000302-a8f2
-4877-ba0a
-fd2b6645fb94
)
658 interface IWICBitmapScaler
: IWICBitmapSource
661 [in] IWICBitmapSource
*pISource
,
664 [in] WICBitmapInterpolationMode mode
);
669 uuid(e4fbcf03
-223d
-4e81
-9333-d635556dd1b5
)
671 interface IWICBitmapClipper
: IWICBitmapSource
674 [in] IWICBitmapSource
*pISource
,
675 [in] const WICRect
*prc
);
678 cpp_quote
("DEFINE_GUID(CLSID_WICImagingFactory, 0xcacaf262,0x9370,0x4615,0xa1,0x3b,0x9f,0x55,0x39,0xda,0x4c,0x0a);")
682 uuid(ec5ec8a9
-c395
-4314-9c77
-54d7a935ff70
)
684 interface IWICImagingFactory
: IUnknown
686 HRESULT CreateDecoderFromFilename
(
687 [in] LPCWSTR wzFilename
,
688 [in, unique] const GUID
*pguidVendor
,
689 [in] DWORD dwDesiredAccess
,
690 [in] WICDecodeOptions metadataOptions
,
691 [out, retval] IWICBitmapDecoder
**ppIDecoder
);
693 HRESULT CreateDecoderFromStream
(
694 [in] IStream
*pIStream
,
695 [in, unique] const GUID
*pguidVendor
,
696 [in] WICDecodeOptions metadataOptions
,
697 [out, retval] IWICBitmapDecoder
**ppIDecoder
);
699 HRESULT CreateDecoderFromFileHandle
(
700 [in] ULONG_PTR hFile
,
701 [in, unique] const GUID
*pguidVendor
,
702 [in] WICDecodeOptions metadataOptions
,
703 [out, retval] IWICBitmapDecoder
**ppIDecoder
);
705 HRESULT CreateComponentInfo
(
706 [in] REFCLSID clsidComponent
,
707 [out] IWICComponentInfo
**ppIInfo
);
709 HRESULT CreateDecoder
(
710 [in] REFGUID guidContainerFormat
,
711 [in, unique] const GUID
*pguidVendor
,
712 [out, retval] IWICBitmapDecoder
**ppIDecoder
);
714 HRESULT CreateEncoder
(
715 [in] REFGUID guidContainerFormat
,
716 [in, unique] const GUID
*pguidVendor
,
717 [out, retval] IWICBitmapEncoder
**ppIEncoder
);
719 HRESULT CreatePalette
(
720 [out] IWICPalette
**ppIPalette
);
722 HRESULT CreateFormatConverter
(
723 [out] IWICFormatConverter
**ppIFormatConverter
);
725 HRESULT CreateBitmapScaler
(
726 [out] IWICBitmapScaler
**ppIBitmapScaler
);
728 HRESULT CreateBitmapClipper
(
729 [out] IWICBitmapClipper
**ppIBitmapClipper
);
731 HRESULT CreateBitmapFlipRotator
(
732 [out] IWICBitmapFlipRotator
**ppIBitmapFlipRotator
);
734 HRESULT CreateStream
(
735 [out] IWICStream
**ppIWICStream
);
737 HRESULT CreateColorContext
(
738 [out] IWICColorContext
**ppIWICColorContext
);
740 HRESULT CreateColorTransformer
(
741 [out] IWICColorTransform
**ppIWICColorTransform
);
743 HRESULT CreateBitmap
(
746 [in] REFWICPixelFormatGUID pixelFormat
,
747 [in] WICBitmapCreateCacheOption option
,
748 [out] IWICBitmap
**ppIBitmap
);
750 HRESULT CreateBitmapFromSource
(
751 [in] IWICBitmapSource
*piBitmapSource
,
752 [in] WICBitmapCreateCacheOption option
,
753 [out] IWICBitmap
**ppIBitmap
);
755 HRESULT CreateBitmapFromSourceRect
(
756 [in] IWICBitmapSource
*piBitmapSource
,
761 [out] IWICBitmap
**ppIBitmap
);
763 HRESULT CreateBitmapFromMemory
(
766 [in] REFWICPixelFormatGUID pixelFormat
,
768 [in] UINT cbBufferSize
,
769 [in, size_is(cbBufferSize
)] BYTE *pbBuffer
,
770 [out] IWICBitmap
**ppIBitmap
);
772 HRESULT CreateBitmapFromHBITMAP
(
773 [in] HBITMAP hBitmap,
774 [in, unique] HPALETTE hPalette,
775 [in] WICBitmapAlphaChannelOption options
,
776 [out] IWICBitmap
**ppIBitmap
);
778 HRESULT CreateBitmapFromHICON
(
780 [out] IWICBitmap
**ppIBitmap
);
782 HRESULT CreateComponentEnumerator
(
783 [in] DWORD componentTypes
,
785 [out] IEnumUnknown
**ppIEnumUnknown
);
787 HRESULT CreateFastMetadataEncoderFromDecoder
(
788 [in] IWICBitmapDecoder
*pIDecoder
,
789 [out] IWICFastMetadataEncoder
**ppIFastEncoder
);
791 HRESULT CreateFastMetadataEncoderFromFrameDecode
(
792 [in] IWICBitmapFrameDecode
*pIFrameDecoder
,
793 [out] IWICFastMetadataEncoder
**ppIFastEncoder
);
795 HRESULT CreateQueryWriter
(
796 [in] REFGUID guidMetadataFormat
,
797 [in, unique] const GUID
*pguidVendor
,
798 [out] IWICMetadataQueryWriter
**ppIQueryWriter
);
800 HRESULT CreateQueryWriterFromReader
(
801 [in] IWICMetadataQueryReader
*pIQueryReader
,
802 [in, unique] const GUID
*pguidVendor
,
803 [out] IWICMetadataQueryWriter
**ppIQueryWriter
);
806 cpp_quote
("HRESULT WINAPI WICConvertBitmapSource(REFWICPixelFormatGUID dstFormat, IWICBitmapSource *pISrc, IWICBitmapSource **ppIDst);")
808 cpp_quote
("DEFINE_GUID(CLSID_WICBmpDecoder, 0x6b462062,0x7cbf,0x400d,0x9f,0xdb,0x81,0x3d,0xd1,0x0f,0x27,0x78);")
809 cpp_quote
("DEFINE_GUID(CLSID_WICPngDecoder, 0x389ea17b,0x5078,0x4cde,0xb6,0xef,0x25,0xc1,0x51,0x75,0xc7,0x51);")
810 cpp_quote
("DEFINE_GUID(CLSID_WICIcoDecoder, 0xc61bfcdf,0x2e0f,0x4aad,0xa8,0xd7,0xe0,0x6b,0xaf,0xeb,0xcd,0xfe);")
811 cpp_quote
("DEFINE_GUID(CLSID_WICJpegDecoder, 0x9456a480,0xe88b,0x43ea,0x9e,0x73,0x0b,0x2d,0x9b,0x71,0xb1,0xca);")
812 cpp_quote
("DEFINE_GUID(CLSID_WICGifDecoder, 0x381dda3c,0x9ce9,0x4834,0xa2,0x3e,0x1f,0x98,0xf8,0xfc,0x52,0xbe);")
813 cpp_quote
("DEFINE_GUID(CLSID_WICTiffDecoder, 0xb54e85d9,0xfe23,0x499f,0x8b,0x88,0x6a,0xce,0xa7,0x13,0x75,0x2b);")
814 cpp_quote
("DEFINE_GUID(CLSID_WICWmpDecoder, 0xa26cec36,0x234c,0x4950,0xae,0x16,0xe3,0x4a,0xac,0xe7,0x1d,0x0d);")
816 cpp_quote
("DEFINE_GUID(CLSID_WICBmpEncoder, 0x69be8bb4,0xd66d,0x47c8,0x86,0x5a,0xed,0x15,0x89,0x43,0x37,0x82);")
817 cpp_quote
("DEFINE_GUID(CLSID_WICPngEncoder, 0x27949969,0x876a,0x41d7,0x94,0x47,0x56,0x8f,0x6a,0x35,0xa4,0xdc);")
818 cpp_quote
("DEFINE_GUID(CLSID_WICJpegEncoder, 0x1a34f5c1,0x4a5a,0x46dc,0xb6,0x44,0x1f,0x45,0x67,0xe7,0xa6,0x76);")
819 cpp_quote
("DEFINE_GUID(CLSID_WICGifEncoder, 0x114f5598,0x0b22,0x40a0,0x86,0xa1,0xc8,0x3e,0xa4,0x95,0xad,0xbd);")
820 cpp_quote
("DEFINE_GUID(CLSID_WICTiffEncoder, 0x0131be10,0x2001,0x4c5f,0xa9,0xb0,0xcc,0x88,0xfa,0xb6,0x4c,0xe8);")
821 cpp_quote
("DEFINE_GUID(CLSID_WICWmpEncoder, 0xac4ce3cb,0xe1c1,0x44cd,0x82,0x15,0x5a,0x16,0x65,0x50,0x9e,0xc2);")
823 cpp_quote
("DEFINE_GUID(CLSID_WICDefaultFormatConverter, 0x1a3f11dc,0xb514,0x4b17,0x8c,0x5f,0x21,0x54,0x51,0x38,0x52,0xf1);")
825 cpp_quote
("DEFINE_GUID(GUID_ContainerFormatBmp, 0x0af1d87e,0xfcfe,0x4188,0xbd,0xeb,0xa7,0x90,0x64,0x71,0xcb,0xe3);")
826 cpp_quote
("DEFINE_GUID(GUID_ContainerFormatPng, 0x1b7cfaf4,0x713f,0x473c,0xbb,0xcd,0x61,0x37,0x42,0x5f,0xae,0xaf);")
827 cpp_quote
("DEFINE_GUID(GUID_ContainerFormatIco, 0xa3a860c4,0x338f,0x4c17,0x91,0x9a,0xfb,0xa4,0xb5,0x62,0x8f,0x21);")
828 cpp_quote
("DEFINE_GUID(GUID_ContainerFormatJpeg, 0x19e4a5aa,0x5662,0x4fc5,0xa0,0xc0,0x17,0x58,0x02,0x8e,0x10,0x57);")
829 cpp_quote
("DEFINE_GUID(GUID_ContainerFormatTiff, 0x163bcc30,0xe2e9,0x4f0b,0x96,0x1d,0xa3,0xe9,0xfd,0xb7,0x88,0xa3);")
830 cpp_quote
("DEFINE_GUID(GUID_ContainerFormatGif, 0x1f8a5601,0x7d4d,0x4cbd,0x9c,0x82,0x1b,0xc8,0xd4,0xee,0xb9,0xa5);")
831 cpp_quote
("DEFINE_GUID(GUID_ContainerFormatWmp, 0x57a37caa,0x367a,0x4540,0x91,0x6b,0xf1,0x83,0xc5,0x09,0x3a,0x4b);")
833 cpp_quote
("DEFINE_GUID(GUID_VendorMicrosoft, 0xf0e749ca,0xedef,0x4589,0xa7,0x3a,0xee,0x0e,0x62,0x6a,0x2a,0x2b);")
835 cpp_quote
("DEFINE_GUID(CATID_WICBitmapDecoders, 0x7ed96837,0x96f0,0x4812,0xb2,0x11,0xf1,0x3c,0x24,0x11,0x7e,0xd3);")
836 cpp_quote
("DEFINE_GUID(CATID_WICBitmapEncoders, 0xac757296,0x3522,0x4e11,0x98,0x62,0xc1,0x7b,0xe5,0xa1,0x76,0x7e);")
837 cpp_quote
("DEFINE_GUID(CATID_WICFormatConverters, 0x7835eae8,0xbf14,0x49d1,0x93,0xce,0x53,0x3a,0x40,0x7b,0x22,0x48);")