2 * @file gdiplusimaging.h
3 * @copy 2012 MinGW.org project
5 * Permission is hereby granted, free of charge, to any person obtaining a
6 * copy of this software and associated documentation files (the "Software"),
7 * to deal in the Software without restriction, including without limitation
8 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
9 * and/or sell copies of the Software, and to permit persons to whom the
10 * Software is furnished to do so, subject to the following conditions:
12 * The above copyright notice and this permission notice (including the next
13 * paragraph) shall be included in all copies or substantial portions of the
16 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
21 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
22 * DEALINGS IN THE SOFTWARE.
24 /* Created by Markus Koenig <markus@stber-koenig.de> */
25 #ifndef __GDIPLUS_IMAGING_H
26 #define __GDIPLUS_IMAGING_H
27 #pragma GCC system_header
31 * GDI+ Imaging and image metadata
34 typedef enum ImageCodecFlags {
35 ImageCodecFlagsEncoder = 0x00000001,
36 ImageCodecFlagsDecoder = 0x00000002,
37 ImageCodecFlagsSupportBitmap = 0x00000004,
38 ImageCodecFlagsSupportVector = 0x00000008,
39 ImageCodecFlagsSeekableEncode = 0x00000010,
40 ImageCodecFlagsBlockingDecode = 0x00000020,
41 ImageCodecFlagsBuiltin = 0x00010000,
42 ImageCodecFlagsSystem = 0x00020000,
43 ImageCodecFlagsUser = 0x00040000
46 typedef enum ImageFlags {
48 ImageFlagsScalable = 0x00000001,
49 ImageFlagsHasAlpha = 0x00000002,
50 ImageFlagsHasTranslucent = 0x00000004,
51 ImageFlagsPartiallyScalable = 0x00000008,
52 ImageFlagsColorSpaceRGB = 0x00000010,
53 ImageFlagsColorSpaceCMYK = 0x00000020,
54 ImageFlagsColorSpaceGRAY = 0x00000040,
55 ImageFlagsColorSpaceYCBCR = 0x00000080,
56 ImageFlagsColorSpaceYCCK = 0x00000100,
57 ImageFlagsHasRealDPI = 0x00001000,
58 ImageFlagsHasRealPixelSize = 0x00002000,
59 ImageFlagsReadOnly = 0x00010000,
60 ImageFlagsCaching = 0x00020000
63 typedef enum ImageLockMode {
64 ImageLockModeRead = 1,
65 ImageLockModeWrite = 2,
66 ImageLockModeUserInputBuf = 4
69 typedef enum ItemDataPosition {
70 ItemDataPositionAfterHeader = 0,
71 ItemDataPositionAfterPalette = 1,
72 ItemDataPositionAfterBits = 2
75 typedef enum RotateFlipType {
76 RotateNoneFlipNone = 0,
78 Rotate180FlipNone = 2,
79 Rotate270FlipNone = 3,
94 typedef struct BitmapData {
98 INT PixelFormat; /* MSDN: "PixelFormat PixelFormat;" */
103 typedef struct EncoderParameter {
105 ULONG NumberOfValues;
110 typedef struct EncoderParameters {
112 EncoderParameter Parameter[1];
115 typedef struct ImageCodecInfo {
120 WCHAR *FormatDescription;
121 WCHAR *FilenameExtension;
131 /* FIXME: The order of fields is probably wrong. Please don't use this
132 * structure until this problem is resolved! Can't test because
133 * ImageItemData is not supported by the redistributable GDI+ 1.0 DLL. */
134 typedef struct ImageItemData {
144 typedef struct PropertyItem {
151 #define PropertyTagGpsVer ((PROPID) 0x0000)
152 #define PropertyTagGpsLatitudeRef ((PROPID) 0x0001)
153 #define PropertyTagGpsLatitude ((PROPID) 0x0002)
154 #define PropertyTagGpsLongitudeRef ((PROPID) 0x0003)
155 #define PropertyTagGpsLongitude ((PROPID) 0x0004)
156 #define PropertyTagGpsAltitudeRef ((PROPID) 0x0005)
157 #define PropertyTagGpsAltitude ((PROPID) 0x0006)
158 #define PropertyTagGpsGpsTime ((PROPID) 0x0007)
159 #define PropertyTagGpsGpsSatellites ((PROPID) 0x0008)
160 #define PropertyTagGpsGpsStatus ((PROPID) 0x0009)
161 #define PropertyTagGpsGpsMeasureMode ((PROPID) 0x000A)
162 #define PropertyTagGpsGpsDop ((PROPID) 0x000B)
163 #define PropertyTagGpsSpeedRef ((PROPID) 0x000C)
164 #define PropertyTagGpsSpeed ((PROPID) 0x000D)
165 #define PropertyTagGpsTrackRef ((PROPID) 0x000E)
166 #define PropertyTagGpsTrack ((PROPID) 0x000F)
167 #define PropertyTagGpsImgDirRef ((PROPID) 0x0010)
168 #define PropertyTagGpsImgDir ((PROPID) 0x0011)
169 #define PropertyTagGpsMapDatum ((PROPID) 0x0012)
170 #define PropertyTagGpsDestLatRef ((PROPID) 0x0013)
171 #define PropertyTagGpsDestLat ((PROPID) 0x0014)
172 #define PropertyTagGpsDestLongRef ((PROPID) 0x0015)
173 #define PropertyTagGpsDestLong ((PROPID) 0x0016)
174 #define PropertyTagGpsDestBearRef ((PROPID) 0x0017)
175 #define PropertyTagGpsDestBear ((PROPID) 0x0018)
176 #define PropertyTagGpsDestDistRef ((PROPID) 0x0019)
177 #define PropertyTagGpsDestDist ((PROPID) 0x001A)
178 #define PropertyTagNewSubfileType ((PROPID) 0x00FE)
179 #define PropertyTagSubfileType ((PROPID) 0x00FF)
180 #define PropertyTagImageWidth ((PROPID) 0x0100)
181 #define PropertyTagImageHeight ((PROPID) 0x0101)
182 #define PropertyTagBitsPerSample ((PROPID) 0x0102)
183 #define PropertyTagCompression ((PROPID) 0x0103)
184 #define PropertyTagPhotometricInterp ((PROPID) 0x0106)
185 #define PropertyTagThreshHolding ((PROPID) 0x0107)
186 #define PropertyTagCellWidth ((PROPID) 0x0108)
187 #define PropertyTagCellHeight ((PROPID) 0x0109)
188 #define PropertyTagFillOrder ((PROPID) 0x010A)
189 #define PropertyTagDocumentName ((PROPID) 0x010D)
190 #define PropertyTagImageDescription ((PROPID) 0x010E)
191 #define PropertyTagEquipMake ((PROPID) 0x010F)
192 #define PropertyTagEquipModel ((PROPID) 0x0110)
193 #define PropertyTagStripOffsets ((PROPID) 0x0111)
194 #define PropertyTagOrientation ((PROPID) 0x0112)
195 #define PropertyTagSamplesPerPixel ((PROPID) 0x0115)
196 #define PropertyTagRowsPerStrip ((PROPID) 0x0116)
197 #define PropertyTagStripBytesCount ((PROPID) 0x0117)
198 #define PropertyTagMinSampleValue ((PROPID) 0x0118)
199 #define PropertyTagMaxSampleValue ((PROPID) 0x0119)
200 #define PropertyTagXResolution ((PROPID) 0x011A)
201 #define PropertyTagYResolution ((PROPID) 0x011B)
202 #define PropertyTagPlanarConfig ((PROPID) 0x011C)
203 #define PropertyTagPageName ((PROPID) 0x011D)
204 #define PropertyTagXPosition ((PROPID) 0x011E)
205 #define PropertyTagYPosition ((PROPID) 0x011F)
206 #define PropertyTagFreeOffset ((PROPID) 0x0120)
207 #define PropertyTagFreeByteCounts ((PROPID) 0x0121)
208 #define PropertyTagGrayResponseUnit ((PROPID) 0x0122)
209 #define PropertyTagGrayResponseCurve ((PROPID) 0x0123)
210 #define PropertyTagT4Option ((PROPID) 0x0124)
211 #define PropertyTagT6Option ((PROPID) 0x0125)
212 #define PropertyTagResolutionUnit ((PROPID) 0x0128)
213 #define PropertyTagPageNumber ((PROPID) 0x0129)
214 #define PropertyTagTransferFunction ((PROPID) 0x012D)
215 #define PropertyTagSoftwareUsed ((PROPID) 0x0131)
216 #define PropertyTagDateTime ((PROPID) 0x0132)
217 #define PropertyTagArtist ((PROPID) 0x013B)
218 #define PropertyTagHostComputer ((PROPID) 0x013C)
219 #define PropertyTagPredictor ((PROPID) 0x013D)
220 #define PropertyTagWhitePoint ((PROPID) 0x013E)
221 #define PropertyTagPrimaryChromaticities ((PROPID) 0x013F)
222 #define PropertyTagColorMap ((PROPID) 0x0140)
223 #define PropertyTagHalftoneHints ((PROPID) 0x0141)
224 #define PropertyTagTileWidth ((PROPID) 0x0142)
225 #define PropertyTagTileLength ((PROPID) 0x0143)
226 #define PropertyTagTileOffset ((PROPID) 0x0144)
227 #define PropertyTagTileByteCounts ((PROPID) 0x0145)
228 #define PropertyTagInkSet ((PROPID) 0x014C)
229 #define PropertyTagInkNames ((PROPID) 0x014D)
230 #define PropertyTagNumberOfInks ((PROPID) 0x014E)
231 #define PropertyTagDotRange ((PROPID) 0x0150)
232 #define PropertyTagTargetPrinter ((PROPID) 0x0151)
233 #define PropertyTagExtraSamples ((PROPID) 0x0152)
234 #define PropertyTagSampleFormat ((PROPID) 0x0153)
235 #define PropertyTagSMinSampleValue ((PROPID) 0x0154)
236 #define PropertyTagSMaxSampleValue ((PROPID) 0x0155)
237 #define PropertyTagTransferRange ((PROPID) 0x0156)
238 #define PropertyTagJPEGProc ((PROPID) 0x0200)
239 #define PropertyTagJPEGInterFormat ((PROPID) 0x0201)
240 #define PropertyTagJPEGInterLength ((PROPID) 0x0202)
241 #define PropertyTagJPEGRestartInterval ((PROPID) 0x0203)
242 #define PropertyTagJPEGLosslessPredictors ((PROPID) 0x0205)
243 #define PropertyTagJPEGPointTransforms ((PROPID) 0x0206)
244 #define PropertyTagJPEGQTables ((PROPID) 0x0207)
245 #define PropertyTagJPEGDCTables ((PROPID) 0x0208)
246 #define PropertyTagJPEGACTables ((PROPID) 0x0209)
247 #define PropertyTagYCbCrCoefficients ((PROPID) 0x0211)
248 #define PropertyTagYCbCrSubsampling ((PROPID) 0x0212)
249 #define PropertyTagYCbCrPositioning ((PROPID) 0x0213)
250 #define PropertyTagREFBlackWhite ((PROPID) 0x0214)
251 #define PropertyTagGamma ((PROPID) 0x0301)
252 #define PropertyTagICCProfileDescriptor ((PROPID) 0x0302)
253 #define PropertyTagSRGBRenderingIntent ((PROPID) 0x0303)
254 #define PropertyTagImageTitle ((PROPID) 0x0320)
255 #define PropertyTagResolutionXUnit ((PROPID) 0x5001)
256 #define PropertyTagResolutionYUnit ((PROPID) 0x5002)
257 #define PropertyTagResolutionXLengthUnit ((PROPID) 0x5003)
258 #define PropertyTagResolutionYLengthUnit ((PROPID) 0x5004)
259 #define PropertyTagPrintFlags ((PROPID) 0x5005)
260 #define PropertyTagPrintFlagsVersion ((PROPID) 0x5006)
261 #define PropertyTagPrintFlagsCrop ((PROPID) 0x5007)
262 #define PropertyTagPrintFlagsBleedWidth ((PROPID) 0x5008)
263 #define PropertyTagPrintFlagsBleedWidthScale ((PROPID) 0x5009)
264 #define PropertyTagHalftoneLPI ((PROPID) 0x500A)
265 #define PropertyTagHalftoneLPIUnit ((PROPID) 0x500B)
266 #define PropertyTagHalftoneDegree ((PROPID) 0x500C)
267 #define PropertyTagHalftoneShape ((PROPID) 0x500D)
268 #define PropertyTagHalftoneMisc ((PROPID) 0x500E)
269 #define PropertyTagHalftoneScreen ((PROPID) 0x500F)
270 #define PropertyTagJPEGQuality ((PROPID) 0x5010)
271 #define PropertyTagGridSize ((PROPID) 0x5011)
272 #define PropertyTagThumbnailFormat ((PROPID) 0x5012)
273 #define PropertyTagThumbnailWidth ((PROPID) 0x5013)
274 #define PropertyTagThumbnailHeight ((PROPID) 0x5014)
275 #define PropertyTagThumbnailColorDepth ((PROPID) 0x5015)
276 #define PropertyTagThumbnailPlanes ((PROPID) 0x5016)
277 #define PropertyTagThumbnailRawBytes ((PROPID) 0x5017)
278 #define PropertyTagThumbnailSize ((PROPID) 0x5018)
279 #define PropertyTagThumbnailCompressedSize ((PROPID) 0x5019)
280 #define PropertyTagColorTransferFunction ((PROPID) 0x501A)
281 #define PropertyTagThumbnailData ((PROPID) 0x501B)
282 #define PropertyTagThumbnailImageWidth ((PROPID) 0x5020)
283 #define PropertyTagThumbnailImageHeight ((PROPID) 0x5021)
284 #define PropertyTagThumbnailBitsPerSample ((PROPID) 0x5022)
285 #define PropertyTagThumbnailCompression ((PROPID) 0x5023)
286 #define PropertyTagThumbnailPhotometricInterp ((PROPID) 0x5024)
287 #define PropertyTagThumbnailImageDescription ((PROPID) 0x5025)
288 #define PropertyTagThumbnailEquipMake ((PROPID) 0x5026)
289 #define PropertyTagThumbnailEquipModel ((PROPID) 0x5027)
290 #define PropertyTagThumbnailStripOffsets ((PROPID) 0x5028)
291 #define PropertyTagThumbnailOrientation ((PROPID) 0x5029)
292 #define PropertyTagThumbnailSamplesPerPixel ((PROPID) 0x502A)
293 #define PropertyTagThumbnailRowsPerStrip ((PROPID) 0x502B)
294 #define PropertyTagThumbnailStripBytesCount ((PROPID) 0x502C)
295 #define PropertyTagThumbnailResolutionX ((PROPID) 0x502D)
296 #define PropertyTagThumbnailResolutionY ((PROPID) 0x502E)
297 #define PropertyTagThumbnailPlanarConfig ((PROPID) 0x502F)
298 #define PropertyTagThumbnailResolutionUnit ((PROPID) 0x5030)
299 #define PropertyTagThumbnailTransferFunction ((PROPID) 0x5031)
300 #define PropertyTagThumbnailSoftwareUsed ((PROPID) 0x5032)
301 #define PropertyTagThumbnailDateTime ((PROPID) 0x5033)
302 #define PropertyTagThumbnailArtist ((PROPID) 0x5034)
303 #define PropertyTagThumbnailWhitePoint ((PROPID) 0x5035)
304 #define PropertyTagThumbnailPrimaryChromaticities ((PROPID) 0x5036)
305 #define PropertyTagThumbnailYCbCrCoefficients ((PROPID) 0x5037)
306 #define PropertyTagThumbnailYCbCrSubsampling ((PROPID) 0x5038)
307 #define PropertyTagThumbnailYCbCrPositioning ((PROPID) 0x5039)
308 #define PropertyTagThumbnailRefBlackWhite ((PROPID) 0x503A)
309 #define PropertyTagThumbnailCopyRight ((PROPID) 0x503B)
310 #define PropertyTagLuminanceTable ((PROPID) 0x5090)
311 #define PropertyTagChrominanceTable ((PROPID) 0x5091)
312 #define PropertyTagFrameDelay ((PROPID) 0x5100)
313 #define PropertyTagLoopCount ((PROPID) 0x5101)
314 #define PropertyTagGlobalPalette ((PROPID) 0x5102)
315 #define PropertyTagIndexBackground ((PROPID) 0x5103)
316 #define PropertyTagIndexTransparent ((PROPID) 0x5104)
317 #define PropertyTagPixelUnit ((PROPID) 0x5110)
318 #define PropertyTagPixelPerUnitX ((PROPID) 0x5111)
319 #define PropertyTagPixelPerUnitY ((PROPID) 0x5112)
320 #define PropertyTagPaletteHistogram ((PROPID) 0x5113)
321 #define PropertyTagCopyright ((PROPID) 0x8298)
322 #define PropertyTagExifExposureTime ((PROPID) 0x829A)
323 #define PropertyTagExifFNumber ((PROPID) 0x829D)
324 #define PropertyTagExifIFD ((PROPID) 0x8769)
325 #define PropertyTagICCProfile ((PROPID) 0x8773)
326 #define PropertyTagExifExposureProg ((PROPID) 0x8822)
327 #define PropertyTagExifSpectralSense ((PROPID) 0x8824)
328 #define PropertyTagGpsIFD ((PROPID) 0x8825)
329 #define PropertyTagExifISOSpeed ((PROPID) 0x8827)
330 #define PropertyTagExifOECF ((PROPID) 0x8828)
331 #define PropertyTagExifVer ((PROPID) 0x9000)
332 #define PropertyTagExifDTOrig ((PROPID) 0x9003)
333 #define PropertyTagExifDTDigitized ((PROPID) 0x9004)
334 #define PropertyTagExifCompConfig ((PROPID) 0x9101)
335 #define PropertyTagExifCompBPP ((PROPID) 0x9102)
336 #define PropertyTagExifShutterSpeed ((PROPID) 0x9201)
337 #define PropertyTagExifAperture ((PROPID) 0x9202)
338 #define PropertyTagExifBrightness ((PROPID) 0x9203)
339 #define PropertyTagExifExposureBias ((PROPID) 0x9204)
340 #define PropertyTagExifMaxAperture ((PROPID) 0x9205)
341 #define PropertyTagExifSubjectDist ((PROPID) 0x9206)
342 #define PropertyTagExifMeteringMode ((PROPID) 0x9207)
343 #define PropertyTagExifLightSource ((PROPID) 0x9208)
344 #define PropertyTagExifFlash ((PROPID) 0x9209)
345 #define PropertyTagExifFocalLength ((PROPID) 0x920A)
346 #define PropertyTagExifMakerNote ((PROPID) 0x927C)
347 #define PropertyTagExifUserComment ((PROPID) 0x9286)
348 #define PropertyTagExifDTSubsec ((PROPID) 0x9290)
349 #define PropertyTagExifDTOrigSS ((PROPID) 0x9291)
350 #define PropertyTagExifDTDigSS ((PROPID) 0x9292)
351 #define PropertyTagExifFPXVer ((PROPID) 0xA000)
352 #define PropertyTagExifColorSpace ((PROPID) 0xA001)
353 #define PropertyTagExifPixXDim ((PROPID) 0xA002)
354 #define PropertyTagExifPixYDim ((PROPID) 0xA003)
355 #define PropertyTagExifRelatedWav ((PROPID) 0xA004)
356 #define PropertyTagExifInterop ((PROPID) 0xA005)
357 #define PropertyTagExifFlashEnergy ((PROPID) 0xA20B)
358 #define PropertyTagExifSpatialFR ((PROPID) 0xA20C)
359 #define PropertyTagExifFocalXRes ((PROPID) 0xA20E)
360 #define PropertyTagExifFocalYRes ((PROPID) 0xA20F)
361 #define PropertyTagExifFocalResUnit ((PROPID) 0xA210)
362 #define PropertyTagExifSubjectLoc ((PROPID) 0xA214)
363 #define PropertyTagExifExposureIndex ((PROPID) 0xA215)
364 #define PropertyTagExifSensingMethod ((PROPID) 0xA217)
365 #define PropertyTagExifFileSource ((PROPID) 0xA300)
366 #define PropertyTagExifSceneType ((PROPID) 0xA301)
367 #define PropertyTagExifCfaPattern ((PROPID) 0xA302)
369 #define PropertyTagTypeByte ((WORD) 1)
370 #define PropertyTagTypeASCII ((WORD) 2)
371 #define PropertyTagTypeShort ((WORD) 3)
372 #define PropertyTagTypeLong ((WORD) 4)
373 #define PropertyTagTypeRational ((WORD) 5)
374 #define PropertyTagTypeUndefined ((WORD) 7)
375 #define PropertyTagTypeSLONG ((WORD) 9)
376 #define PropertyTagTypeSRational ((WORD) 10)
382 extern const GUID EncoderChrominanceTable; /* f2e455dc-09b3-4316-8260-676ada32481c */
383 extern const GUID EncoderColorDepth; /* 66087055-ad66-4c7c-9a18-38a2310b8337 */
384 extern const GUID EncoderColorSpace; /* ? */
385 extern const GUID EncoderCompression; /* e09d739d-ccd4-44ee-8eba-3fbf8be4fc58 */
386 extern const GUID EncoderImageItems; /* ? */
387 extern const GUID EncoderLuminanceTable; /* edb33bce-0266-4a77-b904-27216099e717 */
388 extern const GUID EncoderQuality; /* 1d5be4b5-fa4a-452d-9cdd-5db35105e7eb */
389 extern const GUID EncoderRenderMethod; /* 6d42c53a-229a-4825-8bb7-5c99e2b9a8b8 */
390 extern const GUID EncoderSaveAsCMYK; /* ? */
391 extern const GUID EncoderSaveFlag; /* 292266fc-ac40-47bf-8cfc-a85b89a655de */
392 extern const GUID EncoderScanMethod; /* 3a4e2661-3109-4e56-8536-42c156e7dcfa */
393 extern const GUID EncoderTransformation; /* 8d0eb2d1-a58e-4ea8-aa14-108074b7b6f9 */
394 extern const GUID EncoderVersion; /* 24d18c76-814a-41a4-bf53-1c219cccf797 */
396 extern const GUID ImageFormatBMP; /* b96b3cab-0728-11d3-9d7b-0000f81ef32e */
397 extern const GUID ImageFormatEMF; /* b96b3cac-0728-11d3-9d7b-0000f81ef32e */
398 extern const GUID ImageFormatEXIF; /* ? */
399 extern const GUID ImageFormatGIF; /* b96b3cb0-0728-11d3-9d7b-0000f81ef32e */
400 extern const GUID ImageFormatIcon; /* b96b3cb5-0728-11d3-9d7b-0000f81ef32e */
401 extern const GUID ImageFormatJPEG; /* b96b3cae-0728-11d3-9d7b-0000f81ef32e */
402 extern const GUID ImageFormatMemoryBMP; /* b96b3caa-0728-11d3-9d7b-0000f81ef32e */
403 extern const GUID ImageFormatPNG; /* b96b3caf-0728-11d3-9d7b-0000f81ef32e */
404 extern const GUID ImageFormatTIFF; /* b96b3cb1-0728-11d3-9d7b-0000f81ef32e */
405 extern const GUID ImageFormatUndefined; /* ? */
406 extern const GUID ImageFormatWMF; /* b96b3cad-0728-11d3-9d7b-0000f81ef32e */
408 extern const GUID FrameDimensionPage; /* 7462dc86-6180-4c7e-8e3f-ee7333a7a483 */
409 extern const GUID FrameDimensionResolution; /* ? */
410 extern const GUID FrameDimensionTime; /* 6aedbd6d-3fb5-418a-83a6-7f45229dc872 */
416 #endif /* __GDIPLUS_IMAGING_H */