1 module directx.wincodec;
2 
3 version(Windows):
4 
5 public import directx.dxgiformat, directx.dxgitype;
6 public import directx.dcommon, directx.com;
7 
8 import directx.d2d1 : ID2D1Image;
9 import directx.d2d1_1 : ID2D1Device;
10 import core.sys.windows.wtypes;
11 import core.sys.windows.ocidl, core.sys.windows.oaidl, core.sys.windows.objidl;
12 
13 enum WINCODEC_SDK_VERSION1 = 0x0236;
14 enum WINCODEC_SDK_VERSION2 = 0x0237;
15 // const GUID CLSID_WICImagingFactory  = { 0xcacaf262, 0x9370, 0x4615, [0xa1, 0x3b, 0x9f, 0x55, 0x39, 0xda, 0x4c, 0xa] };
16 const GUID CLSID_WICImagingFactory1 = { 0xcacaf262, 0x9370, 0x4615, [0xa1, 0x3b, 0x9f, 0x55, 0x39, 0xda, 0x4c, 0xa] };
17 const GUID CLSID_WICImagingFactory2 = { 0x317d06e8, 0x5f24, 0x433d, [0xbd, 0xf7, 0x79, 0xce, 0x68, 0xd8, 0xab, 0xc2] };
18 // #if(_WIN32_WINNT >= _WIN32_WINNT_WIN8) || defined(_WIN7_PLATFORM_UPDATE)
19 enum WINCODEC_SDK_VERSION = WINCODEC_SDK_VERSION2;
20 const CLSID_WICImagingFactory = CLSID_WICImagingFactory2;
21 // #else
22 // enum WINCODEC_SDK_VERSION WINCODEC_SDK_VERSION1
23 // #endif
24 const GUID GUID_VendorMicrosoft  = { 0xf0e749ca, 0xedef, 0x4589, [0xa7, 0x3a, 0xee, 0xe, 0x62, 0x6a, 0x2a, 0x2b] };
25 const GUID GUID_VendorMicrosoftBuiltIn = { 0x257a30fd, 0x6b6, 0x462b, [0xae, 0xa4, 0x63, 0xf7, 0xb, 0x86, 0xe5, 0x33] };
26 // const GUID CLSID_WICPngDecoder   = { 0x389ea17b, 0x5078, 0x4cde, [0xb6, 0xef, 0x25, 0xc1, 0x51, 0x75, 0xc7, 0x51] };
27 const GUID CLSID_WICPngDecoder1  = { 0x389ea17b, 0x5078, 0x4cde, [0xb6, 0xef, 0x25, 0xc1, 0x51, 0x75, 0xc7, 0x51] };
28 const GUID CLSID_WICPngDecoder2  = { 0xe018945b, 0xaa86, 0x4008, [0x9b, 0xd4, 0x67, 0x77, 0xa1, 0xe4, 0x0c, 0x11] };
29 // #if(_WIN32_WINNT >= _WIN32_WINNT_WIN8) || defined(_WIN7_PLATFORM_UPDATE)
30 const CLSID_WICPngDecoder = CLSID_WICPngDecoder2;
31 // #endif
32 const GUID CLSID_WICBmpDecoder  = { 0x6b462062, 0x7cbf, 0x400d, [0x9f, 0xdb, 0x81, 0x3d, 0xd1, 0x0f, 0x27, 0x78] };
33 const GUID CLSID_WICIcoDecoder  = { 0xc61bfcdf, 0x2e0f, 0x4aad, [0xa8, 0xd7, 0xe0, 0x6b, 0xaf, 0xeb, 0xcd, 0xfe] };
34 const GUID CLSID_WICJpegDecoder = { 0x9456a480, 0xe88b, 0x43ea, [0x9e, 0x73, 0x0b, 0x2d, 0x9b, 0x71, 0xb1, 0xca] };
35 const GUID CLSID_WICGifDecoder  = { 0x381dda3c, 0x9ce9, 0x4834, [0xa2, 0x3e, 0x1f, 0x98, 0xf8, 0xfc, 0x52, 0xbe] };
36 const GUID CLSID_WICTiffDecoder = { 0xb54e85d9, 0xfe23, 0x499f, [0x8b, 0x88, 0x6a, 0xce, 0xa7, 0x13, 0x75, 0x2b] };
37 const GUID CLSID_WICWmpDecoder  = { 0xa26cec36, 0x234c, 0x4950, [0xae, 0x16, 0xe3, 0x4a, 0xac, 0xe7, 0x1d, 0x0d] };
38 const GUID CLSID_WICDdsDecoder  = { 0x9053699f, 0xa341, 0x429d, [0x9e, 0x90, 0xee, 0x43, 0x7c, 0xf8, 0x0c, 0x73] };
39 const GUID CLSID_WICBmpEncoder  = { 0x69be8bb4, 0xd66d, 0x47c8, [0x86, 0x5a, 0xed, 0x15, 0x89, 0x43, 0x37, 0x82] };
40 const GUID CLSID_WICPngEncoder  = { 0x27949969, 0x876a, 0x41d7, [0x94, 0x47, 0x56, 0x8f, 0x6a, 0x35, 0xa4, 0xdc] };
41 const GUID CLSID_WICJpegEncoder = { 0x1a34f5c1, 0x4a5a, 0x46dc, [0xb6, 0x44, 0x1f, 0x45, 0x67, 0xe7, 0xa6, 0x76] };
42 const GUID CLSID_WICGifEncoder  = { 0x114f5598, 0x0b22, 0x40a0, [0x86, 0xa1, 0xc8, 0x3e, 0xa4, 0x95, 0xad, 0xbd] };
43 const GUID CLSID_WICTiffEncoder = { 0x0131be10, 0x2001, 0x4c5f, [0xa9, 0xb0, 0xcc, 0x88, 0xfa, 0xb6, 0x4c, 0xe8] };
44 const GUID CLSID_WICWmpEncoder  = { 0xac4ce3cb, 0xe1c1, 0x44cd, [0x82, 0x15, 0x5a, 0x16, 0x65, 0x50, 0x9e, 0xc2] };
45 const GUID CLSID_WICDdsEncoder  = { 0xa61dde94, 0x66ce, 0x4ac1, [0x88, 0x1b, 0x71, 0x68, 0x05, 0x88, 0x89, 0x5e] };
46 const GUID CLSID_WICAdngDecoder = { 0x981d9411, 0x909e, 0x42a7, [0x8f, 0x5d, 0xa7, 0x47, 0xff, 0x05, 0x2e, 0xdb] };
47 const GUID CLSID_WICJpegQualcommPhoneEncoder = { 0x68ed5c62, 0xf534, 0x4979, [0xb2, 0xb3, 0x68, 0x6a, 0x12, 0xb2, 0xb3, 0x4c] };
48 const GUID GUID_ContainerFormatBmp  = { 0x0af1d87e, 0xfcfe, 0x4188, [0xbd, 0xeb, 0xa7, 0x90, 0x64, 0x71, 0xcb, 0xe3] };
49 const GUID GUID_ContainerFormatPng  = { 0x1b7cfaf4, 0x713f, 0x473c, [0xbb, 0xcd, 0x61, 0x37, 0x42, 0x5f, 0xae, 0xaf] };
50 const GUID GUID_ContainerFormatIco  = { 0xa3a860c4, 0x338f, 0x4c17, [0x91, 0x9a, 0xfb, 0xa4, 0xb5, 0x62, 0x8f, 0x21] };
51 const GUID GUID_ContainerFormatJpeg = { 0x19e4a5aa, 0x5662, 0x4fc5, [0xa0, 0xc0, 0x17, 0x58, 0x02, 0x8e, 0x10, 0x57] };
52 const GUID GUID_ContainerFormatTiff = { 0x163bcc30, 0xe2e9, 0x4f0b, [0x96, 0x1d, 0xa3, 0xe9, 0xfd, 0xb7, 0x88, 0xa3] };
53 const GUID GUID_ContainerFormatGif  = { 0x1f8a5601, 0x7d4d, 0x4cbd, [0x9c, 0x82, 0x1b, 0xc8, 0xd4, 0xee, 0xb9, 0xa5] };
54 const GUID GUID_ContainerFormatWmp  = { 0x57a37caa, 0x367a, 0x4540, [0x91, 0x6b, 0xf1, 0x83, 0xc5, 0x09, 0x3a, 0x4b] };
55 const GUID GUID_ContainerFormatDds  = { 0x9967cb95, 0x2e85, 0x4ac8, [0x8c, 0xa2, 0x83, 0xd7, 0xcc, 0xd4, 0x25, 0xc9] };
56 const GUID GUID_ContainerFormatAdng = { 0xf3ff6d0d, 0x38c0, 0x41c4, [0xb1, 0xfe, 0x1f, 0x38, 0x24, 0xf1, 0x7b, 0x84] };
57 const GUID CLSID_WICImagingCategories = { 0xfae3d380, 0xfea4, 0x4623, [0x8c, 0x75, 0xc6, 0xb6, 0x11, 0x10, 0xb6, 0x81] };
58 const GUID CATID_WICBitmapDecoders    = { 0x7ed96837, 0x96f0, 0x4812, [0xb2, 0x11, 0xf1, 0x3c, 0x24, 0x11, 0x7e, 0xd3] };
59 const GUID CATID_WICBitmapEncoders    = { 0xac757296, 0x3522, 0x4e11, [0x98, 0x62, 0xc1, 0x7b, 0xe5, 0xa1, 0x76, 0x7e] };
60 const GUID CATID_WICPixelFormats      = { 0x2b46e70f, 0xcda7, 0x473e, [0x89, 0xf6, 0xdc, 0x96, 0x30, 0xa2, 0x39, 0x0b] };
61 const GUID CATID_WICFormatConverters  = { 0x7835eae8, 0xbf14, 0x49d1, [0x93, 0xce, 0x53, 0x3a, 0x40, 0x7b, 0x22, 0x48] };
62 const GUID CATID_WICMetadataReader    = { 0x05af94d8, 0x7174, 0x4cd2, [0xbe, 0x4a, 0x41, 0x24, 0xb8, 0x0e, 0xe4, 0xb8] };
63 const GUID CATID_WICMetadataWriter    = { 0xabe3b9a4, 0x257d, 0x4b97, [0xbd, 0x1a, 0x29, 0x4a, 0xf4, 0x96, 0x22, 0x2e] };
64 const GUID CLSID_WICDefaultFormatConverter = { 0x1a3f11dc, 0xb514, 0x4b17, [0x8c, 0x5f, 0x21, 0x54, 0x51, 0x38, 0x52, 0xf1] };
65 const GUID CLSID_WICFormatConverterHighColor = { 0xac75d454, 0x9f37, 0x48f8, [0xb9, 0x72, 0x4e, 0x19, 0xbc, 0x85, 0x60, 0x11] };
66 const GUID CLSID_WICFormatConverterNChannel = { 0xc17cabb2, 0xd4a3, 0x47d7, [0xa5, 0x57, 0x33, 0x9b, 0x2e, 0xfb, 0xd4, 0xf1] };
67 const GUID CLSID_WICFormatConverterWMPhoto = { 0x9cb5172b, 0xd600, 0x46ba, [0xab, 0x77, 0x77, 0xbb, 0x7e, 0x3a, 0x00, 0xd9] };
68 const GUID CLSID_WICPlanarFormatConverter = { 0x184132b8, 0x32f8, 0x4784, [0x91, 0x31, 0xdd, 0x72, 0x24, 0xb2, 0x34, 0x38] };
69 
70 alias WICColor = UINT32;
71 
72 /* [public] */ struct WICRect
73     {
74     INT X;
75     INT Y;
76     INT Width;
77     INT Height;
78     }
79 
80 alias WICInProcPointer = BYTE*;
81 /* [public] */ 
82 alias WICColorContextType = uint;
83 enum : WICColorContextType
84     {
85         WICColorContextUninitialized	= 0,
86         WICColorContextProfile	= 0x1,
87         WICColorContextExifColorSpace	= 0x2
88     }
89 
90 enum	WIC_JPEG_MAX_COMPONENT_COUNT	= 4;
91 
92 enum	WIC_JPEG_MAX_TABLE_INDEX	= 3;
93 
94 enum	WIC_JPEG_SAMPLE_FACTORS_ONE	= 0x11;
95 
96 enum	WIC_JPEG_SAMPLE_FACTORS_THREE_420	= 0x111122;
97 
98 enum	WIC_JPEG_SAMPLE_FACTORS_THREE_422	= 0x111121;
99 
100 enum	WIC_JPEG_SAMPLE_FACTORS_THREE_440	= 0x111112;
101 
102 enum	WIC_JPEG_SAMPLE_FACTORS_THREE_444	= 0x111111;
103 
104 enum	WIC_JPEG_QUANTIZATION_BASELINE_ONE	= 0;
105 
106 enum	WIC_JPEG_QUANTIZATION_BASELINE_THREE	= 0x10100;
107 
108 enum	WIC_JPEG_HUFFMAN_BASELINE_ONE	= 0;
109 
110 enum	WIC_JPEG_HUFFMAN_BASELINE_THREE	= 0x111100;
111 
112 /* [public] */ alias REFWICPixelFormatGUID = REFGUID;
113 
114 /* [public] */ alias WICPixelFormatGUID = GUID;
115 
116 enum GUID_WICPixelFormatUndefined = GUID_WICPixelFormatDontCare;
117 const GUID GUID_WICPixelFormatDontCare = { 0x6fddc324, 0x4e03, 0x4bfe, [0xb1, 0x85, 0x3d, 0x77, 0x76, 0x8d, 0xc9, 0x00] };
118 const GUID GUID_WICPixelFormat1bppIndexed = { 0x6fddc324, 0x4e03, 0x4bfe, [0xb1, 0x85, 0x3d, 0x77, 0x76, 0x8d, 0xc9, 0x01] };
119 const GUID GUID_WICPixelFormat2bppIndexed = { 0x6fddc324, 0x4e03, 0x4bfe, [0xb1, 0x85, 0x3d, 0x77, 0x76, 0x8d, 0xc9, 0x02] };
120 const GUID GUID_WICPixelFormat4bppIndexed = { 0x6fddc324, 0x4e03, 0x4bfe, [0xb1, 0x85, 0x3d, 0x77, 0x76, 0x8d, 0xc9, 0x03] };
121 const GUID GUID_WICPixelFormat8bppIndexed = { 0x6fddc324, 0x4e03, 0x4bfe, [0xb1, 0x85, 0x3d, 0x77, 0x76, 0x8d, 0xc9, 0x04] };
122 const GUID GUID_WICPixelFormatBlackWhite = { 0x6fddc324, 0x4e03, 0x4bfe, [0xb1, 0x85, 0x3d, 0x77, 0x76, 0x8d, 0xc9, 0x05] };
123 const GUID GUID_WICPixelFormat2bppGray   = { 0x6fddc324, 0x4e03, 0x4bfe, [0xb1, 0x85, 0x3d, 0x77, 0x76, 0x8d, 0xc9, 0x06] };
124 const GUID GUID_WICPixelFormat4bppGray   = { 0x6fddc324, 0x4e03, 0x4bfe, [0xb1, 0x85, 0x3d, 0x77, 0x76, 0x8d, 0xc9, 0x07] };
125 const GUID GUID_WICPixelFormat8bppGray   = { 0x6fddc324, 0x4e03, 0x4bfe, [0xb1, 0x85, 0x3d, 0x77, 0x76, 0x8d, 0xc9, 0x08] };
126 const GUID GUID_WICPixelFormat8bppAlpha = { 0xe6cd0116, 0xeeba, 0x4161, [0xaa, 0x85, 0x27, 0xdd, 0x9f, 0xb3, 0xa8, 0x95] };
127 const GUID GUID_WICPixelFormat16bppBGR555 = { 0x6fddc324, 0x4e03, 0x4bfe, [0xb1, 0x85, 0x3d, 0x77, 0x76, 0x8d, 0xc9, 0x09] };
128 const GUID GUID_WICPixelFormat16bppBGR565 = { 0x6fddc324, 0x4e03, 0x4bfe, [0xb1, 0x85, 0x3d, 0x77, 0x76, 0x8d, 0xc9, 0x0a] };
129 const GUID GUID_WICPixelFormat16bppBGRA5551 = { 0x05ec7c2b, 0xf1e6, 0x4961, [0xad, 0x46, 0xe1, 0xcc, 0x81, 0x0a, 0x87, 0xd2] };
130 const GUID GUID_WICPixelFormat16bppGray   = { 0x6fddc324, 0x4e03, 0x4bfe, [0xb1, 0x85, 0x3d, 0x77, 0x76, 0x8d, 0xc9, 0x0b] };
131 const GUID GUID_WICPixelFormat24bppBGR = { 0x6fddc324, 0x4e03, 0x4bfe, [0xb1, 0x85, 0x3d, 0x77, 0x76, 0x8d, 0xc9, 0x0c] };
132 const GUID GUID_WICPixelFormat24bppRGB = { 0x6fddc324, 0x4e03, 0x4bfe, [0xb1, 0x85, 0x3d, 0x77, 0x76, 0x8d, 0xc9, 0x0d] };
133 const GUID GUID_WICPixelFormat32bppBGR   = { 0x6fddc324, 0x4e03, 0x4bfe, [0xb1, 0x85, 0x3d, 0x77, 0x76, 0x8d, 0xc9, 0x0e] };
134 const GUID GUID_WICPixelFormat32bppBGRA  = { 0x6fddc324, 0x4e03, 0x4bfe, [0xb1, 0x85, 0x3d, 0x77, 0x76, 0x8d, 0xc9, 0x0f] };
135 const GUID GUID_WICPixelFormat32bppPBGRA = { 0x6fddc324, 0x4e03, 0x4bfe, [0xb1, 0x85, 0x3d, 0x77, 0x76, 0x8d, 0xc9, 0x10] };
136 const GUID GUID_WICPixelFormat32bppGrayFloat  = { 0x6fddc324, 0x4e03, 0x4bfe, [0xb1, 0x85, 0x3d, 0x77, 0x76, 0x8d, 0xc9, 0x11] };
137 // #if (_WIN32_WINNT >= _WIN32_WINNT_WIN8) || defined(_WIN7_PLATFORM_UPDATE)
138 const GUID GUID_WICPixelFormat32bppRGB  = { 0xd98c6b95, 0x3efe, 0x47d6, [0xbb, 0x25, 0xeb, 0x17, 0x48, 0xab, 0x0c, 0xf1] };
139 // #endif
140 const GUID GUID_WICPixelFormat32bppRGBA = { 0xf5c7ad2d, 0x6a8d, 0x43dd, [0xa7, 0xa8, 0xa2, 0x99, 0x35, 0x26, 0x1a, 0xe9] };
141 const GUID GUID_WICPixelFormat32bppPRGBA = { 0x3cc4a650, 0xa527, 0x4d37, [0xa9, 0x16, 0x31, 0x42, 0xc7, 0xeb, 0xed, 0xba] };
142 const GUID GUID_WICPixelFormat48bppRGB = { 0x6fddc324, 0x4e03, 0x4bfe, [0xb1, 0x85, 0x3d, 0x77, 0x76, 0x8d, 0xc9, 0x15] };
143 const GUID GUID_WICPixelFormat48bppBGR = { 0xe605a384, 0xb468, 0x46ce, [0xbb, 0x2e, 0x36, 0xf1, 0x80, 0xe6, 0x43, 0x13] };
144 // #if (_WIN32_WINNT >= _WIN32_WINNT_WIN8) || defined(_WIN7_PLATFORM_UPDATE)
145 const GUID GUID_WICPixelFormat64bppRGB   = { 0xa1182111, 0x186d, 0x4d42, [0xbc, 0x6a, 0x9c, 0x83, 0x03, 0xa8, 0xdf, 0xf9] };
146 // #endif
147 const GUID GUID_WICPixelFormat64bppRGBA  = { 0x6fddc324, 0x4e03, 0x4bfe, [0xb1, 0x85, 0x3d, 0x77, 0x76, 0x8d, 0xc9, 0x16] };
148 const GUID GUID_WICPixelFormat64bppBGRA  = { 0x1562ff7c, 0xd352, 0x46f9, [0x97, 0x9e, 0x42, 0x97, 0x6b, 0x79, 0x22, 0x46] };
149 const GUID GUID_WICPixelFormat64bppPRGBA = { 0x6fddc324, 0x4e03, 0x4bfe, [0xb1, 0x85, 0x3d, 0x77, 0x76, 0x8d, 0xc9, 0x17] };
150 const GUID GUID_WICPixelFormat64bppPBGRA = { 0x8c518e8e, 0xa4ec, 0x468b, [0xae, 0x70, 0xc9, 0xa3, 0x5a, 0x9c, 0x55, 0x30] };
151 const GUID GUID_WICPixelFormat16bppGrayFixedPoint = { 0x6fddc324, 0x4e03, 0x4bfe, [0xb1, 0x85, 0x3d, 0x77, 0x76, 0x8d, 0xc9, 0x13] };
152 const GUID GUID_WICPixelFormat32bppBGR101010 = { 0x6fddc324, 0x4e03, 0x4bfe, [0xb1, 0x85, 0x3d, 0x77, 0x76, 0x8d, 0xc9, 0x14] };
153 const GUID GUID_WICPixelFormat48bppRGBFixedPoint = { 0x6fddc324, 0x4e03, 0x4bfe, [0xb1, 0x85, 0x3d, 0x77, 0x76, 0x8d, 0xc9, 0x12] };
154 const GUID GUID_WICPixelFormat48bppBGRFixedPoint = { 0x49ca140e, 0xcab6, 0x493b, [0x9d, 0xdf, 0x60, 0x18, 0x7c, 0x37, 0x53, 0x2a] };
155 const GUID GUID_WICPixelFormat96bppRGBFixedPoint = { 0x6fddc324, 0x4e03, 0x4bfe, [0xb1, 0x85, 0x3d, 0x77, 0x76, 0x8d, 0xc9, 0x18] };
156 // #if (_WIN32_WINNT >= _WIN32_WINNT_WIN8) || defined(_WIN7_PLATFORM_UPDATE)
157 const GUID GUID_WICPixelFormat96bppRGBFloat = { 0xe3fed78f, 0xe8db, 0x4acf, [0x84, 0xc1, 0xe9, 0x7f, 0x61, 0x36, 0xb3, 0x27] };
158 // #endif
159 const GUID GUID_WICPixelFormat128bppRGBAFloat  = { 0x6fddc324, 0x4e03, 0x4bfe, [0xb1, 0x85, 0x3d, 0x77, 0x76, 0x8d, 0xc9, 0x19] };
160 const GUID GUID_WICPixelFormat128bppPRGBAFloat = { 0x6fddc324, 0x4e03, 0x4bfe, [0xb1, 0x85, 0x3d, 0x77, 0x76, 0x8d, 0xc9, 0x1a] };
161 const GUID GUID_WICPixelFormat128bppRGBFloat   = { 0x6fddc324, 0x4e03, 0x4bfe, [0xb1, 0x85, 0x3d, 0x77, 0x76, 0x8d, 0xc9, 0x1b] };
162 const GUID GUID_WICPixelFormat32bppCMYK = { 0x6fddc324, 0x4e03, 0x4bfe, [0xb1, 0x85, 0x3d, 0x77, 0x76, 0x8d, 0xc9, 0x1c] };
163 const GUID GUID_WICPixelFormat64bppRGBAFixedPoint = { 0x6fddc324, 0x4e03, 0x4bfe, [0xb1, 0x85, 0x3d, 0x77, 0x76, 0x8d, 0xc9, 0x1d] };
164 const GUID GUID_WICPixelFormat64bppBGRAFixedPoint = { 0x356de33c, 0x54d2, 0x4a23, [0xbb, 0x4, 0x9b, 0x7b, 0xf9, 0xb1, 0xd4, 0x2d] };
165 const GUID GUID_WICPixelFormat64bppRGBFixedPoint = { 0x6fddc324, 0x4e03, 0x4bfe, [0xb1, 0x85, 0x3d, 0x77, 0x76, 0x8d, 0xc9, 0x40] };
166 const GUID GUID_WICPixelFormat128bppRGBAFixedPoint = { 0x6fddc324, 0x4e03, 0x4bfe, [0xb1, 0x85, 0x3d, 0x77, 0x76, 0x8d, 0xc9, 0x1e] };
167 const GUID GUID_WICPixelFormat128bppRGBFixedPoint = { 0x6fddc324, 0x4e03, 0x4bfe, [0xb1, 0x85, 0x3d, 0x77, 0x76, 0x8d, 0xc9, 0x41] };
168 const GUID GUID_WICPixelFormat64bppRGBAHalf = { 0x6fddc324, 0x4e03, 0x4bfe, [0xb1, 0x85, 0x3d, 0x77, 0x76, 0x8d, 0xc9, 0x3a] };
169 // #if (_WIN32_WINNT >= _WIN32_WINNT_WIN8) || defined(_WIN7_PLATFORM_UPDATE)
170 const GUID GUID_WICPixelFormat64bppPRGBAHalf = { 0x58ad26c2, 0xc623, 0x4d9d, [0xb3, 0x20, 0x38, 0x7e, 0x49, 0xf8, 0xc4, 0x42] };
171 // #endif
172 const GUID GUID_WICPixelFormat64bppRGBHalf = { 0x6fddc324, 0x4e03, 0x4bfe, [0xb1, 0x85, 0x3d, 0x77, 0x76, 0x8d, 0xc9, 0x42] };
173 const GUID GUID_WICPixelFormat48bppRGBHalf = { 0x6fddc324, 0x4e03, 0x4bfe, [0xb1, 0x85, 0x3d, 0x77, 0x76, 0x8d, 0xc9, 0x3b] };
174 const GUID GUID_WICPixelFormat32bppRGBE    = { 0x6fddc324, 0x4e03, 0x4bfe, [0xb1, 0x85, 0x3d, 0x77, 0x76, 0x8d, 0xc9, 0x3d] };
175 const GUID GUID_WICPixelFormat16bppGrayHalf = { 0x6fddc324, 0x4e03, 0x4bfe, [0xb1, 0x85, 0x3d, 0x77, 0x76, 0x8d, 0xc9, 0x3e] };
176 const GUID GUID_WICPixelFormat32bppGrayFixedPoint = { 0x6fddc324, 0x4e03, 0x4bfe, [0xb1, 0x85, 0x3d, 0x77, 0x76, 0x8d, 0xc9, 0x3f] };
177 const GUID GUID_WICPixelFormat32bppRGBA1010102 = { 0x25238D72, 0xFCF9, 0x4522, [0xb5, 0x14, 0x55, 0x78, 0xe5, 0xad, 0x55, 0xe0] };
178 const GUID GUID_WICPixelFormat32bppRGBA1010102XR = { 0x00DE6B9A, 0xC101, 0x434b, [0xb5, 0x02, 0xd0, 0x16, 0x5e, 0xe1, 0x12, 0x2c] };
179 const GUID GUID_WICPixelFormat64bppCMYK = { 0x6fddc324, 0x4e03, 0x4bfe, [0xb1, 0x85, 0x3d, 0x77, 0x76, 0x8d, 0xc9, 0x1f] };
180 const GUID GUID_WICPixelFormat24bpp3Channels = { 0x6fddc324, 0x4e03, 0x4bfe, [0xb1, 0x85, 0x3d, 0x77, 0x76, 0x8d, 0xc9, 0x20] };
181 const GUID GUID_WICPixelFormat32bpp4Channels = { 0x6fddc324, 0x4e03, 0x4bfe, [0xb1, 0x85, 0x3d, 0x77, 0x76, 0x8d, 0xc9, 0x21] };
182 const GUID GUID_WICPixelFormat40bpp5Channels = { 0x6fddc324, 0x4e03, 0x4bfe, [0xb1, 0x85, 0x3d, 0x77, 0x76, 0x8d, 0xc9, 0x22] };
183 const GUID GUID_WICPixelFormat48bpp6Channels = { 0x6fddc324, 0x4e03, 0x4bfe, [0xb1, 0x85, 0x3d, 0x77, 0x76, 0x8d, 0xc9, 0x23] };
184 const GUID GUID_WICPixelFormat56bpp7Channels = { 0x6fddc324, 0x4e03, 0x4bfe, [0xb1, 0x85, 0x3d, 0x77, 0x76, 0x8d, 0xc9, 0x24] };
185 const GUID GUID_WICPixelFormat64bpp8Channels = { 0x6fddc324, 0x4e03, 0x4bfe, [0xb1, 0x85, 0x3d, 0x77, 0x76, 0x8d, 0xc9, 0x25] };
186 const GUID GUID_WICPixelFormat48bpp3Channels = { 0x6fddc324, 0x4e03, 0x4bfe, [0xb1, 0x85, 0x3d, 0x77, 0x76, 0x8d, 0xc9, 0x26] };
187 const GUID GUID_WICPixelFormat64bpp4Channels = { 0x6fddc324, 0x4e03, 0x4bfe, [0xb1, 0x85, 0x3d, 0x77, 0x76, 0x8d, 0xc9, 0x27] };
188 const GUID GUID_WICPixelFormat80bpp5Channels = { 0x6fddc324, 0x4e03, 0x4bfe, [0xb1, 0x85, 0x3d, 0x77, 0x76, 0x8d, 0xc9, 0x28] };
189 const GUID GUID_WICPixelFormat96bpp6Channels = { 0x6fddc324, 0x4e03, 0x4bfe, [0xb1, 0x85, 0x3d, 0x77, 0x76, 0x8d, 0xc9, 0x29] };
190 const GUID GUID_WICPixelFormat112bpp7Channels = { 0x6fddc324, 0x4e03, 0x4bfe, [0xb1, 0x85, 0x3d, 0x77, 0x76, 0x8d, 0xc9, 0x2a] };
191 const GUID GUID_WICPixelFormat128bpp8Channels = { 0x6fddc324, 0x4e03, 0x4bfe, [0xb1, 0x85, 0x3d, 0x77, 0x76, 0x8d, 0xc9, 0x2b] };
192 const GUID GUID_WICPixelFormat40bppCMYKAlpha = { 0x6fddc324, 0x4e03, 0x4bfe, [0xb1, 0x85, 0x3d, 0x77, 0x76, 0x8d, 0xc9, 0x2c] };
193 const GUID GUID_WICPixelFormat80bppCMYKAlpha = { 0x6fddc324, 0x4e03, 0x4bfe, [0xb1, 0x85, 0x3d, 0x77, 0x76, 0x8d, 0xc9, 0x2d] };
194 const GUID GUID_WICPixelFormat32bpp3ChannelsAlpha = { 0x6fddc324, 0x4e03, 0x4bfe, [0xb1, 0x85, 0x3d, 0x77, 0x76, 0x8d, 0xc9, 0x2e] };
195 const GUID GUID_WICPixelFormat40bpp4ChannelsAlpha = { 0x6fddc324, 0x4e03, 0x4bfe, [0xb1, 0x85, 0x3d, 0x77, 0x76, 0x8d, 0xc9, 0x2f] };
196 const GUID GUID_WICPixelFormat48bpp5ChannelsAlpha = { 0x6fddc324, 0x4e03, 0x4bfe, [0xb1, 0x85, 0x3d, 0x77, 0x76, 0x8d, 0xc9, 0x30] };
197 const GUID GUID_WICPixelFormat56bpp6ChannelsAlpha = { 0x6fddc324, 0x4e03, 0x4bfe, [0xb1, 0x85, 0x3d, 0x77, 0x76, 0x8d, 0xc9, 0x31] };
198 const GUID GUID_WICPixelFormat64bpp7ChannelsAlpha = { 0x6fddc324, 0x4e03, 0x4bfe, [0xb1, 0x85, 0x3d, 0x77, 0x76, 0x8d, 0xc9, 0x32] };
199 const GUID GUID_WICPixelFormat72bpp8ChannelsAlpha = { 0x6fddc324, 0x4e03, 0x4bfe, [0xb1, 0x85, 0x3d, 0x77, 0x76, 0x8d, 0xc9, 0x33] };
200 const GUID GUID_WICPixelFormat64bpp3ChannelsAlpha = { 0x6fddc324, 0x4e03, 0x4bfe, [0xb1, 0x85, 0x3d, 0x77, 0x76, 0x8d, 0xc9, 0x34] };
201 const GUID GUID_WICPixelFormat80bpp4ChannelsAlpha = { 0x6fddc324, 0x4e03, 0x4bfe, [0xb1, 0x85, 0x3d, 0x77, 0x76, 0x8d, 0xc9, 0x35] };
202 const GUID GUID_WICPixelFormat96bpp5ChannelsAlpha = { 0x6fddc324, 0x4e03, 0x4bfe, [0xb1, 0x85, 0x3d, 0x77, 0x76, 0x8d, 0xc9, 0x36] };
203 const GUID GUID_WICPixelFormat112bpp6ChannelsAlpha = { 0x6fddc324, 0x4e03, 0x4bfe, [0xb1, 0x85, 0x3d, 0x77, 0x76, 0x8d, 0xc9, 0x37] };
204 const GUID GUID_WICPixelFormat128bpp7ChannelsAlpha = { 0x6fddc324, 0x4e03, 0x4bfe, [0xb1, 0x85, 0x3d, 0x77, 0x76, 0x8d, 0xc9, 0x38] };
205 const GUID GUID_WICPixelFormat144bpp8ChannelsAlpha = { 0x6fddc324, 0x4e03, 0x4bfe, [0xb1, 0x85, 0x3d, 0x77, 0x76, 0x8d, 0xc9, 0x39] };
206 const GUID GUID_WICPixelFormat8bppY            = { 0x91B4DB54, 0x2DF9, 0x42F0, [0xB4, 0x49, 0x29, 0x09, 0xBB, 0x3D, 0xF8, 0x8E] };
207 const GUID GUID_WICPixelFormat8bppCb           = { 0x1339F224, 0x6BFE, 0x4C3E, [0x93, 0x02, 0xE4, 0xF3, 0xA6, 0xD0, 0xCA, 0x2A] };
208 const GUID GUID_WICPixelFormat8bppCr           = { 0xB8145053, 0x2116, 0x49F0, [0x88, 0x35, 0xED, 0x84, 0x4B, 0x20, 0x5C, 0x51] };
209 const GUID GUID_WICPixelFormat16bppCbCr        = { 0xFF95BA6E, 0x11E0, 0x4263, [0xBB, 0x45, 0x01, 0x72, 0x1F, 0x34, 0x60, 0xA4] };
210 const GUID GUID_WICPixelFormat16bppYQuantizedDctCoefficients           = { 0xA355F433, 0x48E8, 0x4A42, [0x84, 0xD8, 0xE2, 0xAA, 0x26, 0xCA, 0x80, 0xA4] };
211 const GUID GUID_WICPixelFormat16bppCbQuantizedDctCoefficients          = { 0xD2C4FF61, 0x56A5, 0x49C2, [0x8B, 0x5C, 0x4C, 0x19, 0x25, 0x96, 0x48, 0x37] };
212 const GUID GUID_WICPixelFormat16bppCrQuantizedDctCoefficients          = { 0x2FE354F0, 0x1680, 0x42D8, [0x92, 0x31, 0xE7, 0x3C, 0x05, 0x65, 0xBF, 0xC1] };
213 /* [public] */
214 alias WICBitmapCreateCacheOption = uint;
215 enum : WICBitmapCreateCacheOption
216     {
217         WICBitmapNoCache	= 0,
218         WICBitmapCacheOnDemand	= 0x1,
219         WICBitmapCacheOnLoad	= 0x2
220     }
221 
222 /* [public] */ 
223 alias WICDecodeOptions = uint;
224 enum : WICDecodeOptions
225     {
226         WICDecodeMetadataCacheOnDemand	= 0,
227         WICDecodeMetadataCacheOnLoad	= 0x1
228     }
229 
230 /* [public] */ 
231 alias WICBitmapEncoderCacheOption = uint;
232 enum : WICBitmapEncoderCacheOption
233     {
234         WICBitmapEncoderCacheInMemory	= 0,
235         WICBitmapEncoderCacheTempFile	= 0x1,
236         WICBitmapEncoderNoCache	= 0x2
237     }
238 
239 /* [public] */ 
240 alias WICComponentType = uint;
241 enum : WICComponentType
242     {
243         WICDecoder	= 0x1,
244         WICEncoder	= 0x2,
245         WICPixelFormatConverter	= 0x4,
246         WICMetadataReader	= 0x8,
247         WICMetadataWriter	= 0x10,
248         WICPixelFormat	= 0x20,
249         WICAllComponents	= 0x3f
250     }
251 
252 /* [public] */ 
253 alias WICComponentEnumerateOptions = uint;
254 enum : WICComponentEnumerateOptions
255     {
256         WICComponentEnumerateDefault	= 0,
257         WICComponentEnumerateRefresh	= 0x1,
258         WICComponentEnumerateDisabled	= 0x80000000,
259         WICComponentEnumerateUnsigned	= 0x40000000,
260         WICComponentEnumerateBuiltInOnly	= 0x20000000
261     }
262 
263 /* [public] */ struct WICBitmapPattern
264     {
265     ULARGE_INTEGER Position;
266     ULONG Length;
267     /* [size_is] */ BYTE* Pattern;
268     /* [size_is] */ BYTE* Mask;
269     BOOL EndOfStream;
270     }
271 
272 /* [public] */ 
273 alias WICBitmapInterpolationMode = uint;
274 enum : WICBitmapInterpolationMode
275     {
276         WICBitmapInterpolationModeNearestNeighbor	= 0,
277         WICBitmapInterpolationModeLinear	= 0x1,
278         WICBitmapInterpolationModeCubic	= 0x2,
279         WICBitmapInterpolationModeFant	= 0x3,
280         WICBitmapInterpolationModeHighQualityCubic	= 0x4
281     }
282 
283 /* [public] */ 
284 alias WICBitmapPaletteType = uint;
285 enum : WICBitmapPaletteType
286     {
287         WICBitmapPaletteTypeCustom	= 0,
288         WICBitmapPaletteTypeMedianCut	= 0x1,
289         WICBitmapPaletteTypeFixedBW	= 0x2,
290         WICBitmapPaletteTypeFixedHalftone8	= 0x3,
291         WICBitmapPaletteTypeFixedHalftone27	= 0x4,
292         WICBitmapPaletteTypeFixedHalftone64	= 0x5,
293         WICBitmapPaletteTypeFixedHalftone125	= 0x6,
294         WICBitmapPaletteTypeFixedHalftone216	= 0x7,
295         WICBitmapPaletteTypeFixedWebPalette	= WICBitmapPaletteTypeFixedHalftone216,
296         WICBitmapPaletteTypeFixedHalftone252	= 0x8,
297         WICBitmapPaletteTypeFixedHalftone256	= 0x9,
298         WICBitmapPaletteTypeFixedGray4	= 0xa,
299         WICBitmapPaletteTypeFixedGray16	= 0xb,
300         WICBitmapPaletteTypeFixedGray256	= 0xc
301     }
302 
303 /* [public] */ 
304 alias WICBitmapDitherType = uint;
305 enum : WICBitmapDitherType
306     {
307         WICBitmapDitherTypeNone	= 0,
308         WICBitmapDitherTypeSolid	= 0,
309         WICBitmapDitherTypeOrdered4x4	= 0x1,
310         WICBitmapDitherTypeOrdered8x8	= 0x2,
311         WICBitmapDitherTypeOrdered16x16	= 0x3,
312         WICBitmapDitherTypeSpiral4x4	= 0x4,
313         WICBitmapDitherTypeSpiral8x8	= 0x5,
314         WICBitmapDitherTypeDualSpiral4x4	= 0x6,
315         WICBitmapDitherTypeDualSpiral8x8	= 0x7,
316         WICBitmapDitherTypeErrorDiffusion	= 0x8
317     }
318 
319 /* [public] */ 
320 alias WICBitmapAlphaChannelOption = uint;
321 enum : WICBitmapAlphaChannelOption
322     {
323         WICBitmapUseAlpha	= 0,
324         WICBitmapUsePremultipliedAlpha	= 0x1,
325         WICBitmapIgnoreAlpha	= 0x2
326     }
327 
328 /* [public] */ 
329 alias WICBitmapTransformOptions = uint;
330 enum : WICBitmapTransformOptions
331     {
332         WICBitmapTransformRotate0	= 0,
333         WICBitmapTransformRotate90	= 0x1,
334         WICBitmapTransformRotate180	= 0x2,
335         WICBitmapTransformRotate270	= 0x3,
336         WICBitmapTransformFlipHorizontal	= 0x8,
337         WICBitmapTransformFlipVertical	= 0x10
338     }
339 
340 /* [public] */ 
341 alias WICBitmapLockFlags = uint;
342 enum : WICBitmapLockFlags
343     {
344         WICBitmapLockRead	= 0x1,
345         WICBitmapLockWrite	= 0x2
346     }
347 
348 /* [public] */ 
349 alias WICBitmapDecoderCapabilities = uint;
350 enum : WICBitmapDecoderCapabilities
351     {
352         WICBitmapDecoderCapabilitySameEncoder	= 0x1,
353         WICBitmapDecoderCapabilityCanDecodeAllImages	= 0x2,
354         WICBitmapDecoderCapabilityCanDecodeSomeImages	= 0x4,
355         WICBitmapDecoderCapabilityCanEnumerateMetadata	= 0x8,
356         WICBitmapDecoderCapabilityCanDecodeThumbnail	= 0x10
357     }
358 
359 /* [public] */ 
360 alias WICProgressOperation = uint;
361 enum : WICProgressOperation
362     {
363         WICProgressOperationCopyPixels	= 0x1,
364         WICProgressOperationWritePixels	= 0x2,
365         WICProgressOperationAll	= 0xffff
366     }
367 
368 /* [public] */ 
369 alias WICProgressNotification = uint;
370 enum : WICProgressNotification
371     {
372         WICProgressNotificationBegin	= 0x10000,
373         WICProgressNotificationEnd	= 0x20000,
374         WICProgressNotificationFrequent	= 0x40000,
375         WICProgressNotificationAll	= 0xffff0000
376     }
377 
378 /* [public] */ 
379 alias WICComponentSigning = uint;
380 enum : WICComponentSigning
381     {
382         WICComponentSigned	= 0x1,
383         WICComponentUnsigned	= 0x2,
384         WICComponentSafe	= 0x4,
385         WICComponentDisabled	= 0x80000000
386     }
387 
388 /* [public] */ 
389 alias WICGifLogicalScreenDescriptorProperties = uint;
390 enum : WICGifLogicalScreenDescriptorProperties
391     {
392         WICGifLogicalScreenSignature	= 0x1,
393         WICGifLogicalScreenDescriptorWidth	= 0x2,
394         WICGifLogicalScreenDescriptorHeight	= 0x3,
395         WICGifLogicalScreenDescriptorGlobalColorTableFlag	= 0x4,
396         WICGifLogicalScreenDescriptorColorResolution	= 0x5,
397         WICGifLogicalScreenDescriptorSortFlag	= 0x6,
398         WICGifLogicalScreenDescriptorGlobalColorTableSize	= 0x7,
399         WICGifLogicalScreenDescriptorBackgroundColorIndex	= 0x8,
400         WICGifLogicalScreenDescriptorPixelAspectRatio	= 0x9
401     }
402 
403 /* [public] */ 
404 alias WICGifImageDescriptorProperties = uint;
405 enum : WICGifImageDescriptorProperties
406     {
407         WICGifImageDescriptorLeft	= 0x1,
408         WICGifImageDescriptorTop	= 0x2,
409         WICGifImageDescriptorWidth	= 0x3,
410         WICGifImageDescriptorHeight	= 0x4,
411         WICGifImageDescriptorLocalColorTableFlag	= 0x5,
412         WICGifImageDescriptorInterlaceFlag	= 0x6,
413         WICGifImageDescriptorSortFlag	= 0x7,
414         WICGifImageDescriptorLocalColorTableSize	= 0x8
415     }
416 
417 /* [public] */ 
418 alias WICGifGraphicControlExtensionProperties = uint;
419 enum : WICGifGraphicControlExtensionProperties
420     {
421         WICGifGraphicControlExtensionDisposal	= 0x1,
422         WICGifGraphicControlExtensionUserInputFlag	= 0x2,
423         WICGifGraphicControlExtensionTransparencyFlag	= 0x3,
424         WICGifGraphicControlExtensionDelay	= 0x4,
425         WICGifGraphicControlExtensionTransparentColorIndex	= 0x5
426     }
427 
428 /* [public] */ 
429 alias WICGifApplicationExtensionProperties = uint;
430 enum : WICGifApplicationExtensionProperties
431     {
432         WICGifApplicationExtensionApplication	= 0x1,
433         WICGifApplicationExtensionData	= 0x2
434     }
435 
436 /* [public] */ 
437 alias WICGifCommentExtensionProperties = uint;
438 enum : WICGifCommentExtensionProperties
439     {
440         WICGifCommentExtensionText	= 0x1
441     }
442 
443 /* [public] */ 
444 alias WICJpegCommentProperties = uint;
445 enum : WICJpegCommentProperties
446     {
447         WICJpegCommentText	= 0x1
448     }
449 
450 /* [public] */ 
451 alias WICJpegLuminanceProperties = uint;
452 enum : WICJpegLuminanceProperties
453     {
454         WICJpegLuminanceTable	= 0x1
455     }
456 
457 /* [public] */ 
458 alias WICJpegChrominanceProperties = uint;
459 enum : WICJpegChrominanceProperties
460     {
461         WICJpegChrominanceTable	= 0x1
462     }
463 
464 /* [public] */ 
465 alias WIC8BIMIptcProperties = uint;
466 enum : WIC8BIMIptcProperties
467     {
468         WIC8BIMIptcPString	= 0,
469         WIC8BIMIptcEmbeddedIPTC	= 0x1
470     }
471 
472 /* [public] */ 
473 alias WIC8BIMResolutionInfoProperties = uint;
474 enum : WIC8BIMResolutionInfoProperties
475     {
476         WIC8BIMResolutionInfoPString	= 0x1,
477         WIC8BIMResolutionInfoHResolution	= 0x2,
478         WIC8BIMResolutionInfoHResolutionUnit	= 0x3,
479         WIC8BIMResolutionInfoWidthUnit	= 0x4,
480         WIC8BIMResolutionInfoVResolution	= 0x5,
481         WIC8BIMResolutionInfoVResolutionUnit	= 0x6,
482         WIC8BIMResolutionInfoHeightUnit	= 0x7
483     }
484 
485 /* [public] */ 
486 alias WIC8BIMIptcDigestProperties = uint;
487 enum : WIC8BIMIptcDigestProperties
488     {
489         WIC8BIMIptcDigestPString	= 0x1,
490         WIC8BIMIptcDigestIptcDigest	= 0x2
491     }
492 
493 /* [public] */ 
494 alias WICPngGamaProperties = uint;
495 enum : WICPngGamaProperties
496     {
497         WICPngGamaGamma	= 0x1
498     }
499 
500 /* [public] */ 
501 alias WICPngBkgdProperties = uint;
502 enum : WICPngBkgdProperties
503     {
504         WICPngBkgdBackgroundColor	= 0x1
505     }
506 
507 /* [public] */ 
508 alias WICPngItxtProperties = uint;
509 enum : WICPngItxtProperties
510     {
511         WICPngItxtKeyword	= 0x1,
512         WICPngItxtCompressionFlag	= 0x2,
513         WICPngItxtLanguageTag	= 0x3,
514         WICPngItxtTranslatedKeyword	= 0x4,
515         WICPngItxtText	= 0x5
516     }
517 
518 /* [public] */ 
519 alias WICPngChrmProperties = uint;
520 enum : WICPngChrmProperties
521     {
522         WICPngChrmWhitePointX	= 0x1,
523         WICPngChrmWhitePointY	= 0x2,
524         WICPngChrmRedX	= 0x3,
525         WICPngChrmRedY	= 0x4,
526         WICPngChrmGreenX	= 0x5,
527         WICPngChrmGreenY	= 0x6,
528         WICPngChrmBlueX	= 0x7,
529         WICPngChrmBlueY	= 0x8
530     }
531 
532 /* [public] */ 
533 alias WICPngHistProperties = uint;
534 enum : WICPngHistProperties
535     {
536         WICPngHistFrequencies	= 0x1
537     }
538 
539 /* [public] */ 
540 alias WICPngIccpProperties = uint;
541 enum : WICPngIccpProperties
542     {
543         WICPngIccpProfileName	= 0x1,
544         WICPngIccpProfileData	= 0x2
545     }
546 
547 /* [public] */ 
548 alias WICPngSrgbProperties = uint;
549 enum : WICPngSrgbProperties
550     {
551         WICPngSrgbRenderingIntent	= 0x1
552     }
553 
554 /* [public] */ 
555 alias WICPngTimeProperties = uint;
556 enum : WICPngTimeProperties
557     {
558         WICPngTimeYear	= 0x1,
559         WICPngTimeMonth	= 0x2,
560         WICPngTimeDay	= 0x3,
561         WICPngTimeHour	= 0x4,
562         WICPngTimeMinute	= 0x5,
563         WICPngTimeSecond	= 0x6
564     }
565 
566 /* [public] */
567 alias WICSectionAccessLevel = uint; 
568 enum : WICSectionAccessLevel
569     {
570         WICSectionAccessLevelRead	= 0x1,
571         WICSectionAccessLevelReadWrite	= 0x3
572     }
573 
574 /* [public] */ 
575 alias WICPixelFormatNumericRepresentation = uint;
576 enum : WICPixelFormatNumericRepresentation
577     {
578         WICPixelFormatNumericRepresentationUnspecified	= 0,
579         WICPixelFormatNumericRepresentationIndexed	= 0x1,
580         WICPixelFormatNumericRepresentationUnsignedInteger	= 0x2,
581         WICPixelFormatNumericRepresentationSignedInteger	= 0x3,
582         WICPixelFormatNumericRepresentationFixed	= 0x4,
583         WICPixelFormatNumericRepresentationFloat	= 0x5
584     }
585 
586 /* [public] */ 
587 alias WICPlanarOptions = uint;
588 enum : WICPlanarOptions
589     {
590         WICPlanarOptionsDefault	= 0,
591         WICPlanarOptionsPreserveSubsampling	= 0x1
592     }
593 
594 /* [public] */ 
595 alias WICJpegIndexingOptions = uint;
596 enum : WICJpegIndexingOptions
597     {
598         WICJpegIndexingOptionsGenerateOnDemand	= 0,
599         WICJpegIndexingOptionsGenerateOnLoad	= 0x1
600     }
601 
602 /* [public] */ 
603 alias WICJpegTransferMatrix = uint;
604 enum : WICJpegTransferMatrix
605     {
606         WICJpegTransferMatrixIdentity	= 0,
607         WICJpegTransferMatrixBT601	= 0x1
608     }
609 
610 /* [public] */ 
611 alias WICJpegScanType = uint;
612 enum : WICJpegScanType
613     {
614         WICJpegScanTypeInterleaved	= 0,
615         WICJpegScanTypePlanarComponents	= 0x1,
616         WICJpegScanTypeProgressive	= 0x2
617     }
618 
619 // #if (_WIN32_WINNT >= _WIN32_WINNT_WIN8) || defined(_WIN7_PLATFORM_UPDATE)
620 /* [public] */ struct WICImageParameters
621     {
622     D2D1_PIXEL_FORMAT PixelFormat;
623     FLOAT DpiX;
624     FLOAT DpiY;
625     FLOAT Top;
626     FLOAT Left;
627     UINT32 PixelWidth;
628     UINT32 PixelHeight;
629     }
630 
631 // #endif
632 /* [public] */ struct WICBitmapPlaneDescription
633     {
634     WICPixelFormatGUID Format;
635     UINT Width;
636     UINT Height;
637     }
638 
639 /* [public] */ struct WICBitmapPlane
640     {
641     WICPixelFormatGUID Format;
642     /* [size_is] */ BYTE* pbBuffer;
643     UINT cbStride;
644     UINT cbBufferSize;
645     }
646 
647 /* [public] */ struct WICJpegFrameHeader
648     {
649     UINT Width;
650     UINT Height;
651     WICJpegTransferMatrix TransferMatrix;
652     WICJpegScanType ScanType;
653     /* [range] */ UINT cComponents;
654     DWORD ComponentIdentifiers;
655     DWORD SampleFactors;
656     DWORD QuantizationTableIndices;
657     }
658 
659 /* [public] */ struct WICJpegScanHeader
660     {
661     /* [range] */ UINT cComponents;
662     UINT RestartInterval;
663     DWORD ComponentSelectors;
664     DWORD HuffmanTableIndices;
665     BYTE StartSpectralSelection;
666     BYTE EndSpectralSelection;
667     BYTE SuccessiveApproximationHigh;
668     BYTE SuccessiveApproximationLow;
669     }
670     
671 
672 mixin(uuid!(IWICPalette, "00000040-a8f2-4877-ba0a-fd2b6645fb94"));
673 interface IWICPalette : IUnknown
674 {
675 extern(Windows):
676     HRESULT InitializePredefined( 
677             /* [in] */ WICBitmapPaletteType ePaletteType,
678             /* [in] */ BOOL fAddTransparentColor);
679 
680     HRESULT InitializeCustom( 
681             /* [size_is][in] */ WICColor* pColors,
682             /* [in] */ UINT cCount);
683 
684     HRESULT InitializeFromBitmap( 
685             /* [in] */ IWICBitmapSource pISurface,
686             /* [in] */ UINT cCount,
687             /* [in] */ BOOL fAddTransparentColor);
688 
689     HRESULT InitializeFromPalette( 
690             /* [in] */ IWICPalette pIPalette);
691 
692     HRESULT GetType( 
693             /* [out] */ WICBitmapPaletteType* pePaletteType);
694 
695     HRESULT GetColorCount( 
696             /* [out] */ UINT* pcCount);
697 
698     HRESULT GetColors( 
699             /* [in] */ UINT cCount,
700             /* [size_is][out] */ WICColor* pColors,
701             /* [out] */ UINT* pcActualColors);
702 
703     HRESULT IsBlackWhite( 
704             /* [out] */ BOOL* pfIsBlackWhite);
705 
706     HRESULT IsGrayscale( 
707             /* [out] */ BOOL* pfIsGrayscale);
708 
709     HRESULT HasAlpha( 
710             /* [out] */ BOOL* pfHasAlpha);
711 }
712 
713 mixin(uuid!(IWICBitmapSource, "00000120-a8f2-4877-ba0a-fd2b6645fb94"));
714 interface IWICBitmapSource : IUnknown
715 {
716 extern(Windows):
717     HRESULT GetSize( 
718         /* [out] */ UINT* puiWidth,
719         /* [out] */ UINT* puiHeight);
720     
721     HRESULT GetPixelFormat( 
722         /* [out] */ WICPixelFormatGUID* pPixelFormat);
723     
724     HRESULT GetResolution( 
725         /* [out] */ double* pDpiX,
726         /* [out] */ double* pDpiY);
727     
728     HRESULT CopyPalette( 
729         /* [in] */ IWICPalette pIPalette);
730     
731     HRESULT CopyPixels( 
732         /* [unique][in] */ const(WICRect)* prc,
733         /* [in] */ UINT cbStride,
734         /* [in] */ UINT cbBufferSize,
735         /* [size_is][out] */ BYTE* pbBuffer);
736     
737 }
738    
739 mixin(uuid!(IWICFormatConverter, "00000301-a8f2-4877-ba0a-fd2b6645fb94"));
740 interface IWICFormatConverter : IWICBitmapSource
741 {
742 extern(Windows):
743     HRESULT Initialize( 
744         /* [in] */ IWICBitmapSource pISource,
745         /* [in] */ REFWICPixelFormatGUID dstFormat,
746         /* [in] */ WICBitmapDitherType dither,
747         /* [unique][in] */ IWICPalette pIPalette,
748         /* [in] */ double alphaThresholdPercent,
749         /* [in] */ WICBitmapPaletteType paletteTranslate);
750     
751     HRESULT CanConvert( 
752         /* [in] */ REFWICPixelFormatGUID srcPixelFormat,
753         /* [in] */ REFWICPixelFormatGUID dstPixelFormat,
754         /* [out] */ BOOL* pfCanConvert);
755     
756 }
757     
758 mixin(uuid!(IWICPlanarFormatConverter, "BEBEE9CB-83B0-4DCC-8132-B0AAA55EAC96"));
759 interface IWICPlanarFormatConverter : IWICBitmapSource
760 {
761 extern(Windows):
762     HRESULT Initialize( 
763         /* [size_is][in] */ IWICBitmapSource *ppPlanes,
764         UINT cPlanes,
765         /* [in] */ REFWICPixelFormatGUID dstFormat,
766         /* [in] */ WICBitmapDitherType dither,
767         /* [unique][in] */ IWICPalette pIPalette,
768         /* [in] */ double alphaThresholdPercent,
769         /* [in] */ WICBitmapPaletteType paletteTranslate);
770     
771     HRESULT CanConvert( 
772         /* [size_is][in] */ const(WICPixelFormatGUID)* pSrcPixelFormats,
773         UINT cSrcPlanes,
774         /* [in] */ REFWICPixelFormatGUID dstPixelFormat,
775         /* [out] */ BOOL* pfCanConvert);
776     
777 }
778     
779 mixin(uuid!(IWICBitmapScaler, "00000302-a8f2-4877-ba0a-fd2b6645fb94"));
780 interface IWICBitmapScaler : IWICBitmapSource
781 {
782 extern(Windows):
783     HRESULT Initialize( 
784         /* [in] */ IWICBitmapSource pISource,
785         /* [in] */ UINT uiWidth,
786         /* [in] */ UINT uiHeight,
787         /* [in] */ WICBitmapInterpolationMode mode);
788     
789 }
790     
791 mixin(uuid!(IWICBitmapClipper, "E4FBCF03-223D-4e81-9333-D635556DD1B5"));
792 interface IWICBitmapClipper : IWICBitmapSource
793 {
794 extern(Windows):
795     HRESULT Initialize( 
796         /* [in] */ IWICBitmapSource pISource,
797         /* [in] */ const(WICRect)* prc);
798     
799 }
800     
801 mixin(uuid!(IWICBitmapFlipRotator, "5009834F-2D6A-41ce-9E1B-17C5AFF7A782"));
802 interface IWICBitmapFlipRotator : IWICBitmapSource
803 {
804 extern(Windows):
805     HRESULT Initialize( 
806         /* [in] */ IWICBitmapSource pISource,
807         /* [in] */ WICBitmapTransformOptions options);
808     
809 }
810     
811 mixin(uuid!(IWICBitmapLock, "00000123-a8f2-4877-ba0a-fd2b6645fb94"));
812 interface IWICBitmapLock : IUnknown
813 {
814 extern(Windows):
815     HRESULT GetSize( 
816         /* [out] */ UINT* puiWidth,
817         /* [out] */ UINT* puiHeight);
818     
819     HRESULT GetStride( 
820         /* [out] */ UINT* pcbStride);
821     
822     HRESULT GetDataPointer( 
823         /* [out] */ UINT* pcbBufferSize,
824         /* [size_is][size_is][out] */ WICInProcPointer* ppbData);
825     
826     HRESULT GetPixelFormat( 
827         /* [out] */ WICPixelFormatGUID* pPixelFormat);
828     
829 }
830     
831 mixin(uuid!(IWICBitmap, "00000121-a8f2-4877-ba0a-fd2b6645fb94"));
832 interface IWICBitmap : IWICBitmapSource
833 {
834 extern(Windows):
835     HRESULT Lock( 
836         /* [unique][in] */ const(WICRect)* prcLock,
837         /* [in] */ DWORD flags,
838         /* [out] */ IWICBitmapLock *ppILock);
839     
840     HRESULT SetPalette( 
841         /* [in] */ IWICPalette pIPalette);
842     
843     HRESULT SetResolution( 
844         /* [in] */ double dpiX,
845         /* [in] */ double dpiY);
846     
847 }
848     
849 mixin(uuid!(IWICColorContext, "3C613A02-34B2-44ea-9A7C-45AEA9C6FD6D"));
850 interface IWICColorContext : IUnknown
851 {
852 extern(Windows):
853     HRESULT InitializeFromFilename( 
854         /* [in] */ LPCWSTR wzFilename);
855     
856     HRESULT InitializeFromMemory( 
857         /* [size_is][in] */ const(BYTE)* pbBuffer,
858         /* [in] */ UINT cbBufferSize);
859     
860     HRESULT InitializeFromExifColorSpace( 
861         /* [in] */ UINT value);
862     
863     HRESULT GetType( 
864         /* [out] */ WICColorContextType* pType);
865     
866     HRESULT GetProfileBytes( 
867         /* [in] */ UINT cbBuffer,
868         /* [size_is][unique][out][in] */ BYTE* pbBuffer,
869         /* [out] */ UINT* pcbActual);
870     
871     HRESULT GetExifColorSpace( 
872         /* [out] */ UINT* pValue);
873     
874 }
875     
876 mixin(uuid!(IWICColorTransform, "B66F034F-D0E2-40ab-B436-6DE39E321A94"));
877 interface IWICColorTransform : IWICBitmapSource
878 {
879 extern(Windows):
880     HRESULT Initialize( 
881         /* [in] */ IWICBitmapSource pIBitmapSource,
882         /* [in] */ IWICColorContext pIContextSource,
883         /* [in] */ IWICColorContext pIContextDest,
884         /* [in] */ REFWICPixelFormatGUID pixelFmtDest);
885     
886 }
887     
888 mixin(uuid!(IWICFastMetadataEncoder, "B84E2C09-78C9-4AC4-8BD3-524AE1663A2F"));
889 interface IWICFastMetadataEncoder : IUnknown
890 {
891 extern(Windows):
892     HRESULT Commit();
893     
894     HRESULT GetMetadataQueryWriter( 
895         /* [out] */ IWICMetadataQueryWriter *ppIMetadataQueryWriter);
896     
897 }
898     
899 mixin(uuid!(IWICStream, "135FF860-22B7-4ddf-B0F6-218F4F299A43"));
900 interface IWICStream : IStream
901 {
902 extern(Windows):
903     HRESULT InitializeFromIStream( 
904         /* [in] */ IStream pIStream);
905     
906     HRESULT InitializeFromFilename( 
907         /* [in] */ LPCWSTR wzFileName,
908         /* [in] */ DWORD dwDesiredAccess);
909     
910     HRESULT InitializeFromMemory( 
911         /* [size_is][in] */ WICInProcPointer pbBuffer,
912         /* [in] */ DWORD cbBufferSize);
913     
914     HRESULT InitializeFromIStreamRegion( 
915         /* [in] */ IStream pIStream,
916         /* [in] */ ULARGE_INTEGER ulOffset,
917         /* [in] */ ULARGE_INTEGER ulMaxSize);
918     
919 }
920     
921 mixin(uuid!(IWICEnumMetadataItem, "DC2BB46D-3F07-481E-8625-220C4AEDBB33"));
922 interface IWICEnumMetadataItem : IUnknown
923 {
924 extern(Windows):
925     HRESULT Next( 
926         /* [in] */ ULONG celt,
927         /* [size_is][unique][out][in] */ PROPVARIANT* rgeltSchema,
928         /* [size_is][out][in] */ PROPVARIANT* rgeltId,
929         /* [size_is][optional][out][in] */ PROPVARIANT* rgeltValue,
930         /* [optional][out] */ ULONG* pceltFetched);
931     
932     HRESULT Skip( 
933         /* [in] */ ULONG celt);
934     
935     HRESULT Reset();
936     
937     HRESULT Clone( 
938         /* [out] */ IWICEnumMetadataItem *ppIEnumMetadataItem);
939     
940 }
941     
942 mixin(uuid!(IWICMetadataQueryReader, "30989668-E1C9-4597-B395-458EEDB808DF"));
943 interface IWICMetadataQueryReader : IUnknown
944 {
945 extern(Windows):
946     HRESULT GetContainerFormat( 
947         /* [out] */ GUID* pguidContainerFormat);
948     
949     HRESULT GetLocation( 
950         /* [in] */ UINT cchMaxLength,
951         /* [size_is][unique][out][in] */ WCHAR* wzNamespace,
952         /* [out] */ UINT* pcchActualLength);
953     
954     HRESULT GetMetadataByName( 
955         /* [in] */ LPCWSTR wzName,
956         /* [unique][out][in] */ PROPVARIANT* pvarValue);
957     
958     HRESULT GetEnumerator( 
959         /* [out] */ IEnumString *ppIEnumString);
960     
961 }
962     
963 mixin(uuid!(IWICMetadataQueryWriter, "A721791A-0DEF-4d06-BD91-2118BF1DB10B"));
964 interface IWICMetadataQueryWriter : IWICMetadataQueryReader
965 {
966 extern(Windows):
967     HRESULT SetMetadataByName( 
968         /* [in] */ LPCWSTR wzName,
969         /* [in] */ const(PROPVARIANT)* pvarValue);
970     
971     HRESULT RemoveMetadataByName( 
972         /* [in] */ LPCWSTR wzName);
973     
974 }
975     
976 mixin(uuid!(IWICBitmapEncoder, "00000103-a8f2-4877-ba0a-fd2b6645fb94"));
977 interface IWICBitmapEncoder : IUnknown
978 {
979 extern(Windows):
980     HRESULT Initialize( 
981         /* [in] */ IStream pIStream,
982         /* [in] */ WICBitmapEncoderCacheOption cacheOption);
983     
984     HRESULT GetContainerFormat( 
985         /* [out] */ GUID* pguidContainerFormat);
986     
987     HRESULT GetEncoderInfo( 
988         /* [out] */ IWICBitmapEncoderInfo *ppIEncoderInfo);
989     
990     HRESULT SetColorContexts( 
991         /* [in] */ UINT cCount,
992         /* [size_is][in] */ IWICColorContext *ppIColorContext);
993     
994     HRESULT SetPalette( 
995         /* [in] */ IWICPalette pIPalette);
996     
997     HRESULT SetThumbnail( 
998         /* [in] */ IWICBitmapSource pIThumbnail);
999     
1000     HRESULT SetPreview( 
1001         /* [in] */ IWICBitmapSource pIPreview);
1002     
1003     HRESULT CreateNewFrame( 
1004         /* [out] */ IWICBitmapFrameEncode *ppIFrameEncode,
1005         /* [unique][out][in] */ IPropertyBag2 *ppIEncoderOptions);
1006     
1007     HRESULT Commit();
1008     
1009     HRESULT GetMetadataQueryWriter( 
1010         /* [out] */ IWICMetadataQueryWriter *ppIMetadataQueryWriter);
1011     
1012 }
1013     
1014 mixin(uuid!(IWICBitmapFrameEncode, "00000105-a8f2-4877-ba0a-fd2b6645fb94"));
1015 interface IWICBitmapFrameEncode : IUnknown
1016 {
1017 extern(Windows):
1018     HRESULT Initialize( 
1019         /* [unique][in] */ IPropertyBag2 pIEncoderOptions);
1020     
1021     HRESULT SetSize( 
1022         /* [in] */ UINT uiWidth,
1023         /* [in] */ UINT uiHeight);
1024     
1025     HRESULT SetResolution( 
1026         /* [in] */ double dpiX,
1027         /* [in] */ double dpiY);
1028     
1029     HRESULT SetPixelFormat( 
1030         /* [out][in] */ WICPixelFormatGUID* pPixelFormat);
1031     
1032     HRESULT SetColorContexts( 
1033         /* [in] */ UINT cCount,
1034         /* [size_is][in] */ IWICColorContext* ppIColorContext);
1035     
1036     HRESULT SetPalette( 
1037         /* [in] */ IWICPalette pIPalette);
1038     
1039     HRESULT SetThumbnail( 
1040         /* [in] */ IWICBitmapSource pIThumbnail);
1041     
1042     HRESULT WritePixels( 
1043         /* [in] */ UINT lineCount,
1044         /* [in] */ UINT cbStride,
1045         /* [in] */ UINT cbBufferSize,
1046         /* [size_is][in] */ BYTE* pbPixels);
1047     
1048     HRESULT WriteSource( 
1049         /* [in] */ IWICBitmapSource pIBitmapSource,
1050         /* [unique][in] */ WICRect* prc);
1051     
1052     HRESULT Commit();
1053     
1054     HRESULT GetMetadataQueryWriter( 
1055         /* [out] */ IWICMetadataQueryWriter* ppIMetadataQueryWriter);
1056     
1057 }
1058     
1059 mixin(uuid!(IWICPlanarBitmapFrameEncode, "F928B7B8-2221-40C1-B72E-7E82F1974D1A"));
1060 interface IWICPlanarBitmapFrameEncode : IUnknown
1061 {
1062 extern(Windows):
1063     HRESULT WritePixels( 
1064         UINT lineCount,
1065         /* [size_is][in] */ WICBitmapPlane* pPlanes,
1066         UINT cPlanes);
1067     
1068     HRESULT WriteSource( 
1069         /* [size_is][in] */ IWICBitmapSource* ppPlanes,
1070         UINT cPlanes,
1071         /* [unique][in] */ WICRect* prcSource);
1072     
1073 }
1074     
1075 mixin(uuid!(IWICImageEncoder, "04C75BF8-3CE1-473B-ACC5-3CC4F5E94999"));
1076 interface IWICImageEncoder : IUnknown
1077 {
1078 extern(Windows):
1079     HRESULT WriteFrame( 
1080         /* [in] */ ID2D1Image pImage,
1081         /* [in] */ IWICBitmapFrameEncode pFrameEncode,
1082         /* [unique][in] */ const(WICImageParameters)* pImageParameters);
1083     
1084     HRESULT WriteFrameThumbnail( 
1085         /* [in] */ ID2D1Image pImage,
1086         /* [in] */ IWICBitmapFrameEncode pFrameEncode,
1087         /* [unique][in] */ const(WICImageParameters)* pImageParameters);
1088     
1089     HRESULT WriteThumbnail( 
1090         /* [in] */ ID2D1Image pImage,
1091         /* [in] */ IWICBitmapEncoder pEncoder,
1092         /* [unique][in] */ const(WICImageParameters)* pImageParameters);
1093     
1094 }
1095     
1096 mixin(uuid!(IWICBitmapDecoder, "9EDDE9E7-8DEE-47ea-99DF-E6FAF2ED44BF"));
1097 interface IWICBitmapDecoder : IUnknown
1098 {
1099 extern(Windows):
1100     HRESULT QueryCapability( 
1101         /* [in] */ IStream pIStream,
1102         /* [out] */ DWORD* pdwCapability);
1103     
1104     HRESULT Initialize( 
1105         /* [in] */ IStream pIStream,
1106         /* [in] */ WICDecodeOptions cacheOptions);
1107     
1108     HRESULT GetContainerFormat( 
1109         /* [out] */ GUID* pguidContainerFormat);
1110     
1111     HRESULT GetDecoderInfo( 
1112         /* [out] */ IWICBitmapDecoderInfo* ppIDecoderInfo);
1113     
1114     HRESULT CopyPalette( 
1115         /* [in] */ IWICPalette pIPalette);
1116     
1117     HRESULT GetMetadataQueryReader( 
1118         /* [out] */ IWICMetadataQueryReader* ppIMetadataQueryReader);
1119     
1120     HRESULT GetPreview( 
1121         /* [out] */ IWICBitmapSource* ppIBitmapSource);
1122     
1123     HRESULT GetColorContexts( 
1124         /* [in] */ UINT cCount,
1125         /* [size_is][unique][out][in] */ IWICColorContext* ppIColorContexts,
1126         /* [out] */ UINT* pcActualCount);
1127     
1128     HRESULT GetThumbnail( 
1129         /* [out] */ IWICBitmapSource* ppIThumbnail);
1130     
1131     HRESULT GetFrameCount( 
1132         /* [out] */ UINT* pCount);
1133     
1134     HRESULT GetFrame( 
1135         /* [in] */ UINT index,
1136         /* [out] */ IWICBitmapFrameDecode* ppIBitmapFrame);
1137     
1138 }
1139     
1140 mixin(uuid!(IWICBitmapSourceTransform, "3B16811B-6A43-4ec9-B713-3D5A0C13B940"));
1141 interface IWICBitmapSourceTransform : IUnknown
1142 {
1143 extern(Windows):
1144     HRESULT CopyPixels( 
1145         /* [unique][in] */ const(WICRect)* prc,
1146         /* [in] */ UINT uiWidth,
1147         /* [in] */ UINT uiHeight,
1148         /* [unique][in] */ WICPixelFormatGUID* pguidDstFormat,
1149         /* [in] */ WICBitmapTransformOptions dstTransform,
1150         /* [in] */ UINT nStride,
1151         /* [in] */ UINT cbBufferSize,
1152         /* [size_is][out] */ BYTE* pbBuffer);
1153     
1154     HRESULT GetClosestSize( 
1155         /* [out][in] */ UINT* puiWidth,
1156         /* [out][in] */ UINT* puiHeight);
1157     
1158     HRESULT GetClosestPixelFormat( 
1159         /* [out][in] */ WICPixelFormatGUID* pguidDstFormat);
1160     
1161     HRESULT DoesSupportTransform( 
1162         /* [in] */ WICBitmapTransformOptions dstTransform,
1163         /* [out] */ BOOL* pfIsSupported);
1164     
1165 }
1166     
1167 mixin(uuid!(IWICPlanarBitmapSourceTransform, "3AFF9CCE-BE95-4303-B927-E7D16FF4A613"));
1168 interface IWICPlanarBitmapSourceTransform : IUnknown
1169 {
1170 extern(Windows):
1171     HRESULT DoesSupportTransform( 
1172         /* [out][in] */ UINT* puiWidth,
1173         /* [out][in] */ UINT* puiHeight,
1174         WICBitmapTransformOptions dstTransform,
1175         WICPlanarOptions dstPlanarOptions,
1176         /* [size_is][in] */ const(WICPixelFormatGUID)* pguidDstFormats,
1177         /* [size_is][out] */ WICBitmapPlaneDescription* pPlaneDescriptions,
1178         UINT cPlanes,
1179         /* [out] */ BOOL* pfIsSupported);
1180     
1181     HRESULT CopyPixels( 
1182         /* [unique][in] */ const(WICRect)* prcSource,
1183         UINT uiWidth,
1184         UINT uiHeight,
1185         WICBitmapTransformOptions dstTransform,
1186         WICPlanarOptions dstPlanarOptions,
1187         /* [size_is][in] */ const(WICBitmapPlane)* pDstPlanes,
1188         UINT cPlanes);
1189     
1190 }
1191     
1192 mixin(uuid!(IWICBitmapFrameDecode, "3B16811B-6A43-4ec9-A813-3D930C13B940"));
1193 interface IWICBitmapFrameDecode : IWICBitmapSource
1194 {
1195 extern(Windows):
1196     HRESULT GetMetadataQueryReader( 
1197         /* [out] */ IWICMetadataQueryReader* ppIMetadataQueryReader);
1198     
1199     HRESULT GetColorContexts( 
1200         /* [in] */ UINT cCount,
1201         /* [size_is][unique][out][in] */ IWICColorContext* ppIColorContexts,
1202         /* [out] */ UINT* pcActualCount);
1203     
1204     HRESULT GetThumbnail( 
1205         /* [out] */ IWICBitmapSource* ppIThumbnail);
1206     
1207 }
1208     
1209 mixin(uuid!(IWICProgressiveLevelControl, "DAAC296F-7AA5-4dbf-8D15-225C5976F891"));
1210 interface IWICProgressiveLevelControl : IUnknown
1211 {
1212 extern(Windows):
1213     HRESULT GetLevelCount( 
1214         /* [retval][out] */ UINT* pcLevels);
1215     
1216     HRESULT GetCurrentLevel( 
1217         /* [retval][out] */ UINT* pnLevel);
1218     
1219     HRESULT SetCurrentLevel( 
1220         /* [in] */ UINT nLevel);
1221     
1222 }
1223     
1224 mixin(uuid!(IWICProgressCallback, "4776F9CD-9517-45FA-BF24-E89C5EC5C60C"));
1225 interface IWICProgressCallback : IUnknown
1226 {
1227 extern(Windows):
1228     HRESULT Notify( 
1229         /* [in] */ ULONG uFrameNum,
1230         /* [in] */ WICProgressOperation operation,
1231         /* [in] */ double dblProgress);
1232     
1233 }
1234     
1235 alias PFNProgressNotification = extern(Windows) HRESULT function(LPVOID pvData, ULONG uFrameNum, WICProgressOperation operation, double dblProgress);
1236 
1237 mixin(uuid!(IWICBitmapCodecProgressNotification, "64C1024E-C3CF-4462-8078-88C2B11C46D9"));
1238 interface IWICBitmapCodecProgressNotification : IUnknown
1239 {
1240 extern(Windows):
1241     /* [local] */ HRESULT RegisterProgressNotification( 
1242         /* [annotation][unique][in] */ 
1243         PFNProgressNotification pfnProgressNotification,
1244         /* [annotation][unique][in] */ 
1245         LPVOID pvData,
1246         /* [in] */ DWORD dwProgressFlags);
1247     
1248 }
1249 
1250 mixin(uuid!(IWICComponentInfo, "23BC3F0A-698B-4357-886B-F24D50671334"));
1251 interface IWICComponentInfo : IUnknown
1252 {
1253 extern(Windows):
1254     HRESULT GetComponentType( 
1255         /* [out] */ WICComponentType* pType);
1256     
1257     HRESULT GetCLSID( 
1258         /* [out] */ CLSID* pclsid);
1259     
1260     HRESULT GetSigningStatus( 
1261         /* [out] */ DWORD* pStatus);
1262     
1263     HRESULT GetAuthor( 
1264         /* [in] */ UINT cchAuthor,
1265         /* [size_is][unique][out][in] */ WCHAR* wzAuthor,
1266         /* [out] */ UINT* pcchActual);
1267     
1268     HRESULT GetVendorGUID( 
1269         /* [out] */ GUID* pguidVendor);
1270     
1271     HRESULT GetVersion( 
1272         /* [in] */ UINT cchVersion,
1273         /* [size_is][unique][out][in] */ WCHAR* wzVersion,
1274         /* [out] */ UINT* pcchActual);
1275     
1276     HRESULT GetSpecVersion( 
1277         /* [in] */ UINT cchSpecVersion,
1278         /* [size_is][unique][out][in] */ WCHAR* wzSpecVersion,
1279         /* [out] */ UINT* pcchActual);
1280     
1281     HRESULT GetFriendlyName( 
1282         /* [in] */ UINT cchFriendlyName,
1283         /* [size_is][unique][out][in] */ WCHAR* wzFriendlyName,
1284         /* [out] */ UINT* pcchActual);
1285     
1286 }
1287     
1288 mixin(uuid!(IWICFormatConverterInfo, "9F34FB65-13F4-4f15-BC57-3726B5E53D9F"));
1289 interface IWICFormatConverterInfo : IWICComponentInfo
1290 {
1291 extern(Windows):
1292     HRESULT GetPixelFormats( 
1293         /* [in] */ UINT cFormats,
1294         /* [size_is][unique][out][in] */ WICPixelFormatGUID* pPixelFormatGUIDs,
1295         /* [out] */ UINT* pcActual);
1296     
1297     HRESULT CreateInstance( 
1298         /* [out] */ IWICFormatConverter* ppIConverter);
1299     
1300 }
1301     
1302 mixin(uuid!(IWICBitmapCodecInfo, "E87A44C4-B76E-4c47-8B09-298EB12A2714"));
1303 interface IWICBitmapCodecInfo : IWICComponentInfo
1304 {
1305 extern(Windows):
1306     HRESULT GetContainerFormat( 
1307         /* [out] */ GUID* pguidContainerFormat);
1308     
1309     HRESULT GetPixelFormats( 
1310         /* [in] */ UINT cFormats,
1311         /* [size_is][unique][out][in] */ GUID* pguidPixelFormats,
1312         /* [out] */ UINT* pcActual);
1313     
1314     HRESULT GetColorManagementVersion( 
1315         /* [in] */ UINT cchColorManagementVersion,
1316         /* [size_is][unique][out][in] */ WCHAR* wzColorManagementVersion,
1317         /* [out] */ UINT* pcchActual);
1318     
1319     HRESULT GetDeviceManufacturer( 
1320         /* [in] */ UINT cchDeviceManufacturer,
1321         /* [size_is][unique][out][in] */ WCHAR* wzDeviceManufacturer,
1322         /* [out] */ UINT* pcchActual);
1323     
1324     HRESULT GetDeviceModels( 
1325         /* [in] */ UINT cchDeviceModels,
1326         /* [size_is][unique][out][in] */ WCHAR* wzDeviceModels,
1327         /* [out] */ UINT* pcchActual);
1328     
1329     HRESULT GetMimeTypes( 
1330         /* [in] */ UINT cchMimeTypes,
1331         /* [size_is][unique][out][in] */ WCHAR* wzMimeTypes,
1332         /* [out] */ UINT* pcchActual);
1333     
1334     HRESULT GetFileExtensions( 
1335         /* [in] */ UINT cchFileExtensions,
1336         /* [size_is][unique][out][in] */ WCHAR* wzFileExtensions,
1337         /* [out] */ UINT* pcchActual);
1338     
1339     HRESULT DoesSupportAnimation( 
1340         /* [out] */ BOOL* pfSupportAnimation);
1341     
1342     HRESULT DoesSupportChromakey( 
1343         /* [out] */ BOOL* pfSupportChromakey);
1344     
1345     HRESULT DoesSupportLossless( 
1346         /* [out] */ BOOL* pfSupportLossless);
1347     
1348     HRESULT DoesSupportMultiframe( 
1349         /* [out] */ BOOL* pfSupportMultiframe);
1350     
1351     HRESULT MatchesMimeType( 
1352         /* [in] */ LPCWSTR wzMimeType,
1353         /* [out] */ BOOL* pfMatches);
1354     
1355 }
1356     
1357 mixin(uuid!(IWICBitmapEncoderInfo, "94C9B4EE-A09F-4f92-8A1E-4A9BCE7E76FB"));
1358 interface IWICBitmapEncoderInfo : IWICBitmapCodecInfo
1359 {
1360 extern(Windows):
1361     HRESULT CreateInstance(
1362         /* [out] */ IWICBitmapEncoder* ppIBitmapEncoder);
1363     
1364 }
1365     
1366 mixin(uuid!(IWICBitmapDecoderInfo, "D8CD007F-D08F-4191-9BFC-236EA7F0E4B5"));
1367 interface IWICBitmapDecoderInfo : IWICBitmapCodecInfo
1368 {
1369 extern(Windows):
1370     /* [local] */ HRESULT GetPatterns( 
1371         /* [in] */ UINT cbSizePatterns,
1372         /* [annotation][unique][size_is][out] */ 
1373         WICBitmapPattern* pPatterns,
1374         /* [annotation][unique][out] */ 
1375         UINT* pcPatterns,
1376         /* [annotation][out] */ 
1377         UINT* pcbPatternsActual);
1378     
1379     HRESULT MatchesPattern( 
1380         /* [in] */ IStream pIStream,
1381         /* [out] */ BOOL* pfMatches);
1382     
1383     HRESULT CreateInstance( 
1384         /* [out] */ IWICBitmapDecoder* ppIBitmapDecoder);
1385     
1386 }
1387 
1388 
1389 mixin(uuid!(IWICPixelFormatInfo, "E8EDA601-3D48-431a-AB44-69059BE88BBE"));
1390 interface IWICPixelFormatInfo : IWICComponentInfo
1391 {
1392 extern(Windows):
1393     HRESULT GetFormatGUID( 
1394         /* [out] */ GUID* pFormat);
1395     
1396     HRESULT GetColorContext( 
1397         /* [out] */ IWICColorContext* ppIColorContext);
1398     
1399     HRESULT GetBitsPerPixel( 
1400         /* [out] */ UINT* puiBitsPerPixel);
1401     
1402     HRESULT GetChannelCount( 
1403         /* [out] */ UINT* puiChannelCount);
1404     
1405     HRESULT GetChannelMask( 
1406         /* [in] */ UINT uiChannelIndex,
1407         /* [in] */ UINT cbMaskBuffer,
1408         /* [size_is][unique][out][in] */ BYTE* pbMaskBuffer,
1409         /* [out] */ UINT* pcbActual);
1410     
1411 }
1412     
1413 mixin(uuid!(IWICPixelFormatInfo2, "A9DB33A2-AF5F-43C7-B679-74F5984B5AA4"));
1414 interface IWICPixelFormatInfo2 : IWICPixelFormatInfo
1415 {
1416 extern(Windows):
1417     HRESULT SupportsTransparency( 
1418         /* [out] */ BOOL* pfSupportsTransparency);
1419     
1420     HRESULT GetNumericRepresentation( 
1421         /* [out] */ WICPixelFormatNumericRepresentation* pNumericRepresentation);
1422     
1423 }
1424     
1425 mixin(uuid!(IWICImagingFactory, "ec5ec8a9-c395-4314-9c77-54d7a935ff70"));
1426 interface IWICImagingFactory : IUnknown
1427 {
1428 extern(Windows):
1429     HRESULT CreateDecoderFromFilename( 
1430         /* [in] */ LPCWSTR wzFilename,
1431         /* [unique][in] */ const(GUID)* pguidVendor,
1432         /* [in] */ DWORD dwDesiredAccess,
1433         /* [in] */ WICDecodeOptions metadataOptions,
1434         /* [retval][out] */ IWICBitmapDecoder* ppIDecoder);
1435     
1436     HRESULT CreateDecoderFromStream( 
1437         /* [in] */ IStream pIStream,
1438         /* [unique][in] */ const(GUID)* pguidVendor,
1439         /* [in] */ WICDecodeOptions metadataOptions,
1440         /* [retval][out] */ IWICBitmapDecoder* ppIDecoder);
1441     
1442     HRESULT CreateDecoderFromFileHandle( 
1443         /* [in] */ ULONG_PTR hFile,
1444         /* [unique][in] */ const(GUID)* pguidVendor,
1445         /* [in] */ WICDecodeOptions metadataOptions,
1446         /* [retval][out] */ IWICBitmapDecoder* ppIDecoder);
1447     
1448     HRESULT CreateComponentInfo( 
1449         /* [in] */ REFCLSID clsidComponent,
1450         /* [out] */ IWICComponentInfo* ppIInfo);
1451     
1452     HRESULT CreateDecoder( 
1453         /* [in] */ REFGUID guidContainerFormat,
1454         /* [unique][in] */ const(GUID)* pguidVendor,
1455         /* [retval][out] */ IWICBitmapDecoder* ppIDecoder);
1456     
1457     HRESULT CreateEncoder( 
1458         /* [in] */ REFGUID guidContainerFormat,
1459         /* [unique][in] */ const(GUID)* pguidVendor,
1460         /* [retval][out] */ IWICBitmapEncoder* ppIEncoder);
1461     
1462     HRESULT CreatePalette( 
1463         /* [out] */ IWICPalette* ppIPalette);
1464     
1465     HRESULT CreateFormatConverter( 
1466         /* [out] */ IWICFormatConverter* ppIFormatConverter);
1467     
1468     HRESULT CreateBitmapScaler( 
1469         /* [out] */ IWICBitmapScaler* ppIBitmapScaler);
1470     
1471     HRESULT CreateBitmapClipper( 
1472         /* [out] */ IWICBitmapClipper* ppIBitmapClipper);
1473     
1474     HRESULT CreateBitmapFlipRotator( 
1475         /* [out] */ IWICBitmapFlipRotator* ppIBitmapFlipRotator);
1476     
1477     HRESULT CreateStream( 
1478         /* [out] */ IWICStream* ppIWICStream);
1479     
1480     HRESULT CreateColorContext( 
1481         /* [out] */ IWICColorContext* ppIWICColorContext);
1482     
1483     HRESULT CreateColorTransformer( 
1484         /* [out] */ IWICColorTransform* ppIWICColorTransform);
1485     
1486     HRESULT CreateBitmap( 
1487         /* [in] */ UINT uiWidth,
1488         /* [in] */ UINT uiHeight,
1489         /* [in] */ REFWICPixelFormatGUID pixelFormat,
1490         /* [in] */ WICBitmapCreateCacheOption option,
1491         /* [out] */ IWICBitmap* ppIBitmap);
1492     
1493     HRESULT CreateBitmapFromSource( 
1494         /* [in] */ IWICBitmapSource pIBitmapSource,
1495         /* [in] */ WICBitmapCreateCacheOption option,
1496         /* [out] */ IWICBitmap* ppIBitmap);
1497     
1498     HRESULT CreateBitmapFromSourceRect( 
1499         /* [in] */ IWICBitmapSource pIBitmapSource,
1500         /* [in] */ UINT x,
1501         /* [in] */ UINT y,
1502         /* [in] */ UINT width,
1503         /* [in] */ UINT height,
1504         /* [out] */ IWICBitmap* ppIBitmap);
1505     
1506     HRESULT CreateBitmapFromMemory( 
1507         /* [in] */ UINT uiWidth,
1508         /* [in] */ UINT uiHeight,
1509         /* [in] */ REFWICPixelFormatGUID pixelFormat,
1510         /* [in] */ UINT cbStride,
1511         /* [in] */ UINT cbBufferSize,
1512         /* [size_is][in] */ BYTE* pbBuffer,
1513         /* [out] */ IWICBitmap* ppIBitmap);
1514     
1515     HRESULT CreateBitmapFromHBITMAP( 
1516         /* [in] */ HBITMAP hBitmap,
1517         /* [unique][in] */ HPALETTE hPalette,
1518         /* [in] */ WICBitmapAlphaChannelOption options,
1519         /* [out] */ IWICBitmap* ppIBitmap);
1520     
1521     HRESULT CreateBitmapFromHICON( 
1522         /* [in] */ HICON hIcon,
1523         /* [out] */ IWICBitmap* ppIBitmap);
1524     
1525     HRESULT CreateComponentEnumerator( 
1526         /* [in] */ DWORD componentTypes,
1527         /* [in] */ DWORD options,
1528         /* [out] */ IEnumUnknown* ppIEnumUnknown);
1529     
1530     HRESULT CreateFastMetadataEncoderFromDecoder( 
1531         /* [in] */ IWICBitmapDecoder pIDecoder,
1532         /* [out] */ IWICFastMetadataEncoder* ppIFastEncoder);
1533     
1534     HRESULT CreateFastMetadataEncoderFromFrameDecode( 
1535         /* [in] */ IWICBitmapFrameDecode pIFrameDecoder,
1536         /* [out] */ IWICFastMetadataEncoder* ppIFastEncoder);
1537     
1538     HRESULT CreateQueryWriter( 
1539         /* [in] */ REFGUID guidMetadataFormat,
1540         /* [unique][in] */ const(GUID)* pguidVendor,
1541         /* [out] */ IWICMetadataQueryWriter* ppIQueryWriter);
1542     
1543     HRESULT CreateQueryWriterFromReader( 
1544         /* [in] */ IWICMetadataQueryReader pIQueryReader,
1545         /* [unique][in] */ const(GUID)* pguidVendor,
1546         /* [out] */ IWICMetadataQueryWriter* ppIQueryWriter);
1547     
1548 }
1549     
1550 mixin(uuid!(IWICImagingFactory2, "7B816B45-1996-4476-B132-DE9E247C8AF0"));
1551 interface IWICImagingFactory2 : IWICImagingFactory
1552 {
1553 extern(Windows):
1554     HRESULT CreateImageEncoder( 
1555         /* [in] */ ID2D1Device pD2DDevice,
1556         /* [out] */ IWICImageEncoder* ppWICImageEncoder);
1557     
1558 }
1559     
1560 extern(Windows)
1561 {
1562     HRESULT WICConvertBitmapSource(
1563         REFWICPixelFormatGUID dstFormat, // Destination pixel format
1564         IWICBitmapSource  pISrc,    // Source bitmap
1565         IWICBitmapSource* ppIDst   // Destination bitmap, a copy or addrefed source
1566         );
1567     HRESULT WICCreateBitmapFromSection(
1568         UINT width,
1569         UINT height,
1570         REFWICPixelFormatGUID pixelFormat,
1571         HANDLE hSection,
1572         UINT stride,
1573         UINT offset,
1574         IWICBitmap* ppIBitmap
1575         );
1576     HRESULT WICCreateBitmapFromSectionEx(
1577         UINT width,
1578         UINT height,
1579         REFWICPixelFormatGUID pixelFormat,
1580         HANDLE hSection,
1581         UINT stride,
1582         UINT offset,
1583         WICSectionAccessLevel desiredAccessLevel,
1584         IWICBitmap* ppIBitmap
1585         );
1586     HRESULT WICMapGuidToShortName(
1587         REFGUID guid,
1588         UINT cchName,
1589         WCHAR* wzName,
1590         UINT* pcchActual
1591     );
1592     HRESULT WICMapShortNameToGuid(
1593         PCWSTR wzName,
1594         GUID* pguid
1595     );
1596     HRESULT WICMapSchemaToName(
1597         REFGUID guidMetadataFormat,
1598         LPWSTR pwzSchema,
1599         UINT cchName,
1600         WCHAR* wzName,
1601         UINT* pcchActual
1602         );
1603 }
1604 enum FACILITY_WINCODEC_ERR = 0x898;
1605 enum WINCODEC_ERR_BASE = 0x2000;
1606 pure MAKE_WINCODECHR(bool sev, uint code) { return MAKE_HRESULT(sev, FACILITY_WINCODEC_ERR, (WINCODEC_ERR_BASE + code)); }
1607 pure MAKE_WINCODECHR_ERR(uint code) { return MAKE_WINCODECHR(true, code); }
1608 enum WINCODEC_ERR_GENERIC_ERROR                    = E_FAIL;
1609 enum WINCODEC_ERR_INVALIDPARAMETER                 = E_INVALIDARG;
1610 enum WINCODEC_ERR_OUTOFMEMORY                      = E_OUTOFMEMORY;
1611 enum WINCODEC_ERR_NOTIMPLEMENTED                   = E_NOTIMPL;
1612 enum WINCODEC_ERR_ABORTED                          = E_ABORT;
1613 enum WINCODEC_ERR_ACCESSDENIED                     = E_ACCESSDENIED;
1614 enum WINCODEC_ERR_VALUEOVERFLOW                    = INTSAFE_E_ARITHMETIC_OVERFLOW;
1615 /* [public] */ 
1616 alias WICTiffCompressionOption = uint;
1617 enum : WICTiffCompressionOption
1618     {
1619         WICTiffCompressionDontCare	= 0,
1620         WICTiffCompressionNone	= 0x1,
1621         WICTiffCompressionCCITT3	= 0x2,
1622         WICTiffCompressionCCITT4	= 0x3,
1623         WICTiffCompressionLZW	= 0x4,
1624         WICTiffCompressionRLE	= 0x5,
1625         WICTiffCompressionZIP	= 0x6,
1626         WICTiffCompressionLZWHDifferencing	= 0x7
1627     }
1628 
1629 /* [public] */ 
1630 alias WICJpegYCrCbSubsamplingOption = uint;
1631 enum : WICJpegYCrCbSubsamplingOption
1632     {
1633         WICJpegYCrCbSubsamplingDefault	= 0,
1634         WICJpegYCrCbSubsampling420	= 0x1,
1635         WICJpegYCrCbSubsampling422	= 0x2,
1636         WICJpegYCrCbSubsampling444	= 0x3,
1637         WICJpegYCrCbSubsampling440	= 0x4
1638     }
1639 
1640 /* [public] */ 
1641 alias WICPngFilterOption = uint;
1642 enum : WICPngFilterOption
1643     {
1644         WICPngFilterUnspecified	= 0,
1645         WICPngFilterNone	= 0x1,
1646         WICPngFilterSub	= 0x2,
1647         WICPngFilterUp	= 0x3,
1648         WICPngFilterAverage	= 0x4,
1649         WICPngFilterPaeth	= 0x5,
1650         WICPngFilterAdaptive	= 0x6
1651     }
1652 
1653 /* [public] */ 
1654 alias WICNamedWhitePoint = uint;
1655 enum : WICNamedWhitePoint
1656     {
1657         WICWhitePointDefault	= 0x1,
1658         WICWhitePointDaylight	= 0x2,
1659         WICWhitePointCloudy	= 0x4,
1660         WICWhitePointShade	= 0x8,
1661         WICWhitePointTungsten	= 0x10,
1662         WICWhitePointFluorescent	= 0x20,
1663         WICWhitePointFlash	= 0x40,
1664         WICWhitePointUnderwater	= 0x80,
1665         WICWhitePointCustom	= 0x100,
1666         WICWhitePointAutoWhiteBalance	= 0x200,
1667         WICWhitePointAsShot	= WICWhitePointDefault
1668     }
1669 
1670 /* [public] */ 
1671 alias WICRawCapabilities = uint;
1672 enum : WICRawCapabilities
1673     {
1674         WICRawCapabilityNotSupported	= 0,
1675         WICRawCapabilityGetSupported	= 0x1,
1676         WICRawCapabilityFullySupported	= 0x2
1677     }
1678 
1679 /* [public] */ 
1680 alias WICRawRotationCapabilities = uint;
1681 enum : WICRawRotationCapabilities
1682     {
1683         WICRawRotationCapabilityNotSupported	= 0,
1684         WICRawRotationCapabilityGetSupported	= 0x1,
1685         WICRawRotationCapabilityNinetyDegreesSupported	= 0x2,
1686         WICRawRotationCapabilityFullySupported	= 0x3
1687     }
1688 
1689 /* [public] */ struct WICRawCapabilitiesInfo
1690     {
1691     UINT cbSize;
1692     UINT CodecMajorVersion;
1693     UINT CodecMinorVersion;
1694     WICRawCapabilities ExposureCompensationSupport;
1695     WICRawCapabilities ContrastSupport;
1696     WICRawCapabilities RGBWhitePointSupport;
1697     WICRawCapabilities NamedWhitePointSupport;
1698     UINT NamedWhitePointSupportMask;
1699     WICRawCapabilities KelvinWhitePointSupport;
1700     WICRawCapabilities GammaSupport;
1701     WICRawCapabilities TintSupport;
1702     WICRawCapabilities SaturationSupport;
1703     WICRawCapabilities SharpnessSupport;
1704     WICRawCapabilities NoiseReductionSupport;
1705     WICRawCapabilities DestinationColorProfileSupport;
1706     WICRawCapabilities ToneCurveSupport;
1707     WICRawRotationCapabilities RotationSupport;
1708     WICRawCapabilities RenderModeSupport;
1709     }
1710 
1711 /* [public] */ 
1712 alias WICRawParameterSet = uint;
1713 enum : WICRawParameterSet
1714     {
1715         WICAsShotParameterSet	= 0x1,
1716         WICUserAdjustedParameterSet	= 0x2,
1717         WICAutoAdjustedParameterSet	= 0x3
1718     }
1719 
1720 /* [public] */ 
1721 alias WICRawRenderMode = uint;
1722 enum : WICRawRenderMode
1723     {
1724         WICRawRenderModeDraft	= 0x1,
1725         WICRawRenderModeNormal	= 0x2,
1726         WICRawRenderModeBestQuality	= 0x3
1727     }
1728 
1729 /* [public] */ struct WICRawToneCurvePoint
1730     {
1731     double Input;
1732     double Output;
1733     }
1734 
1735 /* [public] */ struct WICRawToneCurve
1736     {
1737     UINT cPoints;
1738     WICRawToneCurvePoint[1] aPoints;
1739     }
1740 
1741 enum WICRawChangeNotification_ExposureCompensation       = 0x00000001;
1742 enum WICRawChangeNotification_NamedWhitePoint            = 0x00000002;
1743 enum WICRawChangeNotification_KelvinWhitePoint           = 0x00000004;
1744 enum WICRawChangeNotification_RGBWhitePoint              = 0x00000008;
1745 enum WICRawChangeNotification_Contrast                   = 0x00000010;
1746 enum WICRawChangeNotification_Gamma                      = 0x00000020;
1747 enum WICRawChangeNotification_Sharpness                  = 0x00000040;
1748 enum WICRawChangeNotification_Saturation                 = 0x00000080;
1749 enum WICRawChangeNotification_Tint                       = 0x00000100;
1750 enum WICRawChangeNotification_NoiseReduction             = 0x00000200;
1751 enum WICRawChangeNotification_DestinationColorContext    = 0x00000400;
1752 enum WICRawChangeNotification_ToneCurve                  = 0x00000800;
1753 enum WICRawChangeNotification_Rotation                   = 0x00001000;
1754 enum WICRawChangeNotification_RenderMode                 = 0x00002000;
1755 
1756 mixin(uuid!(IWICDevelopRawNotificationCallback, "95c75a6e-3e8c-4ec2-85a8-aebcc551e59b"));
1757 interface IWICDevelopRawNotificationCallback : IUnknown
1758 {
1759 extern(Windows):
1760     HRESULT Notify( 
1761         /* [in] */ UINT NotificationMask);
1762     
1763 }
1764     
1765 mixin(uuid!(IWICDevelopRaw, "fbec5e44-f7be-4b65-b7f8-c0c81fef026d"));
1766 interface IWICDevelopRaw : IWICBitmapFrameDecode
1767 {
1768 extern(Windows):
1769     /* [local] */ HRESULT QueryRawCapabilitiesInfo( 
1770         /* [out][in] */ WICRawCapabilitiesInfo* pInfo);
1771     
1772     HRESULT LoadParameterSet( 
1773         /* [in] */ WICRawParameterSet ParameterSet);
1774     
1775     HRESULT GetCurrentParameterSet( 
1776         /* [out] */ IPropertyBag2* ppCurrentParameterSet);
1777     
1778     HRESULT SetExposureCompensation( 
1779         /* [in] */ double ev);
1780     
1781     HRESULT GetExposureCompensation( 
1782         /* [out] */ double* pEV);
1783     
1784     HRESULT SetWhitePointRGB( 
1785         /* [in] */ UINT Red,
1786         /* [in] */ UINT Green,
1787         /* [in] */ UINT Blue);
1788     
1789     HRESULT GetWhitePointRGB( 
1790         /* [out] */ UINT* pRed,
1791         /* [out] */ UINT* pGreen,
1792         /* [out] */ UINT* pBlue);
1793     
1794     HRESULT SetNamedWhitePoint( 
1795         /* [in] */ WICNamedWhitePoint WhitePoint);
1796     
1797     HRESULT GetNamedWhitePoint( 
1798         /* [out] */ WICNamedWhitePoint* pWhitePoint);
1799     
1800     HRESULT SetWhitePointKelvin( 
1801         /* [in] */ UINT WhitePointKelvin);
1802     
1803     HRESULT GetWhitePointKelvin( 
1804         /* [out] */ UINT* pWhitePointKelvin);
1805     
1806     HRESULT GetKelvinRangeInfo( 
1807         /* [out] */ UINT* pMinKelvinTemp,
1808         /* [out] */ UINT* pMaxKelvinTemp,
1809         /* [out] */ UINT* pKelvinTempStepValue);
1810     
1811     HRESULT SetContrast( 
1812         /* [in] */ double Contrast);
1813     
1814     HRESULT GetContrast( 
1815         /* [out] */ double* pContrast);
1816     
1817     HRESULT SetGamma( 
1818         /* [in] */ double Gamma);
1819     
1820     HRESULT GetGamma( 
1821         /* [out] */ double* pGamma);
1822     
1823     HRESULT SetSharpness( 
1824         /* [in] */ double Sharpness);
1825     
1826     HRESULT GetSharpness( 
1827         /* [out] */ double* pSharpness);
1828     
1829     HRESULT SetSaturation( 
1830         /* [in] */ double Saturation);
1831     
1832     HRESULT GetSaturation( 
1833         /* [out] */ double* pSaturation);
1834     
1835     HRESULT SetTint( 
1836         /* [in] */ double Tint);
1837     
1838     HRESULT GetTint( 
1839         /* [out] */ double* pTint);
1840     
1841     HRESULT SetNoiseReduction( 
1842         /* [in] */ double NoiseReduction);
1843     
1844     HRESULT GetNoiseReduction( 
1845         /* [out] */ double* pNoiseReduction);
1846     
1847     HRESULT SetDestinationColorContext( 
1848         /* [unique][in] */ IWICColorContext pColorContext);
1849     
1850     /* [local] */ HRESULT SetToneCurve( 
1851         /* [in] */ UINT cbToneCurveSize,
1852         /* [annotation][in] */ 
1853         const(WICRawToneCurve)* pToneCurve);
1854     
1855     /* [local] */ HRESULT GetToneCurve( 
1856         /* [in] */ UINT cbToneCurveBufferSize,
1857         /* [annotation][unique][out] */ 
1858         WICRawToneCurve* pToneCurve,
1859         /* [annotation][unique][out] */ 
1860         UINT* pcbActualToneCurveBufferSize);
1861     
1862     HRESULT SetRotation( 
1863         /* [in] */ double Rotation);
1864     
1865     HRESULT GetRotation( 
1866         /* [out] */ double* pRotation);
1867     
1868     HRESULT SetRenderMode( 
1869         /* [in] */ WICRawRenderMode RenderMode);
1870     
1871     HRESULT GetRenderMode( 
1872         /* [out] */ WICRawRenderMode* pRenderMode);
1873     
1874     HRESULT SetNotificationCallback( 
1875         /* [unique][in] */ IWICDevelopRawNotificationCallback pCallback);
1876     
1877 }
1878 
1879 
1880 /* interface __MIDL_itf_wincodec_0000_0038 */
1881 /* [local] */ 
1882 
1883 /* [public] */ 
1884 alias WICDdsDimension = uint;
1885 enum : WICDdsDimension
1886     {
1887         WICDdsTexture1D	= 0,
1888         WICDdsTexture2D	= 0x1,
1889         WICDdsTexture3D	= 0x2,
1890         WICDdsTextureCube	= 0x3
1891     }
1892 
1893 /* [public] */ 
1894 alias WICDdsAlphaMode = uint;
1895 enum : WICDdsAlphaMode
1896     {
1897         WICDdsAlphaModeUnknown	= 0,
1898         WICDdsAlphaModeStraight	= 0x1,
1899         WICDdsAlphaModePremultiplied	= 0x2,
1900         WICDdsAlphaModeOpaque	= 0x3,
1901         WICDdsAlphaModeCustom	= 0x4
1902     }
1903 
1904 /* [public] */ struct WICDdsParameters
1905     {
1906     UINT Width;
1907     UINT Height;
1908     UINT Depth;
1909     UINT MipLevels;
1910     UINT ArraySize;
1911     DXGI_FORMAT DxgiFormat;
1912     WICDdsDimension Dimension;
1913     WICDdsAlphaMode AlphaMode;
1914     }
1915 
1916 mixin(uuid!(IWICDdsDecoder, "409cd537-8532-40cb-9774-e2feb2df4e9c"));
1917 interface IWICDdsDecoder : IUnknown
1918 {
1919 extern(Windows):
1920     HRESULT GetParameters( 
1921         /* [out] */ WICDdsParameters* pParameters);
1922     
1923     HRESULT GetFrame( 
1924         /* [in] */ UINT arrayIndex,
1925         /* [in] */ UINT mipLevel,
1926         /* [in] */ UINT sliceIndex,
1927         /* [retval][out] */ IWICBitmapFrameDecode* ppIBitmapFrame);
1928     
1929 }
1930     
1931 mixin(uuid!(IWICDdsEncoder, "5cacdb4c-407e-41b3-b936-d0f010cd6732"));
1932 interface IWICDdsEncoder : IUnknown
1933 {
1934 extern(Windows):
1935     HRESULT SetParameters( 
1936         /* [in] */ WICDdsParameters* pParameters);
1937     
1938     HRESULT GetParameters( 
1939         /* [out] */ WICDdsParameters* pParameters);
1940     
1941     HRESULT CreateNewFrame( 
1942         /* [out] */ IWICBitmapFrameEncode* ppIFrameEncode,
1943         /* [optional][out] */ UINT* pArrayIndex,
1944         /* [optional][out] */ UINT* pMipLevel,
1945         /* [optional][out] */ UINT* pSliceIndex);
1946     
1947 }
1948     
1949 /* [public] */ struct WICDdsFormatInfo
1950     {
1951     DXGI_FORMAT DxgiFormat;
1952     UINT BytesPerBlock;
1953     UINT BlockWidth;
1954     UINT BlockHeight;
1955     }
1956 
1957 mixin(uuid!(IWICDdsFrameDecode, "3d4c0c61-18a4-41e4-bd80-481a4fc9f464"));
1958 interface IWICDdsFrameDecode : IUnknown
1959 {
1960 extern(Windows):
1961     HRESULT GetSizeInBlocks( 
1962         /* [out] */ UINT* pWidthInBlocks,
1963         /* [out] */ UINT* pHeightInBlocks);
1964     
1965     HRESULT GetFormatInfo( 
1966         /* [out] */ WICDdsFormatInfo* pFormatInfo);
1967     
1968     HRESULT CopyBlocks( 
1969         /* [unique][in] */ const(WICRect)* prcBoundsInBlocks,
1970         /* [in] */ UINT cbStride,
1971         /* [in] */ UINT cbBufferSize,
1972         /* [size_is][out] */ BYTE* pbBuffer);
1973     
1974 }
1975     
1976 mixin(uuid!(IWICJpegFrameDecode, "8939F66E-C46A-4c21-A9D1-98B327CE1679"));
1977 interface IWICJpegFrameDecode : IUnknown
1978 {
1979 extern(Windows):
1980     HRESULT DoesSupportIndexing( 
1981         /* [out] */ BOOL* pfIndexingSupported);
1982     
1983     HRESULT SetIndexing( 
1984         WICJpegIndexingOptions options,
1985         UINT horizontalIntervalSize);
1986     
1987     HRESULT ClearIndexing();
1988     
1989     HRESULT GetAcHuffmanTable( 
1990         UINT scanIndex,
1991         /* [range] */ UINT tableIndex,
1992         /* [out] */ DXGI_JPEG_AC_HUFFMAN_TABLE* pAcHuffmanTable);
1993     
1994     HRESULT GetDcHuffmanTable( 
1995         UINT scanIndex,
1996         /* [range] */ UINT tableIndex,
1997         /* [out] */ DXGI_JPEG_DC_HUFFMAN_TABLE* pDcHuffmanTable);
1998     
1999     HRESULT GetQuantizationTable( 
2000         UINT scanIndex,
2001         /* [range] */ UINT tableIndex,
2002         /* [out] */ DXGI_JPEG_QUANTIZATION_TABLE* pQuantizationTable);
2003     
2004     HRESULT GetFrameHeader( 
2005         /* [out] */ WICJpegFrameHeader* pFrameHeader);
2006     
2007     HRESULT GetScanHeader( 
2008         UINT scanIndex,
2009         /* [out] */ WICJpegScanHeader* pScanHeader);
2010     
2011     HRESULT CopyScan( 
2012         UINT scanIndex,
2013         UINT scanOffset,
2014         /* [in] */ UINT cbScanData,
2015         /* [length_is][size_is][out] */ BYTE* pbScanData,
2016         /* [out] */ UINT* pcbScanDataActual);
2017     
2018     HRESULT CopyMinimalStream( 
2019         UINT streamOffset,
2020         /* [in] */ UINT cbStreamData,
2021         /* [length_is][size_is][out] */ BYTE* pbStreamData,
2022         /* [out] */ UINT* pcbStreamDataActual);
2023     
2024 }
2025     
2026 mixin(uuid!(IWICJpegFrameEncode, "2F0C601F-D2C6-468C-ABFA-49495D983ED1"));
2027 interface IWICJpegFrameEncode : IUnknown
2028 {
2029 extern(Windows):
2030     HRESULT GetAcHuffmanTable( 
2031         UINT scanIndex,
2032         /* [range] */ UINT tableIndex,
2033         /* [out] */ DXGI_JPEG_AC_HUFFMAN_TABLE* pAcHuffmanTable);
2034     
2035     HRESULT GetDcHuffmanTable( 
2036         UINT scanIndex,
2037         /* [range] */ UINT tableIndex,
2038         /* [out] */ DXGI_JPEG_DC_HUFFMAN_TABLE* pDcHuffmanTable);
2039     
2040     HRESULT GetQuantizationTable( 
2041         UINT scanIndex,
2042         /* [range] */ UINT tableIndex,
2043         /* [out] */ DXGI_JPEG_QUANTIZATION_TABLE* pQuantizationTable);
2044     
2045     HRESULT WriteScan( 
2046         /* [in] */ UINT cbScanData,
2047         /* [size_is][in] */ const(BYTE)* pbScanData);
2048     
2049 }
2050 
2051 extern(Windows)
2052 {
2053     import core.stdc.config : c_ulong;
2054 
2055 c_ulong              BSTR_UserSize(     c_ulong *, c_ulong            , BSTR * ); 
2056 byte *  BSTR_UserMarshal(  c_ulong *, byte *, BSTR * ); 
2057 byte *  BSTR_UserUnmarshal(c_ulong *, byte *, BSTR * ); 
2058 void                       BSTR_UserFree(     c_ulong *, BSTR * ); 
2059 
2060 c_ulong              HBITMAP_UserSize(     c_ulong *, c_ulong            , HBITMAP * ); 
2061 byte *  HBITMAP_UserMarshal(  c_ulong *, byte *, HBITMAP * ); 
2062 byte *  HBITMAP_UserUnmarshal(c_ulong *, byte *, HBITMAP * ); 
2063 void                       HBITMAP_UserFree(     c_ulong *, HBITMAP * ); 
2064 
2065 c_ulong              HICON_UserSize(     c_ulong *, c_ulong            , HICON * ); 
2066 byte *  HICON_UserMarshal(  c_ulong *, byte *, HICON * ); 
2067 byte *  HICON_UserUnmarshal(c_ulong *, byte *, HICON * ); 
2068 void                       HICON_UserFree(     c_ulong *, HICON * ); 
2069 
2070 c_ulong              HPALETTE_UserSize(     c_ulong *, c_ulong            , HPALETTE * ); 
2071 byte *  HPALETTE_UserMarshal(  c_ulong *, byte *, HPALETTE * ); 
2072 byte *  HPALETTE_UserUnmarshal(c_ulong *, byte *, HPALETTE * ); 
2073 void                       HPALETTE_UserFree(     c_ulong *, HPALETTE * ); 
2074 
2075 c_ulong              LPSAFEARRAY_UserSize(     c_ulong *, c_ulong            , LPSAFEARRAY * ); 
2076 byte *  LPSAFEARRAY_UserMarshal(  c_ulong *, byte *, LPSAFEARRAY * ); 
2077 byte *  LPSAFEARRAY_UserUnmarshal(c_ulong *, byte *, LPSAFEARRAY * ); 
2078 void                       LPSAFEARRAY_UserFree(     c_ulong *, LPSAFEARRAY * ); 
2079 
2080 c_ulong              WICInProcPointer_UserSize(     c_ulong *, c_ulong            , WICInProcPointer * ); 
2081 byte *  WICInProcPointer_UserMarshal(  c_ulong *, byte *, WICInProcPointer * ); 
2082 byte *  WICInProcPointer_UserUnmarshal(c_ulong *, byte *, WICInProcPointer * ); 
2083 void                       WICInProcPointer_UserFree(     c_ulong *, WICInProcPointer * ); 
2084 
2085 /* [local] */ HRESULT IWICBitmapCodecProgressNotification_RegisterProgressNotification_Proxy( 
2086     IWICBitmapCodecProgressNotification This,
2087     /* [annotation][unique][in] */ 
2088     PFNProgressNotification pfnProgressNotification,
2089     /* [annotation][unique][in] */ 
2090     LPVOID pvData,
2091     /* [in] */ DWORD dwProgressFlags);
2092 
2093 
2094 /* [call_as] */ HRESULT IWICBitmapCodecProgressNotification_RegisterProgressNotification_Stub( 
2095     IWICBitmapCodecProgressNotification This,
2096     /* [unique][in] */ IWICProgressCallback pICallback,
2097     /* [in] */ DWORD dwProgressFlags);
2098 
2099 /* [local] */ HRESULT IWICBitmapDecoderInfo_GetPatterns_Proxy( 
2100     IWICBitmapDecoderInfo This,
2101     /* [in] */ UINT cbSizePatterns,
2102     /* [annotation][unique][size_is][out] */ 
2103     WICBitmapPattern* pPatterns,
2104     /* [annotation][unique][out] */ 
2105     UINT* pcPatterns,
2106     /* [annotation][out] */ 
2107     UINT* pcbPatternsActual);
2108 
2109 
2110 /* [call_as] */ HRESULT IWICBitmapDecoderInfo_GetPatterns_Stub( 
2111     IWICBitmapDecoderInfo This,
2112     /* [size_is][size_is][out] */ WICBitmapPattern** ppPatterns,
2113     /* [out] */ UINT* pcPatterns);
2114 
2115 /* [local] */ HRESULT IWICDevelopRaw_QueryRawCapabilitiesInfo_Proxy( 
2116     IWICDevelopRaw This,
2117     /* [out][in] */ WICRawCapabilitiesInfo* pInfo);
2118 
2119 
2120 /* [call_as] */ HRESULT IWICDevelopRaw_QueryRawCapabilitiesInfo_Stub( 
2121     IWICDevelopRaw This,
2122     /* [out][in] */ WICRawCapabilitiesInfo* pInfo);
2123 
2124 /* [local] */ HRESULT IWICDevelopRaw_SetToneCurve_Proxy( 
2125     IWICDevelopRaw This,
2126     /* [in] */ UINT cbToneCurveSize,
2127     /* [annotation][in] */ 
2128     const(WICRawToneCurve)* pToneCurve);
2129 
2130 
2131 /* [call_as] */ HRESULT IWICDevelopRaw_SetToneCurve_Stub( 
2132     IWICDevelopRaw This,
2133     /* [in] */ UINT cPoints,
2134     /* [size_is][in] */ const(WICRawToneCurvePoint)* aPoints);
2135 
2136 /* [local] */ HRESULT IWICDevelopRaw_GetToneCurve_Proxy( 
2137     IWICDevelopRaw This,
2138     /* [in] */ UINT cbToneCurveBufferSize,
2139     /* [annotation][unique][out] */ 
2140     WICRawToneCurve* pToneCurve,
2141     /* [annotation][unique][out] */ 
2142     UINT* pcbActualToneCurveBufferSize);
2143 
2144 
2145 /* [call_as] */ HRESULT IWICDevelopRaw_GetToneCurve_Stub( 
2146     IWICDevelopRaw This,
2147     /* [out] */ UINT* pcPoints,
2148     /* [size_is][size_is][out] */ WICRawToneCurvePoint** paPoints);
2149 }