rpcrt4: Make sure we don't try to free a pointer twice.
[wine/multimedia.git] / include / gdiplusimaging.h
blob7c199c3d5bdfffce6b75940a11cecc695b212f80
1 /*
2 * Copyright (C) 2007 Google (Evan Stade)
4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Lesser General Public
6 * License as published by the Free Software Foundation; either
7 * version 2.1 of the License, or (at your option) any later version.
9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * Lesser General Public License for more details.
14 * You should have received a copy of the GNU Lesser General Public
15 * License along with this library; if not, write to the Free Software
16 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
19 #ifndef _GDIPLUSIMAGING_H
20 #define _GDIPLUSIMAGING_H
22 DEFINE_GUID(ImageFormatUndefined, 0xb96b3ca9, 0x728, 0x11d3, 0x9d, 0x7b, 0, 0, 0xf8, 0x1e, 0xf3, 0x2e);
23 DEFINE_GUID(ImageFormatMemoryBMP, 0xb96b3caa, 0x728, 0x11d3, 0x9d, 0x7b, 0, 0, 0xf8, 0x1e, 0xf3, 0x2e);
24 DEFINE_GUID(ImageFormatBMP, 0xb96b3cab, 0x728, 0x11d3, 0x9d, 0x7b, 0, 0, 0xf8, 0x1e, 0xf3, 0x2e);
25 DEFINE_GUID(ImageFormatEMF, 0xb96b3cac, 0x728, 0x11d3, 0x9d, 0x7b, 0, 0, 0xf8, 0x1e, 0xf3, 0x2e);
26 DEFINE_GUID(ImageFormatWMF, 0xb96b3cad, 0x728, 0x11d3, 0x9d, 0x7b, 0, 0, 0xf8, 0x1e, 0xf3, 0x2e);
27 DEFINE_GUID(ImageFormatJPEG, 0xb96b3cae, 0x728, 0x11d3, 0x9d, 0x7b, 0, 0, 0xf8, 0x1e, 0xf3, 0x2e);
28 DEFINE_GUID(ImageFormatPNG, 0xb96b3caf, 0x728, 0x11d3, 0x9d, 0x7b, 0, 0, 0xf8, 0x1e, 0xf3, 0x2e);
29 DEFINE_GUID(ImageFormatGIF, 0xb96b3cb0, 0x728, 0x11d3, 0x9d, 0x7b, 0, 0, 0xf8, 0x1e, 0xf3, 0x2e);
30 DEFINE_GUID(ImageFormatTIFF, 0xb96b3cb1, 0x728, 0x11d3, 0x9d, 0x7b, 0, 0, 0xf8, 0x1e, 0xf3, 0x2e);
31 DEFINE_GUID(ImageFormatEXIF, 0xb96b3cb2, 0x728, 0x11d3, 0x9d, 0x7b, 0, 0, 0xf8, 0x1e, 0xf3, 0x2e);
32 DEFINE_GUID(ImageFormatIcon, 0xb96b3cb5, 0x728, 0x11d3, 0x9d, 0x7b, 0, 0, 0xf8, 0x1e, 0xf3, 0x2e);
34 DEFINE_GUID(FrameDimensionTime, 0x6aedbd6d, 0x3fb5, 0x418a, 0x83, 0xa6, 0x7f, 0x45, 0x22, 0x9d, 0xc8, 0x72);
35 DEFINE_GUID(FrameDimensionPage, 0x7462dc86, 0x6180, 0x4c7e, 0x8e, 0x3f, 0xee, 0x73, 0x33, 0xa7, 0xa4, 0x83);
36 DEFINE_GUID(FrameDimensionResolution, 0x84236f7b, 0x3bd3, 0x428f, 0x8d, 0xab, 0x4e, 0xa1, 0x43, 0x9c, 0xa3, 0x15);
38 enum ImageLockMode
40 ImageLockModeRead = 1,
41 ImageLockModeWrite = 2,
42 ImageLockModeUserInputBuf = 4
45 enum RotateFlipType
47 RotateNoneFlipNone = 0,
48 Rotate180FlipXY = RotateNoneFlipNone,
50 Rotate90FlipNone = 1,
51 Rotate270FlipXY = Rotate90FlipNone,
53 Rotate180FlipNone = 2,
54 RotateNoneFlipXY = Rotate180FlipNone,
56 Rotate270FlipNone = 3,
57 Rotate90FlipXY = Rotate270FlipNone,
59 RotateNoneFlipX = 4,
60 Rotate180FlipY = RotateNoneFlipX,
62 Rotate90FlipX = 5,
63 Rotate270FlipY = Rotate90FlipX,
65 Rotate180FlipX = 6,
66 RotateNoneFlipY = Rotate180FlipX,
68 Rotate270FlipX = 7,
69 Rotate90FlipY = Rotate270FlipX
72 #ifdef __cplusplus
73 class EncoderParameter
75 public:
76 GUID Guid;
77 ULONG NumberOfValues;
78 ULONG Type;
79 VOID* Value;
82 class EncoderParameters
84 public:
85 UINT Count;
86 EncoderParameter Parameter[1];
89 class ImageCodecInfo
91 public:
92 CLSID Clsid;
93 GUID FormatID;
94 const WCHAR* CodecName;
95 const WCHAR* DllName;
96 const WCHAR* FormatDescription;
97 const WCHAR* FilenameExtension;
98 const WCHAR* MimeType;
99 DWORD Flags;
100 DWORD Version;
101 DWORD SigCount;
102 DWORD SigSize;
103 const BYTE* SigPattern;
104 const BYTE* SigMask;
107 class BitmapData
109 public:
110 UINT Width;
111 UINT Height;
112 INT Stride;
113 Gdiplus::PixelFormat PixelFormat;
114 VOID* Scan0;
115 UINT_PTR Reserved;
118 class ImageItemData
120 public:
121 UINT Size;
122 UINT Position;
123 VOID* Desc;
124 UINT DescSize;
125 VOID* Data;
126 UINT DataSize;
127 UINT Cookie;
130 class PropertyItem
132 public:
133 PROPID id;
134 ULONG length;
135 WORD type;
136 VOID* value;
139 #else /* end of c++ typedefs */
141 typedef enum ImageLockMode ImageLockMode;
142 typedef enum RotateFlipType RotateFlipType;
144 typedef struct EncoderParameter
146 GUID Guid;
147 ULONG NumberOfValues;
148 ULONG Type;
149 VOID* Value;
150 } EncoderParameter;
152 typedef struct EncoderParameters
154 UINT Count;
155 EncoderParameter Parameter[1];
156 } EncoderParameters;
158 typedef struct ImageCodecInfo
160 CLSID Clsid;
161 GUID FormatID;
162 const WCHAR* CodecName;
163 const WCHAR* DllName;
164 const WCHAR* FormatDescription;
165 const WCHAR* FilenameExtension;
166 const WCHAR* MimeType;
167 DWORD Flags;
168 DWORD Version;
169 DWORD SigCount;
170 DWORD SigSize;
171 const BYTE* SigPattern;
172 const BYTE* SigMask;
173 } ImageCodecInfo;
175 typedef struct BitmapData
177 UINT Width;
178 UINT Height;
179 INT Stride;
180 PixelFormat PixelFormat;
181 VOID* Scan0;
182 UINT_PTR Reserved; /* undocumented: stores the lock mode */
183 } BitmapData;
185 typedef struct ImageItemData
187 UINT Size;
188 UINT Position;
189 VOID* Desc;
190 UINT DescSize;
191 VOID* Data;
192 UINT DataSize;
193 UINT Cookie;
194 } ImageItemData;
196 typedef struct PropertyItem
198 PROPID id;
199 ULONG length;
200 WORD type;
201 VOID* value;
202 } PropertyItem;
204 #endif /* end of c typedefs */
206 /* property types */
207 #define PropertyTagTypeByte 1
208 #define PropertyTagTypeASCII 2
209 #define PropertyTagTypeShort 3
210 #define PropertyTagTypeLong 4
211 #define PropertyTagTypeRational 5
212 #define PropertyTagTypeUndefined 7
213 #define PropertyTagTypeSLONG 9
214 #define PropertyTagTypeSRational 10
216 /* property IDs */
217 #define PropertyTagExifIFD 0x8769
218 #define PropertyTagGpsIFD 0x8825
220 #define PropertyTagNewSubfileType 0x00FE
221 #define PropertyTagSubfileType 0x00FF
222 #define PropertyTagImageWidth 0x0100
223 #define PropertyTagImageHeight 0x0101
224 #define PropertyTagBitsPerSample 0x0102
225 #define PropertyTagCompression 0x0103
226 #define PropertyTagPhotometricInterp 0x0106
227 #define PropertyTagThreshHolding 0x0107
228 #define PropertyTagCellWidth 0x0108
229 #define PropertyTagCellHeight 0x0109
230 #define PropertyTagFillOrder 0x010A
231 #define PropertyTagDocumentName 0x010D
232 #define PropertyTagImageDescription 0x010E
233 #define PropertyTagEquipMake 0x010F
234 #define PropertyTagEquipModel 0x0110
235 #define PropertyTagStripOffsets 0x0111
236 #define PropertyTagOrientation 0x0112
237 #define PropertyTagSamplesPerPixel 0x0115
238 #define PropertyTagRowsPerStrip 0x0116
239 #define PropertyTagStripBytesCount 0x0117
240 #define PropertyTagMinSampleValue 0x0118
241 #define PropertyTagMaxSampleValue 0x0119
242 #define PropertyTagXResolution 0x011A
243 #define PropertyTagYResolution 0x011B
244 #define PropertyTagPlanarConfig 0x011C
245 #define PropertyTagPageName 0x011D
246 #define PropertyTagXPosition 0x011E
247 #define PropertyTagYPosition 0x011F
248 #define PropertyTagFreeOffset 0x0120
249 #define PropertyTagFreeByteCounts 0x0121
250 #define PropertyTagGrayResponseUnit 0x0122
251 #define PropertyTagGrayResponseCurve 0x0123
252 #define PropertyTagT4Option 0x0124
253 #define PropertyTagT6Option 0x0125
254 #define PropertyTagResolutionUnit 0x0128
255 #define PropertyTagPageNumber 0x0129
256 #define PropertyTagTransferFuncition 0x012D
257 #define PropertyTagSoftwareUsed 0x0131
258 #define PropertyTagDateTime 0x0132
259 #define PropertyTagArtist 0x013B
260 #define PropertyTagHostComputer 0x013C
261 #define PropertyTagPredictor 0x013D
262 #define PropertyTagWhitePoint 0x013E
263 #define PropertyTagPrimaryChromaticities 0x013F
264 #define PropertyTagColorMap 0x0140
265 #define PropertyTagHalftoneHints 0x0141
266 #define PropertyTagTileWidth 0x0142
267 #define PropertyTagTileLength 0x0143
268 #define PropertyTagTileOffset 0x0144
269 #define PropertyTagTileByteCounts 0x0145
270 #define PropertyTagInkSet 0x014C
271 #define PropertyTagInkNames 0x014D
272 #define PropertyTagNumberOfInks 0x014E
273 #define PropertyTagDotRange 0x0150
274 #define PropertyTagTargetPrinter 0x0151
275 #define PropertyTagExtraSamples 0x0152
276 #define PropertyTagSampleFormat 0x0153
277 #define PropertyTagSMinSampleValue 0x0154
278 #define PropertyTagSMaxSampleValue 0x0155
279 #define PropertyTagTransferRange 0x0156
281 #define PropertyTagJPEGProc 0x0200
282 #define PropertyTagJPEGInterFormat 0x0201
283 #define PropertyTagJPEGInterLength 0x0202
284 #define PropertyTagJPEGRestartInterval 0x0203
285 #define PropertyTagJPEGLosslessPredictors 0x0205
286 #define PropertyTagJPEGPointTransforms 0x0206
287 #define PropertyTagJPEGQTables 0x0207
288 #define PropertyTagJPEGDCTables 0x0208
289 #define PropertyTagJPEGACTables 0x0209
291 #define PropertyTagYCbCrCoefficients 0x0211
292 #define PropertyTagYCbCrSubsampling 0x0212
293 #define PropertyTagYCbCrPositioning 0x0213
294 #define PropertyTagREFBlackWhite 0x0214
296 #define PropertyTagICCProfile 0x8773
298 #define PropertyTagGamma 0x0301
299 #define PropertyTagICCProfileDescriptor 0x0302
300 #define PropertyTagSRGBRenderingIntent 0x0303
302 #define PropertyTagImageTitle 0x0320
303 #define PropertyTagCopyright 0x8298
305 #define PropertyTagResolutionXUnit 0x5001
306 #define PropertyTagResolutionYUnit 0x5002
307 #define PropertyTagResolutionXLengthUnit 0x5003
308 #define PropertyTagResolutionYLengthUnit 0x5004
309 #define PropertyTagPrintFlags 0x5005
310 #define PropertyTagPrintFlagsVersion 0x5006
311 #define PropertyTagPrintFlagsCrop 0x5007
312 #define PropertyTagPrintFlagsBleedWidth 0x5008
313 #define PropertyTagPrintFlagsBleedWidthScale 0x5009
314 #define PropertyTagHalftoneLPI 0x500A
315 #define PropertyTagHalftoneLPIUnit 0x500B
316 #define PropertyTagHalftoneDegree 0x500C
317 #define PropertyTagHalftoneShape 0x500D
318 #define PropertyTagHalftoneMisc 0x500E
319 #define PropertyTagHalftoneScreen 0x500F
320 #define PropertyTagJPEGQuality 0x5010
321 #define PropertyTagGridSize 0x5011
322 #define PropertyTagThumbnailFormat 0x5012
323 #define PropertyTagThumbnailWidth 0x5013
324 #define PropertyTagThumbnailHeight 0x5014
325 #define PropertyTagThumbnailColorDepth 0x5015
326 #define PropertyTagThumbnailPlanes 0x5016
327 #define PropertyTagThumbnailRawBytes 0x5017
328 #define PropertyTagThumbnailSize 0x5018
329 #define PropertyTagThumbnailCompressedSize 0x5019
330 #define PropertyTagColorTransferFunction 0x501A
331 #define PropertyTagThumbnailData 0x501B
333 #define PropertyTagThumbnailImageWidth 0x5020
334 #define PropertyTagThumbnailImageHeight 0x5021
335 #define PropertyTagThumbnailBitsPerSample 0x5022
336 #define PropertyTagThumbnailCompression 0x5023
337 #define PropertyTagThumbnailPhotometricInterp 0x5024
338 #define PropertyTagThumbnailImageDescription 0x5025
339 #define PropertyTagThumbnailEquipMake 0x5026
340 #define PropertyTagThumbnailEquipModel 0x5027
341 #define PropertyTagThumbnailStripOffsets 0x5028
342 #define PropertyTagThumbnailOrientation 0x5029
343 #define PropertyTagThumbnailSamplesPerPixel 0x502A
344 #define PropertyTagThumbnailRowsPerStrip 0x502B
345 #define PropertyTagThumbnailStripBytesCount 0x502C
346 #define PropertyTagThumbnailResolutionX 0x502D
347 #define PropertyTagThumbnailResolutionY 0x502E
348 #define PropertyTagThumbnailPlanarConfig 0x502F
349 #define PropertyTagThumbnailResolutionUnit 0x5030
350 #define PropertyTagThumbnailTransferFunction 0x5031
351 #define PropertyTagThumbnailSoftwareUsed 0x5032
352 #define PropertyTagThumbnailDateTime 0x5033
353 #define PropertyTagThumbnailArtist 0x5034
354 #define PropertyTagThumbnailWhitePoint 0x5035
355 #define PropertyTagThumbnailPrimaryChromaticities 0x5036
356 #define PropertyTagThumbnailYCbCrCoefficients 0x5037
357 #define PropertyTagThumbnailYCbCrSubsampling 0x5038
358 #define PropertyTagThumbnailYCbCrPositioning 0x5039
359 #define PropertyTagThumbnailRefBlackWhite 0x503A
360 #define PropertyTagThumbnailCopyRight 0x503B
362 #define PropertyTagLuminanceTable 0x5090
363 #define PropertyTagChrominanceTable 0x5091
365 #define PropertyTagFrameDelay 0x5100
366 #define PropertyTagLoopCount 0x5101
368 #define PropertyTagPixelUnit 0x5110
369 #define PropertyTagPixelPerUnitX 0x5111
370 #define PropertyTagPixelPerUnitY 0x5112
371 #define PropertyTagPaletteHistogram 0x5113
373 #define PropertyTagExifExposureTime 0x829A
374 #define PropertyTagExifFNumber 0x829D
376 #define PropertyTagExifExposureProg 0x8822
377 #define PropertyTagExifSpectralSense 0x8824
378 #define PropertyTagExifISOSpeed 0x8827
379 #define PropertyTagExifOECF 0x8828
381 #define PropertyTagExifVer 0x9000
382 #define PropertyTagExifDTOrig 0x9003
383 #define PropertyTagExifDTDigitized 0x9004
385 #define PropertyTagExifCompConfig 0x9101
386 #define PropertyTagExifCompBPP 0x9102
388 #define PropertyTagExifShutterSpeed 0x9201
389 #define PropertyTagExifAperture 0x9202
390 #define PropertyTagExifBrightness 0x9203
391 #define PropertyTagExifExposureBias 0x9204
392 #define PropertyTagExifMaxAperture 0x9205
393 #define PropertyTagExifSubjectDist 0x9206
394 #define PropertyTagExifMeteringMode 0x9207
395 #define PropertyTagExifLightSource 0x9208
396 #define PropertyTagExifFlash 0x9209
397 #define PropertyTagExifFocalLength 0x920A
398 #define PropertyTagExifMakerNote 0x927C
399 #define PropertyTagExifUserComment 0x9286
400 #define PropertyTagExifDTSubsec 0x9290
401 #define PropertyTagExifDTOrigSS 0x9291
402 #define PropertyTagExifDTDigSS 0x9292
404 #define PropertyTagExifFPXVer 0xA000
405 #define PropertyTagExifColorSpace 0xA001
406 #define PropertyTagExifPixXDim 0xA002
407 #define PropertyTagExifPixYDim 0xA003
408 #define PropertyTagExifRelatedWav 0xA004
409 #define PropertyTagExifInterop 0xA005
410 #define PropertyTagExifFlashEnergy 0xA20B
411 #define PropertyTagExifSpatialFR 0xA20C
412 #define PropertyTagExifFocalXRes 0xA20E
413 #define PropertyTagExifFocalYRes 0xA20F
414 #define PropertyTagExifFocalResUnit 0xA210
415 #define PropertyTagExifSubjectLoc 0xA214
416 #define PropertyTagExifExposureIndex 0xA215
417 #define PropertyTagExifSensingMethod 0xA217
418 #define PropertyTagExifFileSource 0xA300
419 #define PropertyTagExifSceneType 0xA301
420 #define PropertyTagExifCfaPattern 0xA302
422 #define PropertyTagGpsVer 0x0000
423 #define PropertyTagGpsLatitudeRef 0x0001
424 #define PropertyTagGpsLatitude 0x0002
425 #define PropertyTagGpsLongitudeRef 0x0003
426 #define PropertyTagGpsLongitude 0x0004
427 #define PropertyTagGpsAltitudeRef 0x0005
428 #define PropertyTagGpsAltitude 0x0006
429 #define PropertyTagGpsGpsTime 0x0007
430 #define PropertyTagGpsGpsSatellites 0x0008
431 #define PropertyTagGpsGpsStatus 0x0009
432 #define PropertyTagGpsGpsMeasureMode 0x000A
433 #define PropertyTagGpsGpsDop 0x000B
434 #define PropertyTagGpsSpeedRef 0x000C
435 #define PropertyTagGpsSpeed 0x000D
436 #define PropertyTagGpsTrackRef 0x000E
437 #define PropertyTagGpsTrack 0x000F
438 #define PropertyTagGpsImgDirRef 0x0010
439 #define PropertyTagGpsImgDir 0x0011
440 #define PropertyTagGpsMapDatum 0x0012
441 #define PropertyTagGpsDestLatRef 0x0013
442 #define PropertyTagGpsDestLat 0x0014
443 #define PropertyTagGpsDestLongRef 0x0015
444 #define PropertyTagGpsDestLong 0x0016
445 #define PropertyTagGpsDestBearRef 0x0017
446 #define PropertyTagGpsDestBear 0x0018
447 #define PropertyTagGpsDestDistRef 0x0019
448 #define PropertyTagGpsDestDist 0x001A
450 #endif /* _GDIPLUSIMAGING_H */