oleaut32/tests: Fix double GlobalFree in olepicture tests.
[wine] / include / gdiplusimaging.h
1 /*
2  * Copyright (C) 2007 Google (Evan Stade)
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
19 #ifndef _GDIPLUSIMAGING_H
20 #define _GDIPLUSIMAGING_H
21
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);
33
34 enum ImageLockMode
35 {
36     ImageLockModeRead           = 1,
37     ImageLockModeWrite          = 2,
38     ImageLockModeUserInputBuf   = 4
39 };
40
41 #ifdef __cplusplus
42 class EncoderParameter
43 {
44 public:
45     GUID    Guid;
46     ULONG   NumberOfValues;
47     ULONG   Type;
48     VOID*   Value;
49 };
50
51 class EncoderParameters
52 {
53 public:
54     UINT Count;
55     EncoderParameter Parameter[1];
56 };
57
58 class ImageCodecInfo
59 {
60 public:
61     CLSID Clsid;
62     GUID  FormatID;
63     const WCHAR* CodecName;
64     const WCHAR* DllName;
65     const WCHAR* FormatDescription;
66     const WCHAR* FilenameExtension;
67     const WCHAR* MimeType;
68     DWORD Flags;
69     DWORD Version;
70     DWORD SigCount;
71     DWORD SigSize;
72     const BYTE* SigPattern;
73     const BYTE* SigMask;
74 };
75
76 class BitmapData
77 {
78 public:
79     UINT Width;
80     UINT Height;
81     INT Stride;
82     PixelFormat PixelFormat;
83     VOID* Scan0;
84     UINT_PTR Reserved;
85 };
86
87 class ImageItemData
88 {
89 public:
90     UINT  Size;
91     UINT  Position;
92     VOID* Desc;
93     UINT  DescSize;
94     VOID* Data;
95     UINT  DataSize;
96     UINT  Cookie;
97 };
98
99 class PropertyItem
100 {
101 public:
102     PROPID id;
103     ULONG  length;
104     WORD   type;
105     VOID*  value;
106 };
107
108 #else /* end of c++ typedefs */
109
110 typedef enum ImageLockMode ImageLockMode;
111
112 typedef struct EncoderParameter
113 {
114     GUID Guid;
115     ULONG NumberOfValues;
116     ULONG Type;
117     VOID* Value;
118 } EncoderParameter;
119
120 typedef struct EncoderParameters
121 {
122     UINT Count;
123     EncoderParameter Parameter[1];
124 } EncoderParameters;
125
126 typedef struct ImageCodecInfo
127 {
128     CLSID Clsid;
129     GUID  FormatID;
130     const WCHAR* CodecName;
131     const WCHAR* DllName;
132     const WCHAR* FormatDescription;
133     const WCHAR* FilenameExtension;
134     const WCHAR* MimeType;
135     DWORD Flags;
136     DWORD Version;
137     DWORD SigCount;
138     DWORD SigSize;
139     const BYTE* SigPattern;
140     const BYTE* SigMask;
141 } ImageCodecInfo;
142
143 typedef struct BitmapData
144 {
145     UINT Width;
146     UINT Height;
147     INT Stride;
148     PixelFormat PixelFormat;
149     VOID* Scan0;
150     UINT_PTR Reserved; /* undocumented: stores the lock mode */
151 } BitmapData;
152
153 typedef struct ImageItemData
154 {
155     UINT  Size;
156     UINT  Position;
157     VOID* Desc;
158     UINT  DescSize;
159     VOID* Data;
160     UINT  DataSize;
161     UINT  Cookie;
162 } ImageItemData;
163
164 typedef struct PropertyItem
165 {
166     PROPID id;
167     ULONG  length;
168     WORD   type;
169     VOID*  value;
170 } PropertyItem;
171
172 #endif /* end of c typedefs */
173
174 /* property types */
175 #define PropertyTagTypeByte       1
176 #define PropertyTagTypeASCII      2
177 #define PropertyTagTypeShort      3
178 #define PropertyTagTypeLong       4
179 #define PropertyTagTypeRational   5
180 #define PropertyTagTypeUndefined  7
181 #define PropertyTagTypeSLONG      9
182 #define PropertyTagTypeSRational 10
183
184 /* property IDs */
185 #define PropertyTagExifIFD                0x8769
186 #define PropertyTagGpsIFD                 0x8825
187
188 #define PropertyTagNewSubfileType         0x00FE
189 #define PropertyTagSubfileType            0x00FF
190 #define PropertyTagImageWidth             0x0100
191 #define PropertyTagImageHeight            0x0101
192 #define PropertyTagBitsPerSample          0x0102
193 #define PropertyTagCompression            0x0103
194 #define PropertyTagPhotometricInterp      0x0106
195 #define PropertyTagThreshHolding          0x0107
196 #define PropertyTagCellWidth              0x0108
197 #define PropertyTagCellHeight             0x0109
198 #define PropertyTagFillOrder              0x010A
199 #define PropertyTagDocumentName           0x010D
200 #define PropertyTagImageDescription       0x010E
201 #define PropertyTagEquipMake              0x010F
202 #define PropertyTagEquipModel             0x0110
203 #define PropertyTagStripOffsets           0x0111
204 #define PropertyTagOrientation            0x0112
205 #define PropertyTagSamplesPerPixel        0x0115
206 #define PropertyTagRowsPerStrip           0x0116
207 #define PropertyTagStripBytesCount        0x0117
208 #define PropertyTagMinSampleValue         0x0118
209 #define PropertyTagMaxSampleValue         0x0119
210 #define PropertyTagXResolution            0x011A
211 #define PropertyTagYResolution            0x011B
212 #define PropertyTagPlanarConfig           0x011C
213 #define PropertyTagPageName               0x011D
214 #define PropertyTagXPosition              0x011E
215 #define PropertyTagYPosition              0x011F
216 #define PropertyTagFreeOffset             0x0120
217 #define PropertyTagFreeByteCounts         0x0121
218 #define PropertyTagGrayResponseUnit       0x0122
219 #define PropertyTagGrayResponseCurve      0x0123
220 #define PropertyTagT4Option               0x0124
221 #define PropertyTagT6Option               0x0125
222 #define PropertyTagResolutionUnit         0x0128
223 #define PropertyTagPageNumber             0x0129
224 #define PropertyTagTransferFuncition      0x012D
225 #define PropertyTagSoftwareUsed           0x0131
226 #define PropertyTagDateTime               0x0132
227 #define PropertyTagArtist                 0x013B
228 #define PropertyTagHostComputer           0x013C
229 #define PropertyTagPredictor              0x013D
230 #define PropertyTagWhitePoint             0x013E
231 #define PropertyTagPrimaryChromaticities  0x013F
232 #define PropertyTagColorMap               0x0140
233 #define PropertyTagHalftoneHints          0x0141
234 #define PropertyTagTileWidth              0x0142
235 #define PropertyTagTileLength             0x0143
236 #define PropertyTagTileOffset             0x0144
237 #define PropertyTagTileByteCounts         0x0145
238 #define PropertyTagInkSet                 0x014C
239 #define PropertyTagInkNames               0x014D
240 #define PropertyTagNumberOfInks           0x014E
241 #define PropertyTagDotRange               0x0150
242 #define PropertyTagTargetPrinter          0x0151
243 #define PropertyTagExtraSamples           0x0152
244 #define PropertyTagSampleFormat           0x0153
245 #define PropertyTagSMinSampleValue        0x0154
246 #define PropertyTagSMaxSampleValue        0x0155
247 #define PropertyTagTransferRange          0x0156
248
249 #define PropertyTagJPEGProc               0x0200
250 #define PropertyTagJPEGInterFormat        0x0201
251 #define PropertyTagJPEGInterLength        0x0202
252 #define PropertyTagJPEGRestartInterval    0x0203
253 #define PropertyTagJPEGLosslessPredictors 0x0205
254 #define PropertyTagJPEGPointTransforms    0x0206
255 #define PropertyTagJPEGQTables            0x0207
256 #define PropertyTagJPEGDCTables           0x0208
257 #define PropertyTagJPEGACTables           0x0209
258
259 #define PropertyTagYCbCrCoefficients      0x0211
260 #define PropertyTagYCbCrSubsampling       0x0212
261 #define PropertyTagYCbCrPositioning       0x0213
262 #define PropertyTagREFBlackWhite          0x0214
263
264 #define PropertyTagICCProfile          0x8773
265
266 #define PropertyTagGamma                0x0301
267 #define PropertyTagICCProfileDescriptor 0x0302
268 #define PropertyTagSRGBRenderingIntent  0x0303
269
270 #define PropertyTagImageTitle          0x0320
271 #define PropertyTagCopyright           0x8298
272
273 #define PropertyTagResolutionXUnit            0x5001
274 #define PropertyTagResolutionYUnit            0x5002
275 #define PropertyTagResolutionXLengthUnit      0x5003
276 #define PropertyTagResolutionYLengthUnit      0x5004
277 #define PropertyTagPrintFlags                 0x5005
278 #define PropertyTagPrintFlagsVersion          0x5006
279 #define PropertyTagPrintFlagsCrop             0x5007
280 #define PropertyTagPrintFlagsBleedWidth       0x5008
281 #define PropertyTagPrintFlagsBleedWidthScale  0x5009
282 #define PropertyTagHalftoneLPI                0x500A
283 #define PropertyTagHalftoneLPIUnit            0x500B
284 #define PropertyTagHalftoneDegree             0x500C
285 #define PropertyTagHalftoneShape              0x500D
286 #define PropertyTagHalftoneMisc               0x500E
287 #define PropertyTagHalftoneScreen             0x500F
288 #define PropertyTagJPEGQuality                0x5010
289 #define PropertyTagGridSize                   0x5011
290 #define PropertyTagThumbnailFormat            0x5012
291 #define PropertyTagThumbnailWidth             0x5013
292 #define PropertyTagThumbnailHeight            0x5014
293 #define PropertyTagThumbnailColorDepth        0x5015
294 #define PropertyTagThumbnailPlanes            0x5016
295 #define PropertyTagThumbnailRawBytes          0x5017
296 #define PropertyTagThumbnailSize              0x5018
297 #define PropertyTagThumbnailCompressedSize    0x5019
298 #define PropertyTagColorTransferFunction      0x501A
299 #define PropertyTagThumbnailData              0x501B
300
301 #define PropertyTagThumbnailImageWidth        0x5020
302 #define PropertyTagThumbnailImageHeight       0x5021
303 #define PropertyTagThumbnailBitsPerSample     0x5022
304 #define PropertyTagThumbnailCompression       0x5023
305 #define PropertyTagThumbnailPhotometricInterp 0x5024
306 #define PropertyTagThumbnailImageDescription  0x5025
307 #define PropertyTagThumbnailEquipMake         0x5026
308 #define PropertyTagThumbnailEquipModel        0x5027
309 #define PropertyTagThumbnailStripOffsets      0x5028
310 #define PropertyTagThumbnailOrientation       0x5029
311 #define PropertyTagThumbnailSamplesPerPixel   0x502A
312 #define PropertyTagThumbnailRowsPerStrip      0x502B
313 #define PropertyTagThumbnailStripBytesCount   0x502C
314 #define PropertyTagThumbnailResolutionX       0x502D
315 #define PropertyTagThumbnailResolutionY       0x502E
316 #define PropertyTagThumbnailPlanarConfig      0x502F
317 #define PropertyTagThumbnailResolutionUnit    0x5030
318 #define PropertyTagThumbnailTransferFunction  0x5031
319 #define PropertyTagThumbnailSoftwareUsed      0x5032
320 #define PropertyTagThumbnailDateTime          0x5033
321 #define PropertyTagThumbnailArtist            0x5034
322 #define PropertyTagThumbnailWhitePoint        0x5035
323 #define PropertyTagThumbnailPrimaryChromaticities 0x5036
324 #define PropertyTagThumbnailYCbCrCoefficients 0x5037
325 #define PropertyTagThumbnailYCbCrSubsampling  0x5038
326 #define PropertyTagThumbnailYCbCrPositioning  0x5039
327 #define PropertyTagThumbnailRefBlackWhite     0x503A
328 #define PropertyTagThumbnailCopyRight         0x503B
329
330 #define PropertyTagLuminanceTable    0x5090
331 #define PropertyTagChrominanceTable  0x5091
332
333 #define PropertyTagFrameDelay        0x5100
334 #define PropertyTagLoopCount         0x5101
335
336 #define PropertyTagPixelUnit         0x5110
337 #define PropertyTagPixelPerUnitX     0x5111
338 #define PropertyTagPixelPerUnitY     0x5112
339 #define PropertyTagPaletteHistogram  0x5113
340
341 #define PropertyTagExifExposureTime  0x829A
342 #define PropertyTagExifFNumber       0x829D
343
344 #define PropertyTagExifExposureProg  0x8822
345 #define PropertyTagExifSpectralSense 0x8824
346 #define PropertyTagExifISOSpeed      0x8827
347 #define PropertyTagExifOECF          0x8828
348
349 #define PropertyTagExifVer           0x9000
350 #define PropertyTagExifDTOrig        0x9003
351 #define PropertyTagExifDTDigitized   0x9004
352
353 #define PropertyTagExifCompConfig    0x9101
354 #define PropertyTagExifCompBPP       0x9102
355
356 #define PropertyTagExifShutterSpeed  0x9201
357 #define PropertyTagExifAperture      0x9202
358 #define PropertyTagExifBrightness    0x9203
359 #define PropertyTagExifExposureBias  0x9204
360 #define PropertyTagExifMaxAperture   0x9205
361 #define PropertyTagExifSubjectDist   0x9206
362 #define PropertyTagExifMeteringMode  0x9207
363 #define PropertyTagExifLightSource   0x9208
364 #define PropertyTagExifFlash         0x9209
365 #define PropertyTagExifFocalLength   0x920A
366 #define PropertyTagExifMakerNote     0x927C
367 #define PropertyTagExifUserComment   0x9286
368 #define PropertyTagExifDTSubsec      0x9290
369 #define PropertyTagExifDTOrigSS      0x9291
370 #define PropertyTagExifDTDigSS       0x9292
371
372 #define PropertyTagExifFPXVer        0xA000
373 #define PropertyTagExifColorSpace    0xA001
374 #define PropertyTagExifPixXDim       0xA002
375 #define PropertyTagExifPixYDim       0xA003
376 #define PropertyTagExifRelatedWav    0xA004
377 #define PropertyTagExifInterop       0xA005
378 #define PropertyTagExifFlashEnergy   0xA20B
379 #define PropertyTagExifSpatialFR     0xA20C
380 #define PropertyTagExifFocalXRes     0xA20E
381 #define PropertyTagExifFocalYRes     0xA20F
382 #define PropertyTagExifFocalResUnit  0xA210
383 #define PropertyTagExifSubjectLoc    0xA214
384 #define PropertyTagExifExposureIndex 0xA215
385 #define PropertyTagExifSensingMethod 0xA217
386 #define PropertyTagExifFileSource    0xA300
387 #define PropertyTagExifSceneType     0xA301
388 #define PropertyTagExifCfaPattern    0xA302
389
390 #define PropertyTagGpsVer            0x0000
391 #define PropertyTagGpsLatitudeRef    0x0001
392 #define PropertyTagGpsLatitude       0x0002
393 #define PropertyTagGpsLongitudeRef   0x0003
394 #define PropertyTagGpsLongitude      0x0004
395 #define PropertyTagGpsAltitudeRef    0x0005
396 #define PropertyTagGpsAltitude       0x0006
397 #define PropertyTagGpsGpsTime        0x0007
398 #define PropertyTagGpsGpsSatellites  0x0008
399 #define PropertyTagGpsGpsStatus      0x0009
400 #define PropertyTagGpsGpsMeasureMode 0x000A
401 #define PropertyTagGpsGpsDop         0x000B
402 #define PropertyTagGpsSpeedRef       0x000C
403 #define PropertyTagGpsSpeed          0x000D
404 #define PropertyTagGpsTrackRef       0x000E
405 #define PropertyTagGpsTrack          0x000F
406 #define PropertyTagGpsImgDirRef      0x0010
407 #define PropertyTagGpsImgDir         0x0011
408 #define PropertyTagGpsMapDatum       0x0012
409 #define PropertyTagGpsDestLatRef     0x0013
410 #define PropertyTagGpsDestLat        0x0014
411 #define PropertyTagGpsDestLongRef    0x0015
412 #define PropertyTagGpsDestLong       0x0016
413 #define PropertyTagGpsDestBearRef    0x0017
414 #define PropertyTagGpsDestBear       0x0018
415 #define PropertyTagGpsDestDistRef    0x0019
416 #define PropertyTagGpsDestDist       0x001A
417
418 #endif /* _GDIPLUSIMAGING_H */