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