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
23 cpp_quote
("#include \"dcommon.h\"")
25 cpp_quote
("#define WINCODEC_SDK_VERSION 0x0236")
27 #define CODEC_FORCE_DWORD
0x7fffffff
29 typedef enum WICDecodeOptions
{
30 WICDecodeMetadataCacheOnDemand
= 0x00000000,
31 WICDecodeMetadataCacheOnLoad
= 0x00000001,
32 WICMETADATACACHEOPTION_FORCE_DWORD
= CODEC_FORCE_DWORD
35 typedef enum WICBitmapCreateCacheOption
{
36 WICBitmapNoCache
= 0x00000000,
37 WICBitmapCacheOnDemand
= 0x00000001,
38 WICBitmapCacheOnLoad
= 0x00000002,
39 WICBITMAPCREATECACHEOPTION_FORCE_DWORD
= CODEC_FORCE_DWORD
40 } WICBitmapCreateCacheOption
;
42 typedef enum WICBitmapAlphaChannelOption
{
43 WICBitmapUseAlpha
= 0x00000000,
44 WICBitmapUsePremultipliedAlpha
= 0x00000001,
45 WICBitmapIgnoreAlpha
= 0x00000002,
46 WICBITMAPALPHACHANNELOPTIONS_FORCE_DWORD
= CODEC_FORCE_DWORD
47 } WICBitmapAlphaChannelOption
;
49 typedef enum WICBitmapDecoderCapabilities
{
50 WICBitmapDecoderCapabilitySameEncoder
= 0x00000001,
51 WICBitmapDecoderCapabilityCanDecodeAllImages
= 0x00000002,
52 WICBitmapDecoderCapabilityCanDecodeSomeImages
= 0x00000004,
53 WICBitmapDecoderCapabilityCanEnumerateMetadata
= 0x00000008,
54 WICBitmapDecoderCapabilityCanDecodeThumbnail
= 0x00000010,
55 } WICBitmapDecoderCapabilities
;
57 typedef enum WICBitmapDitherType
{
58 WICBitmapDitherTypeNone
= 0x00000000,
59 WICBitmapDitherTypeSolid
= 0x00000000,
60 WICBitmapDitherTypeOrdered4x4
= 0x00000001,
61 WICBitmapDitherTypeOrdered8x8
= 0x00000002,
62 WICBitmapDitherTypeOrdered16x16
= 0x00000003,
63 WICBitmapDitherTypeSpiral4x4
= 0x00000004,
64 WICBitmapDitherTypeSpiral8x8
= 0x00000005,
65 WICBitmapDitherTypeDualSpiral4x4
= 0x00000006,
66 WICBitmapDitherTypeDualSpiral8x8
= 0x00000007,
67 WICBitmapDitherTypeErrorDiffusion
= 0x00000008,
68 WICBITMAPDITHERTYPE_FORCE_DWORD
= CODEC_FORCE_DWORD
69 } WICBitmapDitherType
;
71 typedef enum WICBitmapEncoderCacheOption
{
72 WICBitmapEncoderCacheInMemory
= 0x00000000,
73 WICBitmapEncoderCacheTempFile
= 0x00000001,
74 WICBitmapEncoderNoCache
= 0x00000002,
75 WICBITMAPENCODERCACHEOPTION_FORCE_DWORD
= CODEC_FORCE_DWORD
76 } WICBitmapEncoderCacheOption
;
78 typedef enum WICBitmapInterpolationMode
{
79 WICBitmapInterpolationModeNearestNeighbor
= 0x00000000,
80 WICBitmapInterpolationModeLinear
= 0x00000001,
81 WICBitmapInterpolationModeCubic
= 0x00000002,
82 WICBitmapInterpolationModeFant
= 0x00000003,
83 WICBITMAPINTERPOLATIONMODE_FORCE_DWORD
= CODEC_FORCE_DWORD
84 } WICBitmapInterpolationMode
;
86 typedef enum WICBitmapLockFlags
{
87 WICBitmapLockRead
= 0x00000001,
88 WICBitmapLockWrite
= 0x00000002,
89 WICBITMAPLOCKFLAGS_FORCE_DWORD
= CODEC_FORCE_DWORD
92 typedef enum WICBitmapPaletteType
{
93 WICBitmapPaletteTypeCustom
= 0x00000000,
94 WICBitmapPaletteTypeMedianCut
= 0x00000001,
95 WICBitmapPaletteTypeFixedBW
= 0x00000002,
96 WICBitmapPaletteTypeFixedHalftone8
= 0x00000003,
97 WICBitmapPaletteTypeFixedHalftone27
= 0x00000004,
98 WICBitmapPaletteTypeFixedHalftone64
= 0x00000005,
99 WICBitmapPaletteTypeFixedHalftone125
= 0x00000006,
100 WICBitmapPaletteTypeFixedHalftone216
= 0x00000007,
101 WICBitmapPaletteTypeFixedWebPalette
= WICBitmapPaletteTypeFixedHalftone216
,
102 WICBitmapPaletteTypeFixedHalftone252
= 0x00000008,
103 WICBitmapPaletteTypeFixedHalftone256
= 0x00000009,
104 WICBitmapPaletteTypeFixedGray4
= 0x0000000A,
105 WICBitmapPaletteTypeFixedGray16
= 0x0000000B,
106 WICBitmapPaletteTypeFixedGray256
= 0x0000000C,
107 WICBITMAPPALETTETYPE_FORCE_DWORD
= CODEC_FORCE_DWORD
108 } WICBitmapPaletteType
;
110 typedef enum WICBitmapTransformOptions
{
111 WICBitmapTransformRotate0
= 0x00000000,
112 WICBitmapTransformRotate90
= 0x00000001,
113 WICBitmapTransformRotate180
= 0x00000002,
114 WICBitmapTransformRotate270
= 0x00000003,
115 WICBitmapTransformFlipHorizontal
= 0x00000008,
116 WICBitmapTransformFlipVertical
= 0x00000010,
117 WICBITMAPTRANSFORMOPTIONS_FORCE_DWORD
= CODEC_FORCE_DWORD
118 } WICBitmapTransformOptions
;
120 typedef enum WICColorContextType
{
121 WICColorContextUninitialized
= 0x00000000,
122 WICColorContextProfile
= 0x00000001,
123 WICColorContextExifColorSpace
= 0x00000002
124 } WICColorContextType
;
126 typedef enum WICComponentType
{
127 WICDecoder
= 0x00000001,
128 WICEncoder
= 0x00000002,
129 WICPixelFormatConverter
= 0x00000004,
130 WICMetadataReader
= 0x00000008,
131 WICMetadataWriter
= 0x00000010,
132 WICPixelFormat
= 0x00000020,
133 WICCOMPONENTTYPE_FORCE_DWORD
= CODEC_FORCE_DWORD
136 typedef enum WICComponentSigning
{
137 WICComponentSigned
= 0x00000001,
138 WICComponentUnsigned
= 0x00000002,
139 WICComponentSafe
= 0x00000004,
140 WICComponentDisabled
= 0x80000000
141 } WICComponentSigning
;
143 typedef enum WICComponentEnumerateOptions
{
144 WICComponentEnumerateDefault
= 0x00000000,
145 WICComponentEnumerateRefresh
= 0x00000001,
146 WICComponentEnumerateBuiltInOnly
= 0x20000000,
147 WICComponentEnumerateUnsigned
= 0x40000000,
148 WICComponentEnumerateDisabled
= 0x80000000
149 } WICComponentEnumerateOptions
;
151 typedef enum WICPixelFormatNumericRepresentation
{
152 WICPixelFormatNumericRepresentationUnspecified
= 0x00000000,
153 WICPixelFormatNumericRepresentationIndexed
= 0x00000001,
154 WICPixelFormatNumericRepresentationUnsignedInteger
= 0x00000002,
155 WICPixelFormatNumericRepresentationSignedInteger
= 0x00000003,
156 WICPixelFormatNumericRepresentationFixed
= 0x00000004,
157 WICPixelFormatNumericRepresentationFloat
= 0x00000005,
158 WICPIXELFORMATNUMERICREPRESENTATION_FORCE_DWORD
= CODEC_FORCE_DWORD
159 } WICPixelFormatNumericRepresentation
;
161 typedef enum WICTiffCompressionOption
{
162 WICTiffCompressionDontCare
= 0x00000000,
163 WICTiffCompressionNone
= 0x00000001,
164 WICTiffCompressionCCITT3
= 0x00000002,
165 WICTiffCompressionCCITT4
= 0x00000003,
166 WICTiffCompressionLZW
= 0x00000004,
167 WICTiffCompressionRLE
= 0x00000005,
168 WICTiffCompressionZIP
= 0x00000006,
169 WICTiffCompressionLZWHDifferencing
= 0x00000007,
170 WICTIFFCOMPRESSIONOPTION_FORCE_DWORD
= CODEC_FORCE_DWORD
171 } WICTiffCompressionOption
;
173 typedef enum WICPngFilterOption
{
174 WICPngFilterUnspecified
= 0,
175 WICPngFilterNone
= 1,
178 WICPngFilterAverage
= 4,
179 WICPngFilterPaeth
= 5,
180 WICPngFilterAdaptive
= 6,
181 WICPNFFILTEROPTION_FORCE_DWORD
= CODEC_FORCE_DWORD
182 } WICPngFilterOption
;
184 typedef GUID WICPixelFormatGUID
;
185 typedef REFGUID REFWICPixelFormatGUID
;
187 cpp_quote
("DEFINE_GUID(GUID_WICPixelFormatDontCare, 0x6fddc324,0x4e03,0x4bfe,0xb1,0x85,0x3d,0x77,0x76,0x8d,0xc9,0x00);")
188 cpp_quote
("#define GUID_WICPixelFormatUndefined GUID_WICPixelFormatDontCare")
190 cpp_quote
("DEFINE_GUID(GUID_WICPixelFormat1bppIndexed, 0x6fddc324,0x4e03,0x4bfe,0xb1,0x85,0x3d,0x77,0x76,0x8d,0xc9,0x01);")
191 cpp_quote
("DEFINE_GUID(GUID_WICPixelFormat2bppIndexed, 0x6fddc324,0x4e03,0x4bfe,0xb1,0x85,0x3d,0x77,0x76,0x8d,0xc9,0x02);")
192 cpp_quote
("DEFINE_GUID(GUID_WICPixelFormat4bppIndexed, 0x6fddc324,0x4e03,0x4bfe,0xb1,0x85,0x3d,0x77,0x76,0x8d,0xc9,0x03);")
193 cpp_quote
("DEFINE_GUID(GUID_WICPixelFormat8bppIndexed, 0x6fddc324,0x4e03,0x4bfe,0xb1,0x85,0x3d,0x77,0x76,0x8d,0xc9,0x04);")
195 cpp_quote
("DEFINE_GUID(GUID_WICPixelFormatBlackWhite, 0x6fddc324,0x4e03,0x4bfe,0xb1,0x85,0x3d,0x77,0x76,0x8d,0xc9,0x05);")
196 cpp_quote
("DEFINE_GUID(GUID_WICPixelFormat2bppGray, 0x6fddc324,0x4e03,0x4bfe,0xb1,0x85,0x3d,0x77,0x76,0x8d,0xc9,0x06);")
197 cpp_quote
("DEFINE_GUID(GUID_WICPixelFormat4bppGray, 0x6fddc324,0x4e03,0x4bfe,0xb1,0x85,0x3d,0x77,0x76,0x8d,0xc9,0x07);")
198 cpp_quote
("DEFINE_GUID(GUID_WICPixelFormat8bppGray, 0x6fddc324,0x4e03,0x4bfe,0xb1,0x85,0x3d,0x77,0x76,0x8d,0xc9,0x08);")
199 cpp_quote
("DEFINE_GUID(GUID_WICPixelFormat16bppGray, 0x6fddc324,0x4e03,0x4bfe,0xb1,0x85,0x3d,0x77,0x76,0x8d,0xc9,0x0b);")
201 cpp_quote
("DEFINE_GUID(GUID_WICPixelFormat16bppBGR555, 0x6fddc324,0x4e03,0x4bfe,0xb1,0x85,0x3d,0x77,0x76,0x8d,0xc9,0x09);")
202 cpp_quote
("DEFINE_GUID(GUID_WICPixelFormat16bppBGR565, 0x6fddc324,0x4e03,0x4bfe,0xb1,0x85,0x3d,0x77,0x76,0x8d,0xc9,0x0a);")
203 cpp_quote
("DEFINE_GUID(GUID_WICPixelFormat16bppBGRA5551, 0x05ec7c2b,0xf1e6,0x4961,0xad,0x46,0xe1,0xcc,0x81,0x0a,0x87,0xd2);")
204 cpp_quote
("DEFINE_GUID(GUID_WICPixelFormat24bppBGR, 0x6fddc324,0x4e03,0x4bfe,0xb1,0x85,0x3d,0x77,0x76,0x8d,0xc9,0x0c);")
205 cpp_quote
("DEFINE_GUID(GUID_WICPixelFormat24bppRGB, 0x6fddc324,0x4e03,0x4bfe,0xb1,0x85,0x3d,0x77,0x76,0x8d,0xc9,0x0d);")
206 cpp_quote
("DEFINE_GUID(GUID_WICPixelFormat32bppBGR, 0x6fddc324,0x4e03,0x4bfe,0xb1,0x85,0x3d,0x77,0x76,0x8d,0xc9,0x0e);")
207 cpp_quote
("DEFINE_GUID(GUID_WICPixelFormat32bppBGRA, 0x6fddc324,0x4e03,0x4bfe,0xb1,0x85,0x3d,0x77,0x76,0x8d,0xc9,0x0f);")
208 cpp_quote
("DEFINE_GUID(GUID_WICPixelFormat32bppPBGRA, 0x6fddc324,0x4e03,0x4bfe,0xb1,0x85,0x3d,0x77,0x76,0x8d,0xc9,0x10);")
209 cpp_quote
("DEFINE_GUID(GUID_WICPixelFormat32bppRGB, 0xd98c6b95,0x3efe,0x47d6,0xbb,0x25,0xeb,0x17,0x48,0xab,0x0c,0xf1);")
210 cpp_quote
("DEFINE_GUID(GUID_WICPixelFormat32bppRGBA, 0xf5c7ad2d,0x6a8d,0x43dd,0xa7,0xa8,0xa2,0x99,0x35,0x26,0x1a,0xe9);")
211 cpp_quote
("DEFINE_GUID(GUID_WICPixelFormat32bppPRGBA, 0x3cc4a650,0xa527,0x4d37,0xa9,0x16,0x31,0x42,0xc7,0xeb,0xed,0xba);")
212 cpp_quote
("DEFINE_GUID(GUID_WICPixelFormat32bppGrayFloat, 0x6fddc324,0x4e03,0x4bfe,0xb1,0x85,0x3d,0x77,0x76,0x8d,0xc9,0x11);")
214 cpp_quote
("DEFINE_GUID(GUID_WICPixelFormat48bppRGB, 0x6fddc324,0x4e03,0x4bfe,0xb1,0x85,0x3d,0x77,0x76,0x8d,0xc9,0x15);")
215 cpp_quote
("DEFINE_GUID(GUID_WICPixelFormat64bppRGBA, 0x6fddc324,0x4e03,0x4bfe,0xb1,0x85,0x3d,0x77,0x76,0x8d,0xc9,0x16);")
216 cpp_quote
("DEFINE_GUID(GUID_WICPixelFormat64bppPRGBA, 0x6fddc324,0x4e03,0x4bfe,0xb1,0x85,0x3d,0x77,0x76,0x8d,0xc9,0x17);")
218 cpp_quote
("DEFINE_GUID(GUID_WICPixelFormat32bppCMYK, 0x6fddc324,0x4e03,0x4bfe,0xb1,0x85,0x3d,0x77,0x76,0x8d,0xc9,0x1c);")
221 typedef DWORD
*D2D1_PIXEL_FORMAT
;
224 typedef struct WICRect
{
231 typedef struct WICBitmapPattern
{
232 ULARGE_INTEGER Position
;
239 typedef struct WICImageParameters
241 D2D1_PIXEL_FORMAT PixelFormat
;
248 } WICImageParameters
;
250 typedef UINT32 WICColor
;
252 interface ID2D1Device
;
253 interface ID2D1Image
;
254 interface IWICPalette
;
258 uuid(3c613a02
-34b2
-44ea
-9a7c
-45aea9c6fd6d
)
260 interface IWICColorContext
: IUnknown
262 HRESULT InitializeFromFilename
(
263 [in] LPCWSTR wzFilename
);
265 HRESULT InitializeFromMemory
(
266 [in, size_is(cbBufferSize
)] const BYTE *pbBuffer
,
267 [in] UINT cbBufferSize
);
269 HRESULT InitializeFromExifColorSpace
(
273 [out] WICColorContextType
*pType
);
275 HRESULT GetProfileBytes
(
277 [in, out, unique, size_is(cbBuffer
)] BYTE *pbBuffer
,
278 [out] UINT
*pcbActual
);
280 HRESULT GetExifColorSpace
(
286 uuid(00000120-a8f2
-4877-ba0a
-fd2b6645fb94
)
288 interface IWICBitmapSource
: IUnknown
291 [out] UINT
*puiWidth
,
292 [out] UINT
*puiHeight
);
294 HRESULT GetPixelFormat
(
295 [out] WICPixelFormatGUID
*pPixelFormat
);
297 HRESULT GetResolution
(
299 [out] double *pDpiY
);
302 [in] IWICPalette
*pIPalette
);
305 [in] const WICRect
*prc
,
307 [in] UINT cbBufferSize
,
308 [out, size_is(cbBufferSize
)] BYTE *pbBuffer
);
313 uuid(00000123-a8f2
-4877-ba0a
-fd2b6645fb94
)
315 interface IWICBitmapLock
: IUnknown
319 [out] UINT
*pHeight
);
322 [out] UINT
*pcbStride
);
324 HRESULT GetDataPointer
(
325 [out] UINT
*pcbBufferSize
,
326 [out, size_is(,*pcbBufferSize
)] BYTE **ppbData
);
328 HRESULT GetPixelFormat
(
329 [out] WICPixelFormatGUID
*pPixelFormat
);
334 uuid(5009834f
-2d6a
-41ce
-9e1b
-17c5aff7a782
)
336 interface IWICBitmapFlipRotator
: IWICBitmapSource
339 [in] IWICBitmapSource
*pISource
,
340 [in] WICBitmapTransformOptions options
);
345 uuid(00000121-a8f2
-4877-ba0a
-fd2b6645fb94
)
347 interface IWICBitmap
: IWICBitmapSource
350 [in] const WICRect
*prcLock
,
352 [out] IWICBitmapLock
**ppILock
);
355 [in] IWICPalette
*pIPalette
);
357 HRESULT SetResolution
(
364 uuid(00000040-a8f2
-4877-ba0a
-fd2b6645fb94
)
366 interface IWICPalette
: IUnknown
368 HRESULT InitializePredefined
(
369 [in] WICBitmapPaletteType ePaletteType
,
370 [in] BOOL fAddTransparentColor
);
372 HRESULT InitializeCustom
(
373 [in, size_is(colorCount
)] WICColor
*pColors
,
374 [in] UINT colorCount
);
376 HRESULT InitializeFromBitmap
(
377 [in] IWICBitmapSource
*pISurface
,
378 [in] UINT colorCount
,
379 [in] BOOL fAddTransparentColor
);
381 HRESULT InitializeFromPalette
(
382 [in] IWICPalette
*pIPalette
);
385 [out] WICBitmapPaletteType
*pePaletteType
);
387 HRESULT GetColorCount
(
388 [out] UINT
*pcCount
);
391 [in] UINT colorCount
,
392 [out, size_is(colorCount
)] WICColor
*pColors
,
393 [out] UINT
*pcActualColors
);
395 HRESULT IsBlackWhite
(
396 [out] BOOL
*pfIsBlackWhite
);
399 [out] BOOL
*pfIsGrayscale
);
402 [out] BOOL
*pfHasAlpha
);
407 uuid(23bc3f0a
-698b
-4357-886b
-f24d50671334
)
409 interface IWICComponentInfo
: IUnknown
411 HRESULT GetComponentType
(
412 [out] WICComponentType
*pType
);
415 [out] CLSID
*pclsid
);
417 HRESULT GetSigningStatus
(
418 [out] DWORD
*pStatus
);
422 [in, out, unique, size_is(cchAuthor
)] WCHAR
*wzAuthor
,
423 [out] UINT
*pcchActual
);
425 HRESULT GetVendorGUID
(
426 [out] GUID
*pguidVendor
);
429 [in] UINT cchVersion
,
430 [in, out, unique, size_is(cchVersion
)] WCHAR
*wzVersion
,
431 [out] UINT
*pcchActual
);
433 HRESULT GetSpecVersion
(
434 [in] UINT cchSpecVersion
,
435 [in, out, unique, size_is(cchSpecVersion
)] WCHAR
*wzSpecVersion
,
436 [out] UINT
*pcchActual
);
438 HRESULT GetFriendlyName
(
439 [in] UINT cchFriendlyName
,
440 [in, out, unique, size_is(cchFriendlyName
)] WCHAR
*wzFriendlyName
,
441 [out] UINT
*pcchActual
);
446 uuid(30989668-e1c9
-4597-b395
-458eedb808df
)
448 interface IWICMetadataQueryReader
: IUnknown
450 HRESULT GetContainerFormat
(
451 [out] GUID
*pguidContainerFormat
);
454 [in] UINT cchMaxLength
,
455 [in, out, unique, size_is(cchMaxLength
)] WCHAR
*wzNamespace
,
456 [out] UINT
*pcchActualLength
);
458 HRESULT GetMetadataByName
(
460 [in, out, unique] PROPVARIANT
*pvarValue
);
462 HRESULT GetEnumerator
(
463 [out] IEnumString
**ppIEnumString
);
468 uuid(a721791a
-0def
-4d06
-bd91
-2118bf1db10b
)
470 interface IWICMetadataQueryWriter
: IWICMetadataQueryReader
472 HRESULT SetMetadataByName
(
474 [in] const PROPVARIANT
*pvarValue
);
476 HRESULT RemoveMetadataByName
(
477 [in] LPCWSTR wzName
);
482 uuid(3b16811b
-6a43
-4ec9
-a813
-3d930c13b940
)
484 interface IWICBitmapFrameDecode
: IWICBitmapSource
486 HRESULT GetMetadataQueryReader
(
487 [out] IWICMetadataQueryReader
**ppIMetadataQueryReader
);
489 HRESULT GetColorContexts
(
491 [in, out, unique, size_is(cCount
)] IWICColorContext
**ppIColorContexts
,
492 [out] UINT
*pcActualCount
);
494 HRESULT GetThumbnail
(
495 [out] IWICBitmapSource
**ppIThumbnail
);
500 uuid(e8eda601
-3d48
-431a
-ab44
-69059be88bbe
)
502 interface IWICPixelFormatInfo
: IWICComponentInfo
504 HRESULT GetFormatGUID
(
505 [out] GUID
* pFormat
);
507 HRESULT GetColorContext
(
508 [out] IWICColorContext
**ppIColorContext
);
510 HRESULT GetBitsPerPixel
(
511 [out] UINT
*puiBitsPerPixel
);
513 HRESULT GetChannelCount
(
514 [out] UINT
*puiChannelCount
);
516 HRESULT GetChannelMask
(
517 [in] UINT uiChannelIndex
,
518 [in] UINT cbMaskBuffer
,
519 [in, out, unique, size_is(cbMaskBuffer
)] BYTE *pbMaskBuffer
,
520 [out] UINT
*pcbActual
);
525 uuid(a9db33a2
-af5f
-43c7
-b679
-74f5984b5aa4
)
527 interface IWICPixelFormatInfo2
: IWICPixelFormatInfo
529 HRESULT SupportsTransparency
(
530 [out] BOOL
*pfSupportsTransparency
);
532 HRESULT GetNumericRepresentation
(
533 [out] WICPixelFormatNumericRepresentation
*pNumericRepresentation
);
538 uuid(e87a44c4
-b76e
-4c47
-8b09
-298eb12a2714
)
540 interface IWICBitmapCodecInfo
: IWICComponentInfo
542 HRESULT GetContainerFormat
(
543 [out] GUID
*pguidContainerFormat
);
545 HRESULT GetPixelFormats
(
547 [in, out, unique, size_is(cFormats
)] GUID
*pguidPixelFormats
,
548 [out] UINT
*pcActual
);
550 HRESULT GetColorManagementVersion
(
551 [in] UINT cchColorManagementVersion
,
552 [in, out, unique, size_is(cchColorManagementVersion
)] WCHAR
*wzColorManagementVersion
,
553 [out] UINT
*pcchActual
);
555 HRESULT GetDeviceManufacturer
(
556 [in] UINT cchDeviceManufacturer
,
557 [in, out, unique, size_is(cchDeviceManufacturer
)] WCHAR
*wzDeviceManufacturer
,
558 [out] UINT
*pcchActual
);
560 HRESULT GetDeviceModels
(
561 [in] UINT cchDeviceModels
,
562 [in, out, unique, size_is(cchDeviceModels
)] WCHAR
*wzDeviceModels
,
563 [out] UINT
*pcchActual
);
565 HRESULT GetMimeTypes
(
566 [in] UINT cchMimeTypes
,
567 [in, out, unique, size_is(cchMimeTypes
)] WCHAR
*wzMimeTypes
,
568 [out] UINT
*pcchActual
);
570 HRESULT GetFileExtensions
(
571 [in] UINT cchFileExtensions
,
572 [in, out, unique, size_is(cchFileExtensions
)] WCHAR
*wzFileExtensions
,
573 [out] UINT
*pcchActual
);
575 HRESULT DoesSupportAnimation
(
576 [out] BOOL
*pfSupportAnimation
);
578 HRESULT DoesSupportChromaKey
(
579 [out] BOOL
*pfSupportChromaKey
);
581 HRESULT DoesSupportLossless
(
582 [out] BOOL
*pfSupportLossless
);
584 HRESULT DoesSupportMultiframe
(
585 [out] BOOL
*pfSupportMultiframe
);
587 HRESULT MatchesMimeType
(
588 [in] LPCWSTR wzMimeType
,
589 [out] BOOL
*pfMatches
);
592 interface IWICBitmapDecoder
;
596 uuid(d8cd007f
-d08f
-4191-9bfc
-236ea7f0e4b5
)
598 interface IWICBitmapDecoderInfo
: IWICBitmapCodecInfo
602 [in] UINT cbSizePatterns
,
603 [in, out, unique] WICBitmapPattern
*pPatterns
,
604 [in, out, unique] UINT
*pcPatterns
,
605 [in, out, unique] UINT
*pcbPatternsActual
);
607 HRESULT MatchesPattern
(
608 [in] IStream
*pIStream
,
609 [out] BOOL
*pfMatches
);
611 HRESULT CreateInstance
(
612 [out] IWICBitmapDecoder
**ppIBitmapDecoder
);
617 uuid(9edde9e7
-8dee
-47ea
-99df
-e6faf2ed44bf
)
619 interface IWICBitmapDecoder
: IUnknown
621 HRESULT QueryCapability
(
622 [in] IStream
*pIStream
,
623 [out] DWORD
*pdwCapability
);
626 [in] IStream
*pIStream
,
627 [in] WICDecodeOptions cacheOptions
);
629 HRESULT GetContainerFormat
(
630 [out] GUID
*pguidContainerFormat
);
632 HRESULT GetDecoderInfo
(
633 [out] IWICBitmapDecoderInfo
**ppIDecoderInfo
);
636 [in] IWICPalette
*pIPalette
);
638 HRESULT GetMetadataQueryReader
(
639 [out] IWICMetadataQueryReader
**ppIMetadataQueryReader
);
642 [out] IWICBitmapSource
**ppIBitmapSource
);
644 HRESULT GetColorContexts
(
646 [in, out, unique, size_is(cCount
)] IWICColorContext
**ppIColorContexts
,
647 [out] UINT
*pcActualCount
);
649 HRESULT GetThumbnail
(
650 [out] IWICBitmapSource
**ppIThumbnail
);
652 HRESULT GetFrameCount
(
657 [out] IWICBitmapFrameDecode
**ppIBitmapFrame
);
662 uuid(00000105-a8f2
-4877-ba0a
-fd2b6645fb94
)
664 interface IWICBitmapFrameEncode
: IUnknown
667 [in, unique] IPropertyBag2
*pIEncoderOptions
);
673 HRESULT SetResolution
(
677 HRESULT SetPixelFormat
(
678 [in, out] WICPixelFormatGUID
*pPixelFormat
);
680 HRESULT SetColorContexts
(
682 [in, size_is(cCount
)] IWICColorContext
**ppIColorContext
);
685 [in] IWICPalette
*pIPalette
);
687 HRESULT SetThumbnail
(
688 [in] IWICBitmapSource
*pIThumbnail
);
693 [in] UINT cbBufferSize
,
694 [in, size_is(cbBufferSize
)] BYTE *pbPixels
);
697 [in] IWICBitmapSource
*pIBitmapSource
,
698 [in, unique] WICRect
*prc
);
702 HRESULT GetMetadataQueryWriter
(
703 IWICMetadataQueryWriter
**ppIMetadataQueryWriter
);
706 interface IWICBitmapEncoder
;
710 uuid(94c9b4ee
-a09f
-4f92
-8a1e
-4a9bce7e76fb
)
712 interface IWICBitmapEncoderInfo
: IWICBitmapCodecInfo
714 HRESULT CreateInstance
(
715 [out] IWICBitmapEncoder
**ppIBitmapEncoder
);
720 uuid(00000103-a8f2
-4877-ba0a
-fd2b6645fb94
)
722 interface IWICBitmapEncoder
: IUnknown
725 [in] IStream
*pIStream
,
726 [in] WICBitmapEncoderCacheOption cacheOption
);
728 HRESULT GetContainerFormat
(
729 [out] GUID
*pguidContainerFormat
);
731 HRESULT GetEncoderInfo
(
732 [out] IWICBitmapEncoderInfo
**ppIEncoderInfo
);
734 HRESULT SetColorContexts
(
736 [in, size_is(cCount
)] IWICColorContext
**ppIColorContext
);
739 [in] IWICPalette
*pIPalette
);
741 HRESULT SetThumbnail
(
742 [in] IWICBitmapSource
*pIThumbnail
);
745 [in] IWICBitmapSource
*pIPreview
);
747 HRESULT CreateNewFrame
(
748 [out] IWICBitmapFrameEncode
**ppIFrameEncode
,
749 [in, out, unique] IPropertyBag2
**ppIEncoderOptions
);
753 HRESULT GetMetadataQueryWriter
(
754 [out] IWICMetadataQueryWriter
**ppIMetadataQueryWriter
);
759 uuid(00000301-a8f2
-4877-ba0a
-fd2b6645fb94
)
761 interface IWICFormatConverter
: IWICBitmapSource
764 [in] IWICBitmapSource
*pISource
,
765 [in] REFWICPixelFormatGUID dstFormat
,
766 [in] WICBitmapDitherType dither
,
767 [in] IWICPalette
*pIPalette
,
768 [in] double alphaThresholdPercent
,
769 [in] WICBitmapPaletteType paletteTranslate
);
772 [in] REFWICPixelFormatGUID srcPixelFormat
,
773 [in] REFWICPixelFormatGUID dstPixelFormat
,
774 [out] BOOL
*pfCanConvert
);
779 uuid(9f34fb65
-13f4
-4f15
-bc57
-3726b5e53d9f
)
781 interface IWICFormatConverterInfo
: IWICComponentInfo
783 HRESULT GetPixelFormats
(
785 [in, out, size_is(cFormats
)] WICPixelFormatGUID
*pPixelFormatGUIDs
,
786 [out] UINT
*pcActual
);
788 HRESULT CreateInstance
(
789 [out] IWICFormatConverter
**ppIConverter
);
794 uuid(135ff860
-22b7
-4ddf
-b0f6
-218f4f299a43
)
796 interface IWICStream
: IStream
798 HRESULT InitializeFromIStream
(
799 [in] IStream
*pIStream
);
801 HRESULT InitializeFromFilename
(
802 [in] LPCWSTR wzFileName
,
803 [in] DWORD dwAccessMode
);
805 HRESULT InitializeFromMemory
(
806 [in, size_is(cbBufferSize
)] BYTE *pbBuffer
,
807 [in] DWORD cbBufferSize
);
809 HRESULT InitializeFromIStreamRegion
(
810 [in] IStream
*pIStream
,
811 [in] ULARGE_INTEGER ulOffset
,
812 [in] ULARGE_INTEGER ulMaxSize
);
817 uuid(00000302-a8f2
-4877-ba0a
-fd2b6645fb94
)
819 interface IWICBitmapScaler
: IWICBitmapSource
822 [in] IWICBitmapSource
*pISource
,
825 [in] WICBitmapInterpolationMode mode
);
830 uuid(e4fbcf03
-223d
-4e81
-9333-d635556dd1b5
)
832 interface IWICBitmapClipper
: IWICBitmapSource
835 [in] IWICBitmapSource
*pISource
,
836 [in] const WICRect
*prc
);
841 uuid(b66f034f
-d0e2
-40ab
-b436
-6de39e321a94
)
843 interface IWICColorTransform
: IWICBitmapSource
846 [in] IWICBitmapSource
*pIBitmapSource
,
847 [in] IWICColorContext
*pIContextSource
,
848 [in] IWICColorContext
*pIContextDest
,
849 [in] REFWICPixelFormatGUID pixelFmtDest
);
854 uuid(b84e2c09
-78c9
-4ac4
-8bd3
-524ae1663a2f
)
856 interface IWICFastMetadataEncoder
: IUnknown
860 HRESULT GetMetadataQueryWriter
(
861 [out] IWICMetadataQueryWriter
**ppIMetadataQueryWriter
);
866 uuid(04c75bf8
-3ce1
-473b
-acc5
-3cc4f5e94999
),
869 interface IWICImageEncoder
: IUnknown
872 [in] ID2D1Image
*image
,
873 [in] IWICBitmapFrameEncode
*encode
,
874 [in, unique] const WICImageParameters
*parameters
);
876 HRESULT WriteFrameThumbnail
(
877 [in] ID2D1Image
*image
,
878 [in] IWICBitmapFrameEncode
*encode
,
879 [in, unique] const WICImageParameters
*parameters
);
881 HRESULT WriteThumbnail
(
882 [in] ID2D1Image
*image
,
883 [in] IWICBitmapEncoder
*encoder
,
884 [in, unique] const WICImageParameters
*parameters
);
887 cpp_quote
("DEFINE_GUID(CLSID_WICImagingFactory, 0xcacaf262,0x9370,0x4615,0xa1,0x3b,0x9f,0x55,0x39,0xda,0x4c,0x0a);")
888 cpp_quote
("DEFINE_GUID(CLSID_WICImagingFactory1, 0xcacaf262,0x9370,0x4615,0xa1,0x3b,0x9f,0x55,0x39,0xda,0x4c,0x0a);")
889 cpp_quote
("DEFINE_GUID(CLSID_WICImagingFactory2, 0x317d06e8,0x5f24,0x433d,0xbd,0xf7,0x79,0xce,0x68,0xd8,0xab,0xc2);")
893 uuid(ec5ec8a9
-c395
-4314-9c77
-54d7a935ff70
)
895 interface IWICImagingFactory
: IUnknown
897 HRESULT CreateDecoderFromFilename
(
898 [in] LPCWSTR wzFilename
,
899 [in, unique] const GUID
*pguidVendor
,
900 [in] DWORD dwDesiredAccess
,
901 [in] WICDecodeOptions metadataOptions
,
902 [out, retval] IWICBitmapDecoder
**ppIDecoder
);
904 HRESULT CreateDecoderFromStream
(
905 [in] IStream
*pIStream
,
906 [in, unique] const GUID
*pguidVendor
,
907 [in] WICDecodeOptions metadataOptions
,
908 [out, retval] IWICBitmapDecoder
**ppIDecoder
);
910 HRESULT CreateDecoderFromFileHandle
(
911 [in] ULONG_PTR hFile
,
912 [in, unique] const GUID
*pguidVendor
,
913 [in] WICDecodeOptions metadataOptions
,
914 [out, retval] IWICBitmapDecoder
**ppIDecoder
);
916 HRESULT CreateComponentInfo
(
917 [in] REFCLSID clsidComponent
,
918 [out] IWICComponentInfo
**ppIInfo
);
920 HRESULT CreateDecoder
(
921 [in] REFGUID guidContainerFormat
,
922 [in, unique] const GUID
*pguidVendor
,
923 [out, retval] IWICBitmapDecoder
**ppIDecoder
);
925 HRESULT CreateEncoder
(
926 [in] REFGUID guidContainerFormat
,
927 [in, unique] const GUID
*pguidVendor
,
928 [out, retval] IWICBitmapEncoder
**ppIEncoder
);
930 HRESULT CreatePalette
(
931 [out] IWICPalette
**ppIPalette
);
933 HRESULT CreateFormatConverter
(
934 [out] IWICFormatConverter
**ppIFormatConverter
);
936 HRESULT CreateBitmapScaler
(
937 [out] IWICBitmapScaler
**ppIBitmapScaler
);
939 HRESULT CreateBitmapClipper
(
940 [out] IWICBitmapClipper
**ppIBitmapClipper
);
942 HRESULT CreateBitmapFlipRotator
(
943 [out] IWICBitmapFlipRotator
**ppIBitmapFlipRotator
);
945 HRESULT CreateStream
(
946 [out] IWICStream
**ppIWICStream
);
948 HRESULT CreateColorContext
(
949 [out] IWICColorContext
**ppIWICColorContext
);
951 HRESULT CreateColorTransformer
(
952 [out] IWICColorTransform
**ppIWICColorTransform
);
954 HRESULT CreateBitmap
(
957 [in] REFWICPixelFormatGUID pixelFormat
,
958 [in] WICBitmapCreateCacheOption option
,
959 [out] IWICBitmap
**ppIBitmap
);
961 HRESULT CreateBitmapFromSource
(
962 [in] IWICBitmapSource
*piBitmapSource
,
963 [in] WICBitmapCreateCacheOption option
,
964 [out] IWICBitmap
**ppIBitmap
);
966 HRESULT CreateBitmapFromSourceRect
(
967 [in] IWICBitmapSource
*piBitmapSource
,
972 [out] IWICBitmap
**ppIBitmap
);
974 HRESULT CreateBitmapFromMemory
(
977 [in] REFWICPixelFormatGUID pixelFormat
,
979 [in] UINT cbBufferSize
,
980 [in, size_is(cbBufferSize
)] BYTE *pbBuffer
,
981 [out] IWICBitmap
**ppIBitmap
);
983 HRESULT CreateBitmapFromHBITMAP
(
984 [in] HBITMAP hBitmap,
985 [in, unique] HPALETTE hPalette,
986 [in] WICBitmapAlphaChannelOption options
,
987 [out] IWICBitmap
**ppIBitmap
);
989 HRESULT CreateBitmapFromHICON
(
991 [out] IWICBitmap
**ppIBitmap
);
993 HRESULT CreateComponentEnumerator
(
994 [in] DWORD componentTypes
,
996 [out] IEnumUnknown
**ppIEnumUnknown
);
998 HRESULT CreateFastMetadataEncoderFromDecoder
(
999 [in] IWICBitmapDecoder
*pIDecoder
,
1000 [out] IWICFastMetadataEncoder
**ppIFastEncoder
);
1002 HRESULT CreateFastMetadataEncoderFromFrameDecode
(
1003 [in] IWICBitmapFrameDecode
*pIFrameDecoder
,
1004 [out] IWICFastMetadataEncoder
**ppIFastEncoder
);
1006 HRESULT CreateQueryWriter
(
1007 [in] REFGUID guidMetadataFormat
,
1008 [in, unique] const GUID
*pguidVendor
,
1009 [out] IWICMetadataQueryWriter
**ppIQueryWriter
);
1011 HRESULT CreateQueryWriterFromReader
(
1012 [in] IWICMetadataQueryReader
*pIQueryReader
,
1013 [in, unique] const GUID
*pguidVendor
,
1014 [out] IWICMetadataQueryWriter
**ppIQueryWriter
);
1019 uuid(7b816b45
-1996-4476-b132
-de9e247c8af0
),
1022 interface IWICImagingFactory2
: IWICImagingFactory
1024 HRESULT CreateImageEncoder
(
1025 [in] ID2D1Device
*device
,
1026 [out] IWICImageEncoder
**encoder
);
1032 uuid(dc2bb46d
-3f07
-481e-8625-220c4aedbb33
)
1034 interface IWICEnumMetadataItem
: IUnknown
1038 [in, out, unique, size_is(celt
)] PROPVARIANT
*rgeltSchema
,
1039 [in, out, size_is(celt
)] PROPVARIANT
*rgeltId
,
1040 [in, out, optional, size_is(celt
)] PROPVARIANT
*rgeltValue
,
1041 [out, optional] ULONG
*pceltFetched
);
1049 [out] IWICEnumMetadataItem
**ppIEnumMetadataItem
);
1052 cpp_quote
("HRESULT WINAPI WICConvertBitmapSource(REFWICPixelFormatGUID dstFormat, IWICBitmapSource *pISrc, IWICBitmapSource **ppIDst);")
1054 cpp_quote
("HRESULT WINAPI WICMapGuidToShortName(REFGUID,UINT,WCHAR *,UINT *);")
1055 cpp_quote
("HRESULT WINAPI WICMapShortNameToGuid(PCWSTR,GUID *);")
1056 cpp_quote
("HRESULT WINAPI WICMapSchemaToName(REFGUID,LPWSTR,UINT,WCHAR *,UINT *);")
1058 cpp_quote
("DEFINE_GUID(CLSID_WICBmpDecoder, 0x6b462062,0x7cbf,0x400d,0x9f,0xdb,0x81,0x3d,0xd1,0x0f,0x27,0x78);")
1059 cpp_quote
("DEFINE_GUID(CLSID_WICPngDecoder, 0x389ea17b,0x5078,0x4cde,0xb6,0xef,0x25,0xc1,0x51,0x75,0xc7,0x51);")
1060 cpp_quote
("DEFINE_GUID(CLSID_WICIcoDecoder, 0xc61bfcdf,0x2e0f,0x4aad,0xa8,0xd7,0xe0,0x6b,0xaf,0xeb,0xcd,0xfe);")
1061 cpp_quote
("DEFINE_GUID(CLSID_WICJpegDecoder, 0x9456a480,0xe88b,0x43ea,0x9e,0x73,0x0b,0x2d,0x9b,0x71,0xb1,0xca);")
1062 cpp_quote
("DEFINE_GUID(CLSID_WICGifDecoder, 0x381dda3c,0x9ce9,0x4834,0xa2,0x3e,0x1f,0x98,0xf8,0xfc,0x52,0xbe);")
1063 cpp_quote
("DEFINE_GUID(CLSID_WICTiffDecoder, 0xb54e85d9,0xfe23,0x499f,0x8b,0x88,0x6a,0xce,0xa7,0x13,0x75,0x2b);")
1064 cpp_quote
("DEFINE_GUID(CLSID_WICWmpDecoder, 0xa26cec36,0x234c,0x4950,0xae,0x16,0xe3,0x4a,0xac,0xe7,0x1d,0x0d);")
1066 cpp_quote
("DEFINE_GUID(CLSID_WICBmpEncoder, 0x69be8bb4,0xd66d,0x47c8,0x86,0x5a,0xed,0x15,0x89,0x43,0x37,0x82);")
1067 cpp_quote
("DEFINE_GUID(CLSID_WICPngEncoder, 0x27949969,0x876a,0x41d7,0x94,0x47,0x56,0x8f,0x6a,0x35,0xa4,0xdc);")
1068 cpp_quote
("DEFINE_GUID(CLSID_WICJpegEncoder, 0x1a34f5c1,0x4a5a,0x46dc,0xb6,0x44,0x1f,0x45,0x67,0xe7,0xa6,0x76);")
1069 cpp_quote
("DEFINE_GUID(CLSID_WICGifEncoder, 0x114f5598,0x0b22,0x40a0,0x86,0xa1,0xc8,0x3e,0xa4,0x95,0xad,0xbd);")
1070 cpp_quote
("DEFINE_GUID(CLSID_WICTiffEncoder, 0x0131be10,0x2001,0x4c5f,0xa9,0xb0,0xcc,0x88,0xfa,0xb6,0x4c,0xe8);")
1071 cpp_quote
("DEFINE_GUID(CLSID_WICWmpEncoder, 0xac4ce3cb,0xe1c1,0x44cd,0x82,0x15,0x5a,0x16,0x65,0x50,0x9e,0xc2);")
1073 cpp_quote
("DEFINE_GUID(CLSID_WICDefaultFormatConverter, 0x1a3f11dc,0xb514,0x4b17,0x8c,0x5f,0x21,0x54,0x51,0x38,0x52,0xf1);")
1075 cpp_quote
("DEFINE_GUID(GUID_ContainerFormatBmp, 0x0af1d87e,0xfcfe,0x4188,0xbd,0xeb,0xa7,0x90,0x64,0x71,0xcb,0xe3);")
1076 cpp_quote
("DEFINE_GUID(GUID_ContainerFormatPng, 0x1b7cfaf4,0x713f,0x473c,0xbb,0xcd,0x61,0x37,0x42,0x5f,0xae,0xaf);")
1077 cpp_quote
("DEFINE_GUID(GUID_ContainerFormatIco, 0xa3a860c4,0x338f,0x4c17,0x91,0x9a,0xfb,0xa4,0xb5,0x62,0x8f,0x21);")
1078 cpp_quote
("DEFINE_GUID(GUID_ContainerFormatJpeg, 0x19e4a5aa,0x5662,0x4fc5,0xa0,0xc0,0x17,0x58,0x02,0x8e,0x10,0x57);")
1079 cpp_quote
("DEFINE_GUID(GUID_ContainerFormatTiff, 0x163bcc30,0xe2e9,0x4f0b,0x96,0x1d,0xa3,0xe9,0xfd,0xb7,0x88,0xa3);")
1080 cpp_quote
("DEFINE_GUID(GUID_ContainerFormatGif, 0x1f8a5601,0x7d4d,0x4cbd,0x9c,0x82,0x1b,0xc8,0xd4,0xee,0xb9,0xa5);")
1081 cpp_quote
("DEFINE_GUID(GUID_ContainerFormatWmp, 0x57a37caa,0x367a,0x4540,0x91,0x6b,0xf1,0x83,0xc5,0x09,0x3a,0x4b);")
1083 cpp_quote
("DEFINE_GUID(GUID_VendorMicrosoft, 0xf0e749ca,0xedef,0x4589,0xa7,0x3a,0xee,0x0e,0x62,0x6a,0x2a,0x2b);")
1085 cpp_quote
("DEFINE_GUID(CLSID_WICImagingCategories, 0xfae3d380,0xfea4,0x4623,0x8c,0x75,0xc6,0xb6,0x11,0x10,0xb6,0x81);")
1086 cpp_quote
("DEFINE_GUID(CATID_WICBitmapDecoders, 0x7ed96837,0x96f0,0x4812,0xb2,0x11,0xf1,0x3c,0x24,0x11,0x7e,0xd3);")
1087 cpp_quote
("DEFINE_GUID(CATID_WICBitmapEncoders, 0xac757296,0x3522,0x4e11,0x98,0x62,0xc1,0x7b,0xe5,0xa1,0x76,0x7e);")
1088 cpp_quote
("DEFINE_GUID(CATID_WICFormatConverters, 0x7835eae8,0xbf14,0x49d1,0x93,0xce,0x53,0x3a,0x40,0x7b,0x22,0x48);")
1089 cpp_quote
("DEFINE_GUID(CATID_WICMetadataReader, 0x05af94d8,0x7174,0x4cd2,0xbe,0x4a,0x41,0x24,0xb8,0x0e,0xe4,0xb8);")
1090 cpp_quote
("DEFINE_GUID(CATID_WICPixelFormats, 0x2b46e70f,0xcda7,0x473e,0x89,0xf6,0xdc,0x96,0x30,0xa2,0x39,0x0b);")