1 // Licensed under the Apache License, Version 2.0
2 // <LICENSE-APACHE or http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
3 // <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your option.
4 // All files in the project carrying such notice may not be copied, modified, or distributed
5 // except according to those terms.
6 //! Mappings for the contents of wincodec.h
7 use ctypes::c_double;
8 use shared::basetsd::{UINT32, ULONG_PTR};
9 use shared::dxgiformat::DXGI_FORMAT;
10 use shared::dxgitype::{
11 DXGI_JPEG_AC_HUFFMAN_TABLE, DXGI_JPEG_DC_HUFFMAN_TABLE,
12 DXGI_JPEG_QUANTIZATION_TABLE
13 };
14 use shared::guiddef::{CLSID, GUID, REFCLSID, REFGUID};
15 use shared::minwindef::{BOOL, BYTE, DWORD, FLOAT, INT, LPVOID, UINT, ULONG};
16 use shared::ntdef::{LPCWSTR, LPWSTR, PCWSTR, WCHAR};
17 use shared::windef::{HBITMAP, HICON, HPALETTE};
18 use shared::winerror::{
19 E_ABORT, E_ACCESSDENIED, E_FAIL, E_INVALIDARG, E_NOTIMPL, E_OUTOFMEMORY, HRESULT,
20 SEVERITY_ERROR
21 };
22 use um::d2d1::ID2D1Image;
23 use um::d2d1_1::ID2D1Device;
24 use um::dcommon::D2D1_PIXEL_FORMAT;
25 use um::objidlbase::{IEnumString, IEnumUnknown, IStream, IStreamVtbl};
26 use um::ocidl::IPropertyBag2;
27 use um::propidl::PROPVARIANT;
28 use um::unknwnbase::{IUnknown, IUnknownVtbl};
29 use um::winnt::{HANDLE, ULARGE_INTEGER};
30 DEFINE_GUID!{CLSID_WICImagingFactory,
31 0xcacaf262, 0x9370, 0x4615, 0xa1, 0x3b, 0x9f, 0x55, 0x39, 0xda, 0x4c, 0xa}
32 DEFINE_GUID!{CLSID_WICImagingFactory1,
33 0xcacaf262, 0x9370, 0x4615, 0xa1, 0x3b, 0x9f, 0x55, 0x39, 0xda, 0x4c, 0xa}
34 DEFINE_GUID!{CLSID_WICImagingFactory2,
35 0x317d06e8, 0x5f24, 0x433d, 0xbd, 0xf7, 0x79, 0xce, 0x68, 0xd8, 0xab, 0xc2}
36 DEFINE_GUID!{GUID_VendorMicrosoft,
37 0xf0e749ca, 0xedef, 0x4589, 0xa7, 0x3a, 0xee, 0xe, 0x62, 0x6a, 0x2a, 0x2b}
38 DEFINE_GUID!{GUID_VendorMicrosoftBuiltIn,
39 0x257a30fd, 0x6b6, 0x462b, 0xae, 0xa4, 0x63, 0xf7, 0xb, 0x86, 0xe5, 0x33}
40 DEFINE_GUID!{CLSID_WICPngDecoder,
41 0x389ea17b, 0x5078, 0x4cde, 0xb6, 0xef, 0x25, 0xc1, 0x51, 0x75, 0xc7, 0x51}
42 DEFINE_GUID!{CLSID_WICPngDecoder1,
43 0x389ea17b, 0x5078, 0x4cde, 0xb6, 0xef, 0x25, 0xc1, 0x51, 0x75, 0xc7, 0x51}
44 DEFINE_GUID!{CLSID_WICPngDecoder2,
45 0xe018945b, 0xaa86, 0x4008, 0x9b, 0xd4, 0x67, 0x77, 0xa1, 0xe4, 0x0c, 0x11}
46 DEFINE_GUID!{CLSID_WICBmpDecoder,
47 0x6b462062, 0x7cbf, 0x400d, 0x9f, 0xdb, 0x81, 0x3d, 0xd1, 0x0f, 0x27, 0x78}
48 DEFINE_GUID!{CLSID_WICIcoDecoder,
49 0xc61bfcdf, 0x2e0f, 0x4aad, 0xa8, 0xd7, 0xe0, 0x6b, 0xaf, 0xeb, 0xcd, 0xfe}
50 DEFINE_GUID!{CLSID_WICJpegDecoder,
51 0x9456a480, 0xe88b, 0x43ea, 0x9e, 0x73, 0x0b, 0x2d, 0x9b, 0x71, 0xb1, 0xca}
52 DEFINE_GUID!{CLSID_WICGifDecoder,
53 0x381dda3c, 0x9ce9, 0x4834, 0xa2, 0x3e, 0x1f, 0x98, 0xf8, 0xfc, 0x52, 0xbe}
54 DEFINE_GUID!{CLSID_WICTiffDecoder,
55 0xb54e85d9, 0xfe23, 0x499f, 0x8b, 0x88, 0x6a, 0xce, 0xa7, 0x13, 0x75, 0x2b}
56 DEFINE_GUID!{CLSID_WICWmpDecoder,
57 0xa26cec36, 0x234c, 0x4950, 0xae, 0x16, 0xe3, 0x4a, 0xac, 0xe7, 0x1d, 0x0d}
58 DEFINE_GUID!{CLSID_WICDdsDecoder,
59 0x9053699f, 0xa341, 0x429d, 0x9e, 0x90, 0xee, 0x43, 0x7c, 0xf8, 0x0c, 0x73}
60 DEFINE_GUID!{CLSID_WICBmpEncoder,
61 0x69be8bb4, 0xd66d, 0x47c8, 0x86, 0x5a, 0xed, 0x15, 0x89, 0x43, 0x37, 0x82}
62 DEFINE_GUID!{CLSID_WICPngEncoder,
63 0x27949969, 0x876a, 0x41d7, 0x94, 0x47, 0x56, 0x8f, 0x6a, 0x35, 0xa4, 0xdc}
64 DEFINE_GUID!{CLSID_WICJpegEncoder,
65 0x1a34f5c1, 0x4a5a, 0x46dc, 0xb6, 0x44, 0x1f, 0x45, 0x67, 0xe7, 0xa6, 0x76}
66 DEFINE_GUID!{CLSID_WICGifEncoder,
67 0x114f5598, 0x0b22, 0x40a0, 0x86, 0xa1, 0xc8, 0x3e, 0xa4, 0x95, 0xad, 0xbd}
68 DEFINE_GUID!{CLSID_WICTiffEncoder,
69 0x0131be10, 0x2001, 0x4c5f, 0xa9, 0xb0, 0xcc, 0x88, 0xfa, 0xb6, 0x4c, 0xe8}
70 DEFINE_GUID!{CLSID_WICWmpEncoder,
71 0xac4ce3cb, 0xe1c1, 0x44cd, 0x82, 0x15, 0x5a, 0x16, 0x65, 0x50, 0x9e, 0xc2}
72 DEFINE_GUID!{CLSID_WICDdsEncoder,
73 0xa61dde94, 0x66ce, 0x4ac1, 0x88, 0x1b, 0x71, 0x68, 0x05, 0x88, 0x89, 0x5e}
74 DEFINE_GUID!{CLSID_WICAdngDecoder,
75 0x981d9411, 0x909e, 0x42a7, 0x8f, 0x5d, 0xa7, 0x47, 0xff, 0x05, 0x2e, 0xdb}
76 DEFINE_GUID!{CLSID_WICJpegQualcommPhoneEncoder,
77 0x68ed5c62, 0xf534, 0x4979, 0xb2, 0xb3, 0x68, 0x6a, 0x12, 0xb2, 0xb3, 0x4c}
78 DEFINE_GUID!{GUID_ContainerFormatBmp,
79 0x0af1d87e, 0xfcfe, 0x4188, 0xbd, 0xeb, 0xa7, 0x90, 0x64, 0x71, 0xcb, 0xe3}
80 DEFINE_GUID!{GUID_ContainerFormatPng,
81 0x1b7cfaf4, 0x713f, 0x473c, 0xbb, 0xcd, 0x61, 0x37, 0x42, 0x5f, 0xae, 0xaf}
82 DEFINE_GUID!{GUID_ContainerFormatIco,
83 0xa3a860c4, 0x338f, 0x4c17, 0x91, 0x9a, 0xfb, 0xa4, 0xb5, 0x62, 0x8f, 0x21}
84 DEFINE_GUID!{GUID_ContainerFormatJpeg,
85 0x19e4a5aa, 0x5662, 0x4fc5, 0xa0, 0xc0, 0x17, 0x58, 0x02, 0x8e, 0x10, 0x57}
86 DEFINE_GUID!{GUID_ContainerFormatTiff,
87 0x163bcc30, 0xe2e9, 0x4f0b, 0x96, 0x1d, 0xa3, 0xe9, 0xfd, 0xb7, 0x88, 0xa3}
88 DEFINE_GUID!{GUID_ContainerFormatGif,
89 0x1f8a5601, 0x7d4d, 0x4cbd, 0x9c, 0x82, 0x1b, 0xc8, 0xd4, 0xee, 0xb9, 0xa5}
90 DEFINE_GUID!{GUID_ContainerFormatWmp,
91 0x57a37caa, 0x367a, 0x4540, 0x91, 0x6b, 0xf1, 0x83, 0xc5, 0x09, 0x3a, 0x4b}
92 DEFINE_GUID!{GUID_ContainerFormatDds,
93 0x9967cb95, 0x2e85, 0x4ac8, 0x8c, 0xa2, 0x83, 0xd7, 0xcc, 0xd4, 0x25, 0xc9}
94 DEFINE_GUID!{GUID_ContainerFormatAdng,
95 0xf3ff6d0d, 0x38c0, 0x41c4, 0xb1, 0xfe, 0x1f, 0x38, 0x24, 0xf1, 0x7b, 0x84}
96 DEFINE_GUID!{CLSID_WICImagingCategories,
97 0xfae3d380, 0xfea4, 0x4623, 0x8c, 0x75, 0xc6, 0xb6, 0x11, 0x10, 0xb6, 0x81}
98 DEFINE_GUID!{CATID_WICBitmapDecoders,
99 0x7ed96837, 0x96f0, 0x4812, 0xb2, 0x11, 0xf1, 0x3c, 0x24, 0x11, 0x7e, 0xd3}
100 DEFINE_GUID!{CATID_WICBitmapEncoders,
101 0xac757296, 0x3522, 0x4e11, 0x98, 0x62, 0xc1, 0x7b, 0xe5, 0xa1, 0x76, 0x7e}
102 DEFINE_GUID!{CATID_WICPixelFormats,
103 0x2b46e70f, 0xcda7, 0x473e, 0x89, 0xf6, 0xdc, 0x96, 0x30, 0xa2, 0x39, 0x0b}
104 DEFINE_GUID!{CATID_WICFormatConverters,
105 0x7835eae8, 0xbf14, 0x49d1, 0x93, 0xce, 0x53, 0x3a, 0x40, 0x7b, 0x22, 0x48}
106 DEFINE_GUID!{CATID_WICMetadataReader,
107 0x05af94d8, 0x7174, 0x4cd2, 0xbe, 0x4a, 0x41, 0x24, 0xb8, 0x0e, 0xe4, 0xb8}
108 DEFINE_GUID!{CATID_WICMetadataWriter,
109 0xabe3b9a4, 0x257d, 0x4b97, 0xbd, 0x1a, 0x29, 0x4a, 0xf4, 0x96, 0x22, 0x2e}
110 DEFINE_GUID!{CLSID_WICDefaultFormatConverter,
111 0x1a3f11dc, 0xb514, 0x4b17, 0x8c, 0x5f, 0x21, 0x54, 0x51, 0x38, 0x52, 0xf1}
112 DEFINE_GUID!{CLSID_WICFormatConverterHighColor,
113 0xac75d454, 0x9f37, 0x48f8, 0xb9, 0x72, 0x4e, 0x19, 0xbc, 0x85, 0x60, 0x11}
114 DEFINE_GUID!{CLSID_WICFormatConverterNChannel,
115 0xc17cabb2, 0xd4a3, 0x47d7, 0xa5, 0x57, 0x33, 0x9b, 0x2e, 0xfb, 0xd4, 0xf1}
116 DEFINE_GUID!{CLSID_WICFormatConverterWMPhoto,
117 0x9cb5172b, 0xd600, 0x46ba, 0xab, 0x77, 0x77, 0xbb, 0x7e, 0x3a, 0x00, 0xd9}
118 DEFINE_GUID!{CLSID_WICPlanarFormatConverter,
119 0x184132b8, 0x32f8, 0x4784, 0x91, 0x31, 0xdd, 0x72, 0x24, 0xb2, 0x34, 0x38}
120 pub type WICColor = UINT32;
121 STRUCT!{struct WICRect {
122 X: INT,
123 Y: INT,
124 Width: INT,
125 Height: INT,
126 }}
127 pub type WICInProcPointer = *mut BYTE;
128 ENUM!{enum WICColorContextType {
129 WICColorContextUninitialized = 0x00000000,
130 WICColorContextProfile = 0x00000001,
131 WICColorContextExifColorSpace = 0x00000002,
132 }}
133 pub const CODEC_FORCE_DWORD: DWORD = 0x7FFFFFFF;
134 pub const WIC_JPEG_MAX_COMPONENT_COUNT: UINT = 4;
135 pub const WIC_JPEG_MAX_TABLE_INDEX: UINT = 3;
136 pub const WIC_JPEG_SAMPLE_FACTORS_ONE: DWORD = 0x00000011;
137 pub const WIC_JPEG_SAMPLE_FACTORS_THREE_420: DWORD = 0x00111122;
138 pub const WIC_JPEG_SAMPLE_FACTORS_THREE_422: DWORD = 0x00111121;
139 pub const WIC_JPEG_SAMPLE_FACTORS_THREE_440: DWORD = 0x00111112;
140 pub const WIC_JPEG_SAMPLE_FACTORS_THREE_444: DWORD = 0x00111111;
141 pub const WIC_JPEG_QUANTIZATION_BASELINE_ONE: DWORD = 0x00000000;
142 pub const WIC_JPEG_QUANTIZATION_BASELINE_THREE: DWORD = 0x00010100;
143 pub const WIC_JPEG_HUFFMAN_BASELINE_ONE: DWORD = 0x00000000;
144 pub const WIC_JPEG_HUFFMAN_BASELINE_THREE: DWORD = 0x00111100;
145 pub type REFWICPixelFormatGUID = REFGUID;
146 pub type WICPixelFormatGUID = GUID;
147 DEFINE_GUID!{GUID_WICPixelFormatDontCare,
148 0x6fddc324, 0x4e03, 0x4bfe, 0xb1, 0x85, 0x3d, 0x77, 0x76, 0x8d, 0xc9, 0x00}
149 DEFINE_GUID!{GUID_WICPixelFormat1bppIndexed,
150 0x6fddc324, 0x4e03, 0x4bfe, 0xb1, 0x85, 0x3d, 0x77, 0x76, 0x8d, 0xc9, 0x01}
151 DEFINE_GUID!{GUID_WICPixelFormat2bppIndexed,
152 0x6fddc324, 0x4e03, 0x4bfe, 0xb1, 0x85, 0x3d, 0x77, 0x76, 0x8d, 0xc9, 0x02}
153 DEFINE_GUID!{GUID_WICPixelFormat4bppIndexed,
154 0x6fddc324, 0x4e03, 0x4bfe, 0xb1, 0x85, 0x3d, 0x77, 0x76, 0x8d, 0xc9, 0x03}
155 DEFINE_GUID!{GUID_WICPixelFormat8bppIndexed,
156 0x6fddc324, 0x4e03, 0x4bfe, 0xb1, 0x85, 0x3d, 0x77, 0x76, 0x8d, 0xc9, 0x04}
157 DEFINE_GUID!{GUID_WICPixelFormatBlackWhite,
158 0x6fddc324, 0x4e03, 0x4bfe, 0xb1, 0x85, 0x3d, 0x77, 0x76, 0x8d, 0xc9, 0x05}
159 DEFINE_GUID!{GUID_WICPixelFormat2bppGray,
160 0x6fddc324, 0x4e03, 0x4bfe, 0xb1, 0x85, 0x3d, 0x77, 0x76, 0x8d, 0xc9, 0x06}
161 DEFINE_GUID!{GUID_WICPixelFormat4bppGray,
162 0x6fddc324, 0x4e03, 0x4bfe, 0xb1, 0x85, 0x3d, 0x77, 0x76, 0x8d, 0xc9, 0x07}
163 DEFINE_GUID!{GUID_WICPixelFormat8bppGray,
164 0x6fddc324, 0x4e03, 0x4bfe, 0xb1, 0x85, 0x3d, 0x77, 0x76, 0x8d, 0xc9, 0x08}
165 DEFINE_GUID!{GUID_WICPixelFormat8bppAlpha,
166 0xe6cd0116, 0xeeba, 0x4161, 0xaa, 0x85, 0x27, 0xdd, 0x9f, 0xb3, 0xa8, 0x95}
167 DEFINE_GUID!{GUID_WICPixelFormat16bppBGR555,
168 0x6fddc324, 0x4e03, 0x4bfe, 0xb1, 0x85, 0x3d, 0x77, 0x76, 0x8d, 0xc9, 0x09}
169 DEFINE_GUID!{GUID_WICPixelFormat16bppBGR565,
170 0x6fddc324, 0x4e03, 0x4bfe, 0xb1, 0x85, 0x3d, 0x77, 0x76, 0x8d, 0xc9, 0x0a}
171 DEFINE_GUID!{GUID_WICPixelFormat16bppBGRA5551,
172 0x05ec7c2b, 0xf1e6, 0x4961, 0xad, 0x46, 0xe1, 0xcc, 0x81, 0x0a, 0x87, 0xd2}
173 DEFINE_GUID!{GUID_WICPixelFormat16bppGray,
174 0x6fddc324, 0x4e03, 0x4bfe, 0xb1, 0x85, 0x3d, 0x77, 0x76, 0x8d, 0xc9, 0x0b}
175 DEFINE_GUID!{GUID_WICPixelFormat24bppBGR,
176 0x6fddc324, 0x4e03, 0x4bfe, 0xb1, 0x85, 0x3d, 0x77, 0x76, 0x8d, 0xc9, 0x0c}
177 DEFINE_GUID!{GUID_WICPixelFormat24bppRGB,
178 0x6fddc324, 0x4e03, 0x4bfe, 0xb1, 0x85, 0x3d, 0x77, 0x76, 0x8d, 0xc9, 0x0d}
179 DEFINE_GUID!{GUID_WICPixelFormat32bppBGR,
180 0x6fddc324, 0x4e03, 0x4bfe, 0xb1, 0x85, 0x3d, 0x77, 0x76, 0x8d, 0xc9, 0x0e}
181 DEFINE_GUID!{GUID_WICPixelFormat32bppBGRA,
182 0x6fddc324, 0x4e03, 0x4bfe, 0xb1, 0x85, 0x3d, 0x77, 0x76, 0x8d, 0xc9, 0x0f}
183 DEFINE_GUID!{GUID_WICPixelFormat32bppPBGRA,
184 0x6fddc324, 0x4e03, 0x4bfe, 0xb1, 0x85, 0x3d, 0x77, 0x76, 0x8d, 0xc9, 0x10}
185 DEFINE_GUID!{GUID_WICPixelFormat32bppGrayFloat,
186 0x6fddc324, 0x4e03, 0x4bfe, 0xb1, 0x85, 0x3d, 0x77, 0x76, 0x8d, 0xc9, 0x11}
187 DEFINE_GUID!{GUID_WICPixelFormat32bppRGB,
188 0xd98c6b95, 0x3efe, 0x47d6, 0xbb, 0x25, 0xeb, 0x17, 0x48, 0xab, 0x0c, 0xf1}
189 DEFINE_GUID!{GUID_WICPixelFormat32bppRGBA,
190 0xf5c7ad2d, 0x6a8d, 0x43dd, 0xa7, 0xa8, 0xa2, 0x99, 0x35, 0x26, 0x1a, 0xe9}
191 DEFINE_GUID!{GUID_WICPixelFormat32bppPRGBA,
192 0x3cc4a650, 0xa527, 0x4d37, 0xa9, 0x16, 0x31, 0x42, 0xc7, 0xeb, 0xed, 0xba}
193 DEFINE_GUID!{GUID_WICPixelFormat48bppRGB,
194 0x6fddc324, 0x4e03, 0x4bfe, 0xb1, 0x85, 0x3d, 0x77, 0x76, 0x8d, 0xc9, 0x15}
195 DEFINE_GUID!{GUID_WICPixelFormat48bppBGR,
196 0xe605a384, 0xb468, 0x46ce, 0xbb, 0x2e, 0x36, 0xf1, 0x80, 0xe6, 0x43, 0x13}
197 DEFINE_GUID!{GUID_WICPixelFormat64bppRGB,
198 0xa1182111, 0x186d, 0x4d42, 0xbc, 0x6a, 0x9c, 0x83, 0x03, 0xa8, 0xdf, 0xf9}
199 DEFINE_GUID!{GUID_WICPixelFormat64bppRGBA,
200 0x6fddc324, 0x4e03, 0x4bfe, 0xb1, 0x85, 0x3d, 0x77, 0x76, 0x8d, 0xc9, 0x16}
201 DEFINE_GUID!{GUID_WICPixelFormat64bppBGRA,
202 0x1562ff7c, 0xd352, 0x46f9, 0x97, 0x9e, 0x42, 0x97, 0x6b, 0x79, 0x22, 0x46}
203 DEFINE_GUID!{GUID_WICPixelFormat64bppPRGBA,
204 0x6fddc324, 0x4e03, 0x4bfe, 0xb1, 0x85, 0x3d, 0x77, 0x76, 0x8d, 0xc9, 0x17}
205 DEFINE_GUID!{GUID_WICPixelFormat64bppPBGRA,
206 0x8c518e8e, 0xa4ec, 0x468b, 0xae, 0x70, 0xc9, 0xa3, 0x5a, 0x9c, 0x55, 0x30}
207 DEFINE_GUID!{GUID_WICPixelFormat16bppGrayFixedPoint,
208 0x6fddc324, 0x4e03, 0x4bfe, 0xb1, 0x85, 0x3d, 0x77, 0x76, 0x8d, 0xc9, 0x13}
209 DEFINE_GUID!{GUID_WICPixelFormat32bppBGR101010,
210 0x6fddc324, 0x4e03, 0x4bfe, 0xb1, 0x85, 0x3d, 0x77, 0x76, 0x8d, 0xc9, 0x14}
211 DEFINE_GUID!{GUID_WICPixelFormat48bppRGBFixedPoint,
212 0x6fddc324, 0x4e03, 0x4bfe, 0xb1, 0x85, 0x3d, 0x77, 0x76, 0x8d, 0xc9, 0x12}
213 DEFINE_GUID!{GUID_WICPixelFormat48bppBGRFixedPoint,
214 0x49ca140e, 0xcab6, 0x493b, 0x9d, 0xdf, 0x60, 0x18, 0x7c, 0x37, 0x53, 0x2a}
215 DEFINE_GUID!{GUID_WICPixelFormat96bppRGBFixedPoint,
216 0x6fddc324, 0x4e03, 0x4bfe, 0xb1, 0x85, 0x3d, 0x77, 0x76, 0x8d, 0xc9, 0x18}
217 DEFINE_GUID!{GUID_WICPixelFormat96bppRGBFloat,
218 0xe3fed78f, 0xe8db, 0x4acf, 0x84, 0xc1, 0xe9, 0x7f, 0x61, 0x36, 0xb3, 0x27}
219 DEFINE_GUID!{GUID_WICPixelFormat128bppRGBAFloat,
220 0x6fddc324, 0x4e03, 0x4bfe, 0xb1, 0x85, 0x3d, 0x77, 0x76, 0x8d, 0xc9, 0x19}
221 DEFINE_GUID!{GUID_WICPixelFormat128bppPRGBAFloat,
222 0x6fddc324, 0x4e03, 0x4bfe, 0xb1, 0x85, 0x3d, 0x77, 0x76, 0x8d, 0xc9, 0x1a}
223 DEFINE_GUID!{GUID_WICPixelFormat128bppRGBFloat,
224 0x6fddc324, 0x4e03, 0x4bfe, 0xb1, 0x85, 0x3d, 0x77, 0x76, 0x8d, 0xc9, 0x1b}
225 DEFINE_GUID!{GUID_WICPixelFormat32bppCMYK,
226 0x6fddc324, 0x4e03, 0x4bfe, 0xb1, 0x85, 0x3d, 0x77, 0x76, 0x8d, 0xc9, 0x1c}
227 DEFINE_GUID!{GUID_WICPixelFormat64bppRGBAFixedPoint,
228 0x6fddc324, 0x4e03, 0x4bfe, 0xb1, 0x85, 0x3d, 0x77, 0x76, 0x8d, 0xc9, 0x1d}
229 DEFINE_GUID!{GUID_WICPixelFormat64bppBGRAFixedPoint,
230 0x356de33c, 0x54d2, 0x4a23, 0xbb, 0x4, 0x9b, 0x7b, 0xf9, 0xb1, 0xd4, 0x2d}
231 DEFINE_GUID!{GUID_WICPixelFormat64bppRGBFixedPoint,
232 0x6fddc324, 0x4e03, 0x4bfe, 0xb1, 0x85, 0x3d, 0x77, 0x76, 0x8d, 0xc9, 0x40}
233 DEFINE_GUID!{GUID_WICPixelFormat128bppRGBAFixedPoint,
234 0x6fddc324, 0x4e03, 0x4bfe, 0xb1, 0x85, 0x3d, 0x77, 0x76, 0x8d, 0xc9, 0x1e}
235 DEFINE_GUID!{GUID_WICPixelFormat128bppRGBFixedPoint,
236 0x6fddc324, 0x4e03, 0x4bfe, 0xb1, 0x85, 0x3d, 0x77, 0x76, 0x8d, 0xc9, 0x41}
237 DEFINE_GUID!{GUID_WICPixelFormat64bppRGBAHalf,
238 0x6fddc324, 0x4e03, 0x4bfe, 0xb1, 0x85, 0x3d, 0x77, 0x76, 0x8d, 0xc9, 0x3a}
239 DEFINE_GUID!{GUID_WICPixelFormat64bppPRGBAHalf,
240 0x58ad26c2, 0xc623, 0x4d9d, 0xb3, 0x20, 0x38, 0x7e, 0x49, 0xf8, 0xc4, 0x42}
241 DEFINE_GUID!{GUID_WICPixelFormat64bppRGBHalf,
242 0x6fddc324, 0x4e03, 0x4bfe, 0xb1, 0x85, 0x3d, 0x77, 0x76, 0x8d, 0xc9, 0x42}
243 DEFINE_GUID!{GUID_WICPixelFormat48bppRGBHalf,
244 0x6fddc324, 0x4e03, 0x4bfe, 0xb1, 0x85, 0x3d, 0x77, 0x76, 0x8d, 0xc9, 0x3b}
245 DEFINE_GUID!{GUID_WICPixelFormat32bppRGBE,
246 0x6fddc324, 0x4e03, 0x4bfe, 0xb1, 0x85, 0x3d, 0x77, 0x76, 0x8d, 0xc9, 0x3d}
247 DEFINE_GUID!{GUID_WICPixelFormat16bppGrayHalf,
248 0x6fddc324, 0x4e03, 0x4bfe, 0xb1, 0x85, 0x3d, 0x77, 0x76, 0x8d, 0xc9, 0x3e}
249 DEFINE_GUID!{GUID_WICPixelFormat32bppGrayFixedPoint,
250 0x6fddc324, 0x4e03, 0x4bfe, 0xb1, 0x85, 0x3d, 0x77, 0x76, 0x8d, 0xc9, 0x3f}
251 DEFINE_GUID!{GUID_WICPixelFormat32bppRGBA1010102,
252 0x25238D72, 0xFCF9, 0x4522, 0xb5, 0x14, 0x55, 0x78, 0xe5, 0xad, 0x55, 0xe0}
253 DEFINE_GUID!{GUID_WICPixelFormat32bppRGBA1010102XR,
254 0x00DE6B9A, 0xC101, 0x434b, 0xb5, 0x02, 0xd0, 0x16, 0x5e, 0xe1, 0x12, 0x2c}
255 DEFINE_GUID!{GUID_WICPixelFormat64bppCMYK,
256 0x6fddc324, 0x4e03, 0x4bfe, 0xb1, 0x85, 0x3d, 0x77, 0x76, 0x8d, 0xc9, 0x1f}
257 DEFINE_GUID!{GUID_WICPixelFormat24bpp3Channels,
258 0x6fddc324, 0x4e03, 0x4bfe, 0xb1, 0x85, 0x3d, 0x77, 0x76, 0x8d, 0xc9, 0x20}
259 DEFINE_GUID!{GUID_WICPixelFormat32bpp4Channels,
260 0x6fddc324, 0x4e03, 0x4bfe, 0xb1, 0x85, 0x3d, 0x77, 0x76, 0x8d, 0xc9, 0x21}
261 DEFINE_GUID!{GUID_WICPixelFormat40bpp5Channels,
262 0x6fddc324, 0x4e03, 0x4bfe, 0xb1, 0x85, 0x3d, 0x77, 0x76, 0x8d, 0xc9, 0x22}
263 DEFINE_GUID!{GUID_WICPixelFormat48bpp6Channels,
264 0x6fddc324, 0x4e03, 0x4bfe, 0xb1, 0x85, 0x3d, 0x77, 0x76, 0x8d, 0xc9, 0x23}
265 DEFINE_GUID!{GUID_WICPixelFormat56bpp7Channels,
266 0x6fddc324, 0x4e03, 0x4bfe, 0xb1, 0x85, 0x3d, 0x77, 0x76, 0x8d, 0xc9, 0x24}
267 DEFINE_GUID!{GUID_WICPixelFormat64bpp8Channels,
268 0x6fddc324, 0x4e03, 0x4bfe, 0xb1, 0x85, 0x3d, 0x77, 0x76, 0x8d, 0xc9, 0x25}
269 DEFINE_GUID!{GUID_WICPixelFormat48bpp3Channels,
270 0x6fddc324, 0x4e03, 0x4bfe, 0xb1, 0x85, 0x3d, 0x77, 0x76, 0x8d, 0xc9, 0x26}
271 DEFINE_GUID!{GUID_WICPixelFormat64bpp4Channels,
272 0x6fddc324, 0x4e03, 0x4bfe, 0xb1, 0x85, 0x3d, 0x77, 0x76, 0x8d, 0xc9, 0x27}
273 DEFINE_GUID!{GUID_WICPixelFormat80bpp5Channels,
274 0x6fddc324, 0x4e03, 0x4bfe, 0xb1, 0x85, 0x3d, 0x77, 0x76, 0x8d, 0xc9, 0x28}
275 DEFINE_GUID!{GUID_WICPixelFormat96bpp6Channels,
276 0x6fddc324, 0x4e03, 0x4bfe, 0xb1, 0x85, 0x3d, 0x77, 0x76, 0x8d, 0xc9, 0x29}
277 DEFINE_GUID!{GUID_WICPixelFormat112bpp7Channels,
278 0x6fddc324, 0x4e03, 0x4bfe, 0xb1, 0x85, 0x3d, 0x77, 0x76, 0x8d, 0xc9, 0x2a}
279 DEFINE_GUID!{GUID_WICPixelFormat128bpp8Channels,
280 0x6fddc324, 0x4e03, 0x4bfe, 0xb1, 0x85, 0x3d, 0x77, 0x76, 0x8d, 0xc9, 0x2b}
281 DEFINE_GUID!{GUID_WICPixelFormat40bppCMYKAlpha,
282 0x6fddc324, 0x4e03, 0x4bfe, 0xb1, 0x85, 0x3d, 0x77, 0x76, 0x8d, 0xc9, 0x2c}
283 DEFINE_GUID!{GUID_WICPixelFormat80bppCMYKAlpha,
284 0x6fddc324, 0x4e03, 0x4bfe, 0xb1, 0x85, 0x3d, 0x77, 0x76, 0x8d, 0xc9, 0x2d}
285 DEFINE_GUID!{GUID_WICPixelFormat32bpp3ChannelsAlpha,
286 0x6fddc324, 0x4e03, 0x4bfe, 0xb1, 0x85, 0x3d, 0x77, 0x76, 0x8d, 0xc9, 0x2e}
287 DEFINE_GUID!{GUID_WICPixelFormat40bpp4ChannelsAlpha,
288 0x6fddc324, 0x4e03, 0x4bfe, 0xb1, 0x85, 0x3d, 0x77, 0x76, 0x8d, 0xc9, 0x2f}
289 DEFINE_GUID!{GUID_WICPixelFormat48bpp5ChannelsAlpha,
290 0x6fddc324, 0x4e03, 0x4bfe, 0xb1, 0x85, 0x3d, 0x77, 0x76, 0x8d, 0xc9, 0x30}
291 DEFINE_GUID!{GUID_WICPixelFormat56bpp6ChannelsAlpha,
292 0x6fddc324, 0x4e03, 0x4bfe, 0xb1, 0x85, 0x3d, 0x77, 0x76, 0x8d, 0xc9, 0x31}
293 DEFINE_GUID!{GUID_WICPixelFormat64bpp7ChannelsAlpha,
294 0x6fddc324, 0x4e03, 0x4bfe, 0xb1, 0x85, 0x3d, 0x77, 0x76, 0x8d, 0xc9, 0x32}
295 DEFINE_GUID!{GUID_WICPixelFormat72bpp8ChannelsAlpha,
296 0x6fddc324, 0x4e03, 0x4bfe, 0xb1, 0x85, 0x3d, 0x77, 0x76, 0x8d, 0xc9, 0x33}
297 DEFINE_GUID!{GUID_WICPixelFormat64bpp3ChannelsAlpha,
298 0x6fddc324, 0x4e03, 0x4bfe, 0xb1, 0x85, 0x3d, 0x77, 0x76, 0x8d, 0xc9, 0x34}
299 DEFINE_GUID!{GUID_WICPixelFormat80bpp4ChannelsAlpha,
300 0x6fddc324, 0x4e03, 0x4bfe, 0xb1, 0x85, 0x3d, 0x77, 0x76, 0x8d, 0xc9, 0x35}
301 DEFINE_GUID!{GUID_WICPixelFormat96bpp5ChannelsAlpha,
302 0x6fddc324, 0x4e03, 0x4bfe, 0xb1, 0x85, 0x3d, 0x77, 0x76, 0x8d, 0xc9, 0x36}
303 DEFINE_GUID!{GUID_WICPixelFormat112bpp6ChannelsAlpha,
304 0x6fddc324, 0x4e03, 0x4bfe, 0xb1, 0x85, 0x3d, 0x77, 0x76, 0x8d, 0xc9, 0x37}
305 DEFINE_GUID!{GUID_WICPixelFormat128bpp7ChannelsAlpha,
306 0x6fddc324, 0x4e03, 0x4bfe, 0xb1, 0x85, 0x3d, 0x77, 0x76, 0x8d, 0xc9, 0x38}
307 DEFINE_GUID!{GUID_WICPixelFormat144bpp8ChannelsAlpha,
308 0x6fddc324, 0x4e03, 0x4bfe, 0xb1, 0x85, 0x3d, 0x77, 0x76, 0x8d, 0xc9, 0x39}
309 DEFINE_GUID!{GUID_WICPixelFormat8bppY,
310 0x91B4DB54, 0x2DF9, 0x42F0, 0xB4, 0x49, 0x29, 0x09, 0xBB, 0x3D, 0xF8, 0x8E}
311 DEFINE_GUID!{GUID_WICPixelFormat8bppCb,
312 0x1339F224, 0x6BFE, 0x4C3E, 0x93, 0x02, 0xE4, 0xF3, 0xA6, 0xD0, 0xCA, 0x2A}
313 DEFINE_GUID!{GUID_WICPixelFormat8bppCr,
314 0xB8145053, 0x2116, 0x49F0, 0x88, 0x35, 0xED, 0x84, 0x4B, 0x20, 0x5C, 0x51}
315 DEFINE_GUID!{GUID_WICPixelFormat16bppCbCr,
316 0xFF95BA6E, 0x11E0, 0x4263, 0xBB, 0x45, 0x01, 0x72, 0x1F, 0x34, 0x60, 0xA4}
317 DEFINE_GUID!{GUID_WICPixelFormat16bppYQuantizedDctCoefficients,
318 0xA355F433, 0x48E8, 0x4A42, 0x84, 0xD8, 0xE2, 0xAA, 0x26, 0xCA, 0x80, 0xA4}
319 DEFINE_GUID!{GUID_WICPixelFormat16bppCbQuantizedDctCoefficients,
320 0xD2C4FF61, 0x56A5, 0x49C2, 0x8B, 0x5C, 0x4C, 0x19, 0x25, 0x96, 0x48, 0x37}
321 DEFINE_GUID!{GUID_WICPixelFormat16bppCrQuantizedDctCoefficients,
322 0x2FE354F0, 0x1680, 0x42D8, 0x92, 0x31, 0xE7, 0x3C, 0x05, 0x65, 0xBF, 0xC1}
323 ENUM!{enum WICBitmapCreateCacheOption {
324 WICBitmapNoCache = 0x00000000,
325 WICBitmapCacheOnDemand = 0x00000001,
326 WICBitmapCacheOnLoad = 0x00000002,
327 WICBITMAPCREATECACHEOPTION_FORCE_DWORD = CODEC_FORCE_DWORD,
328 }}
329 ENUM!{enum WICDecodeOptions {
330 WICDecodeMetadataCacheOnDemand = 0x00000000,
331 WICDecodeMetadataCacheOnLoad = 0x00000001,
332 WICMETADATACACHEOPTION_FORCE_DWORD = CODEC_FORCE_DWORD,
333 }}
334 ENUM!{enum WICBitmapEncoderCacheOption {
335 WICBitmapEncoderCacheInMemory = 0x00000000,
336 WICBitmapEncoderCacheTempFile = 0x00000001,
337 WICBitmapEncoderNoCache = 0x00000002,
338 WICBITMAPENCODERCACHEOPTION_FORCE_DWORD = CODEC_FORCE_DWORD,
339 }}
340 ENUM!{enum WICComponentType {
341 WICDecoder = 0x00000001,
342 WICEncoder = 0x00000002,
343 WICPixelFormatConverter = 0x00000004,
344 WICMetadataReader = 0x00000008,
345 WICMetadataWriter = 0x00000010,
346 WICPixelFormat = 0x00000020,
347 WICAllComponents = 0x0000003F,
348 WICCOMPONENTTYPE_FORCE_DWORD = CODEC_FORCE_DWORD,
349 }}
350 ENUM!{enum WICComponentEnumerateOptions {
351 WICComponentEnumerateDefault = 0x00000000,
352 WICComponentEnumerateRefresh = 0x00000001,
353 WICComponentEnumerateDisabled = 0x80000000,
354 WICComponentEnumerateUnsigned = 0x40000000,
355 WICComponentEnumerateBuiltInOnly = 0x20000000,
356 WICCOMPONENTENUMERATEOPTIONS_FORCE_DWORD = CODEC_FORCE_DWORD,
357 }}
358 STRUCT!{struct WICBitmapPattern {
359 Position: ULARGE_INTEGER,
360 Length: ULONG,
361 Pattern: *mut BYTE,
362 Mask: *mut BYTE,
363 EndOfStream: BOOL,
364 }}
365 ENUM!{enum WICBitmapInterpolationMode {
366 WICBitmapInterpolationModeNearestNeighbor = 0x00000000,
367 WICBitmapInterpolationModeLinear = 0x00000001,
368 WICBitmapInterpolationModeCubic = 0x00000002,
369 WICBitmapInterpolationModeFant = 0x00000003,
370 WICBitmapInterpolationModeHighQualityCubic = 0x00000004,
371 WICBITMAPINTERPOLATIONMODE_FORCE_DWORD = CODEC_FORCE_DWORD,
372 }}
373 ENUM!{enum WICBitmapPaletteType {
374 WICBitmapPaletteTypeCustom = 0x00000000,
375 WICBitmapPaletteTypeMedianCut = 0x00000001,
376 WICBitmapPaletteTypeFixedBW = 0x00000002,
377 WICBitmapPaletteTypeFixedHalftone8 = 0x00000003,
378 WICBitmapPaletteTypeFixedHalftone27 = 0x00000004,
379 WICBitmapPaletteTypeFixedHalftone64 = 0x00000005,
380 WICBitmapPaletteTypeFixedHalftone125 = 0x00000006,
381 WICBitmapPaletteTypeFixedHalftone216 = 0x00000007,
382 WICBitmapPaletteTypeFixedWebPalette = WICBitmapPaletteTypeFixedHalftone216,
383 WICBitmapPaletteTypeFixedHalftone252 = 0x00000008,
384 WICBitmapPaletteTypeFixedHalftone256 = 0x00000009,
385 WICBitmapPaletteTypeFixedGray4 = 0x0000000A,
386 WICBitmapPaletteTypeFixedGray16 = 0x0000000B,
387 WICBitmapPaletteTypeFixedGray256 = 0x0000000C,
388 WICBITMAPPALETTETYPE_FORCE_DWORD = CODEC_FORCE_DWORD,
389 }}
390 ENUM!{enum WICBitmapDitherType {
391 WICBitmapDitherTypeNone = 0x00000000,
392 WICBitmapDitherTypeSolid = 0x00000000,
393 WICBitmapDitherTypeOrdered4x4 = 0x00000001,
394 WICBitmapDitherTypeOrdered8x8 = 0x00000002,
395 WICBitmapDitherTypeOrdered16x16 = 0x00000003,
396 WICBitmapDitherTypeSpiral4x4 = 0x00000004,
397 WICBitmapDitherTypeSpiral8x8 = 0x00000005,
398 WICBitmapDitherTypeDualSpiral4x4 = 0x00000006,
399 WICBitmapDitherTypeDualSpiral8x8 = 0x00000007,
400 WICBitmapDitherTypeErrorDiffusion = 0x00000008,
401 WICBITMAPDITHERTYPE_FORCE_DWORD = CODEC_FORCE_DWORD,
402 }}
403 ENUM!{enum WICBitmapAlphaChannelOption {
404 WICBitmapUseAlpha = 0x00000000,
405 WICBitmapUsePremultipliedAlpha = 0x00000001,
406 WICBitmapIgnoreAlpha = 0x00000002,
407 WICBITMAPALPHACHANNELOPTIONS_FORCE_DWORD = CODEC_FORCE_DWORD,
408 }}
409 ENUM!{enum WICBitmapTransformOptions {
410 WICBitmapTransformRotate0 = 0x00000000,
411 WICBitmapTransformRotate90 = 0x00000001,
412 WICBitmapTransformRotate180 = 0x00000002,
413 WICBitmapTransformRotate270 = 0x00000003,
414 WICBitmapTransformFlipHorizontal = 0x00000008,
415 WICBitmapTransformFlipVertical = 0x00000010,
416 WICBITMAPTRANSFORMOPTIONS_FORCE_DWORD = CODEC_FORCE_DWORD,
417 }}
418 ENUM!{enum WICBitmapLockFlags {
419 WICBitmapLockRead = 0x00000001,
420 WICBitmapLockWrite = 0x00000002,
421 WICBITMAPLOCKFLAGS_FORCE_DWORD = CODEC_FORCE_DWORD,
422 }}
423 ENUM!{enum WICBitmapDecoderCapabilities {
424 WICBitmapDecoderCapabilitySameEncoder = 0x00000001,
425 WICBitmapDecoderCapabilityCanDecodeAllImages = 0x00000002,
426 WICBitmapDecoderCapabilityCanDecodeSomeImages = 0x00000004,
427 WICBitmapDecoderCapabilityCanEnumerateMetadata = 0x00000008,
428 WICBitmapDecoderCapabilityCanDecodeThumbnail = 0x00000010,
429 WICBITMAPDECODERCAPABILITIES_FORCE_DWORD = CODEC_FORCE_DWORD,
430 }}
431 ENUM!{enum WICProgressOperation {
432 WICProgressOperationCopyPixels = 0x00000001,
433 WICProgressOperationWritePixels = 0x00000002,
434 WICProgressOperationAll = 0x0000FFFF,
435 WICPROGRESSOPERATION_FORCE_DWORD = CODEC_FORCE_DWORD,
436 }}
437 ENUM!{enum WICProgressNotification {
438 WICProgressNotificationBegin = 0x00010000,
439 WICProgressNotificationEnd = 0x00020000,
440 WICProgressNotificationFrequent = 0x00040000,
441 WICProgressNotificationAll = 0xFFFF0000,
442 WICPROGRESSNOTIFICATION_FORCE_DWORD = CODEC_FORCE_DWORD,
443 }}
444 ENUM!{enum WICComponentSigning {
445 WICComponentSigned = 0x00000001,
446 WICComponentUnsigned = 0x00000002,
447 WICComponentSafe = 0x00000004,
448 WICComponentDisabled = 0x80000000,
449 WICCOMPONENTSIGNING_FORCE_DWORD = CODEC_FORCE_DWORD,
450 }}
451 ENUM!{enum WICGifLogicalScreenDescriptorProperties {
452 WICGifLogicalScreenSignature = 0x00000001,
453 WICGifLogicalScreenDescriptorWidth = 0x00000002,
454 WICGifLogicalScreenDescriptorHeight = 0x00000003,
455 WICGifLogicalScreenDescriptorGlobalColorTableFlag = 0x00000004,
456 WICGifLogicalScreenDescriptorColorResolution = 0x00000005,
457 WICGifLogicalScreenDescriptorSortFlag = 0x00000006,
458 WICGifLogicalScreenDescriptorGlobalColorTableSize = 0x00000007,
459 WICGifLogicalScreenDescriptorBackgroundColorIndex = 0x00000008,
460 WICGifLogicalScreenDescriptorPixelAspectRatio = 0x00000009,
461 WICGifLogicalScreenDescriptorProperties_FORCE_DWORD = CODEC_FORCE_DWORD,
462 }}
463 ENUM!{enum WICGifImageDescriptorProperties {
464 WICGifImageDescriptorLeft = 0x00000001,
465 WICGifImageDescriptorTop = 0x00000002,
466 WICGifImageDescriptorWidth = 0x00000003,
467 WICGifImageDescriptorHeight = 0x00000004,
468 WICGifImageDescriptorLocalColorTableFlag = 0x00000005,
469 WICGifImageDescriptorInterlaceFlag = 0x00000006,
470 WICGifImageDescriptorSortFlag = 0x00000007,
471 WICGifImageDescriptorLocalColorTableSize = 0x00000008,
472 WICGifImageDescriptorProperties_FORCE_DWORD = CODEC_FORCE_DWORD,
473 }}
474 ENUM!{enum WICGifGraphicControlExtensionProperties {
475 WICGifGraphicControlExtensionDisposal = 0x00000001,
476 WICGifGraphicControlExtensionUserInputFlag = 0x00000002,
477 WICGifGraphicControlExtensionTransparencyFlag = 0x00000003,
478 WICGifGraphicControlExtensionDelay = 0x00000004,
479 WICGifGraphicControlExtensionTransparentColorIndex = 0x00000005,
480 WICGifGraphicControlExtensionProperties_FORCE_DWORD = CODEC_FORCE_DWORD,
481 }}
482 ENUM!{enum WICGifApplicationExtensionProperties {
483 WICGifApplicationExtensionApplication = 0x00000001,
484 WICGifApplicationExtensionData = 0x00000002,
485 WICGifApplicationExtensionProperties_FORCE_DWORD = CODEC_FORCE_DWORD,
486 }}
487 ENUM!{enum WICGifCommentExtensionProperties {
488 WICGifCommentExtensionText = 0x00000001,
489 WICGifCommentExtensionProperties_FORCE_DWORD = CODEC_FORCE_DWORD,
490 }}
491 ENUM!{enum WICJpegCommentProperties {
492 WICJpegCommentText = 0x00000001,
493 WICJpegCommentProperties_FORCE_DWORD = CODEC_FORCE_DWORD,
494 }}
495 ENUM!{enum WICJpegLuminanceProperties {
496 WICJpegLuminanceTable = 0x00000001,
497 WICJpegLuminanceProperties_FORCE_DWORD = CODEC_FORCE_DWORD,
498 }}
499 ENUM!{enum WICJpegChrominanceProperties {
500 WICJpegChrominanceTable = 0x00000001,
501 WICJpegChrominanceProperties_FORCE_DWORD = CODEC_FORCE_DWORD,
502 }}
503 ENUM!{enum WIC8BIMIptcProperties {
504 WIC8BIMIptcPString = 0x00000000,
505 WIC8BIMIptcEmbeddedIPTC = 0x00000001,
506 WIC8BIMIptcProperties_FORCE_DWORD = CODEC_FORCE_DWORD,
507 }}
508 ENUM!{enum WIC8BIMResolutionInfoProperties {
509 WIC8BIMResolutionInfoPString = 0x00000001,
510 WIC8BIMResolutionInfoHResolution = 0x00000002,
511 WIC8BIMResolutionInfoHResolutionUnit = 0x00000003,
512 WIC8BIMResolutionInfoWidthUnit = 0x00000004,
513 WIC8BIMResolutionInfoVResolution = 0x00000005,
514 WIC8BIMResolutionInfoVResolutionUnit = 0x00000006,
515 WIC8BIMResolutionInfoHeightUnit = 0x00000007,
516 WIC8BIMResolutionInfoProperties_FORCE_DWORD = CODEC_FORCE_DWORD,
517 }}
518 ENUM!{enum WIC8BIMIptcDigestProperties {
519 WIC8BIMIptcDigestPString = 0x00000001,
520 WIC8BIMIptcDigestIptcDigest = 0x00000002,
521 WIC8BIMIptcDigestProperties_FORCE_DWORD = CODEC_FORCE_DWORD,
522 }}
523 ENUM!{enum WICPngGamaProperties {
524 WICPngGamaGamma = 0x00000001,
525 WICPngGamaProperties_FORCE_DWORD = CODEC_FORCE_DWORD,
526 }}
527 ENUM!{enum WICPngBkgdProperties {
528 WICPngBkgdBackgroundColor = 0x00000001,
529 WICPngBkgdProperties_FORCE_DWORD = CODEC_FORCE_DWORD,
530 }}
531 ENUM!{enum WICPngItxtProperties {
532 WICPngItxtKeyword = 0x00000001,
533 WICPngItxtCompressionFlag = 0x00000002,
534 WICPngItxtLanguageTag = 0x00000003,
535 WICPngItxtTranslatedKeyword = 0x00000004,
536 WICPngItxtText = 0x00000005,
537 WICPngItxtProperties_FORCE_DWORD = CODEC_FORCE_DWORD,
538 }}
539 ENUM!{enum WICPngChrmProperties {
540 WICPngChrmWhitePointX = 0x00000001,
541 WICPngChrmWhitePointY = 0x00000002,
542 WICPngChrmRedX = 0x00000003,
543 WICPngChrmRedY = 0x00000004,
544 WICPngChrmGreenX = 0x00000005,
545 WICPngChrmGreenY = 0x00000006,
546 WICPngChrmBlueX = 0x00000007,
547 WICPngChrmBlueY = 0x0000008,
548 WICPngChrmProperties_FORCE_DWORD = CODEC_FORCE_DWORD,
549 }}
550 ENUM!{enum WICPngHistProperties {
551 WICPngHistFrequencies = 0x00000001,
552 WICPngHistProperties_FORCE_DWORD = CODEC_FORCE_DWORD,
553 }}
554 ENUM!{enum WICPngIccpProperties {
555 WICPngIccpProfileName = 0x00000001,
556 WICPngIccpProfileData = 0x00000002,
557 WICPngIccpProperties_FORCE_DWORD = CODEC_FORCE_DWORD,
558 }}
559 ENUM!{enum WICPngSrgbProperties {
560 WICPngSrgbRenderingIntent = 0x00000001,
561 WICPngSrgbProperties_FORCE_DWORD = CODEC_FORCE_DWORD,
562 }}
563 ENUM!{enum WICPngTimeProperties {
564 WICPngTimeYear = 0x00000001,
565 WICPngTimeMonth = 0x00000002,
566 WICPngTimeDay = 0x00000003,
567 WICPngTimeHour = 0x00000004,
568 WICPngTimeMinute = 0x00000005,
569 WICPngTimeSecond = 0x00000006,
570 WICPngTimeProperties_FORCE_DWORD = CODEC_FORCE_DWORD,
571 }}
572 ENUM!{enum WICSectionAccessLevel {
573 WICSectionAccessLevelRead = 0x00000001,
574 WICSectionAccessLevelReadWrite = 0x00000003,
575 WICSectionAccessLevel_FORCE_DWORD = CODEC_FORCE_DWORD,
576 }}
577 ENUM!{enum WICPixelFormatNumericRepresentation {
578 WICPixelFormatNumericRepresentationUnspecified = 0x00000000,
579 WICPixelFormatNumericRepresentationIndexed = 0x00000001,
580 WICPixelFormatNumericRepresentationUnsignedInteger = 0x00000002,
581 WICPixelFormatNumericRepresentationSignedInteger = 0x00000003,
582 WICPixelFormatNumericRepresentationFixed = 0x00000004,
583 WICPixelFormatNumericRepresentationFloat = 0x00000005,
584 WICPixelFormatNumericRepresentation_FORCE_DWORD = CODEC_FORCE_DWORD,
585 }}
586 ENUM!{enum WICPlanarOptions {
587 WICPlanarOptionsDefault = 0x00000000,
588 WICPlanarOptionsPreserveSubsampling = 0x00000001,
589 WICPLANAROPTIONS_FORCE_DWORD = CODEC_FORCE_DWORD,
590 }}
591 ENUM!{enum WICJpegIndexingOptions {
592 WICJpegIndexingOptionsGenerateOnDemand = 0x00000000,
593 WICJpegIndexingOptionsGenerateOnLoad = 0x00000001,
594 WICJpegIndexingOptions_FORCE_DWORD = CODEC_FORCE_DWORD,
595 }}
596 ENUM!{enum WICJpegTransferMatrix {
597 WICJpegTransferMatrixIdentity = 0x00000000,
598 WICJpegTransferMatrixBT601 = 0x00000001,
599 WICJpegTransferMatrix_FORCE_DWORD = CODEC_FORCE_DWORD,
600 }}
601 ENUM!{enum WICJpegScanType {
602 WICJpegScanTypeInterleaved = 0x00000000,
603 WICJpegScanTypePlanarComponents = 0x00000001,
604 WICJpegScanTypeProgressive = 0x00000002,
605 WICJpegScanType_FORCE_DWORD = CODEC_FORCE_DWORD,
606 }}
607 STRUCT!{struct WICImageParameters {
608 PixelFormat: D2D1_PIXEL_FORMAT,
609 DpiX: FLOAT,
610 DpiY: FLOAT,
611 Top: FLOAT,
612 Left: FLOAT,
613 PixelWidth: UINT32,
614 PixelHeight: UINT32,
615 }}
616 STRUCT!{struct WICBitmapPlaneDescription {
617 Format: WICPixelFormatGUID,
618 Width: UINT,
619 Height: UINT,
620 }}
621 STRUCT!{struct WICBitmapPlane {
622 Format: WICPixelFormatGUID,
623 pbBuffer: *mut BYTE,
624 cbStride: UINT,
625 cbBufferSize: UINT,
626 }}
627 STRUCT!{struct WICJpegFrameHeader {
628 Width: UINT,
629 Height: UINT,
630 TransferMatrix: WICJpegTransferMatrix,
631 ScanType: WICJpegScanType,
632 cComponents: UINT,
633 ComponentIdentifiers: DWORD,
634 SampleFactors: DWORD,
635 QuantizationTableIndices: DWORD,
636 }}
637 STRUCT!{struct WICJpegScanHeader {
638 cComponents: UINT,
639 RestartInterval: UINT,
640 ComponentSelectors: DWORD,
641 HuffmanTableIndices: DWORD,
642 StartSpectralSelection: BYTE,
643 EndSpectralSelection: BYTE,
644 SuccessiveApproximationHigh: BYTE,
645 SuccessiveApproximationLow: BYTE,
646 }}
647 RIDL!{#[uuid(0x00000040, 0xa8f2, 0x4877, 0xba, 0x0a, 0xfd, 0x2b, 0x66, 0x45, 0xfb, 0x94)]
648 interface IWICPalette(IWICPaletteVtbl): IUnknown(IUnknownVtbl) {
649 fn InitializePredefined(
650 ePaletteType: WICBitmapPaletteType,
651 fAddTransparentColor: BOOL,
652 ) -> HRESULT,
653 fn InitializeCustom(
654 pColors: *const WICColor,
655 cCount: UINT,
656 ) -> HRESULT,
657 fn InitializeFromBitmap(
658 pISurface: *const IWICBitmapSource,
659 cCount: UINT,
660 fAddTransparentColor: BOOL,
661 ) -> HRESULT,
662 fn InitializeFromPalette(
663 pIPalette: *const IWICPalette,
664 ) -> HRESULT,
665 fn GetType(
666 pePaletteType: *mut WICBitmapPaletteType,
667 ) -> HRESULT,
668 fn GetColorCount(
669 pcCount: *mut UINT,
670 ) -> HRESULT,
671 fn GetColors(
672 cCount: UINT,
673 pColors: *mut WICColor,
674 pcActualColors: *mut UINT,
675 ) -> HRESULT,
676 fn IsBlackWhite(
677 pfIsBlackWhite: *mut BOOL,
678 ) -> HRESULT,
679 fn IsGrayscale(
680 pfIsGrayscale: *mut BOOL,
681 ) -> HRESULT,
682 fn HasAlpha(
683 pfHasAlpha: *mut BOOL,
684 ) -> HRESULT,
685 }}
686 RIDL!{#[uuid(0x00000120, 0xa8f2, 0x4877, 0xba, 0x0a, 0xfd, 0x2b, 0x66, 0x45, 0xfb, 0x94)]
687 interface IWICBitmapSource(IWICBitmapSourceVtbl): IUnknown(IUnknownVtbl) {
688 fn GetSize(
689 puiWidth: *mut UINT,
690 puiHeight: *mut UINT,
691 ) -> HRESULT,
692 fn GetPixelFormat(
693 pPixelFormat: *mut WICPixelFormatGUID,
694 ) -> HRESULT,
695 fn GetResolution(
696 pDpiX: *mut c_double,
697 pDpiY: *mut c_double,
698 ) -> HRESULT,
699 fn CopyPalette(
700 pIPalette: *mut IWICPalette,
701 ) -> HRESULT,
702 fn CopyPixels(
703 prc: *const WICRect,
704 cbStride: UINT,
705 cbBufferSize: UINT,
706 pbBuffer: *mut BYTE,
707 ) -> HRESULT,
708 }}
709 RIDL!{#[uuid(0x00000301, 0xa8f2, 0x4877, 0xba, 0x0a, 0xfd, 0x2b, 0x66, 0x45, 0xfb, 0x94)]
710 interface IWICFormatConverter(IWICFormatConverterVtbl): IWICBitmapSource(IWICBitmapSourceVtbl) {
711 fn Initialize(
712 pISource: *const IWICBitmapSource,
713 dstFormat: REFWICPixelFormatGUID,
714 dither: WICBitmapDitherType,
715 pIPalette: *const IWICPalette,
716 alphaThresholdPercent: c_double,
717 paletteTranslate: WICBitmapPaletteType,
718 ) -> HRESULT,
719 fn CanConvert(
720 srcPixelFormat: REFWICPixelFormatGUID,
721 dstPixelFormat: REFWICPixelFormatGUID,
722 pfCanConvert: *mut BOOL,
723 ) -> HRESULT,
724 }}
725 RIDL!{#[uuid(0xbebee9cb, 0x83b0, 0x4dcc, 0x81, 0x32, 0xb0, 0xaa, 0xa5, 0x5e, 0xac, 0x96)]
726 interface IWICPlanarFormatConverter(IWICPlanarFormatConverterVtbl):
727 IWICBitmapSource(IWICBitmapSourceVtbl) {
728 fn Initialize(
729 ppPlanes: *const *const IWICBitmapSource,
730 cPlanes: UINT,
731 dstFormat: REFWICPixelFormatGUID,
732 dither: WICBitmapDitherType,
733 pIPalette: *const IWICPalette,
734 alphaThresholdPercent: c_double,
735 paletteTranslate: WICBitmapPaletteType,
736 ) -> HRESULT,
737 fn CanConvert(
738 pSrcPixelFormats: *const WICPixelFormatGUID,
739 cSrcPlanes: UINT,
740 dstPixelFormat: REFWICPixelFormatGUID,
741 pfCanConvert: *mut BOOL,
742 ) -> HRESULT,
743 }}
744 RIDL!{#[uuid(0x00000302, 0xa8f2, 0x4877, 0xba, 0x0a, 0xfd, 0x2b, 0x66, 0x45, 0xfb, 0x94)]
745 interface IWICBitmapScaler(IWICBitmapScalerVtbl): IWICBitmapSource(IWICBitmapSourceVtbl) {
746 fn Initialize(
747 pISource: *const IWICBitmapSource,
748 uiWidth: UINT,
749 uiHeight: UINT,
750 mode: WICBitmapInterpolationMode,
751 ) -> HRESULT,
752 }}
753 RIDL!{#[uuid(0xe4fbcf03, 0x223d, 0x4e81, 0x93, 0x33, 0xd6, 0x35, 0x55, 0x6d, 0xd1, 0xb5)]
754 interface IWICBitmapClipper(IWICBitmapClipperVtbl): IWICBitmapSource(IWICBitmapSourceVtbl) {
755 fn Initialize(
756 pISource: *const IWICBitmapSource,
757 prc: *const WICRect,
758 ) -> HRESULT,
759 }}
760 RIDL!{#[uuid(0x5009834f, 0x2d6a, 0x41ce, 0x9e, 0x1b, 0x17, 0xc5, 0xaf, 0xf7, 0xa7, 0x82)]
761 interface IWICBitmapFlipRotator(IWICBitmapFlipRotatorVtbl):
762 IWICBitmapSource(IWICBitmapSourceVtbl) {
763 fn Initialize(
764 pISource: *const IWICBitmapSource,
765 options: WICBitmapTransformOptions,
766 ) -> HRESULT,
767 }}
768 RIDL!{#[uuid(0x00000123, 0xa8f2, 0x4877, 0xba, 0x0a, 0xfd, 0x2b, 0x66, 0x45, 0xfb, 0x94)]
769 interface IWICBitmapLock(IWICBitmapLockVtbl): IUnknown(IUnknownVtbl) {
770 fn GetSize(
771 puiWidth: *mut UINT,
772 puiHeight: *mut UINT,
773 ) -> HRESULT,
774 fn GetStride(
775 pcbStride: *mut UINT,
776 ) -> HRESULT,
777 fn GetDataPointer(
778 pcbBufferSize: *mut UINT,
779 ppbData: *mut WICInProcPointer,
780 ) -> HRESULT,
781 fn GetPixelFormat(
782 pPixelFormat: *mut WICPixelFormatGUID,
783 ) -> HRESULT,
784 }}
785 RIDL!{#[uuid(0x00000121, 0xa8f2, 0x4877, 0xba, 0x0a, 0xfd, 0x2b, 0x66, 0x45, 0xfb, 0x94)]
786 interface IWICBitmap(IWICBitmapVtbl): IWICBitmapSource(IWICBitmapSourceVtbl) {
787 fn Lock(
788 prcLock: *const WICRect,
789 flags: DWORD,
790 ppILock: *mut *mut IWICBitmapLock,
791 ) -> HRESULT,
792 fn SetPalette(
793 pIPalette: *const IWICPalette,
794 ) -> HRESULT,
795 fn SetResolution(
796 dpiX: c_double,
797 dpiY: c_double,
798 ) -> HRESULT,
799 }}
800 RIDL!{#[uuid(0x3c613a02, 0x34b2, 0x44ea, 0x9a, 0x7c, 0x45, 0xae, 0xa9, 0xc6, 0xfd, 0x6d)]
801 interface IWICColorContext(IWICColorContextVtbl): IUnknown(IUnknownVtbl) {
802 fn InitializeFromFilename(
803 wzFilename: LPCWSTR,
804 ) -> HRESULT,
805 fn InitializeFromMemory(
806 pbBuffer: *const BYTE,
807 cbBufferSize: UINT,
808 ) -> HRESULT,
809 fn InitializeFromExifColorSpace(
810 value: UINT,
811 ) -> HRESULT,
812 fn GetType(
813 pType: *mut WICColorContextType,
814 ) -> HRESULT,
815 fn GetProfileBytes(
816 cbBuffer: UINT,
817 pbBuffer: *mut BYTE,
818 pcbActual: *mut UINT,
819 ) -> HRESULT,
820 fn GetExifColorSpace(
821 pValue: *mut UINT,
822 ) -> HRESULT,
823 }}
824 RIDL!{#[uuid(0xb66f034f, 0xd0e2, 0x40ab, 0xb4, 0x36, 0x6d, 0xe3, 0x9e, 0x32, 0x1a, 0x94)]
825 interface IWICColorTransform(IWICColorTransformVtbl): IWICBitmapSource(IWICBitmapSourceVtbl) {
826 fn Initialize(
827 pIBitmapSource: *const IWICBitmapSource,
828 pIContextSource: *const IWICColorContext,
829 pIContextDest: *const IWICColorContext,
830 pixelFmtDest: REFWICPixelFormatGUID,
831 ) -> HRESULT,
832 }}
833 RIDL!{#[uuid(0xb84e2c09, 0x78c9, 0x4ac4, 0x8b, 0xd3, 0x52, 0x4a, 0xe1, 0x66, 0x3a, 0x2f)]
834 interface IWICFastMetadataEncoder(IWICFastMetadataEncoderVtbl): IUnknown(IUnknownVtbl) {
835 fn Commit() -> HRESULT,
836 fn GetMetadataQueryWriter(
837 ppIMetadataQueryWriter: *mut *mut IWICMetadataQueryWriter,
838 ) -> HRESULT,
839 }}
840 RIDL!{#[uuid(0x135ff860, 0x22b7, 0x4ddf, 0xb0, 0xf6, 0x21, 0x8f, 0x4f, 0x29, 0x9a, 0x43)]
841 interface IWICStream(IWICStreamVtbl): IStream(IStreamVtbl) {
842 fn InitializeFromIStream(
843 pIStream: *const IStream,
844 ) -> HRESULT,
845 fn InitializeFromFilename(
846 wzFileName: LPCWSTR,
847 dwDesiredAccess: DWORD,
848 ) -> HRESULT,
849 fn InitializeFromMemory(
850 pbBuffer: WICInProcPointer,
851 cbBufferSize: DWORD,
852 ) -> HRESULT,
853 fn InitializeFromIStreamRegion(
854 pIStream: *const IStream,
855 ulOffset: ULARGE_INTEGER,
856 ulMaxSize: ULARGE_INTEGER,
857 ) -> HRESULT,
858 }}
859 RIDL!{#[uuid(0xdc2bb46d, 0x3f07, 0x481e, 0x86, 0x25, 0x22, 0x0c, 0x4a, 0xed, 0xbb, 0x33)]
860 interface IWICEnumMetadataItem(IWICEnumMetadataItemVtbl): IUnknown(IUnknownVtbl) {
861 fn Next(
862 celt: ULONG,
863 rgeltSchema: *mut PROPVARIANT,
864 rgeltId: *mut PROPVARIANT,
865 rgeltValue: *mut PROPVARIANT,
866 pceltFetched: *mut ULONG,
867 ) -> HRESULT,
868 fn Skip(
869 celt: ULONG,
870 ) -> HRESULT,
871 fn Reset() -> HRESULT,
872 fn Clone(
873 ppIEnumMetadataItem: *mut *mut IWICEnumMetadataItem,
874 ) -> HRESULT,
875 }}
876 RIDL!{#[uuid(0x30989668, 0xe1c9, 0x4597, 0xb3, 0x95, 0x45, 0x8e, 0xed, 0xb8, 0x08, 0xdf)]
877 interface IWICMetadataQueryReader(IWICMetadataQueryReaderVtbl): IUnknown(IUnknownVtbl) {
878 fn GetContainerFormat(
879 pguidContainerFormat: *mut GUID,
880 ) -> HRESULT,
881 fn GetLocation(
882 cchMaxLength: UINT,
883 wzNamespace: *mut WCHAR,
884 pcchActualLength: *mut UINT,
885 ) -> HRESULT,
886 fn GetMetadataByName(
887 wzName: LPCWSTR,
888 pvarValue: *mut PROPVARIANT,
889 ) -> HRESULT,
890 fn GetEnumerator(
891 ppIEnumString: *mut *mut IEnumString,
892 ) -> HRESULT,
893 }}
894 RIDL!{#[uuid(0xa721791a, 0x0def, 0x4d06, 0xbd, 0x91, 0x21, 0x18, 0xbf, 0x1d, 0xb1, 0x0b)]
895 interface IWICMetadataQueryWriter(IWICMetadataQueryWriterVtbl):
896 IWICMetadataQueryReader(IWICMetadataQueryReaderVtbl) {
897 fn SetMetadataByName(
898 wzName: LPCWSTR,
899 pvarValue: *const PROPVARIANT,
900 ) -> HRESULT,
901 fn RemoveMetadataByName(
902 wzName: LPCWSTR,
903 ) -> HRESULT,
904 }}
905 RIDL!{#[uuid(0x00000103, 0xa8f2, 0x4877, 0xba, 0x0a, 0xfd, 0x2b, 0x66, 0x45, 0xfb, 0x94)]
906 interface IWICBitmapEncoder(IWICBitmapEncoderVtbl): IUnknown(IUnknownVtbl) {
907 fn Initialize(
908 pIStream: *const IStream,
909 cacheOption: WICBitmapEncoderCacheOption,
910 ) -> HRESULT,
911 fn GetContainerFormat(
912 pguidContainerFormat: *mut GUID,
913 ) -> HRESULT,
914 fn GetEncoderInfo(
915 ppIEncoderInfo: *mut *mut IWICBitmapEncoderInfo,
916 ) -> HRESULT,
917 fn SetColorContexts(
918 cCount: UINT,
919 ppIColorContext: *const *const IWICColorContext,
920 ) -> HRESULT,
921 fn SetPalette(
922 pIPalette: *const IWICPalette,
923 ) -> HRESULT,
924 fn SetThumbnail(
925 pIThumbnail: *const IWICBitmapSource,
926 ) -> HRESULT,
927 fn SetPreview(
928 pIPreview: *const IWICBitmapSource,
929 ) -> HRESULT,
930 fn CreateNewFrame(
931 ppIFrameEncode: *mut *mut IWICBitmapFrameEncode,
932 ppIEncoderOptions: *mut *mut IPropertyBag2,
933 ) -> HRESULT,
934 fn Commit() -> HRESULT,
935 fn GetMetadataQueryWriter(
936 ppIMetadataQueryWriter: *mut *mut IWICMetadataQueryWriter,
937 ) -> HRESULT,
938 }}
939 RIDL!{#[uuid(0x00000105, 0xa8f2, 0x4877, 0xba, 0x0a, 0xfd, 0x2b, 0x66, 0x45, 0xfb, 0x94)]
940 interface IWICBitmapFrameEncode(IWICBitmapFrameEncodeVtbl): IUnknown(IUnknownVtbl) {
941 fn Initialize(
942 pIEncoderOptions: *const IPropertyBag2,
943 ) -> HRESULT,
944 fn SetSize(
945 uiWidth: UINT,
946 uiHeight: UINT,
947 ) -> HRESULT,
948 fn SetResolution(
949 dpiX: c_double,
950 dpiY: c_double,
951 ) -> HRESULT,
952 fn SetPixelFormat(
953 pPixelFormat: *mut WICPixelFormatGUID,
954 ) -> HRESULT,
955 fn SetColorContexts(
956 cCount: UINT,
957 ppIColorContext: *const *const IWICColorContext,
958 ) -> HRESULT,
959 fn SetPalette(
960 pIPalette: *const IWICPalette,
961 ) -> HRESULT,
962 fn SetThumbnail(
963 pIThumbnail: *const IWICBitmapSource,
964 ) -> HRESULT,
965 fn WritePixels(
966 lineCount: UINT,
967 cbStride: UINT,
968 cbBufferSize: UINT,
969 pbPixels: *const BYTE,
970 ) -> HRESULT,
971 fn WriteSource(
972 pIBitmapSource: *const IWICBitmapSource,
973 prc: *const WICRect,
974 ) -> HRESULT,
975 fn Commit() -> HRESULT,
976 fn GetMetadataQueryWriter(
977 ppIMetadataQueryWriter: *mut *mut IWICMetadataQueryWriter,
978 ) -> HRESULT,
979 }}
980 RIDL!{#[uuid(0xf928b7b8, 0x2221, 0x40c1, 0xb7, 0x2e, 0x7e, 0x82, 0xf1, 0x97, 0x4d, 0x1a)]
981 interface IWICPlanarBitmapFrameEncode(IWICPlanarBitmapFrameEncodeVtbl): IUnknown(IUnknownVtbl) {
982 fn WritePixels(
983 lineCount: UINT,
984 pPlanes: *const WICBitmapPlane,
985 cPlanes: UINT,
986 ) -> HRESULT,
987 fn WriteSource(
988 ppPlanes: *const *const IWICBitmapSource,
989 cPlanes: UINT,
990 prcSource: *const WICRect,
991 ) -> HRESULT,
992 }}
993 RIDL!{#[uuid(0x04c75bf8, 0x3ce1, 0x473b, 0xac, 0xc5, 0x3c, 0xc4, 0xf5, 0xe9, 0x49, 0x99)]
994 interface IWICImageEncoder(IWICImageEncoderVtbl): IUnknown(IUnknownVtbl) {
995 fn WriteFrame(
996 pImage: *const ID2D1Image,
997 pFrameEncode: *const IWICBitmapFrameEncode,
998 pImageParameters: *const WICImageParameters,
999 ) -> HRESULT,
1000 fn WriteFrameThumbnail(
1001 pImage: *const ID2D1Image,
1002 pFrameEncode: *const IWICBitmapFrameEncode,
1003 pImageParameters: *const WICImageParameters,
1004 ) -> HRESULT,
1005 fn WriteThumbnail(
1006 pImage: *const ID2D1Image,
1007 pEncoder: *const IWICBitmapEncoder,
1008 pImageParameters: *const WICImageParameters,
1009 ) -> HRESULT,
1010 }}
1011 RIDL!{#[uuid(0x9edde9e7, 0x8dee, 0x47ea, 0x99, 0xdf, 0xe6, 0xfa, 0xf2, 0xed, 0x44, 0xbf)]
1012 interface IWICBitmapDecoder(IWICBitmapDecoderVtbl): IUnknown(IUnknownVtbl) {
1013 fn QueryCapability(
1014 pIStream: *const IStream,
1015 pdwCapability: *mut DWORD,
1016 ) -> HRESULT,
1017 fn Initialize(
1018 pIStream: *const IStream,
1019 cacheOptions: WICDecodeOptions,
1020 ) -> HRESULT,
1021 fn GetContainerFormat(
1022 pguidContainerFormat: *mut GUID,
1023 ) -> HRESULT,
1024 fn GetDecoderInfo(
1025 ppIDecoderInfo: *mut *mut IWICBitmapDecoderInfo,
1026 ) -> HRESULT,
1027 fn CopyPalette(
1028 pIPalette: *const IWICPalette,
1029 ) -> HRESULT,
1030 fn GetMetadataQueryReader(
1031 ppIMetadataQueryReader: *mut *mut IWICMetadataQueryReader,
1032 ) -> HRESULT,
1033 fn GetPreview(
1034 ppIBitmapSource: *mut *mut IWICBitmapSource,
1035 ) -> HRESULT,
1036 fn GetColorContexts(
1037 cCount: UINT,
1038 ppIColorContexts: *mut *mut IWICColorContext,
1039 pcActualCount: *mut UINT,
1040 ) -> HRESULT,
1041 fn GetThumbnail(
1042 ppIThumbnail: *mut *mut IWICBitmapSource,
1043 ) -> HRESULT,
1044 fn GetFrameCount(
1045 pCount: *mut UINT,
1046 ) -> HRESULT,
1047 fn GetFrame(
1048 index: UINT,
1049 ppIBitmapFrame: *mut *mut IWICBitmapFrameDecode,
1050 ) -> HRESULT,
1051 }}
1052 RIDL!{#[uuid(0x3b16811b, 0x6a43, 0x4ec9, 0xb7, 0x13, 0x3d, 0x5a, 0x0c, 0x13, 0xb9, 0x40)]
1053 interface IWICBitmapSourceTransform(IWICBitmapSourceTransformVtbl): IUnknown(IUnknownVtbl) {
1054 fn CopyPixels(
1055 prc: *const WICRect,
1056 uiWidth: UINT,
1057 uiHeight: UINT,
1058 pguidDstFormat: *const WICPixelFormatGUID,
1059 dstTransform: WICBitmapTransformOptions,
1060 nStride: UINT,
1061 cbBufferSize: UINT,
1062 pbBuffer: *mut BYTE,
1063 ) -> HRESULT,
1064 fn GetClosestSize(
1065 puiWidth: *mut UINT,
1066 puiHeight: *mut UINT,
1067 ) -> HRESULT,
1068 fn GetClosestPixelFormat(
1069 pguidDstFormat: *mut WICPixelFormatGUID,
1070 ) -> HRESULT,
1071 fn DoesSupportTransform(
1072 dstTransform: WICBitmapTransformOptions,
1073 pfIsSupported: *mut BOOL,
1074 ) -> HRESULT,
1075 }}
1076 RIDL!{#[uuid(0x3aff9cce, 0xbe95, 0x4303, 0xb9, 0x27, 0xe7, 0xd1, 0x6f, 0xf4, 0xa6, 0x13)]
1077 interface IWICPlanarBitmapSourceTransform(IWICPlanarBitmapSourceTransformVtbl):
1078 IUnknown(IUnknownVtbl) {
1079 fn DoesSupportTransform(
1080 puiWidth: *mut UINT,
1081 puiHeight: *mut UINT,
1082 dstTransform: WICBitmapTransformOptions,
1083 dstPlanarOptions: WICPlanarOptions,
1084 pguidDstFormats: *const WICPixelFormatGUID,
1085 pPlaneDescriptions: *mut WICBitmapPlaneDescription,
1086 cPlanes: UINT,
1087 pfIsSupported: *mut BOOL,
1088 ) -> HRESULT,
1089 fn CopyPixels(
1090 prcSource: *const WICRect,
1091 uiWidth: UINT,
1092 uiHeight: UINT,
1093 dstTransform: WICBitmapTransformOptions,
1094 dstPlanarOptions: WICPlanarOptions,
1095 pDstPlanes: *const WICBitmapPlane,
1096 cPlanes: UINT,
1097 ) -> HRESULT,
1098 }}
1099 RIDL!{#[uuid(0x3b16811b, 0x6a43, 0x4ec9, 0xa8, 0x13, 0x3d, 0x93, 0x0c, 0x13, 0xb9, 0x40)]
1100 interface IWICBitmapFrameDecode(IWICBitmapFrameDecodeVtbl):
1101 IWICBitmapSource(IWICBitmapSourceVtbl) {
1102 fn GetMetadataQueryReader(
1103 ppIMetadataQueryReader: *mut *mut IWICMetadataQueryReader,
1104 ) -> HRESULT,
1105 fn GetColorContexts(
1106 cCount: UINT,
1107 ppIColorContexts: *mut *mut IWICColorContext,
1108 pcActualCount: *mut UINT,
1109 ) -> HRESULT,
1110 fn GetThumbnail(
1111 ppIThumbnail: *mut *mut IWICBitmapSource,
1112 ) -> HRESULT,
1113 }}
1114 RIDL!{#[uuid(0xdaac296f, 0x7aa5, 0x4dbf, 0x8d, 0x15, 0x22, 0x5c, 0x59, 0x76, 0xf8, 0x91)]
1115 interface IWICProgressiveLevelControl(IWICProgressiveLevelControlVtbl): IUnknown(IUnknownVtbl) {
1116 fn GetLevelCount(
1117 pcLevels: *mut UINT,
1118 ) -> HRESULT,
1119 fn GetCurrentLevel(
1120 pnLevel: *mut UINT,
1121 ) -> HRESULT,
1122 fn SetCurrentLevel(
1123 nLevel: UINT,
1124 ) -> HRESULT,
1125 }}
1126 RIDL!{#[uuid(0x4776f9cd, 0x9517, 0x45fa, 0xbf, 0x24, 0xe8, 0x9c, 0x5e, 0xc5, 0xc6, 0x0c)]
1127 interface IWICProgressCallback(IWICProgressCallbackVtbl): IUnknown(IUnknownVtbl) {
1128 fn Notify(
1129 uFrameNum: ULONG,
1130 operation: WICProgressOperation,
1131 dblProgress: c_double,
1132 ) -> HRESULT,
1133 }}
1134 FN!{stdcall PFNProgressNotification(
1135 pvData: LPVOID,
1136 uFrameNum: ULONG,
1137 operation: WICProgressOperation,
1138 dblProgress: c_double,
1139 ) -> HRESULT}
1140 RIDL!{#[uuid(0x64c1024e, 0xc3cf, 0x4462, 0x80, 0x78, 0x88, 0xc2, 0xb1, 0x1c, 0x46, 0xd9)]
1141 interface IWICBitmapCodecProgressNotification(IWICBitmapCodecProgressNotificationVtbl):
1142 IUnknown(IUnknownVtbl) {
1143 fn RegisterProgressNotification(
1144 pfnProgressNotification: PFNProgressNotification,
1145 pvData: LPVOID,
1146 dwProgressFlags: DWORD,
1147 ) -> HRESULT,
1148 }}
1149 RIDL!{#[uuid(0x23bc3f0a, 0x698b, 0x4357, 0x88, 0x6b, 0xf2, 0x4d, 0x50, 0x67, 0x13, 0x34)]
1150 interface IWICComponentInfo(IWICComponentInfoVtbl): IUnknown(IUnknownVtbl) {
1151 fn GetComponentType(
1152 pType: *mut WICComponentType,
1153 ) -> HRESULT,
1154 fn GetCLSID(
1155 pclsid: *mut CLSID,
1156 ) -> HRESULT,
1157 fn GetSigningStatus(
1158 pStatus: *mut DWORD,
1159 ) -> HRESULT,
1160 fn GetAuthor(
1161 cchAuthor: UINT,
1162 wzAuthor: *mut WCHAR,
1163 pcchActual: *mut UINT,
1164 ) -> HRESULT,
1165 fn GetVendorGUID(
1166 pguidVendor: *mut GUID,
1167 ) -> HRESULT,
1168 fn GetVersion(
1169 cchVersion: UINT,
1170 wzVersion: *mut WCHAR,
1171 pcchActual: *mut UINT,
1172 ) -> HRESULT,
1173 fn GetSpecVersion(
1174 cchSpecVersion: UINT,
1175 wzSpecVersion: *mut WCHAR,
1176 pcchActual: *mut UINT,
1177 ) -> HRESULT,
1178 fn GetFriendlyName(
1179 cchFriendlyName: UINT,
1180 wzFriendlyName: *mut WCHAR,
1181 pcchActual: *mut UINT,
1182 ) -> HRESULT,
1183 }}
1184 RIDL!{#[uuid(0x9f34fb65, 0x13f4, 0x4f15, 0xbc, 0x57, 0x37, 0x26, 0xb5, 0xe5, 0x3d, 0x9f)]
1185 interface IWICFormatConverterInfo(IWICFormatConverterInfoVtbl):
1186 IWICComponentInfo(IWICComponentInfoVtbl) {
1187 fn GetPixelFormats(
1188 cFormats: UINT,
1189 pPixelFormatGUIDs: *mut WICPixelFormatGUID,
1190 pcActual: *mut UINT,
1191 ) -> HRESULT,
1192 fn CreateInstance(
1193 ppIConverter: *mut *mut IWICFormatConverter,
1194 ) -> HRESULT,
1195 }}
1196 RIDL!{#[uuid(0xe87a44c4, 0xb76e, 0x4c47, 0x8b, 0x09, 0x29, 0x8e, 0xb1, 0x2a, 0x27, 0x14)]
1197 interface IWICBitmapCodecInfo(IWICBitmapCodecInfoVtbl): IWICComponentInfo(IWICComponentInfoVtbl) {
1198 fn GetContainerFormat(
1199 pguidContainerFormat: *mut GUID,
1200 ) -> HRESULT,
1201 fn GetPixelFormats(
1202 cFormats: UINT,
1203 pguidPixelFormats: *mut GUID,
1204 pcActual: *mut UINT,
1205 ) -> HRESULT,
1206 fn GetColorManagementVersion(
1207 cchColorManagementVersion: UINT,
1208 wzColorManagementVersion: *mut WCHAR,
1209 pcchActual: *mut UINT,
1210 ) -> HRESULT,
1211 fn GetDeviceManufacturer(
1212 cchDeviceManufacturer: UINT,
1213 wzDeviceManufacturer: *mut WCHAR,
1214 pcchActual: *mut UINT,
1215 ) -> HRESULT,
1216 fn GetDeviceModels(
1217 cchDeviceModels: UINT,
1218 wzDeviceModels: *mut WCHAR,
1219 pcchActual: *mut UINT,
1220 ) -> HRESULT,
1221 fn GetMimeTypes(
1222 cchMimeTypes: UINT,
1223 wzMimeTypes: *mut WCHAR,
1224 pcchActual: *mut UINT,
1225 ) -> HRESULT,
1226 fn GetFileExtensions(
1227 cchFileExtensions: UINT,
1228 wzFileExtensions: *mut WCHAR,
1229 pcchActual: *mut UINT,
1230 ) -> HRESULT,
1231 fn DoesSupportAnimation(
1232 pfSupportAnimation: *mut BOOL,
1233 ) -> HRESULT,
1234 fn DoesSupportChromakey(
1235 pfSupportChromakey: *mut BOOL,
1236 ) -> HRESULT,
1237 fn DoesSupportLossless(
1238 pfSupportLossless: *mut BOOL,
1239 ) -> HRESULT,
1240 fn DoesSupportMultiframe(
1241 pfSupportMultiframe: *mut BOOL,
1242 ) -> HRESULT,
1243 fn MatchesMimeType(
1244 wzMimeType: LPCWSTR,
1245 pfMatches: *mut BOOL,
1246 ) -> HRESULT,
1247 }}
1248 RIDL!{#[uuid(0x94c9b4ee, 0xa09f, 0x4f92, 0x8a, 0x1e, 0x4a, 0x9b, 0xce, 0x7e, 0x76, 0xfb)]
1249 interface IWICBitmapEncoderInfo(IWICBitmapEncoderInfoVtbl):
1250 IWICBitmapCodecInfo(IWICBitmapCodecInfoVtbl) {
1251 fn CreateInstance(
1252 ppIBitmapEncoder: *mut *mut IWICBitmapEncoder,
1253 ) -> HRESULT,
1254 }}
1255 RIDL!{#[uuid(0xd8cd007f, 0xd08f, 0x4191, 0x9b, 0xfc, 0x23, 0x6e, 0xa7, 0xf0, 0xe4, 0xb5)]
1256 interface IWICBitmapDecoderInfo(IWICBitmapDecoderInfoVtbl):
1257 IWICBitmapCodecInfo(IWICBitmapCodecInfoVtbl) {
1258 fn GetPatterns(
1259 cbSizePatterns: UINT,
1260 pPatterns: *mut WICBitmapPattern,
1261 pcPatterns: *mut UINT,
1262 pcbPatternsActual: *mut UINT,
1263 ) -> HRESULT,
1264 fn MatchesPattern(
1265 pIStream: *const IStream,
1266 pfMatches: *mut BOOL,
1267 ) -> HRESULT,
1268 fn CreateInstance(
1269 ppIBitmapDecoder: *mut *mut IWICBitmapDecoder,
1270 ) -> HRESULT,
1271 }}
1272 RIDL!{#[uuid(0xe8eda601, 0x3d48, 0x431a, 0xab, 0x44, 0x69, 0x05, 0x9b, 0xe8, 0x8b, 0xbe)]
1273 interface IWICPixelFormatInfo(IWICPixelFormatInfoVtbl): IWICComponentInfo(IWICComponentInfoVtbl) {
1274 fn GetFormatGUID(
1275 pFormat: *mut GUID,
1276 ) -> HRESULT,
1277 fn GetColorContext(
1278 ppIColorContext: *mut *mut IWICColorContext,
1279 ) -> HRESULT,
1280 fn GetBitsPerPixel(
1281 puiBitsPerPixel: *mut UINT,
1282 ) -> HRESULT,
1283 fn GetChannelCount(
1284 puiChannelCount: *mut UINT,
1285 ) -> HRESULT,
1286 fn GetChannelMask(
1287 uiChannelIndex: UINT,
1288 cbMaskBuffer: UINT,
1289 pbMaskBuffer: *mut BYTE,
1290 pcbActual: *mut UINT,
1291 ) -> HRESULT,
1292 }}
1293 RIDL!{#[uuid(0xa9db33a2, 0xaf5f, 0x43c7, 0xb6, 0x79, 0x74, 0xf5, 0x98, 0x4b, 0x5a, 0xa4)]
1294 interface IWICPixelFormatInfo2(IWICPixelFormatInfo2Vtbl):
1295 IWICPixelFormatInfo(IWICPixelFormatInfoVtbl) {
1296 fn SupportsTransparency(
1297 pfSupportsTransparency: *mut BOOL,
1298 ) -> HRESULT,
1299 fn GetNumericRepresentation(
1300 pNumericRepresentation: *mut WICPixelFormatNumericRepresentation,
1301 ) -> HRESULT,
1302 }}
1303 RIDL!{#[uuid(0xec5ec8a9, 0xc395, 0x4314, 0x9c, 0x77, 0x54, 0xd7, 0xa9, 0x35, 0xff, 0x70)]
1304 interface IWICImagingFactory(IWICImagingFactoryVtbl): IUnknown(IUnknownVtbl) {
1305 fn CreateDecoderFromFilename(
1306 wzFilename: LPCWSTR,
1307 pguidVendor: *const GUID,
1308 dwDesiredAccess: DWORD,
1309 metadataOptions: WICDecodeOptions,
1310 ppIDecoder: *mut *mut IWICBitmapDecoder,
1311 ) -> HRESULT,
1312 fn CreateDecoderFromStream(
1313 pIStream: *const IStream,
1314 pguidVendor: *const GUID,
1315 metadataOptions: WICDecodeOptions,
1316 ppIDecoder: *mut *mut IWICBitmapDecoder,
1317 ) -> HRESULT,
1318 fn CreateDecoderFromFileHandle(
1319 hFile: ULONG_PTR,
1320 pguidVendor: *const GUID,
1321 metadataOptions: WICDecodeOptions,
1322 ppIDecoder: *mut *mut IWICBitmapDecoder,
1323 ) -> HRESULT,
1324 fn CreateComponentInfo(
1325 clsidComponent: REFCLSID,
1326 ppIInfo: *mut *mut IWICComponentInfo,
1327 ) -> HRESULT,
1328 fn CreateDecoder(
1329 guidContainerFormat: REFGUID,
1330 pguidVendor: *const GUID,
1331 ppIDecoder: *mut *mut IWICBitmapDecoder,
1332 ) -> HRESULT,
1333 fn CreateEncoder(
1334 guidContainerFormat: REFGUID,
1335 pguidVendor: *const GUID,
1336 ppIEncoder: *mut *mut IWICBitmapEncoder,
1337 ) -> HRESULT,
1338 fn CreatePalette(
1339 ppIPalette: *mut *mut IWICPalette,
1340 ) -> HRESULT,
1341 fn CreateFormatConverter(
1342 ppIFormatConverter: *mut *mut IWICFormatConverter,
1343 ) -> HRESULT,
1344 fn CreateBitmapScaler(
1345 ppIBitmapScaler: *mut *mut IWICBitmapScaler,
1346 ) -> HRESULT,
1347 fn CreateBitmapClipper(
1348 ppIBitmapClipper: *mut *mut IWICBitmapClipper,
1349 ) -> HRESULT,
1350 fn CreateBitmapFlipRotator(
1351 ppIBitmapFlipRotator: *mut *mut IWICBitmapFlipRotator,
1352 ) -> HRESULT,
1353 fn CreateStream(
1354 ppIWICStream: *mut *mut IWICStream,
1355 ) -> HRESULT,
1356 fn CreateColorContext(
1357 ppIWICColorContext: *mut *mut IWICColorContext,
1358 ) -> HRESULT,
1359 fn CreateColorTransformer(
1360 ppIWICColorTransform: *mut *mut IWICColorTransform,
1361 ) -> HRESULT,
1362 fn CreateBitmap(
1363 uiWidth: UINT,
1364 uiHeight: UINT,
1365 pixelFormat: REFWICPixelFormatGUID,
1366 option: WICBitmapCreateCacheOption,
1367 ppIBitmap: *mut *mut IWICBitmap,
1368 ) -> HRESULT,
1369 fn CreateBitmapFromSource(
1370 pIBitmapSource: *const IWICBitmapSource,
1371 option: WICBitmapCreateCacheOption,
1372 ppIBitmap: *mut *mut IWICBitmap,
1373 ) -> HRESULT,
1374 fn CreateBitmapFromSourceRect(
1375 pIBitmapSource: *const IWICBitmapSource,
1376 x: UINT,
1377 y: UINT,
1378 width: UINT,
1379 height: UINT,
1380 ppIBitmap: *mut *mut IWICBitmap,
1381 ) -> HRESULT,
1382 fn CreateBitmapFromMemory(
1383 uiWidth: UINT,
1384 uiHeight: UINT,
1385 pixelFormat: REFWICPixelFormatGUID,
1386 cbStride: UINT,
1387 cbBufferSize: UINT,
1388 pbBuffer: *const BYTE,
1389 ppIBitmap: *mut *mut IWICBitmap,
1390 ) -> HRESULT,
1391 fn CreateBitmapFromHBITMAP(
1392 hBitmap: HBITMAP,
1393 hPalette: HPALETTE,
1394 options: WICBitmapAlphaChannelOption,
1395 ppIBitmap: *mut *mut IWICBitmap,
1396 ) -> HRESULT,
1397 fn CreateBitmapFromHICON(
1398 hIcon: HICON,
1399 ppIBitmap: *mut *mut IWICBitmap,
1400 ) -> HRESULT,
1401 fn CreateComponentEnumerator(
1402 componentTypes: DWORD,
1403 options: DWORD,
1404 ppIEnumUnknown: *mut *mut IEnumUnknown,
1405 ) -> HRESULT,
1406 fn CreateFastMetadataEncoderFromDecoder(
1407 pIDecoder: *const IWICBitmapDecoder,
1408 ppIFastEncoder: *mut *mut IWICFastMetadataEncoder,
1409 ) -> HRESULT,
1410 fn CreateFastMetadataEncoderFromFrameDecode(
1411 pIFrameDecoder: *const IWICBitmapFrameDecode,
1412 ppIFastEncoder: *mut *mut IWICFastMetadataEncoder,
1413 ) -> HRESULT,
1414 fn CreateQueryWriter(
1415 guidMetadataFormat: REFGUID,
1416 pguidVendor: *const GUID,
1417 ppIQueryWriter: *mut *mut IWICMetadataQueryWriter,
1418 ) -> HRESULT,
1419 fn CreateQueryWriterFromReader(
1420 pIQueryReader: *const IWICMetadataQueryReader,
1421 pguidVendor: *const GUID,
1422 ppIQueryWriter: *mut *mut IWICMetadataQueryWriter,
1423 ) -> HRESULT,
1424 }}
1425 RIDL!{#[uuid(0x7b816b45, 0x1996, 0x4476, 0xb1, 0x32, 0xde, 0x9e, 0x24, 0x7c, 0x8a, 0xf0)]
1426 interface IWICImagingFactory2(IWICImagingFactory2Vtbl):
1427 IWICImagingFactory(IWICImagingFactoryVtbl) {
1428 fn CreateImageEncoder(
1429 pD2DDevice: *const ID2D1Device,
1430 ppWICImageEncoder: *mut *mut IWICImageEncoder,
1431 ) -> HRESULT,
1432 }}
1433 extern "system" {
WICConvertBitmapSource( dstFormat: REFWICPixelFormatGUID, pISrc: *const IWICBitmapSource, ppIDst: *mut *mut IWICBitmapSource, ) -> HRESULT1434 pub fn WICConvertBitmapSource(
1435 dstFormat: REFWICPixelFormatGUID,
1436 pISrc: *const IWICBitmapSource,
1437 ppIDst: *mut *mut IWICBitmapSource,
1438 ) -> HRESULT;
WICCreateBitmapFromSection( width: UINT, height: UINT, pixelFormat: REFWICPixelFormatGUID, hSection: HANDLE, stride: UINT, offset: UINT, ppIBitmap: *mut *mut IWICBitmap, ) -> HRESULT1439 pub fn WICCreateBitmapFromSection(
1440 width: UINT,
1441 height: UINT,
1442 pixelFormat: REFWICPixelFormatGUID,
1443 hSection: HANDLE,
1444 stride: UINT,
1445 offset: UINT,
1446 ppIBitmap: *mut *mut IWICBitmap,
1447 ) -> HRESULT;
WICCreateBitmapFromSectionEx( width: UINT, height: UINT, pixelFormat: REFWICPixelFormatGUID, hSection: HANDLE, stride: UINT, offset: UINT, desiredAccessLevel: WICSectionAccessLevel, ppIBitmap: *mut *mut IWICBitmap, ) -> HRESULT1448 pub fn WICCreateBitmapFromSectionEx(
1449 width: UINT,
1450 height: UINT,
1451 pixelFormat: REFWICPixelFormatGUID,
1452 hSection: HANDLE,
1453 stride: UINT,
1454 offset: UINT,
1455 desiredAccessLevel: WICSectionAccessLevel,
1456 ppIBitmap: *mut *mut IWICBitmap,
1457 ) -> HRESULT;
WICMapGuidToShortName( guid: REFGUID, cchName: UINT, wzName: *mut WCHAR, pcchActual: *mut UINT, ) -> HRESULT1458 pub fn WICMapGuidToShortName(
1459 guid: REFGUID,
1460 cchName: UINT,
1461 wzName: *mut WCHAR,
1462 pcchActual: *mut UINT,
1463 ) -> HRESULT;
WICMapShortNameToGuid( wzName: PCWSTR, pguid: *mut GUID, ) -> HRESULT1464 pub fn WICMapShortNameToGuid(
1465 wzName: PCWSTR,
1466 pguid: *mut GUID,
1467 ) -> HRESULT;
WICMapSchemaToName( guidMetadataFormat: REFGUID, pwzSchema: LPWSTR, cchName: UINT, wzName: *mut WCHAR, pcchActual: *mut UINT, ) -> HRESULT1468 pub fn WICMapSchemaToName(
1469 guidMetadataFormat: REFGUID,
1470 pwzSchema: LPWSTR,
1471 cchName: UINT,
1472 wzName: *mut WCHAR,
1473 pcchActual: *mut UINT,
1474 ) -> HRESULT;
1475 }
1476 pub const FACILITY_WINCODEC_ERR: HRESULT = 0x898;
1477 pub const WINCODEC_ERR_BASE: HRESULT = 0x2000;
1478 /// intsafe.h, 0x216 = 534 = ERROR_ARITHMETIC_OVERFLOW
1479 pub const INTSAFE_E_ARITHMETIC_OVERFLOW: HRESULT = 0x80070216;
1480 #[inline]
MAKE_WINCODECHR(severity: HRESULT, code: HRESULT) -> HRESULT1481 pub fn MAKE_WINCODECHR(severity: HRESULT, code: HRESULT) -> HRESULT {
1482 MAKE_HRESULT!(severity, FACILITY_WINCODEC_ERR, WINCODEC_ERR_BASE + code)
1483 }
1484 #[inline]
MAKE_WINCODECHR_ERR(code: HRESULT) -> HRESULT1485 pub fn MAKE_WINCODECHR_ERR(code: HRESULT) -> HRESULT {
1486 MAKE_WINCODECHR(SEVERITY_ERROR, code)
1487 }
1488 pub const WINCODEC_ERR_GENERIC_ERROR: HRESULT = E_FAIL;
1489 pub const WINCODEC_ERR_INVALIDPARAMETER: HRESULT = E_INVALIDARG;
1490 pub const WINCODEC_ERR_OUTOFMEMORY: HRESULT = E_OUTOFMEMORY;
1491 pub const WINCODEC_ERR_NOTIMPLEMENTED: HRESULT = E_NOTIMPL;
1492 pub const WINCODEC_ERR_ABORTED: HRESULT = E_ABORT;
1493 pub const WINCODEC_ERR_ACCESSDENIED: HRESULT = E_ACCESSDENIED;
1494 pub const WINCODEC_ERR_VALUEOVERFLOW: HRESULT = INTSAFE_E_ARITHMETIC_OVERFLOW;
1495 ENUM!{enum WICTiffCompressionOption {
1496 WICTiffCompressionDontCare = 0x00000000,
1497 WICTiffCompressionNone = 0x00000001,
1498 WICTiffCompressionCCITT3 = 0x00000002,
1499 WICTiffCompressionCCITT4 = 0x00000003,
1500 WICTiffCompressionLZW = 0x00000004,
1501 WICTiffCompressionRLE = 0x00000005,
1502 WICTiffCompressionZIP = 0x00000006,
1503 WICTiffCompressionLZWHDifferencing = 0x00000007,
1504 WICTIFFCOMPRESSIONOPTION_FORCE_DWORD = CODEC_FORCE_DWORD,
1505 }}
1506 ENUM!{enum WICJpegYCrCbSubsamplingOption {
1507 WICJpegYCrCbSubsamplingDefault = 0x00000000,
1508 WICJpegYCrCbSubsampling420 = 0x00000001,
1509 WICJpegYCrCbSubsampling422 = 0x00000002,
1510 WICJpegYCrCbSubsampling444 = 0x00000003,
1511 WICJpegYCrCbSubsampling440 = 0x00000004,
1512 WICJPEGYCRCBSUBSAMPLING_FORCE_DWORD = CODEC_FORCE_DWORD,
1513 }}
1514 ENUM!{enum WICPngFilterOption {
1515 WICPngFilterUnspecified = 0x00000000,
1516 WICPngFilterNone = 0x00000001,
1517 WICPngFilterSub = 0x00000002,
1518 WICPngFilterUp = 0x00000003,
1519 WICPngFilterAverage = 0x00000004,
1520 WICPngFilterPaeth = 0x00000005,
1521 WICPngFilterAdaptive = 0x00000006,
1522 WICPNGFILTEROPTION_FORCE_DWORD = CODEC_FORCE_DWORD,
1523 }}
1524 ENUM!{enum WICNamedWhitePoint {
1525 WICWhitePointDefault = 0x00000001,
1526 WICWhitePointDaylight = 0x00000002,
1527 WICWhitePointCloudy = 0x00000004,
1528 WICWhitePointShade = 0x00000008,
1529 WICWhitePointTungsten = 0x00000010,
1530 WICWhitePointFluorescent = 0x00000020,
1531 WICWhitePointFlash = 0x00000040,
1532 WICWhitePointUnderwater = 0x00000080,
1533 WICWhitePointCustom = 0x00000100,
1534 WICWhitePointAutoWhiteBalance = 0x00000200,
1535 WICWhitePointAsShot = WICWhitePointDefault,
1536 WICNAMEDWHITEPOINT_FORCE_DWORD = CODEC_FORCE_DWORD,
1537 }}
1538 ENUM!{enum WICRawCapabilities {
1539 WICRawCapabilityNotSupported = 0x00000000,
1540 WICRawCapabilityGetSupported = 0x00000001,
1541 WICRawCapabilityFullySupported = 0x00000002,
1542 WICRAWCAPABILITIES_FORCE_DWORD = CODEC_FORCE_DWORD,
1543 }}
1544 ENUM!{enum WICRawRotationCapabilities {
1545 WICRawRotationCapabilityNotSupported = 0x00000000,
1546 WICRawRotationCapabilityGetSupported = 0x00000001,
1547 WICRawRotationCapabilityNinetyDegreesSupported = 0x00000002,
1548 WICRawRotationCapabilityFullySupported = 0x00000003,
1549 WICRAWROTATIONCAPABILITIES_FORCE_DWORD = CODEC_FORCE_DWORD,
1550 }}
1551 STRUCT!{struct WICRawCapabilitiesInfo {
1552 cbSize: UINT,
1553 CodecMajorVersion: UINT,
1554 CodecMinorVersion: UINT,
1555 ExposureCompensationSupport: WICRawCapabilities,
1556 ContrastSupport: WICRawCapabilities,
1557 RGBWhitePointSupport: WICRawCapabilities,
1558 NamedWhitePointSupport: WICRawCapabilities,
1559 NamedWhitePointSupportMask: UINT,
1560 KelvinWhitePointSupport: WICRawCapabilities,
1561 GammaSupport: WICRawCapabilities,
1562 TintSupport: WICRawCapabilities,
1563 SaturationSupport: WICRawCapabilities,
1564 SharpnessSupport: WICRawCapabilities,
1565 NoiseReductionSupport: WICRawCapabilities,
1566 DestinationColorProfileSupport: WICRawCapabilities,
1567 ToneCurveSupport: WICRawCapabilities,
1568 RotationSupport: WICRawRotationCapabilities,
1569 RenderModeSupport: WICRawCapabilities,
1570 }}
1571 ENUM!{enum WICRawParameterSet {
1572 WICAsShotParameterSet = 0x00000001,
1573 WICUserAdjustedParameterSet = 0x00000002,
1574 WICAutoAdjustedParameterSet = 0x00000003,
1575 WICRAWPARAMETERSET_FORCE_DWORD = CODEC_FORCE_DWORD,
1576 }}
1577 ENUM!{enum WICRawRenderMode {
1578 WICRawRenderModeDraft = 0x00000001,
1579 WICRawRenderModeNormal = 0x00000002,
1580 WICRawRenderModeBestQuality = 0x00000003,
1581 WICRAWRENDERMODE_FORCE_DWORD = CODEC_FORCE_DWORD,
1582 }}
1583 STRUCT!{struct WICRawToneCurvePoint {
1584 Input: c_double,
1585 Output: c_double,
1586 }}
1587 STRUCT!{struct WICRawToneCurve {
1588 cPoints: UINT,
1589 aPoints: [WICRawToneCurvePoint; 1],
1590 }}
1591 pub const WICRawChangeNotification_ExposureCompensation: UINT = 0x00000001;
1592 pub const WICRawChangeNotification_NamedWhitePoint: UINT = 0x00000002;
1593 pub const WICRawChangeNotification_KelvinWhitePoint: UINT = 0x00000004;
1594 pub const WICRawChangeNotification_RGBWhitePoint: UINT = 0x00000008;
1595 pub const WICRawChangeNotification_Contrast: UINT = 0x00000010;
1596 pub const WICRawChangeNotification_Gamma: UINT = 0x00000020;
1597 pub const WICRawChangeNotification_Sharpness: UINT = 0x00000040;
1598 pub const WICRawChangeNotification_Saturation: UINT = 0x00000080;
1599 pub const WICRawChangeNotification_Tint: UINT = 0x00000100;
1600 pub const WICRawChangeNotification_NoiseReduction: UINT = 0x00000200;
1601 pub const WICRawChangeNotification_DestinationColorContext: UINT = 0x00000400;
1602 pub const WICRawChangeNotification_ToneCurve: UINT = 0x00000800;
1603 pub const WICRawChangeNotification_Rotation: UINT = 0x00001000;
1604 pub const WICRawChangeNotification_RenderMode: UINT = 0x00002000;
1605 RIDL!{#[uuid(0x95c75a6e, 0x3e8c, 0x4ec2, 0x85, 0xa8, 0xae, 0xbc, 0xc5, 0x51, 0xe5, 0x9b)]
1606 interface IWICDevelopRawNotificationCallback(IWICDevelopRawNotificationCallbackVtbl):
1607 IUnknown(IUnknownVtbl) {
1608 fn Notify(
1609 NotificationMask: UINT,
1610 ) -> HRESULT,
1611 }}
1612 RIDL!{#[uuid(0xfbec5e44, 0xf7be, 0x4b65, 0xb7, 0xf8, 0xc0, 0xc8, 0x1f, 0xef, 0x02, 0x6d)]
1613 interface IWICDevelopRaw(IWICDevelopRawVtbl): IWICBitmapFrameDecode(IWICBitmapFrameDecodeVtbl) {
1614 fn QueryRawCapabilitiesInfo(
1615 pInfo: *mut WICRawCapabilitiesInfo,
1616 ) -> HRESULT,
1617 fn LoadParameterSet(
1618 ParameterSet: WICRawParameterSet,
1619 ) -> HRESULT,
1620 fn GetCurrentParameterSet(
1621 ppCurrentParameterSet: *mut *mut IPropertyBag2,
1622 ) -> HRESULT,
1623 fn SetExposureCompensation(
1624 ev: c_double,
1625 ) -> HRESULT,
1626 fn GetExposureCompensation(
1627 pEV: *mut c_double,
1628 ) -> HRESULT,
1629 fn SetWhitePointRGB(
1630 Red: UINT,
1631 Green: UINT,
1632 Blue: UINT,
1633 ) -> HRESULT,
1634 fn GetWhitePointRGB(
1635 pRed: *mut UINT,
1636 pGreen: *mut UINT,
1637 pBlue: *mut UINT,
1638 ) -> HRESULT,
1639 fn SetNamedWhitePoint(
1640 WhitePoint: WICNamedWhitePoint,
1641 ) -> HRESULT,
1642 fn GetNamedWhitePoint(
1643 pWhitePoint: *mut WICNamedWhitePoint,
1644 ) -> HRESULT,
1645 fn SetWhitePointKelvin(
1646 WhitePointKelvin: UINT,
1647 ) -> HRESULT,
1648 fn GetWhitePointKelvin(
1649 pWhitePointKelvin: *mut UINT,
1650 ) -> HRESULT,
1651 fn GetKelvinRangeInfo(
1652 pMinKelvinTemp: *mut UINT,
1653 pMaxKelvinTemp: *mut UINT,
1654 pKelvinTempStepValue: *mut UINT,
1655 ) -> HRESULT,
1656 fn SetContrast(
1657 Contrast: c_double,
1658 ) -> HRESULT,
1659 fn GetContrast(
1660 pContrast: *mut c_double,
1661 ) -> HRESULT,
1662 fn SetGamma(
1663 Gamma: c_double,
1664 ) -> HRESULT,
1665 fn GetGamma(
1666 pGamma: *mut c_double,
1667 ) -> HRESULT,
1668 fn SetSharpness(
1669 Sharpness: c_double,
1670 ) -> HRESULT,
1671 fn GetSharpness(
1672 pSharpness: *mut c_double,
1673 ) -> HRESULT,
1674 fn SetSaturation(
1675 Saturation: c_double,
1676 ) -> HRESULT,
1677 fn GetSaturation(
1678 pSaturation: *mut c_double,
1679 ) -> HRESULT,
1680 fn SetTint(
1681 Tint: c_double,
1682 ) -> HRESULT,
1683 fn GetTint(
1684 pTint: *mut c_double,
1685 ) -> HRESULT,
1686 fn SetNoiseReduction(
1687 NoiseReduction: c_double,
1688 ) -> HRESULT,
1689 fn GetNoiseReduction(
1690 pNoiseReduction: *mut c_double,
1691 ) -> HRESULT,
1692 fn SetDestinationColorContext(
1693 pColorContext: *const IWICColorContext,
1694 ) -> HRESULT,
1695 fn SetToneCurve(
1696 cbToneCurveSize: UINT,
1697 pToneCurve: *const WICRawToneCurve,
1698 ) -> HRESULT,
1699 fn GetToneCurve(
1700 cbToneCurveBufferSize: UINT,
1701 pToneCurve: *mut WICRawToneCurve,
1702 pcbActualToneCurveBufferSize: *mut UINT,
1703 ) -> HRESULT,
1704 fn SetRotation(
1705 Rotation: c_double,
1706 ) -> HRESULT,
1707 fn GetRotation(
1708 pRotation: *mut c_double,
1709 ) -> HRESULT,
1710 fn SetRenderMode(
1711 RenderMode: WICRawRenderMode,
1712 ) -> HRESULT,
1713 fn GetRenderMode(
1714 pRenderMode: *mut WICRawRenderMode,
1715 ) -> HRESULT,
1716 fn SetNotificationCallback(
1717 pCallback: *const IWICDevelopRawNotificationCallback,
1718 ) -> HRESULT,
1719 }}
1720 ENUM!{enum WICDdsDimension {
1721 WICDdsTexture1D = 0x00000000,
1722 WICDdsTexture2D = 0x00000001,
1723 WICDdsTexture3D = 0x00000002,
1724 WICDdsTextureCube = 0x00000003,
1725 WICDDSTEXTURE_FORCE_DWORD = CODEC_FORCE_DWORD,
1726 }}
1727 ENUM!{enum WICDdsAlphaMode {
1728 WICDdsAlphaModeUnknown = 0x00000000,
1729 WICDdsAlphaModeStraight = 0x00000001,
1730 WICDdsAlphaModePremultiplied = 0x00000002,
1731 WICDdsAlphaModeOpaque = 0x00000003,
1732 WICDdsAlphaModeCustom = 0x00000004,
1733 WICDDSALPHAMODE_FORCE_DWORD = CODEC_FORCE_DWORD,
1734 }}
1735 STRUCT!{struct WICDdsParameters {
1736 Width: UINT,
1737 Height: UINT,
1738 Depth: UINT,
1739 MipLevels: UINT,
1740 ArraySize: UINT,
1741 DxgiFormat: DXGI_FORMAT,
1742 Dimension: WICDdsDimension,
1743 AlphaMode: WICDdsAlphaMode,
1744 }}
1745 RIDL!{#[uuid(0x409cd537, 0x8532, 0x40cb, 0x97, 0x74, 0xe2, 0xfe, 0xb2, 0xdf, 0x4e, 0x9c)]
1746 interface IWICDdsDecoder(IWICDdsDecoderVtbl): IUnknown(IUnknownVtbl) {
1747 fn GetParameters(
1748 pParameters: *mut WICDdsParameters,
1749 ) -> HRESULT,
1750 fn GetFrame(
1751 arrayIndex: UINT,
1752 mipLevel: UINT,
1753 sliceIndex: UINT,
1754 ppIBitmapFrame: *mut *mut IWICBitmapFrameDecode,
1755 ) -> HRESULT,
1756 }}
1757 RIDL!{#[uuid(0x5cacdb4c, 0x407e, 0x41b3, 0xb9, 0x36, 0xd0, 0xf0, 0x10, 0xcd, 0x67, 0x32)]
1758 interface IWICDdsEncoder(IWICDdsEncoderVtbl): IUnknown(IUnknownVtbl) {
1759 fn SetParameters(
1760 pParameters: *const WICDdsParameters,
1761 ) -> HRESULT,
1762 fn GetParameters(
1763 pParameters: *mut WICDdsParameters,
1764 ) -> HRESULT,
1765 fn CreateNewFrame(
1766 ppIFrameEncode: *mut *mut IWICBitmapFrameEncode,
1767 pArrayIndex: *mut UINT,
1768 pMipLevel: *mut UINT,
1769 pSliceIndex: *mut UINT,
1770 ) -> HRESULT,
1771 }}
1772 STRUCT!{struct WICDdsFormatInfo {
1773 DxgiFormat: DXGI_FORMAT,
1774 BytesPerBlock: UINT,
1775 BlockWidth: UINT,
1776 BlockHeight: UINT,
1777 }}
1778 RIDL!{#[uuid(0x3d4c0c61, 0x18a4, 0x41e4, 0xbd, 0x80, 0x48, 0x1a, 0x4f, 0xc9, 0xf4, 0x64)]
1779 interface IWICDdsFrameDecode(IWICDdsFrameDecodeVtbl): IUnknown(IUnknownVtbl) {
1780 fn GetSizeInBlocks(
1781 pWidthInBlocks: *mut UINT,
1782 pHeightInBlocks: *mut UINT,
1783 ) -> HRESULT,
1784 fn GetFormatInfo(
1785 pFormatInfo: *mut WICDdsFormatInfo,
1786 ) -> HRESULT,
1787 fn CopyBlocks(
1788 prcBoundsInBlocks: *const WICRect,
1789 cbStride: UINT,
1790 cbBufferSize: UINT,
1791 pbBuffer: *mut BYTE,
1792 ) -> HRESULT,
1793 }}
1794 RIDL!{#[uuid(0x8939f66e, 0xc46a, 0x4c21, 0xa9, 0xd1, 0x98, 0xb3, 0x27, 0xce, 0x16, 0x79)]
1795 interface IWICJpegFrameDecode(IWICJpegFrameDecodeVtbl): IUnknown(IUnknownVtbl) {
1796 fn DoesSupportIndexing(
1797 pfIndexingSupported: *mut BOOL,
1798 ) -> HRESULT,
1799 fn SetIndexing(
1800 options: WICJpegIndexingOptions,
1801 horizontalIntervalSize: UINT,
1802 ) -> HRESULT,
1803 fn ClearIndexing() -> HRESULT,
1804 fn GetAcHuffmanTable(
1805 scanIndex: UINT,
1806 tableIndex: UINT,
1807 pAcHuffmanTable: *mut DXGI_JPEG_AC_HUFFMAN_TABLE,
1808 ) -> HRESULT,
1809 fn GetDcHuffmanTable(
1810 scanIndex: UINT,
1811 tableIndex: UINT,
1812 pDcHuffmanTable: *mut DXGI_JPEG_DC_HUFFMAN_TABLE,
1813 ) -> HRESULT,
1814 fn GetQuantizationTable(
1815 scanIndex: UINT,
1816 tableIndex: UINT,
1817 pQuantizationTable: *mut DXGI_JPEG_QUANTIZATION_TABLE,
1818 ) -> HRESULT,
1819 fn GetFrameHeader(
1820 pFrameHeader: *mut WICJpegFrameHeader,
1821 ) -> HRESULT,
1822 fn GetScanHeader(
1823 scanIndex: UINT,
1824 pScanHeader: *mut WICJpegScanHeader,
1825 ) -> HRESULT,
1826 fn CopyScan(
1827 scanIndex: UINT,
1828 scanOffset: UINT,
1829 cbScanData: UINT,
1830 pbScanData: *mut BYTE,
1831 pcbScanDataActual: *mut UINT,
1832 ) -> HRESULT,
1833 fn CopyMinimalStream(
1834 streamOffset: UINT,
1835 cbStreamData: UINT,
1836 pbStreamData: *mut BYTE,
1837 pcbStreamDataActual: *mut UINT,
1838 ) -> HRESULT,
1839 }}
1840 RIDL!{#[uuid(0x2f0c601f, 0xd2c6, 0x468c, 0xab, 0xfa, 0x49, 0x49, 0x5d, 0x98, 0x3e, 0xd1)]
1841 interface IWICJpegFrameEncode(IWICJpegFrameEncodeVtbl): IUnknown(IUnknownVtbl) {
1842 fn GetAcHuffmanTable(
1843 scanIndex: UINT,
1844 tableIndex: UINT,
1845 pAcHuffmanTable: *mut DXGI_JPEG_AC_HUFFMAN_TABLE,
1846 ) -> HRESULT,
1847 fn GetDcHuffmanTable(
1848 scanIndex: UINT,
1849 tableIndex: UINT,
1850 pDcHuffmanTable: *mut DXGI_JPEG_DC_HUFFMAN_TABLE,
1851 ) -> HRESULT,
1852 fn GetQuantizationTable(
1853 scanIndex: UINT,
1854 tableIndex: UINT,
1855 pQuantizationTable: *mut DXGI_JPEG_QUANTIZATION_TABLE,
1856 ) -> HRESULT,
1857 fn WriteScan(
1858 cbScanData: UINT,
1859 pbScanData: *const BYTE,
1860 ) -> HRESULT,
1861 }}
1862