1/* 2 * Copyright 2009 Vincent Povirk for CodeWeavers 3 * 4 * This library is free software; you can redistribute it and/or 5 * modify it under the terms of the GNU Lesser General Public 6 * License as published by the Free Software Foundation; either 7 * version 2.1 of the License, or (at your option) any later version. 8 * 9 * This library is distributed in the hope that it will be useful, 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 12 * Lesser General Public License for more details. 13 * 14 * You should have received a copy of the GNU Lesser General Public 15 * License along with this library; if not, write to the Free Software 16 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA 17 */ 18 19import "wtypes.idl"; 20import "propidl.idl"; 21import "ocidl.idl"; 22 23cpp_quote("#define WINCODEC_SDK_VERSION 0x0236") 24 25#define CODEC_FORCE_DWORD 0x7fffffff 26 27typedef enum WICDecodeOptions { 28 WICDecodeMetadataCacheOnDemand = 0x00000000, 29 WICDecodeMetadataCacheOnLoad = 0x00000001, 30 WICMETADATACACHEOPTION_FORCE_DWORD = CODEC_FORCE_DWORD 31} WICDecodeOptions; 32 33typedef enum WICBitmapCreateCacheOption { 34 WICBitmapNoCache = 0x00000000, 35 WICBitmapCacheOnDemand = 0x00000001, 36 WICBitmapCacheOnLoad = 0x00000002, 37 WICBITMAPCREATECACHEOPTION_FORCE_DWORD = CODEC_FORCE_DWORD 38} WICBitmapCreateCacheOption; 39 40typedef enum WICBitmapAlphaChannelOption { 41 WICBitmapUseAlpha = 0x00000000, 42 WICBitmapUsePremultipliedAlpha = 0x00000001, 43 WICBitmapIgnoreAlpha = 0x00000002, 44 WICBITMAPALPHACHANNELOPTIONS_FORCE_DWORD = CODEC_FORCE_DWORD 45} WICBitmapAlphaChannelOption; 46 47typedef enum WICBitmapDecoderCapabilities { 48 WICBitmapDecoderCapabilitySameEncoder = 0x00000001, 49 WICBitmapDecoderCapabilityCanDecodeAllImages = 0x00000002, 50 WICBitmapDecoderCapabilityCanDecodeSomeImages = 0x00000004, 51 WICBitmapDecoderCapabilityCanEnumerateMetadata = 0x00000008, 52 WICBitmapDecoderCapabilityCanDecodeThumbnail = 0x00000010, 53} WICBitmapDecoderCapabilities; 54 55typedef enum WICBitmapDitherType { 56 WICBitmapDitherTypeNone = 0x00000000, 57 WICBitmapDitherTypeSolid = 0x00000000, 58 WICBitmapDitherTypeOrdered4x4 = 0x00000001, 59 WICBitmapDitherTypeOrdered8x8 = 0x00000002, 60 WICBitmapDitherTypeOrdered16x16 = 0x00000003, 61 WICBitmapDitherTypeSpiral4x4 = 0x00000004, 62 WICBitmapDitherTypeSpiral8x8 = 0x00000005, 63 WICBitmapDitherTypeDualSpiral4x4 = 0x00000006, 64 WICBitmapDitherTypeDualSpiral8x8 = 0x00000007, 65 WICBitmapDitherTypeErrorDiffusion = 0x00000008, 66 WICBITMAPDITHERTYPE_FORCE_DWORD = CODEC_FORCE_DWORD 67} WICBitmapDitherType; 68 69typedef enum WICBitmapEncoderCacheOption { 70 WICBitmapEncoderCacheInMemory = 0x00000000, 71 WICBitmapEncoderCacheTempFile = 0x00000001, 72 WICBitmapEncoderNoCache = 0x00000002, 73 WICBITMAPENCODERCACHEOPTION_FORCE_DWORD = CODEC_FORCE_DWORD 74} WICBitmapEncoderCacheOption; 75 76typedef enum WICBitmapInterpolationMode { 77 WICBitmapInterpolationModeNearestNeighbor = 0x00000000, 78 WICBitmapInterpolationModeLinear = 0x00000001, 79 WICBitmapInterpolationModeCubic = 0x00000002, 80 WICBitmapInterpolationModeFant = 0x00000003, 81 WICBITMAPINTERPOLATIONMODE_FORCE_DWORD = CODEC_FORCE_DWORD 82} WICBitmapInterpolationMode; 83 84typedef enum WICBitmapLockFlags { 85 WICBitmapLockRead = 0x00000001, 86 WICBitmapLockWrite = 0x00000002, 87 WICBITMAPLOCKFLAGS_FORCE_DWORD = CODEC_FORCE_DWORD 88} WICBitmapLockFlags; 89 90typedef enum WICBitmapPaletteType { 91 WICBitmapPaletteTypeCustom = 0x00000000, 92 WICBitmapPaletteTypeMedianCut = 0x00000001, 93 WICBitmapPaletteTypeFixedBW = 0x00000002, 94 WICBitmapPaletteTypeFixedHalftone8 = 0x00000003, 95 WICBitmapPaletteTypeFixedHalftone27 = 0x00000004, 96 WICBitmapPaletteTypeFixedHalftone64 = 0x00000005, 97 WICBitmapPaletteTypeFixedHalftone125 = 0x00000006, 98 WICBitmapPaletteTypeFixedHalftone216 = 0x00000007, 99 WICBitmapPaletteTypeFixedWebPalette = WICBitmapPaletteTypeFixedHalftone216, 100 WICBitmapPaletteTypeFixedHalftone252 = 0x00000008, 101 WICBitmapPaletteTypeFixedHalftone256 = 0x00000009, 102 WICBitmapPaletteTypeFixedGray4 = 0x0000000A, 103 WICBitmapPaletteTypeFixedGray16 = 0x0000000B, 104 WICBitmapPaletteTypeFixedGray256 = 0x0000000C, 105 WICBITMAPPALETTETYPE_FORCE_DWORD = CODEC_FORCE_DWORD 106} WICBitmapPaletteType; 107 108typedef enum WICBitmapTransformOptions { 109 WICBitmapTransformRotate0 = 0x00000000, 110 WICBitmapTransformRotate90 = 0x00000001, 111 WICBitmapTransformRotate180 = 0x00000002, 112 WICBitmapTransformRotate270 = 0x00000003, 113 WICBitmapTransformFlipHorizontal = 0x00000008, 114 WICBitmapTransformFlipVertical = 0x00000010, 115 WICBITMAPTRANSFORMOPTIONS_FORCE_DWORD = CODEC_FORCE_DWORD 116} WICBitmapTransformOptions; 117 118typedef enum WICColorContextType { 119 WICColorContextUninitialized = 0x00000000, 120 WICColorContextProfile = 0x00000001, 121 WICColorContextExifColorSpace = 0x00000002 122} WICColorContextType; 123 124typedef enum WICComponentType { 125 WICDecoder = 0x00000001, 126 WICEncoder = 0x00000002, 127 WICPixelFormatConverter = 0x00000004, 128 WICMetadataReader = 0x00000008, 129 WICMetadataWriter = 0x00000010, 130 WICPixelFormat = 0x00000020, 131 WICCOMPONENTTYPE_FORCE_DWORD = CODEC_FORCE_DWORD 132} WICComponentType; 133 134typedef enum WICComponentSigning { 135 WICComponentSigned = 0x00000001, 136 WICComponentUnsigned = 0x00000002, 137 WICComponentSafe = 0x00000004, 138 WICComponentDisabled = 0x80000000 139} WICComponentSigning; 140 141typedef enum WICComponentEnumerateOptions { 142 WICComponentEnumerateDefault = 0x00000000, 143 WICComponentEnumerateRefresh = 0x00000001, 144 WICComponentEnumerateBuiltInOnly = 0x20000000, 145 WICComponentEnumerateUnsigned = 0x40000000, 146 WICComponentEnumerateDisabled = 0x80000000 147} WICComponentEnumerateOptions; 148 149typedef enum WICJpegYCrCbSubsamplingOption { 150 WICJpegYCrCbSubsamplingDefault = 0x00000000, 151 WICJpegYCrCbSubsampling420 = 0x00000001, 152 WICJpegYCrCbSubsampling422 = 0x00000002, 153 WICJpegYCrCbSubsampling444 = 0x00000003, 154 WICJpegYCrCbSubsampling440 = 0x00000004 155} WICJpegYCrCbSubsamplingOption; 156 157typedef enum WICPixelFormatNumericRepresentation { 158 WICPixelFormatNumericRepresentationUnspecified = 0x00000000, 159 WICPixelFormatNumericRepresentationIndexed = 0x00000001, 160 WICPixelFormatNumericRepresentationUnsignedInteger = 0x00000002, 161 WICPixelFormatNumericRepresentationSignedInteger = 0x00000003, 162 WICPixelFormatNumericRepresentationFixed = 0x00000004, 163 WICPixelFormatNumericRepresentationFloat = 0x00000005, 164 WICPIXELFORMATNUMERICREPRESENTATION_FORCE_DWORD = CODEC_FORCE_DWORD 165} WICPixelFormatNumericRepresentation; 166 167typedef enum WICTiffCompressionOption { 168 WICTiffCompressionDontCare = 0x00000000, 169 WICTiffCompressionNone = 0x00000001, 170 WICTiffCompressionCCITT3 = 0x00000002, 171 WICTiffCompressionCCITT4 = 0x00000003, 172 WICTiffCompressionLZW = 0x00000004, 173 WICTiffCompressionRLE = 0x00000005, 174 WICTiffCompressionZIP = 0x00000006, 175 WICTiffCompressionLZWHDifferencing = 0x00000007, 176 WICTIFFCOMPRESSIONOPTION_FORCE_DWORD = CODEC_FORCE_DWORD 177} WICTiffCompressionOption; 178 179typedef enum WICPngFilterOption { 180 WICPngFilterUnspecified = 0, 181 WICPngFilterNone = 1, 182 WICPngFilterSub = 2, 183 WICPngFilterUp = 3, 184 WICPngFilterAverage = 4, 185 WICPngFilterPaeth = 5, 186 WICPngFilterAdaptive = 6, 187 WICPNFFILTEROPTION_FORCE_DWORD = CODEC_FORCE_DWORD 188} WICPngFilterOption; 189 190typedef enum WICSectionAccessLevel { 191 WICSectionAccessLevelRead = 0x00000001, 192 WICSectionAccessLevelReadWrite = 0x00000003, 193 WICSectionAccessLevel_FORCE_DWORD = CODEC_FORCE_DWORD 194} WICSectionAccessLevel; 195 196typedef GUID WICPixelFormatGUID; 197typedef REFGUID REFWICPixelFormatGUID; 198 199cpp_quote("DEFINE_GUID(GUID_WICPixelFormatDontCare, 0x6fddc324,0x4e03,0x4bfe,0xb1,0x85,0x3d,0x77,0x76,0x8d,0xc9,0x00);") 200cpp_quote("#define GUID_WICPixelFormatUndefined GUID_WICPixelFormatDontCare") 201 202cpp_quote("DEFINE_GUID(GUID_WICPixelFormat1bppIndexed, 0x6fddc324,0x4e03,0x4bfe,0xb1,0x85,0x3d,0x77,0x76,0x8d,0xc9,0x01);") 203cpp_quote("DEFINE_GUID(GUID_WICPixelFormat2bppIndexed, 0x6fddc324,0x4e03,0x4bfe,0xb1,0x85,0x3d,0x77,0x76,0x8d,0xc9,0x02);") 204cpp_quote("DEFINE_GUID(GUID_WICPixelFormat4bppIndexed, 0x6fddc324,0x4e03,0x4bfe,0xb1,0x85,0x3d,0x77,0x76,0x8d,0xc9,0x03);") 205cpp_quote("DEFINE_GUID(GUID_WICPixelFormat8bppIndexed, 0x6fddc324,0x4e03,0x4bfe,0xb1,0x85,0x3d,0x77,0x76,0x8d,0xc9,0x04);") 206 207cpp_quote("DEFINE_GUID(GUID_WICPixelFormatBlackWhite, 0x6fddc324,0x4e03,0x4bfe,0xb1,0x85,0x3d,0x77,0x76,0x8d,0xc9,0x05);") 208cpp_quote("DEFINE_GUID(GUID_WICPixelFormat2bppGray, 0x6fddc324,0x4e03,0x4bfe,0xb1,0x85,0x3d,0x77,0x76,0x8d,0xc9,0x06);") 209cpp_quote("DEFINE_GUID(GUID_WICPixelFormat4bppGray, 0x6fddc324,0x4e03,0x4bfe,0xb1,0x85,0x3d,0x77,0x76,0x8d,0xc9,0x07);") 210cpp_quote("DEFINE_GUID(GUID_WICPixelFormat8bppGray, 0x6fddc324,0x4e03,0x4bfe,0xb1,0x85,0x3d,0x77,0x76,0x8d,0xc9,0x08);") 211cpp_quote("DEFINE_GUID(GUID_WICPixelFormat16bppGray, 0x6fddc324,0x4e03,0x4bfe,0xb1,0x85,0x3d,0x77,0x76,0x8d,0xc9,0x0b);") 212 213cpp_quote("DEFINE_GUID(GUID_WICPixelFormat8bppAlpha, 0xe6cd0116,0xeeba,0x4161,0xaa,0x85,0x27,0xdd,0x9f,0xb3,0xa8,0x95);") 214 215cpp_quote("DEFINE_GUID(GUID_WICPixelFormat16bppBGR555, 0x6fddc324,0x4e03,0x4bfe,0xb1,0x85,0x3d,0x77,0x76,0x8d,0xc9,0x09);") 216cpp_quote("DEFINE_GUID(GUID_WICPixelFormat16bppBGR565, 0x6fddc324,0x4e03,0x4bfe,0xb1,0x85,0x3d,0x77,0x76,0x8d,0xc9,0x0a);") 217cpp_quote("DEFINE_GUID(GUID_WICPixelFormat16bppBGRA5551, 0x05ec7c2b,0xf1e6,0x4961,0xad,0x46,0xe1,0xcc,0x81,0x0a,0x87,0xd2);") 218cpp_quote("DEFINE_GUID(GUID_WICPixelFormat24bppBGR, 0x6fddc324,0x4e03,0x4bfe,0xb1,0x85,0x3d,0x77,0x76,0x8d,0xc9,0x0c);") 219cpp_quote("DEFINE_GUID(GUID_WICPixelFormat24bppRGB, 0x6fddc324,0x4e03,0x4bfe,0xb1,0x85,0x3d,0x77,0x76,0x8d,0xc9,0x0d);") 220cpp_quote("DEFINE_GUID(GUID_WICPixelFormat32bppBGR, 0x6fddc324,0x4e03,0x4bfe,0xb1,0x85,0x3d,0x77,0x76,0x8d,0xc9,0x0e);") 221cpp_quote("DEFINE_GUID(GUID_WICPixelFormat32bppBGRA, 0x6fddc324,0x4e03,0x4bfe,0xb1,0x85,0x3d,0x77,0x76,0x8d,0xc9,0x0f);") 222cpp_quote("DEFINE_GUID(GUID_WICPixelFormat32bppPBGRA, 0x6fddc324,0x4e03,0x4bfe,0xb1,0x85,0x3d,0x77,0x76,0x8d,0xc9,0x10);") 223cpp_quote("DEFINE_GUID(GUID_WICPixelFormat32bppRGB, 0xd98c6b95,0x3efe,0x47d6,0xbb,0x25,0xeb,0x17,0x48,0xab,0x0c,0xf1);") 224cpp_quote("DEFINE_GUID(GUID_WICPixelFormat32bppRGBA, 0xf5c7ad2d,0x6a8d,0x43dd,0xa7,0xa8,0xa2,0x99,0x35,0x26,0x1a,0xe9);") 225cpp_quote("DEFINE_GUID(GUID_WICPixelFormat32bppPRGBA, 0x3cc4a650,0xa527,0x4d37,0xa9,0x16,0x31,0x42,0xc7,0xeb,0xed,0xba);") 226cpp_quote("DEFINE_GUID(GUID_WICPixelFormat32bppGrayFloat, 0x6fddc324,0x4e03,0x4bfe,0xb1,0x85,0x3d,0x77,0x76,0x8d,0xc9,0x11);") 227 228cpp_quote("DEFINE_GUID(GUID_WICPixelFormat48bppRGB, 0x6fddc324,0x4e03,0x4bfe,0xb1,0x85,0x3d,0x77,0x76,0x8d,0xc9,0x15);") 229cpp_quote("DEFINE_GUID(GUID_WICPixelFormat48bppBGR, 0xe605a384,0xb468,0x46ce,0xbb,0x2e,0x36,0xf1,0x80,0xe6,0x43,0x13);") 230cpp_quote("DEFINE_GUID(GUID_WICPixelFormat64bppRGBA, 0x6fddc324,0x4e03,0x4bfe,0xb1,0x85,0x3d,0x77,0x76,0x8d,0xc9,0x16);") 231cpp_quote("DEFINE_GUID(GUID_WICPixelFormat64bppBGRA, 0x1562ff7c,0xd352,0x46f9,0x97,0x9e,0x42,0x97,0x6b,0x79,0x22,0x46);") 232cpp_quote("DEFINE_GUID(GUID_WICPixelFormat64bppPRGBA, 0x6fddc324,0x4e03,0x4bfe,0xb1,0x85,0x3d,0x77,0x76,0x8d,0xc9,0x17);") 233cpp_quote("DEFINE_GUID(GUID_WICPixelFormat64bppPBGRA, 0x8c518e8e,0xa4ec,0x468b,0xae,0x70,0xc9,0xa3,0x5a,0x9c,0x55,0x30);") 234 235cpp_quote("DEFINE_GUID(GUID_WICPixelFormat16bppGrayFixedPoint, 0x6fddc324,0x4e03,0x4bfe,0xb1,0x85,0x3d,0x77,0x76,0x8d,0xc9,0x13);") 236cpp_quote("DEFINE_GUID(GUID_WICPixelFormat32bppBGR101010, 0x6fddc324,0x4e03,0x4bfe,0xb1,0x85,0x3d,0x77,0x76,0x8d,0xc9,0x14);") 237cpp_quote("DEFINE_GUID(GUID_WICPixelFormat48bppRGBFixedPoint, 0x6fddc324,0x4e03,0x4bfe,0xb1,0x85,0x3d,0x77,0x76,0x8d,0xc9,0x12);") 238cpp_quote("DEFINE_GUID(GUID_WICPixelFormat48bppBGRFixedPoint, 0x49ca140e,0xcab6,0x493b,0x9d,0xdf,0x60,0x18,0x7c,0x37,0x53,0x2a);") 239cpp_quote("DEFINE_GUID(GUID_WICPixelFormat96bppRGBFixedPoint, 0x6fddc324,0x4e03,0x4bfe,0xb1,0x85,0x3d,0x77,0x76,0x8d,0xc9,0x18);") 240cpp_quote("DEFINE_GUID(GUID_WICPixelFormat128bppRGBAFloat, 0x6fddc324,0x4e03,0x4bfe,0xb1,0x85,0x3d,0x77,0x76,0x8d,0xc9,0x19);") 241cpp_quote("DEFINE_GUID(GUID_WICPixelFormat128bppPRGBAFloat, 0x6fddc324,0x4e03,0x4bfe,0xb1,0x85,0x3d,0x77,0x76,0x8d,0xc9,0x1a);") 242cpp_quote("DEFINE_GUID(GUID_WICPixelFormat128bppRGBFloat, 0x6fddc324,0x4e03,0x4bfe,0xb1,0x85,0x3d,0x77,0x76,0x8d,0xc9,0x1b);") 243 244cpp_quote("DEFINE_GUID(GUID_WICPixelFormat32bppCMYK, 0x6fddc324,0x4e03,0x4bfe,0xb1,0x85,0x3d,0x77,0x76,0x8d,0xc9,0x1c);") 245 246cpp_quote("DEFINE_GUID(GUID_WICPixelFormat64bppRGBAFixedPoint, 0x6fddc324,0x4e03,0x4bfe,0xb1,0x85,0x3d,0x77,0x76,0x8d,0xc9,0x1d);") 247cpp_quote("DEFINE_GUID(GUID_WICPixelFormat64bppBGRAFixedPoint, 0x356de33c,0x54d2,0x4a23,0xbb,0x4,0x9b,0x7b,0xf9,0xb1,0xd4,0x2d);") 248cpp_quote("DEFINE_GUID(GUID_WICPixelFormat64bppRGBFixedPoint, 0x6fddc324,0x4e03,0x4bfe,0xb1,0x85,0x3d,0x77,0x76,0x8d,0xc9,0x40);") 249cpp_quote("DEFINE_GUID(GUID_WICPixelFormat128bppRGBAFixedPoint, 0x6fddc324,0x4e03,0x4bfe,0xb1,0x85,0x3d,0x77,0x76,0x8d,0xc9,0x1e);") 250cpp_quote("DEFINE_GUID(GUID_WICPixelFormat128bppRGBFixedPoint, 0x6fddc324,0x4e03,0x4bfe,0xb1,0x85,0x3d,0x77,0x76,0x8d,0xc9,0x41);") 251 252cpp_quote("DEFINE_GUID(GUID_WICPixelFormat64bppRGBAHalf, 0x6fddc324,0x4e03,0x4bfe,0xb1,0x85,0x3d,0x77,0x76,0x8d,0xc9,0x3a);") 253cpp_quote("DEFINE_GUID(GUID_WICPixelFormat64bppRGBHalf, 0x6fddc324,0x4e03,0x4bfe,0xb1,0x85,0x3d,0x77,0x76,0x8d,0xc9,0x42);") 254cpp_quote("DEFINE_GUID(GUID_WICPixelFormat48bppRGBHalf, 0x6fddc324,0x4e03,0x4bfe,0xb1,0x85,0x3d,0x77,0x76,0x8d,0xc9,0x3b);") 255 256cpp_quote("DEFINE_GUID(GUID_WICPixelFormat32bppRGBE, 0x6fddc324,0x4e03,0x4bfe,0xb1,0x85,0x3d,0x77,0x76,0x8d,0xc9,0x3d);") 257 258cpp_quote("DEFINE_GUID(GUID_WICPixelFormat16bppGrayHalf, 0x6fddc324,0x4e03,0x4bfe,0xb1,0x85,0x3d,0x77,0x76,0x8d,0xc9,0x3e);") 259cpp_quote("DEFINE_GUID(GUID_WICPixelFormat32bppGrayFixedPoint, 0x6fddc324,0x4e03,0x4bfe,0xb1,0x85,0x3d,0x77,0x76,0x8d,0xc9,0x3f);") 260 261cpp_quote("DEFINE_GUID(GUID_WICPixelFormat32bppRGBA1010102, 0x25238d72,0xfcf9,0x4522,0xb5,0x14,0x55,0x78,0xe5,0xad,0x55,0xe0);") 262cpp_quote("DEFINE_GUID(GUID_WICPixelFormat32bppRGBA1010102XR, 0x00de6b9a,0xc101,0x434b,0xb5,0x02,0xd0,0x16,0x5e,0xe1,0x12,0x2c);") 263 264cpp_quote("DEFINE_GUID(GUID_WICPixelFormat64bppCMYK, 0x6fddc324,0x4e03,0x4bfe,0xb1,0x85,0x3d,0x77,0x76,0x8d,0xc9,0x1f);") 265 266cpp_quote("DEFINE_GUID(GUID_WICPixelFormat24bpp3Channels, 0x6fddc324,0x4e03,0x4bfe,0xb1,0x85,0x3d,0x77,0x76,0x8d,0xc9,0x20);") 267cpp_quote("DEFINE_GUID(GUID_WICPixelFormat32bpp4Channels, 0x6fddc324,0x4e03,0x4bfe,0xb1,0x85,0x3d,0x77,0x76,0x8d,0xc9,0x21);") 268cpp_quote("DEFINE_GUID(GUID_WICPixelFormat40bpp5Channels, 0x6fddc324,0x4e03,0x4bfe,0xb1,0x85,0x3d,0x77,0x76,0x8d,0xc9,0x22);") 269cpp_quote("DEFINE_GUID(GUID_WICPixelFormat48bpp6Channels, 0x6fddc324,0x4e03,0x4bfe,0xb1,0x85,0x3d,0x77,0x76,0x8d,0xc9,0x23);") 270cpp_quote("DEFINE_GUID(GUID_WICPixelFormat56bpp7Channels, 0x6fddc324,0x4e03,0x4bfe,0xb1,0x85,0x3d,0x77,0x76,0x8d,0xc9,0x24);") 271cpp_quote("DEFINE_GUID(GUID_WICPixelFormat64bpp8Channels, 0x6fddc324,0x4e03,0x4bfe,0xb1,0x85,0x3d,0x77,0x76,0x8d,0xc9,0x25);") 272 273cpp_quote("DEFINE_GUID(GUID_WICPixelFormat48bpp3Channels, 0x6fddc324,0x4e03,0x4bfe,0xb1,0x85,0x3d,0x77,0x76,0x8d,0xc9,0x26);") 274cpp_quote("DEFINE_GUID(GUID_WICPixelFormat64bpp4Channels, 0x6fddc324,0x4e03,0x4bfe,0xb1,0x85,0x3d,0x77,0x76,0x8d,0xc9,0x27);") 275cpp_quote("DEFINE_GUID(GUID_WICPixelFormat80bpp5Channels, 0x6fddc324,0x4e03,0x4bfe,0xb1,0x85,0x3d,0x77,0x76,0x8d,0xc9,0x28);") 276cpp_quote("DEFINE_GUID(GUID_WICPixelFormat96bpp6Channels, 0x6fddc324,0x4e03,0x4bfe,0xb1,0x85,0x3d,0x77,0x76,0x8d,0xc9,0x29);") 277cpp_quote("DEFINE_GUID(GUID_WICPixelFormat112bpp7Channels, 0x6fddc324,0x4e03,0x4bfe,0xb1,0x85,0x3d,0x77,0x76,0x8d,0xc9,0x2a);") 278cpp_quote("DEFINE_GUID(GUID_WICPixelFormat128bpp8Channels, 0x6fddc324,0x4e03,0x4bfe,0xb1,0x85,0x3d,0x77,0x76,0x8d,0xc9,0x2b);") 279 280cpp_quote("DEFINE_GUID(GUID_WICPixelFormat40bppCMYKAlpha, 0x6fddc324,0x4e03,0x4bfe,0xb1,0x85,0x3d,0x77,0x76,0x8d,0xc9,0x2c);") 281cpp_quote("DEFINE_GUID(GUID_WICPixelFormat80bppCMYKAlpha, 0x6fddc324,0x4e03,0x4bfe,0xb1,0x85,0x3d,0x77,0x76,0x8d,0xc9,0x2d);") 282 283cpp_quote("DEFINE_GUID(GUID_WICPixelFormat32bpp3ChannelsAlpha, 0x6fddc324,0x4e03,0x4bfe,0xb1,0x85,0x3d,0x77,0x76,0x8d,0xc9,0x2e);") 284cpp_quote("DEFINE_GUID(GUID_WICPixelFormat40bpp4ChannelsAlpha, 0x6fddc324,0x4e03,0x4bfe,0xb1,0x85,0x3d,0x77,0x76,0x8d,0xc9,0x2f);") 285cpp_quote("DEFINE_GUID(GUID_WICPixelFormat48bpp5ChannelsAlpha, 0x6fddc324,0x4e03,0x4bfe,0xb1,0x85,0x3d,0x77,0x76,0x8d,0xc9,0x30);") 286cpp_quote("DEFINE_GUID(GUID_WICPixelFormat56bpp6ChannelsAlpha, 0x6fddc324,0x4e03,0x4bfe,0xb1,0x85,0x3d,0x77,0x76,0x8d,0xc9,0x31);") 287cpp_quote("DEFINE_GUID(GUID_WICPixelFormat64bpp7ChannelsAlpha, 0x6fddc324,0x4e03,0x4bfe,0xb1,0x85,0x3d,0x77,0x76,0x8d,0xc9,0x32);") 288cpp_quote("DEFINE_GUID(GUID_WICPixelFormat72bpp8ChannelsAlpha, 0x6fddc324,0x4e03,0x4bfe,0xb1,0x85,0x3d,0x77,0x76,0x8d,0xc9,0x33);") 289 290cpp_quote("DEFINE_GUID(GUID_WICPixelFormat64bpp3ChannelsAlpha, 0x6fddc324,0x4e03,0x4bfe,0xb1,0x85,0x3d,0x77,0x76,0x8d,0xc9,0x34);") 291cpp_quote("DEFINE_GUID(GUID_WICPixelFormat80bpp4ChannelsAlpha, 0x6fddc324,0x4e03,0x4bfe,0xb1,0x85,0x3d,0x77,0x76,0x8d,0xc9,0x35);") 292cpp_quote("DEFINE_GUID(GUID_WICPixelFormat96bpp5ChannelsAlpha, 0x6fddc324,0x4e03,0x4bfe,0xb1,0x85,0x3d,0x77,0x76,0x8d,0xc9,0x36);") 293cpp_quote("DEFINE_GUID(GUID_WICPixelFormat112bpp6ChannelsAlpha, 0x6fddc324,0x4e03,0x4bfe,0xb1,0x85,0x3d,0x77,0x76,0x8d,0xc9,0x37);") 294cpp_quote("DEFINE_GUID(GUID_WICPixelFormat128bpp7ChannelsAlpha, 0x6fddc324,0x4e03,0x4bfe,0xb1,0x85,0x3d,0x77,0x76,0x8d,0xc9,0x38);") 295cpp_quote("DEFINE_GUID(GUID_WICPixelFormat144bpp8ChannelsAlpha, 0x6fddc324,0x4e03,0x4bfe,0xb1,0x85,0x3d,0x77,0x76,0x8d,0xc9,0x39);") 296 297typedef struct WICRect { 298 INT X; 299 INT Y; 300 INT Width; 301 INT Height; 302} WICRect; 303 304typedef struct WICBitmapPattern { 305 ULARGE_INTEGER Position; 306 ULONG Length; 307 BYTE *Pattern; 308 BYTE *Mask; 309 BOOL EndOfStream; 310} WICBitmapPattern; 311 312typedef UINT32 WICColor; 313 314interface IWICPalette; 315 316[ 317 object, 318 uuid(3c613a02-34b2-44ea-9a7c-45aea9c6fd6d) 319] 320interface IWICColorContext : IUnknown 321{ 322 HRESULT InitializeFromFilename( 323 [in] LPCWSTR wzFilename); 324 325 HRESULT InitializeFromMemory( 326 [in, size_is(cbBufferSize)] const BYTE *pbBuffer, 327 [in] UINT cbBufferSize); 328 329 HRESULT InitializeFromExifColorSpace( 330 [in] UINT value); 331 332 HRESULT GetType( 333 [out] WICColorContextType *pType); 334 335 HRESULT GetProfileBytes( 336 [in] UINT cbBuffer, 337 [in, out, unique, size_is(cbBuffer)] BYTE *pbBuffer, 338 [out] UINT *pcbActual); 339 340 HRESULT GetExifColorSpace( 341 [out] UINT *pValue); 342} 343 344[ 345 object, 346 uuid(00000120-a8f2-4877-ba0a-fd2b6645fb94) 347] 348interface IWICBitmapSource : IUnknown 349{ 350 HRESULT GetSize( 351 [out] UINT *puiWidth, 352 [out] UINT *puiHeight); 353 354 HRESULT GetPixelFormat( 355 [out] WICPixelFormatGUID *pPixelFormat); 356 357 HRESULT GetResolution( 358 [out] double *pDpiX, 359 [out] double *pDpiY); 360 361 HRESULT CopyPalette( 362 [in] IWICPalette *pIPalette); 363 364 HRESULT CopyPixels( 365 [in] const WICRect *prc, 366 [in] UINT cbStride, 367 [in] UINT cbBufferSize, 368 [out, size_is(cbBufferSize)] BYTE *pbBuffer); 369} 370 371[ 372 object, 373 uuid(00000123-a8f2-4877-ba0a-fd2b6645fb94) 374] 375interface IWICBitmapLock : IUnknown 376{ 377 HRESULT GetSize( 378 [out] UINT *pWidth, 379 [out] UINT *pHeight); 380 381 HRESULT GetStride( 382 [out] UINT *pcbStride); 383 384 HRESULT GetDataPointer( 385 [out] UINT *pcbBufferSize, 386 [out, size_is(,*pcbBufferSize)] BYTE **ppbData); 387 388 HRESULT GetPixelFormat( 389 [out] WICPixelFormatGUID *pPixelFormat); 390} 391 392[ 393 object, 394 uuid(5009834f-2d6a-41ce-9e1b-17c5aff7a782) 395] 396interface IWICBitmapFlipRotator : IWICBitmapSource 397{ 398 HRESULT Initialize( 399 [in] IWICBitmapSource *pISource, 400 [in] WICBitmapTransformOptions options); 401} 402 403[ 404 object, 405 uuid(00000121-a8f2-4877-ba0a-fd2b6645fb94) 406] 407interface IWICBitmap : IWICBitmapSource 408{ 409 HRESULT Lock( 410 [in] const WICRect *prcLock, 411 [in] DWORD flags, 412 [out] IWICBitmapLock **ppILock); 413 414 HRESULT SetPalette( 415 [in] IWICPalette *pIPalette); 416 417 HRESULT SetResolution( 418 [in] double dpiX, 419 [in] double dpiY); 420} 421 422[ 423 object, 424 uuid(00000040-a8f2-4877-ba0a-fd2b6645fb94) 425] 426interface IWICPalette : IUnknown 427{ 428 HRESULT InitializePredefined( 429 [in] WICBitmapPaletteType ePaletteType, 430 [in] BOOL fAddTransparentColor); 431 432 HRESULT InitializeCustom( 433 [in, size_is(colorCount)] WICColor *pColors, 434 [in] UINT colorCount); 435 436 HRESULT InitializeFromBitmap( 437 [in] IWICBitmapSource *pISurface, 438 [in] UINT colorCount, 439 [in] BOOL fAddTransparentColor); 440 441 HRESULT InitializeFromPalette( 442 [in] IWICPalette *pIPalette); 443 444 HRESULT GetType( 445 [out] WICBitmapPaletteType *pePaletteType); 446 447 HRESULT GetColorCount( 448 [out] UINT *pcCount); 449 450 HRESULT GetColors( 451 [in] UINT colorCount, 452 [out, size_is(colorCount)] WICColor *pColors, 453 [out] UINT *pcActualColors); 454 455 HRESULT IsBlackWhite( 456 [out] BOOL *pfIsBlackWhite); 457 458 HRESULT IsGrayscale( 459 [out] BOOL *pfIsGrayscale); 460 461 HRESULT HasAlpha( 462 [out] BOOL *pfHasAlpha); 463} 464 465[ 466 object, 467 uuid(23bc3f0a-698b-4357-886b-f24d50671334) 468] 469interface IWICComponentInfo : IUnknown 470{ 471 HRESULT GetComponentType( 472 [out] WICComponentType *pType); 473 474 HRESULT GetCLSID( 475 [out] CLSID *pclsid); 476 477 HRESULT GetSigningStatus( 478 [out] DWORD *pStatus); 479 480 HRESULT GetAuthor( 481 [in] UINT cchAuthor, 482 [in, out, unique, size_is(cchAuthor)] WCHAR *wzAuthor, 483 [out] UINT *pcchActual); 484 485 HRESULT GetVendorGUID( 486 [out] GUID *pguidVendor); 487 488 HRESULT GetVersion( 489 [in] UINT cchVersion, 490 [in, out, unique, size_is(cchVersion)] WCHAR *wzVersion, 491 [out] UINT *pcchActual); 492 493 HRESULT GetSpecVersion( 494 [in] UINT cchSpecVersion, 495 [in, out, unique, size_is(cchSpecVersion)] WCHAR *wzSpecVersion, 496 [out] UINT *pcchActual); 497 498 HRESULT GetFriendlyName( 499 [in] UINT cchFriendlyName, 500 [in, out, unique, size_is(cchFriendlyName)] WCHAR *wzFriendlyName, 501 [out] UINT *pcchActual); 502} 503 504[ 505 object, 506 uuid(30989668-e1c9-4597-b395-458eedb808df) 507] 508interface IWICMetadataQueryReader : IUnknown 509{ 510 HRESULT GetContainerFormat( 511 [out] GUID *pguidContainerFormat); 512 513 HRESULT GetLocation( 514 [in] UINT cchMaxLength, 515 [in, out, unique, size_is(cchMaxLength)] WCHAR *wzNamespace, 516 [out] UINT *pcchActualLength); 517 518 HRESULT GetMetadataByName( 519 [in] LPCWSTR wzName, 520 [in, out, unique] PROPVARIANT *pvarValue); 521 522 HRESULT GetEnumerator( 523 [out] IEnumString **ppIEnumString); 524} 525 526[ 527 object, 528 uuid(a721791a-0def-4d06-bd91-2118bf1db10b) 529] 530interface IWICMetadataQueryWriter : IWICMetadataQueryReader 531{ 532 HRESULT SetMetadataByName( 533 [in] LPCWSTR wzName, 534 [in] const PROPVARIANT *pvarValue); 535 536 HRESULT RemoveMetadataByName( 537 [in] LPCWSTR wzName); 538} 539 540[ 541 object, 542 uuid(3b16811b-6a43-4ec9-a813-3d930c13b940) 543] 544interface IWICBitmapFrameDecode : IWICBitmapSource 545{ 546 HRESULT GetMetadataQueryReader( 547 [out] IWICMetadataQueryReader **ppIMetadataQueryReader); 548 549 HRESULT GetColorContexts( 550 [in] UINT cCount, 551 [in, out, unique, size_is(cCount)] IWICColorContext **ppIColorContexts, 552 [out] UINT *pcActualCount); 553 554 HRESULT GetThumbnail( 555 [out] IWICBitmapSource **ppIThumbnail); 556} 557 558[ 559 object, 560 uuid(e8eda601-3d48-431a-ab44-69059be88bbe) 561] 562interface IWICPixelFormatInfo : IWICComponentInfo 563{ 564 HRESULT GetFormatGUID( 565 [out] GUID* pFormat); 566 567 HRESULT GetColorContext( 568 [out] IWICColorContext **ppIColorContext); 569 570 HRESULT GetBitsPerPixel( 571 [out] UINT *puiBitsPerPixel); 572 573 HRESULT GetChannelCount( 574 [out] UINT *puiChannelCount); 575 576 HRESULT GetChannelMask( 577 [in] UINT uiChannelIndex, 578 [in] UINT cbMaskBuffer, 579 [in, out, unique, size_is(cbMaskBuffer)] BYTE *pbMaskBuffer, 580 [out] UINT *pcbActual); 581} 582 583[ 584 object, 585 uuid(a9db33a2-af5f-43c7-b679-74f5984b5aa4) 586] 587interface IWICPixelFormatInfo2 : IWICPixelFormatInfo 588{ 589 HRESULT SupportsTransparency( 590 [out] BOOL *pfSupportsTransparency); 591 592 HRESULT GetNumericRepresentation( 593 [out] WICPixelFormatNumericRepresentation *pNumericRepresentation); 594} 595 596[ 597 object, 598 uuid(e87a44c4-b76e-4c47-8b09-298eb12a2714) 599] 600interface IWICBitmapCodecInfo : IWICComponentInfo 601{ 602 HRESULT GetContainerFormat( 603 [out] GUID *pguidContainerFormat); 604 605 HRESULT GetPixelFormats( 606 [in] UINT cFormats, 607 [in, out, unique, size_is(cFormats)] GUID *pguidPixelFormats, 608 [out] UINT *pcActual); 609 610 HRESULT GetColorManagementVersion( 611 [in] UINT cchColorManagementVersion, 612 [in, out, unique, size_is(cchColorManagementVersion)] WCHAR *wzColorManagementVersion, 613 [out] UINT *pcchActual); 614 615 HRESULT GetDeviceManufacturer( 616 [in] UINT cchDeviceManufacturer, 617 [in, out, unique, size_is(cchDeviceManufacturer)] WCHAR *wzDeviceManufacturer, 618 [out] UINT *pcchActual); 619 620 HRESULT GetDeviceModels( 621 [in] UINT cchDeviceModels, 622 [in, out, unique, size_is(cchDeviceModels)] WCHAR *wzDeviceModels, 623 [out] UINT *pcchActual); 624 625 HRESULT GetMimeTypes( 626 [in] UINT cchMimeTypes, 627 [in, out, unique, size_is(cchMimeTypes)] WCHAR *wzMimeTypes, 628 [out] UINT *pcchActual); 629 630 HRESULT GetFileExtensions( 631 [in] UINT cchFileExtensions, 632 [in, out, unique, size_is(cchFileExtensions)] WCHAR *wzFileExtensions, 633 [out] UINT *pcchActual); 634 635 HRESULT DoesSupportAnimation( 636 [out] BOOL *pfSupportAnimation); 637 638 HRESULT DoesSupportChromaKey( 639 [out] BOOL *pfSupportChromaKey); 640 641 HRESULT DoesSupportLossless( 642 [out] BOOL *pfSupportLossless); 643 644 HRESULT DoesSupportMultiframe( 645 [out] BOOL *pfSupportMultiframe); 646 647 HRESULT MatchesMimeType( 648 [in] LPCWSTR wzMimeType, 649 [out] BOOL *pfMatches); 650} 651 652interface IWICBitmapDecoder; 653 654[ 655 object, 656 uuid(d8cd007f-d08f-4191-9bfc-236ea7f0e4b5) 657] 658interface IWICBitmapDecoderInfo : IWICBitmapCodecInfo 659{ 660 [local] 661 HRESULT GetPatterns( 662 [in] UINT cbSizePatterns, 663 [in, out, unique] WICBitmapPattern *pPatterns, 664 [in, out, unique] UINT *pcPatterns, 665 [in, out, unique] UINT *pcbPatternsActual); 666 667 HRESULT MatchesPattern( 668 [in] IStream *pIStream, 669 [out] BOOL *pfMatches); 670 671 HRESULT CreateInstance( 672 [out] IWICBitmapDecoder **ppIBitmapDecoder); 673} 674 675[ 676 object, 677 uuid(9edde9e7-8dee-47ea-99df-e6faf2ed44bf) 678] 679interface IWICBitmapDecoder : IUnknown 680{ 681 HRESULT QueryCapability( 682 [in] IStream *pIStream, 683 [out] DWORD *pdwCapability); 684 685 HRESULT Initialize( 686 [in] IStream *pIStream, 687 [in] WICDecodeOptions cacheOptions); 688 689 HRESULT GetContainerFormat( 690 [out] GUID *pguidContainerFormat); 691 692 HRESULT GetDecoderInfo( 693 [out] IWICBitmapDecoderInfo **ppIDecoderInfo); 694 695 HRESULT CopyPalette( 696 [in] IWICPalette *pIPalette); 697 698 HRESULT GetMetadataQueryReader( 699 [out] IWICMetadataQueryReader **ppIMetadataQueryReader); 700 701 HRESULT GetPreview( 702 [out] IWICBitmapSource **ppIBitmapSource); 703 704 HRESULT GetColorContexts( 705 [in] UINT cCount, 706 [in, out, unique, size_is(cCount)] IWICColorContext **ppIColorContexts, 707 [out] UINT *pcActualCount); 708 709 HRESULT GetThumbnail( 710 [out] IWICBitmapSource **ppIThumbnail); 711 712 HRESULT GetFrameCount( 713 [out] UINT *pCount); 714 715 HRESULT GetFrame( 716 [in] UINT index, 717 [out] IWICBitmapFrameDecode **ppIBitmapFrame); 718} 719 720[ 721 object, 722 uuid(00000105-a8f2-4877-ba0a-fd2b6645fb94) 723] 724interface IWICBitmapFrameEncode : IUnknown 725{ 726 HRESULT Initialize( 727 [in, unique] IPropertyBag2 *pIEncoderOptions); 728 729 HRESULT SetSize( 730 [in] UINT uiWidth, 731 [in] UINT uiHeight); 732 733 HRESULT SetResolution( 734 [in] double dpiX, 735 [in] double dpiY); 736 737 HRESULT SetPixelFormat( 738 [in, out] WICPixelFormatGUID *pPixelFormat); 739 740 HRESULT SetColorContexts( 741 [in] UINT cCount, 742 [in, size_is(cCount)] IWICColorContext **ppIColorContext); 743 744 HRESULT SetPalette( 745 [in] IWICPalette *pIPalette); 746 747 HRESULT SetThumbnail( 748 [in] IWICBitmapSource *pIThumbnail); 749 750 HRESULT WritePixels( 751 [in] UINT lineCount, 752 [in] UINT cbStride, 753 [in] UINT cbBufferSize, 754 [in, size_is(cbBufferSize)] BYTE *pbPixels); 755 756 HRESULT WriteSource( 757 [in] IWICBitmapSource *pIBitmapSource, 758 [in, unique] WICRect *prc); 759 760 HRESULT Commit(); 761 762 HRESULT GetMetadataQueryWriter( 763 IWICMetadataQueryWriter **ppIMetadataQueryWriter); 764} 765 766interface IWICBitmapEncoder; 767 768[ 769 object, 770 uuid(94c9b4ee-a09f-4f92-8a1e-4a9bce7e76fb) 771] 772interface IWICBitmapEncoderInfo : IWICBitmapCodecInfo 773{ 774 HRESULT CreateInstance( 775 [out] IWICBitmapEncoder **ppIBitmapEncoder); 776} 777 778[ 779 object, 780 uuid(00000103-a8f2-4877-ba0a-fd2b6645fb94) 781] 782interface IWICBitmapEncoder : IUnknown 783{ 784 HRESULT Initialize( 785 [in] IStream *pIStream, 786 [in] WICBitmapEncoderCacheOption cacheOption); 787 788 HRESULT GetContainerFormat( 789 [out] GUID *pguidContainerFormat); 790 791 HRESULT GetEncoderInfo( 792 [out] IWICBitmapEncoderInfo **ppIEncoderInfo); 793 794 HRESULT SetColorContexts( 795 [in] UINT cCount, 796 [in, size_is(cCount)] IWICColorContext **ppIColorContext); 797 798 HRESULT SetPalette( 799 [in] IWICPalette *pIPalette); 800 801 HRESULT SetThumbnail( 802 [in] IWICBitmapSource *pIThumbnail); 803 804 HRESULT SetPreview( 805 [in] IWICBitmapSource *pIPreview); 806 807 HRESULT CreateNewFrame( 808 [out] IWICBitmapFrameEncode **ppIFrameEncode, 809 [in, out, unique] IPropertyBag2 **ppIEncoderOptions); 810 811 HRESULT Commit(); 812 813 HRESULT GetMetadataQueryWriter( 814 [out] IWICMetadataQueryWriter **ppIMetadataQueryWriter); 815} 816 817[ 818 object, 819 uuid(00000301-a8f2-4877-ba0a-fd2b6645fb94) 820] 821interface IWICFormatConverter : IWICBitmapSource 822{ 823 HRESULT Initialize( 824 [in] IWICBitmapSource *pISource, 825 [in] REFWICPixelFormatGUID dstFormat, 826 [in] WICBitmapDitherType dither, 827 [in] IWICPalette *pIPalette, 828 [in] double alphaThresholdPercent, 829 [in] WICBitmapPaletteType paletteTranslate); 830 831 HRESULT CanConvert( 832 [in] REFWICPixelFormatGUID srcPixelFormat, 833 [in] REFWICPixelFormatGUID dstPixelFormat, 834 [out] BOOL *pfCanConvert); 835} 836 837[ 838 object, 839 uuid(9f34fb65-13f4-4f15-bc57-3726b5e53d9f) 840] 841interface IWICFormatConverterInfo : IWICComponentInfo 842{ 843 HRESULT GetPixelFormats( 844 [in] UINT cFormats, 845 [in, out, size_is(cFormats)] WICPixelFormatGUID *pPixelFormatGUIDs, 846 [out] UINT *pcActual); 847 848 HRESULT CreateInstance( 849 [out] IWICFormatConverter **ppIConverter); 850} 851 852[ 853 object, 854 uuid(135ff860-22b7-4ddf-b0f6-218f4f299a43) 855] 856interface IWICStream : IStream 857{ 858 HRESULT InitializeFromIStream( 859 [in] IStream *pIStream); 860 861 HRESULT InitializeFromFilename( 862 [in] LPCWSTR wzFileName, 863 [in] DWORD dwAccessMode); 864 865 HRESULT InitializeFromMemory( 866 [in, size_is(cbBufferSize)] BYTE *pbBuffer, 867 [in] DWORD cbBufferSize); 868 869 HRESULT InitializeFromIStreamRegion( 870 [in] IStream *pIStream, 871 [in] ULARGE_INTEGER ulOffset, 872 [in] ULARGE_INTEGER ulMaxSize); 873} 874 875[ 876 object, 877 uuid(00000302-a8f2-4877-ba0a-fd2b6645fb94) 878] 879interface IWICBitmapScaler : IWICBitmapSource 880{ 881 HRESULT Initialize( 882 [in] IWICBitmapSource *pISource, 883 [in] UINT uiWidth, 884 [in] UINT uiHeight, 885 [in] WICBitmapInterpolationMode mode); 886} 887 888[ 889 object, 890 uuid(e4fbcf03-223d-4e81-9333-d635556dd1b5) 891] 892interface IWICBitmapClipper : IWICBitmapSource 893{ 894 HRESULT Initialize( 895 [in] IWICBitmapSource *pISource, 896 [in] const WICRect *prc); 897} 898 899[ 900 object, 901 uuid(b66f034f-d0e2-40ab-b436-6de39e321a94) 902] 903interface IWICColorTransform : IWICBitmapSource 904{ 905 HRESULT Initialize( 906 [in] IWICBitmapSource *pIBitmapSource, 907 [in] IWICColorContext *pIContextSource, 908 [in] IWICColorContext *pIContextDest, 909 [in] REFWICPixelFormatGUID pixelFmtDest); 910} 911 912[ 913 object, 914 uuid(b84e2c09-78c9-4ac4-8bd3-524ae1663a2f) 915] 916interface IWICFastMetadataEncoder : IUnknown 917{ 918 HRESULT Commit(); 919 920 HRESULT GetMetadataQueryWriter( 921 [out] IWICMetadataQueryWriter **ppIMetadataQueryWriter); 922} 923 924cpp_quote("DEFINE_GUID(CLSID_WICImagingFactory, 0xcacaf262,0x9370,0x4615,0xa1,0x3b,0x9f,0x55,0x39,0xda,0x4c,0x0a);") 925cpp_quote("DEFINE_GUID(CLSID_WICImagingFactory1, 0xcacaf262,0x9370,0x4615,0xa1,0x3b,0x9f,0x55,0x39,0xda,0x4c,0x0a);") 926cpp_quote("DEFINE_GUID(CLSID_WICImagingFactory2, 0x317d06e8,0x5f24,0x433d,0xbd,0xf7,0x79,0xce,0x68,0xd8,0xab,0xc2);") 927 928[ 929 object, 930 uuid(ec5ec8a9-c395-4314-9c77-54d7a935ff70) 931] 932interface IWICImagingFactory : IUnknown 933{ 934 HRESULT CreateDecoderFromFilename( 935 [in] LPCWSTR wzFilename, 936 [in, unique] const GUID *pguidVendor, 937 [in] DWORD dwDesiredAccess, 938 [in] WICDecodeOptions metadataOptions, 939 [out, retval] IWICBitmapDecoder **ppIDecoder); 940 941 HRESULT CreateDecoderFromStream( 942 [in] IStream *pIStream, 943 [in, unique] const GUID *pguidVendor, 944 [in] WICDecodeOptions metadataOptions, 945 [out, retval] IWICBitmapDecoder **ppIDecoder); 946 947 HRESULT CreateDecoderFromFileHandle( 948 [in] ULONG_PTR hFile, 949 [in, unique] const GUID *pguidVendor, 950 [in] WICDecodeOptions metadataOptions, 951 [out, retval] IWICBitmapDecoder **ppIDecoder); 952 953 HRESULT CreateComponentInfo( 954 [in] REFCLSID clsidComponent, 955 [out] IWICComponentInfo **ppIInfo); 956 957 HRESULT CreateDecoder( 958 [in] REFGUID guidContainerFormat, 959 [in, unique] const GUID *pguidVendor, 960 [out, retval] IWICBitmapDecoder **ppIDecoder); 961 962 HRESULT CreateEncoder( 963 [in] REFGUID guidContainerFormat, 964 [in, unique] const GUID *pguidVendor, 965 [out, retval] IWICBitmapEncoder **ppIEncoder); 966 967 HRESULT CreatePalette( 968 [out] IWICPalette **ppIPalette); 969 970 HRESULT CreateFormatConverter( 971 [out] IWICFormatConverter **ppIFormatConverter); 972 973 HRESULT CreateBitmapScaler( 974 [out] IWICBitmapScaler **ppIBitmapScaler); 975 976 HRESULT CreateBitmapClipper( 977 [out] IWICBitmapClipper **ppIBitmapClipper); 978 979 HRESULT CreateBitmapFlipRotator( 980 [out] IWICBitmapFlipRotator **ppIBitmapFlipRotator); 981 982 HRESULT CreateStream( 983 [out] IWICStream **ppIWICStream); 984 985 HRESULT CreateColorContext( 986 [out] IWICColorContext **ppIWICColorContext); 987 988 HRESULT CreateColorTransformer( 989 [out] IWICColorTransform **ppIWICColorTransform); 990 991 HRESULT CreateBitmap( 992 [in] UINT uiWidth, 993 [in] UINT uiHeight, 994 [in] REFWICPixelFormatGUID pixelFormat, 995 [in] WICBitmapCreateCacheOption option, 996 [out] IWICBitmap **ppIBitmap); 997 998 HRESULT CreateBitmapFromSource( 999 [in] IWICBitmapSource *piBitmapSource, 1000 [in] WICBitmapCreateCacheOption option, 1001 [out] IWICBitmap **ppIBitmap); 1002 1003 HRESULT CreateBitmapFromSourceRect( 1004 [in] IWICBitmapSource *piBitmapSource, 1005 [in] UINT x, 1006 [in] UINT y, 1007 [in] UINT width, 1008 [in] UINT height, 1009 [out] IWICBitmap **ppIBitmap); 1010 1011 HRESULT CreateBitmapFromMemory( 1012 [in] UINT uiWidth, 1013 [in] UINT uiHeight, 1014 [in] REFWICPixelFormatGUID pixelFormat, 1015 [in] UINT cbStride, 1016 [in] UINT cbBufferSize, 1017 [in, size_is(cbBufferSize)] BYTE *pbBuffer, 1018 [out] IWICBitmap **ppIBitmap); 1019 1020 HRESULT CreateBitmapFromHBITMAP( 1021 [in] HBITMAP hBitmap, 1022 [in, unique] HPALETTE hPalette, 1023 [in] WICBitmapAlphaChannelOption options, 1024 [out] IWICBitmap **ppIBitmap); 1025 1026 HRESULT CreateBitmapFromHICON( 1027 [in] HICON hIcon, 1028 [out] IWICBitmap **ppIBitmap); 1029 1030 HRESULT CreateComponentEnumerator( 1031 [in] DWORD componentTypes, 1032 [in] DWORD options, 1033 [out] IEnumUnknown **ppIEnumUnknown); 1034 1035 HRESULT CreateFastMetadataEncoderFromDecoder( 1036 [in] IWICBitmapDecoder *pIDecoder, 1037 [out] IWICFastMetadataEncoder **ppIFastEncoder); 1038 1039 HRESULT CreateFastMetadataEncoderFromFrameDecode( 1040 [in] IWICBitmapFrameDecode *pIFrameDecoder, 1041 [out] IWICFastMetadataEncoder **ppIFastEncoder); 1042 1043 HRESULT CreateQueryWriter( 1044 [in] REFGUID guidMetadataFormat, 1045 [in, unique] const GUID *pguidVendor, 1046 [out] IWICMetadataQueryWriter **ppIQueryWriter); 1047 1048 HRESULT CreateQueryWriterFromReader( 1049 [in] IWICMetadataQueryReader *pIQueryReader, 1050 [in, unique] const GUID *pguidVendor, 1051 [out] IWICMetadataQueryWriter **ppIQueryWriter); 1052} 1053 1054[ 1055 object, 1056 uuid(7b816b45-1996-4476-b132-de9e247c8af0), 1057 local 1058] 1059interface IWICImagingFactory2 : IWICImagingFactory 1060{ 1061} 1062 1063[ 1064 local, 1065 object, 1066 uuid(dc2bb46d-3f07-481e-8625-220c4aedbb33) 1067] 1068interface IWICEnumMetadataItem : IUnknown 1069{ 1070 HRESULT Next( 1071 [in] ULONG celt, 1072 [in, out, unique, size_is(celt)] PROPVARIANT *rgeltSchema, 1073 [in, out, size_is(celt)] PROPVARIANT *rgeltId, 1074 [in, out, optional, size_is(celt)] PROPVARIANT *rgeltValue, 1075 [out, optional] ULONG *pceltFetched); 1076 1077 HRESULT Skip( 1078 [in] ULONG celt); 1079 1080 HRESULT Reset(); 1081 1082 HRESULT Clone( 1083 [out] IWICEnumMetadataItem **ppIEnumMetadataItem); 1084} 1085 1086cpp_quote("HRESULT WINAPI WICConvertBitmapSource(REFWICPixelFormatGUID dstFormat, IWICBitmapSource *pISrc, IWICBitmapSource **ppIDst);") 1087cpp_quote("HRESULT WINAPI WICCreateBitmapFromSection(UINT width, UINT height, REFWICPixelFormatGUID format, HANDLE section, UINT stride, UINT offset, IWICBitmap **bitmap);") 1088cpp_quote("HRESULT WINAPI WICCreateBitmapFromSectionEx(UINT width, UINT height, REFWICPixelFormatGUID format, HANDLE section, UINT stride, UINT offset, WICSectionAccessLevel access, IWICBitmap **bitmap);") 1089 1090cpp_quote("HRESULT WINAPI WICMapGuidToShortName(REFGUID,UINT,WCHAR *,UINT *);") 1091cpp_quote("HRESULT WINAPI WICMapShortNameToGuid(PCWSTR,GUID *);") 1092cpp_quote("HRESULT WINAPI WICMapSchemaToName(REFGUID,LPWSTR,UINT,WCHAR *,UINT *);") 1093 1094cpp_quote("DEFINE_GUID(CLSID_WICBmpDecoder, 0x6b462062,0x7cbf,0x400d,0x9f,0xdb,0x81,0x3d,0xd1,0x0f,0x27,0x78);") 1095cpp_quote("DEFINE_GUID(CLSID_WICPngDecoder, 0x389ea17b,0x5078,0x4cde,0xb6,0xef,0x25,0xc1,0x51,0x75,0xc7,0x51);") 1096cpp_quote("DEFINE_GUID(CLSID_WICIcoDecoder, 0xc61bfcdf,0x2e0f,0x4aad,0xa8,0xd7,0xe0,0x6b,0xaf,0xeb,0xcd,0xfe);") 1097cpp_quote("DEFINE_GUID(CLSID_WICJpegDecoder, 0x9456a480,0xe88b,0x43ea,0x9e,0x73,0x0b,0x2d,0x9b,0x71,0xb1,0xca);") 1098cpp_quote("DEFINE_GUID(CLSID_WICGifDecoder, 0x381dda3c,0x9ce9,0x4834,0xa2,0x3e,0x1f,0x98,0xf8,0xfc,0x52,0xbe);") 1099cpp_quote("DEFINE_GUID(CLSID_WICTiffDecoder, 0xb54e85d9,0xfe23,0x499f,0x8b,0x88,0x6a,0xce,0xa7,0x13,0x75,0x2b);") 1100cpp_quote("DEFINE_GUID(CLSID_WICWmpDecoder, 0xa26cec36,0x234c,0x4950,0xae,0x16,0xe3,0x4a,0xac,0xe7,0x1d,0x0d);") 1101 1102cpp_quote("DEFINE_GUID(CLSID_WICBmpEncoder, 0x69be8bb4,0xd66d,0x47c8,0x86,0x5a,0xed,0x15,0x89,0x43,0x37,0x82);") 1103cpp_quote("DEFINE_GUID(CLSID_WICPngEncoder, 0x27949969,0x876a,0x41d7,0x94,0x47,0x56,0x8f,0x6a,0x35,0xa4,0xdc);") 1104cpp_quote("DEFINE_GUID(CLSID_WICJpegEncoder, 0x1a34f5c1,0x4a5a,0x46dc,0xb6,0x44,0x1f,0x45,0x67,0xe7,0xa6,0x76);") 1105cpp_quote("DEFINE_GUID(CLSID_WICGifEncoder, 0x114f5598,0x0b22,0x40a0,0x86,0xa1,0xc8,0x3e,0xa4,0x95,0xad,0xbd);") 1106cpp_quote("DEFINE_GUID(CLSID_WICTiffEncoder, 0x0131be10,0x2001,0x4c5f,0xa9,0xb0,0xcc,0x88,0xfa,0xb6,0x4c,0xe8);") 1107cpp_quote("DEFINE_GUID(CLSID_WICWmpEncoder, 0xac4ce3cb,0xe1c1,0x44cd,0x82,0x15,0x5a,0x16,0x65,0x50,0x9e,0xc2);") 1108 1109cpp_quote("DEFINE_GUID(CLSID_WICDefaultFormatConverter, 0x1a3f11dc,0xb514,0x4b17,0x8c,0x5f,0x21,0x54,0x51,0x38,0x52,0xf1);") 1110cpp_quote("DEFINE_GUID(CLSID_WICFormatConverterHighColor, 0xac75d454,0x9f37,0x48f8,0xb9,0x72,0x4e,0x19,0xbc,0x85,0x60,0x11);") 1111cpp_quote("DEFINE_GUID(CLSID_WICFormatConverterNChannel, 0xc17cabb2,0xd4a3,0x47d7,0xa5,0x57,0x33,0x9b,0x2e,0xfb,0xd4,0xf1);") 1112cpp_quote("DEFINE_GUID(CLSID_WICFormatConverterWMPhoto, 0x9cb5172b,0xd600,0x46ba,0xab,0x77,0x77,0xbb,0x7e,0x3a,0x00,0xd9);") 1113 1114cpp_quote("DEFINE_GUID(GUID_ContainerFormatBmp, 0x0af1d87e,0xfcfe,0x4188,0xbd,0xeb,0xa7,0x90,0x64,0x71,0xcb,0xe3);") 1115cpp_quote("DEFINE_GUID(GUID_ContainerFormatPng, 0x1b7cfaf4,0x713f,0x473c,0xbb,0xcd,0x61,0x37,0x42,0x5f,0xae,0xaf);") 1116cpp_quote("DEFINE_GUID(GUID_ContainerFormatIco, 0xa3a860c4,0x338f,0x4c17,0x91,0x9a,0xfb,0xa4,0xb5,0x62,0x8f,0x21);") 1117cpp_quote("DEFINE_GUID(GUID_ContainerFormatJpeg, 0x19e4a5aa,0x5662,0x4fc5,0xa0,0xc0,0x17,0x58,0x02,0x8e,0x10,0x57);") 1118cpp_quote("DEFINE_GUID(GUID_ContainerFormatTiff, 0x163bcc30,0xe2e9,0x4f0b,0x96,0x1d,0xa3,0xe9,0xfd,0xb7,0x88,0xa3);") 1119cpp_quote("DEFINE_GUID(GUID_ContainerFormatGif, 0x1f8a5601,0x7d4d,0x4cbd,0x9c,0x82,0x1b,0xc8,0xd4,0xee,0xb9,0xa5);") 1120cpp_quote("DEFINE_GUID(GUID_ContainerFormatWmp, 0x57a37caa,0x367a,0x4540,0x91,0x6b,0xf1,0x83,0xc5,0x09,0x3a,0x4b);") 1121 1122cpp_quote("DEFINE_GUID(GUID_VendorMicrosoft, 0xf0e749ca,0xedef,0x4589,0xa7,0x3a,0xee,0x0e,0x62,0x6a,0x2a,0x2b);") 1123cpp_quote("DEFINE_GUID(GUID_VendorMicrosoftBuiltIn, 0x257a30fd,0x6b6,0x462b,0xae,0xa4,0x63,0xf7,0xb,0x86,0xe5,0x33);") 1124 1125cpp_quote("DEFINE_GUID(CLSID_WICImagingCategories, 0xfae3d380,0xfea4,0x4623,0x8c,0x75,0xc6,0xb6,0x11,0x10,0xb6,0x81);") 1126cpp_quote("DEFINE_GUID(CATID_WICBitmapDecoders, 0x7ed96837,0x96f0,0x4812,0xb2,0x11,0xf1,0x3c,0x24,0x11,0x7e,0xd3);") 1127cpp_quote("DEFINE_GUID(CATID_WICBitmapEncoders, 0xac757296,0x3522,0x4e11,0x98,0x62,0xc1,0x7b,0xe5,0xa1,0x76,0x7e);") 1128cpp_quote("DEFINE_GUID(CATID_WICFormatConverters, 0x7835eae8,0xbf14,0x49d1,0x93,0xce,0x53,0x3a,0x40,0x7b,0x22,0x48);") 1129cpp_quote("DEFINE_GUID(CATID_WICMetadataReader, 0x05af94d8,0x7174,0x4cd2,0xbe,0x4a,0x41,0x24,0xb8,0x0e,0xe4,0xb8);") 1130cpp_quote("DEFINE_GUID(CATID_WICMetadataWriter, 0xabe3b9a4,0x257d,0x4b97,0xbd,0x1a,0x29,0x4a,0xf4,0x96,0x22,0x2e);") 1131cpp_quote("DEFINE_GUID(CATID_WICPixelFormats, 0x2b46e70f,0xcda7,0x473e,0x89,0xf6,0xdc,0x96,0x30,0xa2,0x39,0x0b);") 1132