~cosme/ubuntu/precise/freeimage/freeimage-3.15.1

« back to all changes in this revision

Viewing changes to Wrapper/FreeImage.NET/cs/Library/Classes/MetadataModels.cs

  • Committer: Stefano Rivera
  • Date: 2010-07-24 15:35:51 UTC
  • mto: This revision was merged to the branch mainline in revision 5.
  • Revision ID: stefanor@ubuntu.com-20100724153551-6s3fth1653huk31a
Tags: upstream-3.13.1
ImportĀ upstreamĀ versionĀ 3.31.1

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
// ==========================================================
 
2
// FreeImage 3 .NET wrapper
 
3
// Original FreeImage 3 functions and .NET compatible derived functions
 
4
//
 
5
// Design and implementation by
 
6
// - Jean-Philippe Goerke (jpgoerke@users.sourceforge.net)
 
7
// - Carsten Klein (cklein05@users.sourceforge.net)
 
8
//
 
9
// Contributors:
 
10
// - David Boland (davidboland@vodafone.ie)
 
11
//
 
12
// Main reference : MSDN Knowlede Base
 
13
//
 
14
// This file is part of FreeImage 3
 
15
//
 
16
// COVERED CODE IS PROVIDED UNDER THIS LICENSE ON AN "AS IS" BASIS, WITHOUT WARRANTY
 
17
// OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, WITHOUT LIMITATION, WARRANTIES
 
18
// THAT THE COVERED CODE IS FREE OF DEFECTS, MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE
 
19
// OR NON-INFRINGING. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE COVERED
 
20
// CODE IS WITH YOU. SHOULD ANY COVERED CODE PROVE DEFECTIVE IN ANY RESPECT, YOU (NOT
 
21
// THE INITIAL DEVELOPER OR ANY OTHER CONTRIBUTOR) ASSUME THE COST OF ANY NECESSARY
 
22
// SERVICING, REPAIR OR CORRECTION. THIS DISCLAIMER OF WARRANTY CONSTITUTES AN ESSENTIAL
 
23
// PART OF THIS LICENSE. NO USE OF ANY COVERED CODE IS AUTHORIZED HEREUNDER EXCEPT UNDER
 
24
// THIS DISCLAIMER.
 
25
//
 
26
// Use at your own risk!
 
27
// ==========================================================
 
28
 
 
29
// ==========================================================
 
30
// CVS
 
31
// $Revision: 1.6 $
 
32
// $Date: 2009/09/15 11:49:24 $
 
33
// $Id: MetadataModels.cs,v 1.6 2009/09/15 11:49:24 cklein05 Exp $
 
34
// ==========================================================
 
35
 
 
36
using System;
 
37
using System.Xml;
 
38
using System.IO;
 
39
using System.Text;
 
40
 
 
41
namespace FreeImageAPI.Metadata
 
42
{
 
43
    /// <summary>
 
44
    /// Represents a collection of all tags contained in the metadata model
 
45
    /// <see cref="FREE_IMAGE_MDMODEL.FIMD_ANIMATION"/>.
 
46
    /// </summary>
 
47
    public class MDM_ANIMATION : MetadataModel
 
48
    {
 
49
        /// <summary>
 
50
        /// Initializes a new instance of this class.
 
51
        /// </summary>
 
52
        /// <param name="dib">Handle to a FreeImage bitmap.</param>
 
53
        public MDM_ANIMATION(FIBITMAP dib) : base(dib) { }
 
54
 
 
55
        /// <summary>
 
56
        /// Retrieves the datamodel that this instance represents.
 
57
        /// </summary>
 
58
        public override FREE_IMAGE_MDMODEL Model
 
59
        {
 
60
            get { return FREE_IMAGE_MDMODEL.FIMD_ANIMATION; }
 
61
        }
 
62
 
 
63
        /// <summary>
 
64
        /// Gets or sets the width of the entire canvas area, that each page is displayed in.
 
65
        /// </summary>
 
66
        /// <remarks>
 
67
        /// <b>Handling of null values</b><para/>
 
68
        /// A null value indicates, that the corresponding metadata tag is not
 
69
        /// present in the metadata model.
 
70
        /// Setting this property's value to a non-null reference creates the
 
71
        /// metadata tag if necessary.
 
72
        /// Setting this property's value to a null reference deletes the
 
73
        /// metadata tag from the metadata model.
 
74
        /// </remarks>
 
75
        public ushort? LogicalWidth
 
76
        {
 
77
            get
 
78
            {
 
79
                return GetTagValue<ushort>("LogicalWidth");
 
80
            }
 
81
            set
 
82
            {
 
83
                SetTagValue("LogicalWidth", value);
 
84
            }
 
85
        }
 
86
 
 
87
        /// <summary>
 
88
        /// Gets or sets the height of the entire canvas area, that each page is displayed in.
 
89
        /// </summary>
 
90
        /// <remarks>
 
91
        /// <b>Handling of null values</b><para/>
 
92
        /// A null value indicates, that the corresponding metadata tag is not
 
93
        /// present in the metadata model.
 
94
        /// Setting this property's value to a non-null reference creates the
 
95
        /// metadata tag if necessary.
 
96
        /// Setting this property's value to a null reference deletes the
 
97
        /// metadata tag from the metadata model.
 
98
        /// </remarks>
 
99
        public ushort? LogicalHeight
 
100
        {
 
101
            get
 
102
            {
 
103
                return GetTagValue<ushort>("LogicalHeight");
 
104
            }
 
105
            set
 
106
            {
 
107
                SetTagValue("LogicalHeight", value);
 
108
            }
 
109
        }
 
110
 
 
111
        /// <summary>
 
112
        /// Gets or sets the global palette of the GIF image.
 
113
        /// </summary>
 
114
        /// <remarks>
 
115
        /// <b>Handling of null values</b><para/>
 
116
        /// A null value indicates, that the corresponding metadata tag is not
 
117
        /// present in the metadata model.
 
118
        /// Setting this property's value to a non-null reference creates the
 
119
        /// metadata tag if necessary.
 
120
        /// Setting this property's value to a null reference deletes the
 
121
        /// metadata tag from the metadata model.
 
122
        /// </remarks>
 
123
        public Palette GlobalPalette
 
124
        {
 
125
            get
 
126
            {
 
127
                MetadataTag mdtag = GetTag("GlobalPalette");
 
128
                return (mdtag == null) ? null : new Palette(mdtag);
 
129
            }
 
130
            set
 
131
            {
 
132
                SetTagValue("GlobalPalette", (value != null) ? null : value.Data);
 
133
            }
 
134
        }
 
135
 
 
136
        /// <summary>
 
137
        /// Gets or sets the number of replays for the animation.
 
138
        /// Use 0 (zero) to specify an infinte number of replays.
 
139
        /// </summary>
 
140
        /// <remarks>
 
141
        /// <b>Handling of null values</b><para/>
 
142
        /// A null value indicates, that the corresponding metadata tag is not
 
143
        /// present in the metadata model.
 
144
        /// Setting this property's value to a non-null reference creates the
 
145
        /// metadata tag if necessary.
 
146
        /// Setting this property's value to a null reference deletes the
 
147
        /// metadata tag from the metadata model.
 
148
        /// </remarks>
 
149
        public uint? LoopCount
 
150
        {
 
151
            get
 
152
            {
 
153
                return GetTagValue<uint>("Loop");
 
154
            }
 
155
            set
 
156
            {
 
157
                SetTagValue("Loop", value);
 
158
            }
 
159
        }
 
160
 
 
161
        /// <summary>
 
162
        /// Gets or sets the horizontal offset within the logical canvas area, this frame is to be displayed at.
 
163
        /// </summary>
 
164
        /// <remarks>
 
165
        /// <b>Handling of null values</b><para/>
 
166
        /// A null value indicates, that the corresponding metadata tag is not
 
167
        /// present in the metadata model.
 
168
        /// Setting this property's value to a non-null reference creates the
 
169
        /// metadata tag if necessary.
 
170
        /// Setting this property's value to a null reference deletes the
 
171
        /// metadata tag from the metadata model.
 
172
        /// </remarks>
 
173
        public ushort? FrameLeft
 
174
        {
 
175
            get
 
176
            {
 
177
                return GetTagValue<ushort>("FrameLeft");
 
178
            }
 
179
            set
 
180
            {
 
181
                SetTagValue("FrameLeft", value);
 
182
            }
 
183
        }
 
184
 
 
185
        /// <summary>
 
186
        /// Gets or sets the vertical offset within the logical canvas area, this frame is to be displayed at.
 
187
        /// </summary>
 
188
        /// <remarks>
 
189
        /// <b>Handling of null values</b><para/>
 
190
        /// A null value indicates, that the corresponding metadata tag is not
 
191
        /// present in the metadata model.
 
192
        /// Setting this property's value to a non-null reference creates the
 
193
        /// metadata tag if necessary.
 
194
        /// Setting this property's value to a null reference deletes the
 
195
        /// metadata tag from the metadata model.
 
196
        /// </remarks>
 
197
        public ushort? FrameTop
 
198
        {
 
199
            get
 
200
            {
 
201
                return GetTagValue<ushort>("FrameTop");
 
202
            }
 
203
            set
 
204
            {
 
205
                SetTagValue("FrameTop", value);
 
206
            }
 
207
        }
 
208
 
 
209
        /// <summary>
 
210
        /// Gets or sets a flag to supress saving the dib's attached palette
 
211
        /// (making it use the global palette). The local palette is the palette used by a page.
 
212
        /// </summary>
 
213
        /// <remarks>
 
214
        /// <b>Handling of null values</b><para/>
 
215
        /// A null value indicates, that the corresponding metadata tag is not
 
216
        /// present in the metadata model.
 
217
        /// Setting this property's value to a non-null reference creates the
 
218
        /// metadata tag if necessary.
 
219
        /// Setting this property's value to a null reference deletes the
 
220
        /// metadata tag from the metadata model.
 
221
        /// </remarks>
 
222
        public bool? NoLocalPalette
 
223
        {
 
224
            get
 
225
            {
 
226
                byte? useGlobalPalette = GetTagValue<byte>("NoLocalPalette");
 
227
                return useGlobalPalette.HasValue ? (useGlobalPalette.Value != 0) : default(bool?);
 
228
            }
 
229
            set
 
230
            {
 
231
                byte? val = null;
 
232
                if (value.HasValue)
 
233
                {
 
234
                    val = (byte)(value.Value ? 1 : 0);
 
235
                }
 
236
                SetTagValue("NoLocalPalette", val);
 
237
            }
 
238
        }
 
239
 
 
240
        /// <summary>
 
241
        /// Gets or sets a value indicating whether the image is interlaced.
 
242
        /// </summary>
 
243
        /// <remarks>
 
244
        /// <b>Handling of null values</b><para/>
 
245
        /// A null value indicates, that the corresponding metadata tag is not
 
246
        /// present in the metadata model.
 
247
        /// Setting this property's value to a non-null reference creates the
 
248
        /// metadata tag if necessary.
 
249
        /// Setting this property's value to a null reference deletes the
 
250
        /// metadata tag from the metadata model.
 
251
        /// </remarks>
 
252
        public bool? Interlaced
 
253
        {
 
254
            get
 
255
            {
 
256
                byte? useGlobalPalette = GetTagValue<byte>("Interlaced");
 
257
                return useGlobalPalette.HasValue ? (useGlobalPalette.Value != 0) : default(bool?);
 
258
            }
 
259
            set
 
260
            {
 
261
                byte? val = null;
 
262
                if (value.HasValue)
 
263
                {
 
264
                    val = (byte)(value.Value ? 1 : 0);
 
265
                }
 
266
                SetTagValue("Interlaced", val);
 
267
            }
 
268
        }
 
269
 
 
270
        /// <summary>
 
271
        /// Gets or sets the amout of time in milliseconds this frame is to be displayed.
 
272
        /// </summary>
 
273
        /// <remarks>
 
274
        /// <b>Handling of null values</b><para/>
 
275
        /// A null value indicates, that the corresponding metadata tag is not
 
276
        /// present in the metadata model.
 
277
        /// Setting this property's value to a non-null reference creates the
 
278
        /// metadata tag if necessary.
 
279
        /// Setting this property's value to a null reference deletes the
 
280
        /// metadata tag from the metadata model.
 
281
        /// </remarks>
 
282
        public uint? FrameTime
 
283
        {
 
284
            get
 
285
            {
 
286
                return GetTagValue<uint>("FrameTime");
 
287
            }
 
288
            set
 
289
            {
 
290
                SetTagValue("FrameTime", value);
 
291
            }
 
292
        }
 
293
 
 
294
        /// <summary>
 
295
        /// Gets or sets this frame's disposal method. Generally, this method defines, how to
 
296
        /// remove or replace a frame when the next frame has to be drawn.<para/>
 
297
        /// </summary>
 
298
        /// <remarks>
 
299
        /// <b>Handling of null values</b><para/>
 
300
        /// A null value indicates, that the corresponding metadata tag is not
 
301
        /// present in the metadata model.
 
302
        /// Setting this property's value to a non-null reference creates the
 
303
        /// metadata tag if necessary.
 
304
        /// Setting this property's value to a null reference deletes the
 
305
        /// metadata tag from the metadata model.
 
306
        /// </remarks>
 
307
        public DisposalMethodType? DisposalMethod
 
308
        {
 
309
            get
 
310
            {
 
311
                return GetTagValue<DisposalMethodType>("DisposalMethod");
 
312
            }
 
313
            set
 
314
            {
 
315
                SetTagValue("DisposalMethod", value);
 
316
            }
 
317
        }
 
318
    }
 
319
 
 
320
    /// <summary>
 
321
    /// Represents a collection of all tags contained in the metadata model
 
322
    /// <see cref="FREE_IMAGE_MDMODEL.FIMD_COMMENTS"/>.
 
323
    /// </summary>
 
324
    public class MDM_COMMENTS : MetadataModel
 
325
    {
 
326
        /// <summary>
 
327
        /// Initializes a new instance of this class.
 
328
        /// </summary>
 
329
        /// <param name="dib">Handle to a FreeImage bitmap.</param>
 
330
        public MDM_COMMENTS(FIBITMAP dib) : base(dib) { }
 
331
 
 
332
        /// <summary>
 
333
        /// Retrieves the datamodel that this instance represents.
 
334
        /// </summary>
 
335
        public override FREE_IMAGE_MDMODEL Model
 
336
        {
 
337
            get { return FREE_IMAGE_MDMODEL.FIMD_COMMENTS; }
 
338
        }
 
339
 
 
340
        /// <summary>
 
341
        /// Gets or sets the comment of the image.
 
342
        /// Supported formats are JPEG, PNG and GIF.
 
343
        /// </summary>
 
344
        /// <remarks>
 
345
        /// <b>Handling of null values</b><para/>
 
346
        /// A null value indicates, that the corresponding metadata tag is not
 
347
        /// present in the metadata model.
 
348
        /// Setting this property's value to a non-null reference creates the
 
349
        /// metadata tag if necessary.
 
350
        /// Setting this property's value to a null reference deletes the
 
351
        /// metadata tag from the metadata model.
 
352
        /// </remarks>
 
353
        public string Comment
 
354
        {
 
355
            get
 
356
            {
 
357
                return GetTagText("Comment");
 
358
            }
 
359
            set
 
360
            {
 
361
                SetTagValue("Comment", value);
 
362
            }
 
363
        }
 
364
    }
 
365
 
 
366
    /// <summary>
 
367
    /// Represents a collection of all tags contained in the metadata model
 
368
    /// <see cref="FREE_IMAGE_MDMODEL.FIMD_CUSTOM"/>.
 
369
    /// </summary>
 
370
    public class MDM_CUSTOM : MetadataModel
 
371
    {
 
372
        /// <summary>
 
373
        /// Initializes a new instance of this class.
 
374
        /// </summary>
 
375
        /// <param name="dib">Handle to a FreeImage bitmap.</param>
 
376
        public MDM_CUSTOM(FIBITMAP dib) : base(dib) { }
 
377
 
 
378
        /// <summary>
 
379
        /// Retrieves the datamodel that this instance represents.
 
380
        /// </summary>
 
381
        public override FREE_IMAGE_MDMODEL Model
 
382
        {
 
383
            get { return FREE_IMAGE_MDMODEL.FIMD_CUSTOM; }
 
384
        }
 
385
    }
 
386
 
 
387
    /// <summary>
 
388
    /// Represents a collection of all tags contained in the metadata model
 
389
    /// <see cref="FREE_IMAGE_MDMODEL.FIMD_EXIF_EXIF"/>.
 
390
    /// </summary>
 
391
    public class MDM_EXIF_EXIF : MetadataModel
 
392
    {
 
393
        /// <summary>
 
394
        /// Initializes a new instance of this class.
 
395
        /// </summary>
 
396
        /// <param name="dib">Handle to a FreeImage bitmap.</param>
 
397
        public MDM_EXIF_EXIF(FIBITMAP dib) : base(dib) { }
 
398
 
 
399
        /// <summary>
 
400
        /// Retrieves the datamodel that this instance represents.
 
401
        /// </summary>
 
402
        public override FREE_IMAGE_MDMODEL Model
 
403
        {
 
404
            get { return FREE_IMAGE_MDMODEL.FIMD_EXIF_EXIF; }
 
405
        }
 
406
 
 
407
        /// <summary>
 
408
        /// Gets or sets the version of this standard supported.
 
409
        /// Constant length or 4.
 
410
        /// </summary>
 
411
        /// <remarks>
 
412
        /// <b>Handling of null values</b><para/>
 
413
        /// A null value indicates, that the corresponding metadata tag is not
 
414
        /// present in the metadata model.
 
415
        /// Setting this property's value to a non-null reference creates the
 
416
        /// metadata tag if necessary.
 
417
        /// Setting this property's value to a null reference deletes the
 
418
        /// metadata tag from the metadata model.
 
419
        /// </remarks>
 
420
        public byte[] ExifVersion
 
421
        {
 
422
            get
 
423
            {
 
424
                return GetTagArray<byte>("ExifVersion");
 
425
            }
 
426
            set
 
427
            {
 
428
                FreeImage.Resize(ref value, 4);
 
429
                SetTagValueUndefined("ExifVersion", value);
 
430
            }
 
431
        }
 
432
 
 
433
        /// <summary>
 
434
        /// Gets or sets the Flashpix format version supported by a FPXR file.
 
435
        /// Constant length or 4.
 
436
        /// </summary>
 
437
        /// <remarks>
 
438
        /// <b>Handling of null values</b><para/>
 
439
        /// A null value indicates, that the corresponding metadata tag is not
 
440
        /// present in the metadata model.
 
441
        /// Setting this property's value to a non-null reference creates the
 
442
        /// metadata tag if necessary.
 
443
        /// Setting this property's value to a null reference deletes the
 
444
        /// metadata tag from the metadata model.
 
445
        /// </remarks>
 
446
        public byte[] FlashpixVersion
 
447
        {
 
448
            get
 
449
            {
 
450
                return GetTagArray<byte>("FlashpixVersion");
 
451
            }
 
452
            set
 
453
            {
 
454
                FreeImage.Resize(ref value, 4);
 
455
                SetTagValueUndefined("FlashpixVersion", value);
 
456
            }
 
457
        }
 
458
 
 
459
        /// <summary>
 
460
        /// Gets or sets the color space information tag.
 
461
        /// See remarks for further information.
 
462
        /// </summary>
 
463
        /// <remarks>
 
464
        /// The following values are defined:<para/>
 
465
        /// <list type="table">
 
466
        ///             <listheader>
 
467
        ///                     <term>ID</term>
 
468
        ///                     <description>Description</description>
 
469
        ///             </listheader>
 
470
        ///             <item>
 
471
        ///                     <term>1</term>
 
472
        ///                     <description>sRGB (default)</description>
 
473
        ///             </item>
 
474
        ///             <item>
 
475
        ///                     <term>0xFFFF</term>
 
476
        ///                     <description>uncalibrated</description>
 
477
        ///             </item>
 
478
        ///             <item>
 
479
        ///                     <term>other</term>
 
480
        ///                     <description>reserved</description>
 
481
        ///             </item>
 
482
        /// </list>
 
483
        /// <para/>
 
484
        /// <br/><b>Handling of null values</b><para/>
 
485
        /// A null value indicates, that the corresponding metadata tag is not
 
486
        /// present in the metadata model.
 
487
        /// Setting this property's value to a non-null reference creates the
 
488
        /// metadata tag if necessary.
 
489
        /// Setting this property's value to a null reference deletes the
 
490
        /// metadata tag from the metadata model.
 
491
        /// </remarks>
 
492
        public ushort? ColorSpace
 
493
        {
 
494
            get
 
495
            {
 
496
                return GetTagValue<ushort>("ColorSpace");
 
497
            }
 
498
            set
 
499
            {
 
500
                SetTagValue("ColorSpace", value);
 
501
            }
 
502
        }
 
503
 
 
504
        /// <summary>
 
505
        /// Gets or sets the valid width of a compressed image.
 
506
        /// </summary>
 
507
        /// <remarks>
 
508
        /// <b>Handling of null values</b><para/>
 
509
        /// A null value indicates, that the corresponding metadata tag is not
 
510
        /// present in the metadata model.
 
511
        /// Setting this property's value to a non-null reference creates the
 
512
        /// metadata tag if necessary.
 
513
        /// Setting this property's value to a null reference deletes the
 
514
        /// metadata tag from the metadata model.
 
515
        /// </remarks>
 
516
        public uint? PixelXDimension
 
517
        {
 
518
            get
 
519
            {
 
520
                return GetUInt32Value("PixelXDimension");
 
521
            }
 
522
            set
 
523
            {
 
524
                RemoveTag("PixelXDimension");
 
525
                if (value.HasValue)
 
526
                {
 
527
                    SetTagValue("PixelXDimension", value.Value);
 
528
                }
 
529
            }
 
530
        }
 
531
 
 
532
        /// <summary>
 
533
        /// Gets or sets the valid height of a compressed image.
 
534
        /// </summary>
 
535
        /// <remarks>
 
536
        /// <b>Handling of null values</b><para/>
 
537
        /// A null value indicates, that the corresponding metadata tag is not
 
538
        /// present in the metadata model.
 
539
        /// Setting this property's value to a non-null reference creates the
 
540
        /// metadata tag if necessary.
 
541
        /// Setting this property's value to a null reference deletes the
 
542
        /// metadata tag from the metadata model.
 
543
        /// </remarks>
 
544
        public uint? PixelYDimension
 
545
        {
 
546
            get
 
547
            {
 
548
                return GetUInt32Value("PixelYDimension");
 
549
            }
 
550
            set
 
551
            {
 
552
                RemoveTag("PixelYDimension");
 
553
                if (value.HasValue)
 
554
                {
 
555
                    SetTagValue("PixelYDimension", value.Value);
 
556
                }
 
557
            }
 
558
        }
 
559
 
 
560
        /// <summary>
 
561
        /// Gets or sets components configuration. See remarks for further information.
 
562
        /// Constant length of 4.
 
563
        /// </summary>
 
564
        /// <remarks>
 
565
        /// The channels of each component are arranged in order from the 1st component to the 4th.
 
566
        /// For uncompressed data the data arrangement is given in the PhotometricInterpretation tag.
 
567
        /// However, since PhotometricInterpretation can only express the order of Y,Cb and Cr,
 
568
        /// this tag is provided for cases when compressed data uses components other than Y, Cb,
 
569
        /// and Cr and to enable support of other sequences.<para/>
 
570
        /// Default = 4 5 6 0 (if RGB uncompressed)<para/>
 
571
        /// The following values are defined:<para/>
 
572
        /// <list type="table">
 
573
        ///             <listheader>
 
574
        ///                     <term>ID</term>
 
575
        ///                     <description>Description</description>
 
576
        ///             </listheader>
 
577
        ///             <item>
 
578
        ///                     <term>0</term>
 
579
        ///                     <description>does not exist</description>
 
580
        ///             </item>
 
581
        ///             <item>
 
582
        ///                     <term>1</term>
 
583
        ///                     <description>Y</description>
 
584
        ///             </item>
 
585
        ///             <item>
 
586
        ///                     <term>2</term>
 
587
        ///                     <description>Cb</description>
 
588
        ///             </item>
 
589
        ///             <item>
 
590
        ///                     <term>3</term>
 
591
        ///                     <description>Cr</description>
 
592
        ///             </item>
 
593
        ///             <item>
 
594
        ///                     <term>4</term>
 
595
        ///                     <description>R</description>
 
596
        ///             </item>
 
597
        ///             <item>
 
598
        ///                     <term>5</term>
 
599
        ///                     <description>R</description>
 
600
        ///             </item>
 
601
        ///             <item>
 
602
        ///                     <term>6</term>
 
603
        ///                     <description>R</description>
 
604
        ///             </item>
 
605
        ///             <item>
 
606
        ///                     <term>other</term>
 
607
        ///                     <description>reserved</description>
 
608
        ///             </item>
 
609
        /// </list>
 
610
        /// <para/>
 
611
        /// <br/><b>Handling of null values</b><para/>
 
612
        /// A null value indicates, that the corresponding metadata tag is not
 
613
        /// present in the metadata model.
 
614
        /// Setting this property's value to a non-null reference creates the
 
615
        /// metadata tag if necessary.
 
616
        /// Setting this property's value to a null reference deletes the
 
617
        /// metadata tag from the metadata model.
 
618
        /// </remarks>
 
619
        public byte[] ComponentsConfiguration
 
620
        {
 
621
            get
 
622
            {
 
623
                return GetTagArray<byte>("ComponentsConfiguration");
 
624
            }
 
625
            set
 
626
            {
 
627
                FreeImage.Resize(ref value, 4);
 
628
                SetTagValueUndefined("ComponentsConfiguration", value);
 
629
            }
 
630
        }
 
631
 
 
632
        /// <summary>
 
633
        /// Gets or sets compression mode used for a compressed image is indicated
 
634
        /// in unit bits per pixel.
 
635
        /// </summary>
 
636
        /// <remarks>
 
637
        /// <b>Handling of null values</b><para/>
 
638
        /// A null value indicates, that the corresponding metadata tag is not
 
639
        /// present in the metadata model.
 
640
        /// Setting this property's value to a non-null reference creates the
 
641
        /// metadata tag if necessary.
 
642
        /// Setting this property's value to a null reference deletes the
 
643
        /// metadata tag from the metadata model.
 
644
        /// </remarks>
 
645
        public FIURational? CompressedBitsPerPixel
 
646
        {
 
647
            get
 
648
            {
 
649
                return GetTagValue<FIURational>("CompressedBitsPerPixel");
 
650
            }
 
651
            set
 
652
            {
 
653
                SetTagValue("CompressedBitsPerPixel", value);
 
654
            }
 
655
        }
 
656
 
 
657
        /// <summary>
 
658
        /// Gets or sets a tag for manufacturers of Exif writers to record any desired information.
 
659
        /// The contents are up to the manufacturer, but this tag should not be used for any other
 
660
        /// than its intended purpose.
 
661
        /// </summary>
 
662
        /// <remarks>
 
663
        /// <b>Handling of null values</b><para/>
 
664
        /// A null value indicates, that the corresponding metadata tag is not
 
665
        /// present in the metadata model.
 
666
        /// Setting this property's value to a non-null reference creates the
 
667
        /// metadata tag if necessary.
 
668
        /// Setting this property's value to a null reference deletes the
 
669
        /// metadata tag from the metadata model.
 
670
        /// </remarks>
 
671
        public byte[] MakerNote
 
672
        {
 
673
            get
 
674
            {
 
675
                return GetTagArray<byte>("FlashpixVersion");
 
676
            }
 
677
            set
 
678
            {
 
679
                SetTagValueUndefined("FlashpixVersion", value);
 
680
            }
 
681
        }
 
682
 
 
683
        /// <summary>
 
684
        /// Gets or sets a tag for Exif users to write keywords or comments on the image besides
 
685
        /// those in ImageDescription, and without the character code limitations of the ImageDescription tag.
 
686
        /// Minimum length of 8. See remarks for further information.
 
687
        /// </summary>
 
688
        /// <remarks>
 
689
        /// The character code used in the UserComment tag is identified based on an ID code in a fixed 8-byte
 
690
        /// area at the start of the tag data area. The unused portion of the area is padded with NULL.
 
691
        /// The ID code for the UserComment area may be a Defined code such as JIS or ASCII, or may be Undefined.
 
692
        /// <para/>
 
693
        /// <br/><b>Handling of null values</b><para/>
 
694
        /// A null value indicates, that the corresponding metadata tag is not
 
695
        /// present in the metadata model.
 
696
        /// Setting this property's value to a non-null reference creates the
 
697
        /// metadata tag if necessary.
 
698
        /// Setting this property's value to a null reference deletes the
 
699
        /// metadata tag from the metadata model.
 
700
        /// </remarks>
 
701
        public byte[] UserComment
 
702
        {
 
703
            get
 
704
            {
 
705
                return GetTagArray<byte>("UserComment");
 
706
            }
 
707
            set
 
708
            {
 
709
                FreeImage.Resize(ref value, 8, int.MaxValue);
 
710
                SetTagValueUndefined("UserComment", value);
 
711
            }
 
712
        }
 
713
 
 
714
        /// <summary>
 
715
        /// Gets or sets the name of an audio file related to the image data.
 
716
        /// The format is 8.3.
 
717
        /// Constant length of 12
 
718
        /// </summary>
 
719
        /// <remarks>
 
720
        /// <b>Handling of null values</b><para/>
 
721
        /// A null value indicates, that the corresponding metadata tag is not
 
722
        /// present in the metadata model.
 
723
        /// Setting this property's value to a non-null reference creates the
 
724
        /// metadata tag if necessary.
 
725
        /// Setting this property's value to a null reference deletes the
 
726
        /// metadata tag from the metadata model.
 
727
        /// </remarks>
 
728
        public string RelatedSoundFile
 
729
        {
 
730
            get
 
731
            {
 
732
                string text = GetTagText("RelatedSoundFile");
 
733
                if (!string.IsNullOrEmpty(text))
 
734
                {
 
735
                    text = text.Substring(0, text.Length - 1);
 
736
                }
 
737
                return text;
 
738
            }
 
739
            set
 
740
            {
 
741
                if (value != null)
 
742
                {
 
743
                    FreeImage.Resize(ref value, 12);
 
744
                    value += '\0';
 
745
                }
 
746
                SetTagValue("RelatedSoundFile", value);
 
747
            }
 
748
        }
 
749
 
 
750
        /// <summary>
 
751
        /// Gets or sets the date and time when the original image data was generated.
 
752
        /// </summary>
 
753
        /// <remarks>
 
754
        /// <b>Handling of null values</b><para/>
 
755
        /// A null value indicates, that the corresponding metadata tag is not
 
756
        /// present in the metadata model.
 
757
        /// Setting this property's value to a non-null reference creates the
 
758
        /// metadata tag if necessary.
 
759
        /// Setting this property's value to a null reference deletes the
 
760
        /// metadata tag from the metadata model.
 
761
        /// </remarks>
 
762
        public DateTime? DateTimeOriginal
 
763
        {
 
764
            get
 
765
            {
 
766
                DateTime? result = null;
 
767
                string text = GetTagText("DateTimeOriginal");
 
768
                if (text != null)
 
769
                {
 
770
                    try
 
771
                    {
 
772
                        result = System.DateTime.ParseExact(text, "yyyy:MM:dd HH:mm:ss\0", null);
 
773
                    }
 
774
                    catch
 
775
                    {
 
776
                    }
 
777
                }
 
778
                return result;
 
779
            }
 
780
            set
 
781
            {
 
782
                string val = null;
 
783
                if (value.HasValue)
 
784
                {
 
785
                    try
 
786
                    {
 
787
                        val = value.Value.ToString("yyyy:MM:dd HH:mm:ss\0");
 
788
                    }
 
789
                    catch
 
790
                    {
 
791
                    }
 
792
                }
 
793
                SetTagValue("DateTimeOriginal", val);
 
794
            }
 
795
        }
 
796
 
 
797
        /// <summary>
 
798
        /// Gets or sets the date and time when the image was stored as digital data.
 
799
        /// </summary>
 
800
        /// <remarks>
 
801
        /// <b>Handling of null values</b><para/>
 
802
        /// A null value indicates, that the corresponding metadata tag is not
 
803
        /// present in the metadata model.
 
804
        /// Setting this property's value to a non-null reference creates the
 
805
        /// metadata tag if necessary.
 
806
        /// Setting this property's value to a null reference deletes the
 
807
        /// metadata tag from the metadata model.
 
808
        /// </remarks>
 
809
        public DateTime? DateTimeDigitized
 
810
        {
 
811
            get
 
812
            {
 
813
                DateTime? result = null;
 
814
                string text = GetTagText("DateTimeDigitized");
 
815
                if (text != null)
 
816
                {
 
817
                    try
 
818
                    {
 
819
                        result = System.DateTime.ParseExact(text, "yyyy:MM:dd HH:mm:ss\0", null);
 
820
                    }
 
821
                    catch
 
822
                    {
 
823
                    }
 
824
                }
 
825
                return result;
 
826
            }
 
827
            set
 
828
            {
 
829
                string val = null;
 
830
                if (value.HasValue)
 
831
                {
 
832
                    try
 
833
                    {
 
834
                        val = value.Value.ToString("yyyy:MM:dd HH:mm:ss\0");
 
835
                    }
 
836
                    catch
 
837
                    {
 
838
                    }
 
839
                }
 
840
                SetTagValue("DateTimeDigitized", val);
 
841
            }
 
842
        }
 
843
 
 
844
        /// <summary>
 
845
        /// Gets or sets a tag used to record fractions of seconds for the DateTime tag.
 
846
        /// </summary>
 
847
        /// <remarks>
 
848
        /// <b>Handling of null values</b><para/>
 
849
        /// A null value indicates, that the corresponding metadata tag is not
 
850
        /// present in the metadata model.
 
851
        /// Setting this property's value to a non-null reference creates the
 
852
        /// metadata tag if necessary.
 
853
        /// Setting this property's value to a null reference deletes the
 
854
        /// metadata tag from the metadata model.
 
855
        /// </remarks>
 
856
        public string SubsecTime
 
857
        {
 
858
            get
 
859
            {
 
860
                string text = GetTagText("SubsecTime");
 
861
                if (!string.IsNullOrEmpty(text))
 
862
                {
 
863
                    text = text.Substring(0, text.Length - 1);
 
864
                }
 
865
                return text;
 
866
            }
 
867
            set
 
868
            {
 
869
                if (value != null)
 
870
                {
 
871
                    value += '\0';
 
872
                }
 
873
                SetTagValue("SubsecTime", value);
 
874
            }
 
875
        }
 
876
 
 
877
        /// <summary>
 
878
        /// Gets or sets a tag used to record fractions of seconds for the DateTimeOriginal tag.
 
879
        /// </summary>
 
880
        /// <remarks>
 
881
        /// <b>Handling of null values</b><para/>
 
882
        /// A null value indicates, that the corresponding metadata tag is not
 
883
        /// present in the metadata model.
 
884
        /// Setting this property's value to a non-null reference creates the
 
885
        /// metadata tag if necessary.
 
886
        /// Setting this property's value to a null reference deletes the
 
887
        /// metadata tag from the metadata model.
 
888
        /// </remarks>
 
889
        public string SubsecTimeOriginal
 
890
        {
 
891
            get
 
892
            {
 
893
                string text = GetTagText("SubsecTimeOriginal");
 
894
                if (!string.IsNullOrEmpty(text))
 
895
                {
 
896
                    text = text.Substring(0, text.Length - 1);
 
897
                }
 
898
                return text;
 
899
            }
 
900
            set
 
901
            {
 
902
                if (value != null)
 
903
                {
 
904
                    value += '\0';
 
905
                }
 
906
                SetTagValue("SubsecTimeOriginal", value);
 
907
            }
 
908
        }
 
909
 
 
910
        /// <summary>
 
911
        /// Gets or sets a tag used to record fractions of seconds for the DateTimeDigitized tag.
 
912
        /// </summary>
 
913
        /// <remarks>
 
914
        /// <b>Handling of null values</b><para/>
 
915
        /// A null value indicates, that the corresponding metadata tag is not
 
916
        /// present in the metadata model.
 
917
        /// Setting this property's value to a non-null reference creates the
 
918
        /// metadata tag if necessary.
 
919
        /// Setting this property's value to a null reference deletes the
 
920
        /// metadata tag from the metadata model.
 
921
        /// </remarks>
 
922
        public string SubsecTimeDigitized
 
923
        {
 
924
            get
 
925
            {
 
926
                string text = GetTagText("SubsecTimeDigitized");
 
927
                if (!string.IsNullOrEmpty(text))
 
928
                {
 
929
                    text = text.Substring(0, text.Length - 1);
 
930
                }
 
931
                return text;
 
932
            }
 
933
            set
 
934
            {
 
935
                if (value != null)
 
936
                {
 
937
                    value += '\0';
 
938
                }
 
939
                SetTagValue("SubsecTimeDigitized", value);
 
940
            }
 
941
        }
 
942
 
 
943
        /// <summary>
 
944
        /// Gets or the exposure time, given in seconds (sec).
 
945
        /// </summary>
 
946
        /// <remarks>
 
947
        /// <b>Handling of null values</b><para/>
 
948
        /// A null value indicates, that the corresponding metadata tag is not
 
949
        /// present in the metadata model.
 
950
        /// Setting this property's value to a non-null reference creates the
 
951
        /// metadata tag if necessary.
 
952
        /// Setting this property's value to a null reference deletes the
 
953
        /// metadata tag from the metadata model.
 
954
        /// </remarks>
 
955
        public FIURational? ExposureTime
 
956
        {
 
957
            get
 
958
            {
 
959
                return GetTagValue<FIURational>("ExposureTime");
 
960
            }
 
961
            set
 
962
            {
 
963
                SetTagValue("ExposureTime", value);
 
964
            }
 
965
        }
 
966
 
 
967
        /// <summary>
 
968
        /// Gets or the F number.
 
969
        /// </summary>
 
970
        /// <remarks>
 
971
        /// <b>Handling of null values</b><para/>
 
972
        /// A null value indicates, that the corresponding metadata tag is not
 
973
        /// present in the metadata model.
 
974
        /// Setting this property's value to a non-null reference creates the
 
975
        /// metadata tag if necessary.
 
976
        /// Setting this property's value to a null reference deletes the
 
977
        /// metadata tag from the metadata model.
 
978
        /// </remarks>
 
979
        public FIURational? FNumber
 
980
        {
 
981
            get
 
982
            {
 
983
                return GetTagValue<FIURational>("FNumber");
 
984
            }
 
985
            set
 
986
            {
 
987
                SetTagValue("FNumber", value);
 
988
            }
 
989
        }
 
990
 
 
991
        /// <summary>
 
992
        /// Gets or sets the class of the program used by the camera to set exposure when the
 
993
        /// picture is taken.
 
994
        /// See remarks for further information.
 
995
        /// </summary>
 
996
        /// <remarks>
 
997
        /// The following values are defined:<para/>
 
998
        /// <list type="table">
 
999
        ///             <listheader>
 
1000
        ///                     <term>ID</term>
 
1001
        ///                     <description>Description</description>
 
1002
        ///             </listheader>
 
1003
        ///             <item>
 
1004
        ///                     <term>0</term>
 
1005
        ///                     <description>not defined</description>
 
1006
        ///             </item>
 
1007
        ///             <item>
 
1008
        ///                     <term>1</term>
 
1009
        ///                     <description>manual</description>
 
1010
        ///             </item>
 
1011
        ///             <item>
 
1012
        ///                     <term>2</term>
 
1013
        ///                     <description>normal program</description>
 
1014
        ///             </item>
 
1015
        ///             <item>
 
1016
        ///                     <term>3</term>
 
1017
        ///                     <description>aperture priority</description>
 
1018
        ///             </item>
 
1019
        ///             <item>
 
1020
        ///                     <term>4</term>
 
1021
        ///                     <description>shutter priority</description>
 
1022
        ///             </item>
 
1023
        ///             <item>
 
1024
        ///                     <term>5</term>
 
1025
        ///                     <description>create program</description>
 
1026
        ///             </item>
 
1027
        ///             <item>
 
1028
        ///                     <term>6</term>
 
1029
        ///                     <description>action program</description>
 
1030
        ///             </item>
 
1031
        ///             <item>
 
1032
        ///                     <term>7</term>
 
1033
        ///                     <description>portrait mode</description>
 
1034
        ///             </item>
 
1035
        ///             <item>
 
1036
        ///                     <term>8</term>
 
1037
        ///                     <description>landscape mode</description>
 
1038
        ///             </item>
 
1039
        ///             <item>
 
1040
        ///                     <term>others</term>
 
1041
        ///                     <description>reserved</description>
 
1042
        ///             </item>
 
1043
        /// </list>
 
1044
        /// <para/>
 
1045
        /// <br/><b>Handling of null values</b><para/>
 
1046
        /// A null value indicates, that the corresponding metadata tag is not
 
1047
        /// present in the metadata model.
 
1048
        /// Setting this property's value to a non-null reference creates the
 
1049
        /// metadata tag if necessary.
 
1050
        /// Setting this property's value to a null reference deletes the
 
1051
        /// metadata tag from the metadata model.
 
1052
        /// </remarks>
 
1053
        public ushort? ExposureProgram
 
1054
        {
 
1055
            get
 
1056
            {
 
1057
                return GetTagValue<ushort>("ExposureProgram");
 
1058
            }
 
1059
            set
 
1060
            {
 
1061
                SetTagValue("ExposureProgram", value);
 
1062
            }
 
1063
        }
 
1064
 
 
1065
        /// <summary>
 
1066
        /// Gets or sets the spectral sensitivity of each channel of the camera used.
 
1067
        /// </summary>
 
1068
        /// <remarks>
 
1069
        /// <b>Handling of null values</b><para/>
 
1070
        /// A null value indicates, that the corresponding metadata tag is not
 
1071
        /// present in the metadata model.
 
1072
        /// Setting this property's value to a non-null reference creates the
 
1073
        /// metadata tag if necessary.
 
1074
        /// Setting this property's value to a null reference deletes the
 
1075
        /// metadata tag from the metadata model.
 
1076
        /// </remarks>
 
1077
        public string SpectralSensitivity
 
1078
        {
 
1079
            get
 
1080
            {
 
1081
                string text = GetTagText("SpectralSensitivity");
 
1082
                if (!string.IsNullOrEmpty(text))
 
1083
                {
 
1084
                    text = text.Substring(0, text.Length - 1);
 
1085
                }
 
1086
                return text;
 
1087
            }
 
1088
            set
 
1089
            {
 
1090
                if (value != null)
 
1091
                {
 
1092
                    value += '\0';
 
1093
                }
 
1094
                SetTagValue("SpectralSensitivity", value);
 
1095
            }
 
1096
        }
 
1097
 
 
1098
        /// <summary>
 
1099
        /// Gets or sets the the ISO Speed and ISO Latitude of the camera or input device as
 
1100
        /// specified in ISO 12232.
 
1101
        /// </summary>
 
1102
        /// <remarks>
 
1103
        /// <b>Handling of null values</b><para/>
 
1104
        /// A null value indicates, that the corresponding metadata tag is not
 
1105
        /// present in the metadata model.
 
1106
        /// Setting this property's value to a non-null reference creates the
 
1107
        /// metadata tag if necessary.
 
1108
        /// Setting this property's value to a null reference deletes the
 
1109
        /// metadata tag from the metadata model.
 
1110
        /// </remarks>
 
1111
        public ushort[] ISOSpeedRatings
 
1112
        {
 
1113
            get
 
1114
            {
 
1115
                return GetTagArray<ushort>("ISOSpeedRatings");
 
1116
            }
 
1117
            set
 
1118
            {
 
1119
                SetTagValue("ISOSpeedRatings", value);
 
1120
            }
 
1121
        }
 
1122
 
 
1123
        /// <summary>
 
1124
        /// Gets or sets the Opto-Electric Conversion Function (OECF) specified in ISO 14524.
 
1125
        /// OECF is the relationship between the camera optical input and the image values.
 
1126
        /// </summary>
 
1127
        /// <remarks>
 
1128
        /// <b>Handling of null values</b><para/>
 
1129
        /// A null value indicates, that the corresponding metadata tag is not
 
1130
        /// present in the metadata model.
 
1131
        /// Setting this property's value to a non-null reference creates the
 
1132
        /// metadata tag if necessary.
 
1133
        /// Setting this property's value to a null reference deletes the
 
1134
        /// metadata tag from the metadata model.
 
1135
        /// </remarks>
 
1136
        public byte[] OECF
 
1137
        {
 
1138
            get
 
1139
            {
 
1140
                return GetTagArray<byte>("OECF");
 
1141
            }
 
1142
            set
 
1143
            {
 
1144
                SetTagValueUndefined("OECF", value);
 
1145
            }
 
1146
        }
 
1147
 
 
1148
        /// <summary>
 
1149
        /// Gets or sets the shutter speed. The unit is the APEX (Additive System of Photographic Exposure).
 
1150
        /// </summary>
 
1151
        /// <remarks>
 
1152
        /// <b>Handling of null values</b><para/>
 
1153
        /// A null value indicates, that the corresponding metadata tag is not
 
1154
        /// present in the metadata model.
 
1155
        /// Setting this property's value to a non-null reference creates the
 
1156
        /// metadata tag if necessary.
 
1157
        /// Setting this property's value to a null reference deletes the
 
1158
        /// metadata tag from the metadata model.
 
1159
        /// </remarks>
 
1160
        public FIRational? ShutterSpeedValue
 
1161
        {
 
1162
            get
 
1163
            {
 
1164
                return GetTagValue<FIRational>("ShutterSpeedValue");
 
1165
            }
 
1166
            set
 
1167
            {
 
1168
                SetTagValue("ShutterSpeedValue", value);
 
1169
            }
 
1170
        }
 
1171
 
 
1172
        /// <summary>
 
1173
        /// Gets or sets the lens aperture. The unit is the APEX value.
 
1174
        /// </summary>
 
1175
        /// <remarks>
 
1176
        /// <b>Handling of null values</b><para/>
 
1177
        /// A null value indicates, that the corresponding metadata tag is not
 
1178
        /// present in the metadata model.
 
1179
        /// Setting this property's value to a non-null reference creates the
 
1180
        /// metadata tag if necessary.
 
1181
        /// Setting this property's value to a null reference deletes the
 
1182
        /// metadata tag from the metadata model.
 
1183
        /// </remarks>
 
1184
        public FIURational? ApertureValue
 
1185
        {
 
1186
            get
 
1187
            {
 
1188
                return GetTagValue<FIURational>("ApertureValue");
 
1189
            }
 
1190
            set
 
1191
            {
 
1192
                SetTagValue("ApertureValue", value);
 
1193
            }
 
1194
        }
 
1195
 
 
1196
        /// <summary>
 
1197
        /// Gets or sets the value of brightness. The unit is the APEX value.
 
1198
        /// Ordinarily it is given in the range of -99.99 to 99.99.
 
1199
        /// </summary>
 
1200
        /// <remarks>
 
1201
        /// <b>Handling of null values</b><para/>
 
1202
        /// A null value indicates, that the corresponding metadata tag is not
 
1203
        /// present in the metadata model.
 
1204
        /// Setting this property's value to a non-null reference creates the
 
1205
        /// metadata tag if necessary.
 
1206
        /// Setting this property's value to a null reference deletes the
 
1207
        /// metadata tag from the metadata model.
 
1208
        /// </remarks>
 
1209
        public FIRational? BrightnessValue
 
1210
        {
 
1211
            get
 
1212
            {
 
1213
                return GetTagValue<FIRational>("BrightnessValue");
 
1214
            }
 
1215
            set
 
1216
            {
 
1217
                SetTagValue("BrightnessValue", value);
 
1218
            }
 
1219
        }
 
1220
 
 
1221
        /// <summary>
 
1222
        /// Gets or sets the exposure bias. The unit is the APEX value.
 
1223
        /// Ordinarily it is given in the range of ļæ½99.99 to 99.99.
 
1224
        /// </summary>
 
1225
        /// <remarks>
 
1226
        /// <b>Handling of null values</b><para/>
 
1227
        /// A null value indicates, that the corresponding metadata tag is not
 
1228
        /// present in the metadata model.
 
1229
        /// Setting this property's value to a non-null reference creates the
 
1230
        /// metadata tag if necessary.
 
1231
        /// Setting this property's value to a null reference deletes the
 
1232
        /// metadata tag from the metadata model.
 
1233
        /// </remarks>
 
1234
        public FIRational? ExposureBiasValue
 
1235
        {
 
1236
            get
 
1237
            {
 
1238
                return GetTagValue<FIRational>("ExposureBiasValue");
 
1239
            }
 
1240
            set
 
1241
            {
 
1242
                SetTagValue("ExposureBiasValue", value);
 
1243
            }
 
1244
        }
 
1245
 
 
1246
        /// <summary>
 
1247
        /// Gets or sets the smallest F number of the lens. The unit is the APEX value.
 
1248
        /// Ordinarily it is given in the range of 00.00 to 99.99,
 
1249
        /// but it is not limited to this range.
 
1250
        /// </summary>
 
1251
        /// <remarks>
 
1252
        /// <b>Handling of null values</b><para/>
 
1253
        /// A null value indicates, that the corresponding metadata tag is not
 
1254
        /// present in the metadata model.
 
1255
        /// Setting this property's value to a non-null reference creates the
 
1256
        /// metadata tag if necessary.
 
1257
        /// Setting this property's value to a null reference deletes the
 
1258
        /// metadata tag from the metadata model.
 
1259
        /// </remarks>
 
1260
        public FIURational? MaxApertureValue
 
1261
        {
 
1262
            get
 
1263
            {
 
1264
                return GetTagValue<FIURational>("MaxApertureValue");
 
1265
            }
 
1266
            set
 
1267
            {
 
1268
                SetTagValue("MaxApertureValue", value);
 
1269
            }
 
1270
        }
 
1271
 
 
1272
        /// <summary>
 
1273
        /// Gets or sets distance to the subject, given in meters.
 
1274
        /// Note that if the numerator of the recorded value is FFFFFFFF, infinity shall be indicated;
 
1275
        /// and if the numerator is 0, distance unknown shall be indicated.
 
1276
        /// </summary>
 
1277
        /// <remarks>
 
1278
        /// <b>Handling of null values</b><para/>
 
1279
        /// A null value indicates, that the corresponding metadata tag is not
 
1280
        /// present in the metadata model.
 
1281
        /// Setting this property's value to a non-null reference creates the
 
1282
        /// metadata tag if necessary.
 
1283
        /// Setting this property's value to a null reference deletes the
 
1284
        /// metadata tag from the metadata model.
 
1285
        /// </remarks>
 
1286
        public FIURational? SubjectDistance
 
1287
        {
 
1288
            get
 
1289
            {
 
1290
                return GetTagValue<FIURational>("SubjectDistance");
 
1291
            }
 
1292
            set
 
1293
            {
 
1294
                SetTagValue("SubjectDistance", value);
 
1295
            }
 
1296
        }
 
1297
 
 
1298
        /// <summary>
 
1299
        /// Gets or sets the metering mode. See remarks for further information.
 
1300
        /// </summary>
 
1301
        /// <remarks>
 
1302
        /// The following values are defined:<para/>
 
1303
        /// <list type="table">
 
1304
        ///             <listheader>
 
1305
        ///                     <term>ID</term>
 
1306
        ///                     <description>Description</description>
 
1307
        ///             </listheader>
 
1308
        ///             <item>
 
1309
        ///                     <term>0</term>
 
1310
        ///                     <description>unknown</description>
 
1311
        ///             </item>
 
1312
        ///             <item>
 
1313
        ///                     <term>1</term>
 
1314
        ///                     <description>average</description>
 
1315
        ///             </item>
 
1316
        ///             <item>
 
1317
        ///                     <term>2</term>
 
1318
        ///                     <description>center-weighted-average</description>
 
1319
        ///             </item>
 
1320
        ///             <item>
 
1321
        ///                     <term>3</term>
 
1322
        ///                     <description>spot</description>
 
1323
        ///             </item>
 
1324
        ///             <item>
 
1325
        ///                     <term>4</term>
 
1326
        ///                     <description>multi-spot</description>
 
1327
        ///             </item>
 
1328
        ///             <item>
 
1329
        ///                     <term>5</term>
 
1330
        ///                     <description>pattern</description>
 
1331
        ///             </item>
 
1332
        ///             <item>
 
1333
        ///                     <term>6</term>
 
1334
        ///                     <description>partial</description>
 
1335
        ///             </item>
 
1336
        ///             <item>
 
1337
        ///                     <term>other</term>
 
1338
        ///                     <description>reserved</description>
 
1339
        ///             </item>
 
1340
        ///             <item>
 
1341
        ///                     <term>255</term>
 
1342
        ///                     <description>other</description>
 
1343
        ///             </item>
 
1344
        /// </list>
 
1345
        /// <para/>
 
1346
        /// <br/><b>Handling of null values</b><para/>
 
1347
        /// A null value indicates, that the corresponding metadata tag is not
 
1348
        /// present in the metadata model.
 
1349
        /// Setting this property's value to a non-null reference creates the
 
1350
        /// metadata tag if necessary.
 
1351
        /// Setting this property's value to a null reference deletes the
 
1352
        /// metadata tag from the metadata model.
 
1353
        /// </remarks>
 
1354
        public ushort? MeteringMode
 
1355
        {
 
1356
            get
 
1357
            {
 
1358
                return GetTagValue<ushort>("MeteringMode");
 
1359
            }
 
1360
            set
 
1361
            {
 
1362
                SetTagValue("MeteringMode", value);
 
1363
            }
 
1364
        }
 
1365
 
 
1366
        /// <summary>
 
1367
        /// Gets or sets the kind of light source.
 
1368
        /// See remarks for further information.
 
1369
        /// </summary>
 
1370
        /// <remarks>
 
1371
        /// The following values are defined:<para/>
 
1372
        /// <list type="table">
 
1373
        ///             <listheader>
 
1374
        ///                     <term>ID</term>
 
1375
        ///                     <description>Description</description>
 
1376
        ///             </listheader>
 
1377
        ///             <item>
 
1378
        ///                     <term>0</term>
 
1379
        ///                     <description>unknown</description>
 
1380
        ///             </item>
 
1381
        ///             <item>
 
1382
        ///                     <term>1</term>
 
1383
        ///                     <description>daylight</description>
 
1384
        ///             </item>
 
1385
        ///             <item>
 
1386
        ///                     <term>2</term>
 
1387
        ///                     <description>fluorescent</description>
 
1388
        ///             </item>
 
1389
        ///             <item>
 
1390
        ///                     <term>3</term>
 
1391
        ///                     <description>tungsten</description>
 
1392
        ///             </item>
 
1393
        ///             <item>
 
1394
        ///                     <term>4</term>
 
1395
        ///                     <description>flash</description>
 
1396
        ///             </item>
 
1397
        ///             <item>
 
1398
        ///                     <term>9</term>
 
1399
        ///                     <description>fine weather</description>
 
1400
        ///             </item>
 
1401
        ///             <item>
 
1402
        ///                     <term>10</term>
 
1403
        ///                     <description>cloudy weather</description>
 
1404
        ///             </item>
 
1405
        ///             <item>
 
1406
        ///                     <term>11</term>
 
1407
        ///                     <description>shade</description>
 
1408
        ///             </item>
 
1409
        ///             <item>
 
1410
        ///                     <term>12</term>
 
1411
        ///                     <description>daylight fluorecent (D 5700 - 7100K)</description>
 
1412
        ///             </item>
 
1413
        ///             <item>
 
1414
        ///                     <term>13</term>
 
1415
        ///                     <description>day white fluorescent (N 4600 - 5400K)</description>
 
1416
        ///             </item>
 
1417
        ///             <item>
 
1418
        ///                     <term>14</term>
 
1419
        ///                     <description>cool white fluorescent (W 3900 - 4500K)</description>
 
1420
        ///             </item>
 
1421
        ///             <item>
 
1422
        ///                     <term>15</term>
 
1423
        ///                     <description>white fluorescent (WW 3200 - 3700K)</description>
 
1424
        ///             </item>
 
1425
        ///             <item>
 
1426
        ///                     <term>17</term>
 
1427
        ///                     <description>standard light A</description>
 
1428
        ///             </item>
 
1429
        ///             <item>
 
1430
        ///                     <term>18</term>
 
1431
        ///                     <description>standard light B</description>
 
1432
        ///             </item>
 
1433
        ///             <item>
 
1434
        ///                     <term>19</term>
 
1435
        ///                     <description>standard light C</description>
 
1436
        ///             </item>
 
1437
        ///             <item>
 
1438
        ///                     <term>20</term>
 
1439
        ///                     <description>D55</description>
 
1440
        ///             </item>
 
1441
        ///             <item>
 
1442
        ///                     <term>21</term>
 
1443
        ///                     <description>D65</description>
 
1444
        ///             </item>
 
1445
        ///             <item>
 
1446
        ///                     <term>22</term>
 
1447
        ///                     <description>D75</description>
 
1448
        ///             </item>
 
1449
        ///             <item>
 
1450
        ///                     <term>23</term>
 
1451
        ///                     <description>D50</description>
 
1452
        ///             </item>
 
1453
        ///             <item>
 
1454
        ///                     <term>24</term>
 
1455
        ///                     <description>ISO studio tungsten</description>
 
1456
        ///             </item>
 
1457
        ///             <item>
 
1458
        ///                     <term>255</term>
 
1459
        ///                     <description>other light source</description>
 
1460
        ///             </item>
 
1461
        ///             <item>
 
1462
        ///                     <term>other</term>
 
1463
        ///                     <description>reserved</description>
 
1464
        ///             </item>
 
1465
        /// </list>
 
1466
        /// <para/>
 
1467
        /// <br/><b>Handling of null values</b><para/>
 
1468
        /// A null value indicates, that the corresponding metadata tag is not
 
1469
        /// present in the metadata model.
 
1470
        /// Setting this property's value to a non-null reference creates the
 
1471
        /// metadata tag if necessary.
 
1472
        /// Setting this property's value to a null reference deletes the
 
1473
        /// metadata tag from the metadata model.
 
1474
        /// </remarks>
 
1475
        public ushort? LightSource
 
1476
        {
 
1477
            get
 
1478
            {
 
1479
                return GetTagValue<ushort>("LightSource");
 
1480
            }
 
1481
            set
 
1482
            {
 
1483
                SetTagValue("LightSource", value);
 
1484
            }
 
1485
        }
 
1486
 
 
1487
        /// <summary>
 
1488
        /// Gets or sets a value indicating the status of flash when the image was shot.
 
1489
        /// Bit 0 indicates the flash firing status, bits 1 and 2 indicate the flash return
 
1490
        /// status, bits 3 and 4 indicate the flash mode, bit 5 indicates whether the flash
 
1491
        /// function is present, and bit 6 indicates "red eye" mode.
 
1492
        /// </summary>
 
1493
        /// <remarks>
 
1494
        /// <b>Handling of null values</b><para/>
 
1495
        /// A null value indicates, that the corresponding metadata tag is not
 
1496
        /// present in the metadata model.
 
1497
        /// Setting this property's value to a non-null reference creates the
 
1498
        /// metadata tag if necessary.
 
1499
        /// Setting this property's value to a null reference deletes the
 
1500
        /// metadata tag from the metadata model.
 
1501
        /// </remarks>
 
1502
        public ushort? Flash
 
1503
        {
 
1504
            get
 
1505
            {
 
1506
                return GetTagValue<ushort>("Flash");
 
1507
            }
 
1508
            set
 
1509
            {
 
1510
                SetTagValue("Flash", value);
 
1511
            }
 
1512
        }
 
1513
 
 
1514
        /// <summary>
 
1515
        /// Gets or sets a value indicating the location and area of the main subject in
 
1516
        /// the overall scene. Variable length between 2 and 4.
 
1517
        /// </summary>
 
1518
        /// <remarks>
 
1519
        /// <b>Handling of null values</b><para/>
 
1520
        /// A null value indicates, that the corresponding metadata tag is not
 
1521
        /// present in the metadata model.
 
1522
        /// Setting this property's value to a non-null reference creates the
 
1523
        /// metadata tag if necessary.
 
1524
        /// Setting this property's value to a null reference deletes the
 
1525
        /// metadata tag from the metadata model.
 
1526
        /// </remarks>
 
1527
        public ushort[] SubjectArea
 
1528
        {
 
1529
            get
 
1530
            {
 
1531
                return GetTagArray<ushort>("SubjectArea");
 
1532
            }
 
1533
            set
 
1534
            {
 
1535
                FreeImage.Resize(ref value, 2, 4);
 
1536
                SetTagValue("SubjectArea", value);
 
1537
            }
 
1538
        }
 
1539
 
 
1540
        /// <summary>
 
1541
        /// Gets or sets the actual focal length of the lens, in mm.
 
1542
        /// Conversion is not made to the focal length of a 35 mm film camera.
 
1543
        /// </summary>
 
1544
        /// <remarks>
 
1545
        /// <b>Handling of null values</b><para/>
 
1546
        /// A null value indicates, that the corresponding metadata tag is not
 
1547
        /// present in the metadata model.
 
1548
        /// Setting this property's value to a non-null reference creates the
 
1549
        /// metadata tag if necessary.
 
1550
        /// Setting this property's value to a null reference deletes the
 
1551
        /// metadata tag from the metadata model.
 
1552
        /// </remarks>
 
1553
        public FIURational? FocalLength
 
1554
        {
 
1555
            get
 
1556
            {
 
1557
                return GetTagValue<FIURational>("FocalLength");
 
1558
            }
 
1559
            set
 
1560
            {
 
1561
                SetTagValue("FocalLength", value);
 
1562
            }
 
1563
        }
 
1564
 
 
1565
        /// <summary>
 
1566
        /// Gets or sets the strobe energy at the time the image is captured,
 
1567
        /// as measured in Beam Candle Power Seconds (BCPS).
 
1568
        /// </summary>
 
1569
        /// <remarks>
 
1570
        /// <b>Handling of null values</b><para/>
 
1571
        /// A null value indicates, that the corresponding metadata tag is not
 
1572
        /// present in the metadata model.
 
1573
        /// Setting this property's value to a non-null reference creates the
 
1574
        /// metadata tag if necessary.
 
1575
        /// Setting this property's value to a null reference deletes the
 
1576
        /// metadata tag from the metadata model.
 
1577
        /// </remarks>
 
1578
        public FIURational? FlashEnergy
 
1579
        {
 
1580
            get
 
1581
            {
 
1582
                return GetTagValue<FIURational>("FlashEnergy");
 
1583
            }
 
1584
            set
 
1585
            {
 
1586
                SetTagValue("FlashEnergy", value);
 
1587
            }
 
1588
        }
 
1589
 
 
1590
        /// <summary>
 
1591
        /// Gets or sets the camera or input device spatial frequency table and SFR values
 
1592
        /// in the direction of image width, image height, and diagonal direction,
 
1593
        /// as specified in ISO 12233.
 
1594
        /// </summary>
 
1595
        /// <remarks>
 
1596
        /// <b>Handling of null values</b><para/>
 
1597
        /// A null value indicates, that the corresponding metadata tag is not
 
1598
        /// present in the metadata model.
 
1599
        /// Setting this property's value to a non-null reference creates the
 
1600
        /// metadata tag if necessary.
 
1601
        /// Setting this property's value to a null reference deletes the
 
1602
        /// metadata tag from the metadata model.
 
1603
        /// </remarks>
 
1604
        public byte[] SpatialFrequencyResponse
 
1605
        {
 
1606
            get
 
1607
            {
 
1608
                return GetTagArray<byte>("SpatialFrequencyResponse");
 
1609
            }
 
1610
            set
 
1611
            {
 
1612
                SetTagValueUndefined("SpatialFrequencyResponse", value);
 
1613
            }
 
1614
        }
 
1615
 
 
1616
        /// <summary>
 
1617
        /// Gets or sets the number of pixels in the image width (X) direction per
 
1618
        /// FocalPlaneResolutionUnit on the camera focal plane.
 
1619
        /// </summary>
 
1620
        /// <remarks>
 
1621
        /// <b>Handling of null values</b><para/>
 
1622
        /// A null value indicates, that the corresponding metadata tag is not
 
1623
        /// present in the metadata model.
 
1624
        /// Setting this property's value to a non-null reference creates the
 
1625
        /// metadata tag if necessary.
 
1626
        /// Setting this property's value to a null reference deletes the
 
1627
        /// metadata tag from the metadata model.
 
1628
        /// </remarks>
 
1629
        public FIURational? FocalPlaneXResolution
 
1630
        {
 
1631
            get
 
1632
            {
 
1633
                return GetTagValue<FIURational>("FocalPlaneXResolution");
 
1634
            }
 
1635
            set
 
1636
            {
 
1637
                SetTagValue("FocalPlaneXResolution", value);
 
1638
            }
 
1639
        }
 
1640
 
 
1641
        /// <summary>
 
1642
        /// Gets or sets the number of pixels in the image height (Y) direction per
 
1643
        /// FocalPlaneResolutionUnit on the camera focal plane.
 
1644
        /// </summary>
 
1645
        /// <remarks>
 
1646
        /// <b>Handling of null values</b><para/>
 
1647
        /// A null value indicates, that the corresponding metadata tag is not
 
1648
        /// present in the metadata model.
 
1649
        /// Setting this property's value to a non-null reference creates the
 
1650
        /// metadata tag if necessary.
 
1651
        /// Setting this property's value to a null reference deletes the
 
1652
        /// metadata tag from the metadata model.
 
1653
        /// </remarks>
 
1654
        public FIURational? FocalPlaneYResolution
 
1655
        {
 
1656
            get
 
1657
            {
 
1658
                return GetTagValue<FIURational>("FocalPlaneYResolution");
 
1659
            }
 
1660
            set
 
1661
            {
 
1662
                SetTagValue("FocalPlaneYResolution", value);
 
1663
            }
 
1664
        }
 
1665
 
 
1666
        /// <summary>
 
1667
        /// Gets or sets the unit for measuring FocalPlaneXResolution and FocalPlaneYResolution.
 
1668
        /// This value is the same as the ResolutionUnit.
 
1669
        /// </summary>
 
1670
        /// <remarks>
 
1671
        /// <b>Handling of null values</b><para/>
 
1672
        /// A null value indicates, that the corresponding metadata tag is not
 
1673
        /// present in the metadata model.
 
1674
        /// Setting this property's value to a non-null reference creates the
 
1675
        /// metadata tag if necessary.
 
1676
        /// Setting this property's value to a null reference deletes the
 
1677
        /// metadata tag from the metadata model.
 
1678
        /// </remarks>
 
1679
        public ushort? FocalPlaneResolutionUnit
 
1680
        {
 
1681
            get
 
1682
            {
 
1683
                return GetTagValue<ushort>("FocalPlaneResolutionUnit");
 
1684
            }
 
1685
            set
 
1686
            {
 
1687
                SetTagValue("FocalPlaneResolutionUnit", value);
 
1688
            }
 
1689
        }
 
1690
 
 
1691
        /// <summary>
 
1692
        /// Gets or sets the location of the main subject in the scene.
 
1693
        /// The value of this tag represents the pixel at the center of the main subject
 
1694
        /// relative to the left edge, prior to rotation processing as per the Rotation tag.
 
1695
        /// The first value indicates the X column number and second indicates the Y row number.
 
1696
        /// </summary>
 
1697
        /// <remarks>
 
1698
        /// <b>Handling of null values</b><para/>
 
1699
        /// A null value indicates, that the corresponding metadata tag is not
 
1700
        /// present in the metadata model.
 
1701
        /// Setting this property's value to a non-null reference creates the
 
1702
        /// metadata tag if necessary.
 
1703
        /// Setting this property's value to a null reference deletes the
 
1704
        /// metadata tag from the metadata model.
 
1705
        /// </remarks>
 
1706
        public ushort? SubjectLocation
 
1707
        {
 
1708
            get
 
1709
            {
 
1710
                return GetTagValue<ushort>("SubjectLocation");
 
1711
            }
 
1712
            set
 
1713
            {
 
1714
                SetTagValue("SubjectLocation", value);
 
1715
            }
 
1716
        }
 
1717
 
 
1718
        /// <summary>
 
1719
        /// Gets or sets the exposure index selected on the camera or input device at the
 
1720
        /// time the image was captured.
 
1721
        /// </summary>
 
1722
        /// <remarks>
 
1723
        /// <b>Handling of null values</b><para/>
 
1724
        /// A null value indicates, that the corresponding metadata tag is not
 
1725
        /// present in the metadata model.
 
1726
        /// Setting this property's value to a non-null reference creates the
 
1727
        /// metadata tag if necessary.
 
1728
        /// Setting this property's value to a null reference deletes the
 
1729
        /// metadata tag from the metadata model.
 
1730
        /// </remarks>
 
1731
        public FIURational? ExposureIndex
 
1732
        {
 
1733
            get
 
1734
            {
 
1735
                return GetTagValue<FIURational>("ExposureIndex");
 
1736
            }
 
1737
            set
 
1738
            {
 
1739
                SetTagValue("ExposureIndex", value);
 
1740
            }
 
1741
        }
 
1742
 
 
1743
        /// <summary>
 
1744
        /// Gets or sets the image sensor type on the camera or input device.
 
1745
        /// See remarks for further information.
 
1746
        /// </summary>
 
1747
        /// <remarks>
 
1748
        /// The following values are defined:<para/>
 
1749
        /// <list type="table">
 
1750
        ///             <listheader>
 
1751
        ///                     <term>ID</term>
 
1752
        ///                     <description>Description</description>
 
1753
        ///             </listheader>
 
1754
        ///             <item>
 
1755
        ///                     <term>1</term>
 
1756
        ///                     <description>not defined</description>
 
1757
        ///             </item>
 
1758
        ///             <item>
 
1759
        ///                     <term>2</term>
 
1760
        ///                     <description>one-chip color area sensor</description>
 
1761
        ///             </item>
 
1762
        ///             <item>
 
1763
        ///                     <term>3</term>
 
1764
        ///                     <description>two-chip color area sensor</description>
 
1765
        ///             </item>
 
1766
        ///             <item>
 
1767
        ///                     <term>4</term>
 
1768
        ///                     <description>three-chip color area sensor</description>
 
1769
        ///             </item>
 
1770
        ///             <item>
 
1771
        ///                     <term>5</term>
 
1772
        ///                     <description>color sequential area sensor</description>
 
1773
        ///             </item>
 
1774
        ///             <item>
 
1775
        ///                     <term>7</term>
 
1776
        ///                     <description>trilinear sensor</description>
 
1777
        ///             </item>
 
1778
        ///             <item>
 
1779
        ///                     <term>8</term>
 
1780
        ///                     <description>color sequential linear sensor</description>
 
1781
        ///             </item>
 
1782
        ///             <item>
 
1783
        ///                     <term>other</term>
 
1784
        ///                     <description>reserved</description>
 
1785
        ///             </item>
 
1786
        /// </list>
 
1787
        /// <para/>
 
1788
        /// <br/><b>Handling of null values</b><para/>
 
1789
        /// A null value indicates, that the corresponding metadata tag is not
 
1790
        /// present in the metadata model.
 
1791
        /// Setting this property's value to a non-null reference creates the
 
1792
        /// metadata tag if necessary.
 
1793
        /// Setting this property's value to a null reference deletes the
 
1794
        /// metadata tag from the metadata model.
 
1795
        /// </remarks>
 
1796
        public ushort? SensingMethod
 
1797
        {
 
1798
            get
 
1799
            {
 
1800
                return GetTagValue<ushort>("SensingMethod");
 
1801
            }
 
1802
            set
 
1803
            {
 
1804
                SetTagValue("SensingMethod", value);
 
1805
            }
 
1806
        }
 
1807
 
 
1808
        /// <summary>
 
1809
        /// Gets or sets the image source. If a DSC recorded the image, this tag value of this
 
1810
        /// tag always be set to 3, indicating that the image was recorded on a DSC.
 
1811
        /// </summary>
 
1812
        /// <remarks>
 
1813
        /// <b>Handling of null values</b><para/>
 
1814
        /// A null value indicates, that the corresponding metadata tag is not
 
1815
        /// present in the metadata model.
 
1816
        /// Setting this property's value to a non-null reference creates the
 
1817
        /// metadata tag if necessary.
 
1818
        /// Setting this property's value to a null reference deletes the
 
1819
        /// metadata tag from the metadata model.
 
1820
        /// </remarks>
 
1821
        public byte? FileSource
 
1822
        {
 
1823
            get
 
1824
            {
 
1825
                return GetTagValue<byte>("FileSource");
 
1826
            }
 
1827
            set
 
1828
            {
 
1829
                SetTagValueUndefined("FileSource", value.HasValue ? new byte[] { value.Value } : null);
 
1830
            }
 
1831
        }
 
1832
 
 
1833
        /// <summary>
 
1834
        /// Gets or sets the type of scene. If a DSC recorded the image, this tag value shall
 
1835
        /// always be set to 1, indicating that the image was directly photographed.
 
1836
        /// </summary>
 
1837
        /// <remarks>
 
1838
        /// <b>Handling of null values</b><para/>
 
1839
        /// A null value indicates, that the corresponding metadata tag is not
 
1840
        /// present in the metadata model.
 
1841
        /// Setting this property's value to a non-null reference creates the
 
1842
        /// metadata tag if necessary.
 
1843
        /// Setting this property's value to a null reference deletes the
 
1844
        /// metadata tag from the metadata model.
 
1845
        /// </remarks>
 
1846
        public byte? SceneType
 
1847
        {
 
1848
            get
 
1849
            {
 
1850
                return GetTagValue<byte>("SceneType");
 
1851
            }
 
1852
            set
 
1853
            {
 
1854
                SetTagValueUndefined("SceneType", value.HasValue ? new byte[] { value.Value } : null);
 
1855
            }
 
1856
        }
 
1857
 
 
1858
        /// <summary>
 
1859
        /// Gets or sets the color filter array (CFA) geometric pattern of the image sensor
 
1860
        /// when a one-chip color area sensor is used. It does not apply to all sensing methods.
 
1861
        /// </summary>
 
1862
        /// <remarks>
 
1863
        /// <b>Handling of null values</b><para/>
 
1864
        /// A null value indicates, that the corresponding metadata tag is not
 
1865
        /// present in the metadata model.
 
1866
        /// Setting this property's value to a non-null reference creates the
 
1867
        /// metadata tag if necessary.
 
1868
        /// Setting this property's value to a null reference deletes the
 
1869
        /// metadata tag from the metadata model.
 
1870
        /// </remarks>
 
1871
        public byte[] CFAPattern
 
1872
        {
 
1873
            get
 
1874
            {
 
1875
                return GetTagArray<byte>("CFAPattern");
 
1876
            }
 
1877
            set
 
1878
            {
 
1879
                SetTagValueUndefined("CFAPattern", value);
 
1880
            }
 
1881
        }
 
1882
 
 
1883
        /// <summary>
 
1884
        /// Gets or sets the use of special processing on image data, such as rendering geared to output.
 
1885
        /// When special processing is performed, the reader is expected to disable or minimize any
 
1886
        /// further processing. See remarks for further information.
 
1887
        /// </summary>
 
1888
        /// <remarks>
 
1889
        /// The following values are definied:<para/>
 
1890
        /// <list type="table">
 
1891
        ///             <listheader>
 
1892
        ///                     <term>ID</term>
 
1893
        ///                     <description>Description</description>
 
1894
        ///             </listheader>
 
1895
        ///             <item>
 
1896
        ///                     <term>0</term>
 
1897
        ///                     <description>normal process</description>
 
1898
        ///             </item>
 
1899
        ///             <item>
 
1900
        ///                     <term>1</term>
 
1901
        ///                     <description>custom process</description>
 
1902
        ///             </item>
 
1903
        ///             <item>
 
1904
        ///                     <term>other</term>
 
1905
        ///                     <description>reserved</description>
 
1906
        ///             </item>
 
1907
        /// </list>
 
1908
        /// <para/>
 
1909
        /// <br/><b>Handling of null values</b><para/>
 
1910
        /// A null value indicates, that the corresponding metadata tag is not
 
1911
        /// present in the metadata model.
 
1912
        /// Setting this property's value to a non-null reference creates the
 
1913
        /// metadata tag if necessary.
 
1914
        /// Setting this property's value to a null reference deletes the
 
1915
        /// metadata tag from the metadata model.
 
1916
        /// </remarks>
 
1917
        public ushort? CustomRendered
 
1918
        {
 
1919
            get
 
1920
            {
 
1921
                return GetTagValue<ushort>("CustomRendered");
 
1922
            }
 
1923
            set
 
1924
            {
 
1925
                SetTagValue("CustomRendered", value);
 
1926
            }
 
1927
        }
 
1928
 
 
1929
        /// <summary>
 
1930
        /// Gets or sets the exposure mode set when the image was shot.
 
1931
        /// In auto-bracketing mode, the camera shoots a series of frames of the same scene
 
1932
        /// at different exposure settings. See remarks for further information.
 
1933
        /// </summary>
 
1934
        /// <remarks>
 
1935
        /// The following values are definied:<para/>
 
1936
        /// <list type="table">
 
1937
        ///             <listheader>
 
1938
        ///                     <term>ID</term>
 
1939
        ///                     <description>Description</description>
 
1940
        ///             </listheader>
 
1941
        ///             <item>
 
1942
        ///                     <term>0</term>
 
1943
        ///                     <description>auto exposure</description>
 
1944
        ///             </item>
 
1945
        ///             <item>
 
1946
        ///                     <term>1</term>
 
1947
        ///                     <description>manual exposure</description>
 
1948
        ///             </item>
 
1949
        ///             <item>
 
1950
        ///                     <term>2</term>
 
1951
        ///                     <description>auto bracket</description>
 
1952
        ///             </item>
 
1953
        ///             <item>
 
1954
        ///                     <term>other</term>
 
1955
        ///                     <description>reserved</description>
 
1956
        ///             </item>
 
1957
        /// </list>
 
1958
        /// <para/>
 
1959
        /// <br/><b>Handling of null values</b><para/>
 
1960
        /// A null value indicates, that the corresponding metadata tag is not
 
1961
        /// present in the metadata model.
 
1962
        /// Setting this property's value to a non-null reference creates the
 
1963
        /// metadata tag if necessary.
 
1964
        /// Setting this property's value to a null reference deletes the
 
1965
        /// metadata tag from the metadata model.
 
1966
        /// </remarks>
 
1967
        public ushort? ExposureMode
 
1968
        {
 
1969
            get
 
1970
            {
 
1971
                return GetTagValue<ushort>("ExposureMode");
 
1972
            }
 
1973
            set
 
1974
            {
 
1975
                SetTagValue("ExposureMode", value);
 
1976
            }
 
1977
        }
 
1978
 
 
1979
        /// <summary>
 
1980
        /// Gets or sets the white balance mode set when the image was shot.
 
1981
        /// See remarks for further information.
 
1982
        /// </summary>
 
1983
        /// <remarks>
 
1984
        /// The following values are definied:<para/>
 
1985
        /// <list type="table">
 
1986
        ///             <listheader>
 
1987
        ///                     <term>ID</term>
 
1988
        ///                     <description>Description</description>
 
1989
        ///             </listheader>
 
1990
        ///             <item>
 
1991
        ///                     <term>0</term>
 
1992
        ///                     <description>auto white balance</description>
 
1993
        ///             </item>
 
1994
        ///             <item>
 
1995
        ///                     <term>1</term>
 
1996
        ///                     <description>manual white balance</description>
 
1997
        ///             </item>
 
1998
        ///             <item>
 
1999
        ///                     <term>other</term>
 
2000
        ///                     <description>reserved</description>
 
2001
        ///             </item>
 
2002
        /// </list>
 
2003
        /// <para/>
 
2004
        /// <br/><b>Handling of null values</b><para/>
 
2005
        /// A null value indicates, that the corresponding metadata tag is not
 
2006
        /// present in the metadata model.
 
2007
        /// Setting this property's value to a non-null reference creates the
 
2008
        /// metadata tag if necessary.
 
2009
        /// Setting this property's value to a null reference deletes the
 
2010
        /// metadata tag from the metadata model.
 
2011
        /// </remarks>
 
2012
        public ushort? WhiteBalance
 
2013
        {
 
2014
            get
 
2015
            {
 
2016
                return GetTagValue<ushort>("WhiteBalance");
 
2017
            }
 
2018
            set
 
2019
            {
 
2020
                SetTagValue("WhiteBalance", value);
 
2021
            }
 
2022
        }
 
2023
 
 
2024
        /// <summary>
 
2025
        /// Gets or sets the digital zoom ratio when the image was shot.
 
2026
        /// If the numerator of the recorded value is 0, this indicates that digital zoom was not used.
 
2027
        /// </summary>
 
2028
        /// <remarks>
 
2029
        /// <b>Handling of null values</b><para/>
 
2030
        /// A null value indicates, that the corresponding metadata tag is not
 
2031
        /// present in the metadata model.
 
2032
        /// Setting this property's value to a non-null reference creates the
 
2033
        /// metadata tag if necessary.
 
2034
        /// Setting this property's value to a null reference deletes the
 
2035
        /// metadata tag from the metadata model.
 
2036
        /// </remarks>
 
2037
        public FIURational? DigitalZoomRatio
 
2038
        {
 
2039
            get
 
2040
            {
 
2041
                return GetTagValue<FIURational>("DigitalZoomRatio");
 
2042
            }
 
2043
            set
 
2044
            {
 
2045
                SetTagValue("DigitalZoomRatio", value);
 
2046
            }
 
2047
        }
 
2048
 
 
2049
        /// <summary>
 
2050
        /// Gets or sets the equivalent focal length assuming a 35mm film camera, in mm.
 
2051
        /// A value of 0 means the focal length is unknown. Note that this tag differs
 
2052
        /// from the FocalLength tag.
 
2053
        /// </summary>
 
2054
        /// <remarks>
 
2055
        /// <b>Handling of null values</b><para/>
 
2056
        /// A null value indicates, that the corresponding metadata tag is not
 
2057
        /// present in the metadata model.
 
2058
        /// Setting this property's value to a non-null reference creates the
 
2059
        /// metadata tag if necessary.
 
2060
        /// Setting this property's value to a null reference deletes the
 
2061
        /// metadata tag from the metadata model.
 
2062
        /// </remarks>
 
2063
        public ushort? FocalLengthIn35mmFilm
 
2064
        {
 
2065
            get
 
2066
            {
 
2067
                return GetTagValue<ushort>("DigitalZoomRatio");
 
2068
            }
 
2069
            set
 
2070
            {
 
2071
                SetTagValue("DigitalZoomRatio", value);
 
2072
            }
 
2073
        }
 
2074
 
 
2075
        /// <summary>
 
2076
        /// Gets or sets the type of scene that was shot.
 
2077
        /// It can also be used to record the mode in which the image was shot.
 
2078
        /// See remarks for further information.
 
2079
        /// </summary>
 
2080
        /// <remarks>
 
2081
        /// The following values are definied:<para/>
 
2082
        /// <list type="table">
 
2083
        ///             <listheader>
 
2084
        ///                     <term>ID</term>
 
2085
        ///                     <description>Description</description>
 
2086
        ///             </listheader>
 
2087
        ///             <item>
 
2088
        ///                     <term>0</term>
 
2089
        ///                     <description>standard</description>
 
2090
        ///             </item>
 
2091
        ///             <item>
 
2092
        ///                     <term>1</term>
 
2093
        ///                     <description>landscape</description>
 
2094
        ///             </item>
 
2095
        ///             <item>
 
2096
        ///                     <term>2</term>
 
2097
        ///                     <description>portrait</description>
 
2098
        ///             </item>
 
2099
        ///             <item>
 
2100
        ///                     <term>3</term>
 
2101
        ///                     <description>night scene</description>
 
2102
        ///             </item>
 
2103
        ///             <item>
 
2104
        ///                     <term>other</term>
 
2105
        ///                     <description>reserved</description>
 
2106
        ///             </item>
 
2107
        /// </list>
 
2108
        /// <para/>
 
2109
        /// <br/><b>Handling of null values</b><para/>
 
2110
        /// A null value indicates, that the corresponding metadata tag is not
 
2111
        /// present in the metadata model.
 
2112
        /// Setting this property's value to a non-null reference creates the
 
2113
        /// metadata tag if necessary.
 
2114
        /// Setting this property's value to a null reference deletes the
 
2115
        /// metadata tag from the metadata model.
 
2116
        /// </remarks>
 
2117
        public ushort? SceneCaptureType
 
2118
        {
 
2119
            get
 
2120
            {
 
2121
                return GetTagValue<ushort>("SceneCaptureType");
 
2122
            }
 
2123
            set
 
2124
            {
 
2125
                SetTagValue("SceneCaptureType", value);
 
2126
            }
 
2127
        }
 
2128
 
 
2129
        /// <summary>
 
2130
        /// Gets or sets the degree of overall image gain adjustment.
 
2131
        /// See remarks for further information.
 
2132
        /// </summary>
 
2133
        /// <remarks>
 
2134
        /// The following values are definied:<para/>
 
2135
        /// <list type="table">
 
2136
        ///             <listheader>
 
2137
        ///                     <term>ID</term>
 
2138
        ///                     <description>Description</description>
 
2139
        ///             </listheader>
 
2140
        ///             <item>
 
2141
        ///                     <term>0</term>
 
2142
        ///                     <description>none</description>
 
2143
        ///             </item>
 
2144
        ///             <item>
 
2145
        ///                     <term>1</term>
 
2146
        ///                     <description>low gain up</description>
 
2147
        ///             </item>
 
2148
        ///             <item>
 
2149
        ///                     <term>2</term>
 
2150
        ///                     <description>high gain up</description>
 
2151
        ///             </item>
 
2152
        ///             <item>
 
2153
        ///                     <term>3</term>
 
2154
        ///                     <description>low gain down</description>
 
2155
        ///             </item>
 
2156
        ///             <item>
 
2157
        ///                     <term>4</term>
 
2158
        ///                     <description>high gain down</description>
 
2159
        ///             </item>
 
2160
        ///             <item>
 
2161
        ///                     <term>other</term>
 
2162
        ///                     <description>reserved</description>
 
2163
        ///             </item>
 
2164
        /// </list>
 
2165
        /// <para/>
 
2166
        /// <br/><b>Handling of null values</b><para/>
 
2167
        /// A null value indicates, that the corresponding metadata tag is not
 
2168
        /// present in the metadata model.
 
2169
        /// Setting this property's value to a non-null reference creates the
 
2170
        /// metadata tag if necessary.
 
2171
        /// Setting this property's value to a null reference deletes the
 
2172
        /// metadata tag from the metadata model.
 
2173
        /// </remarks>
 
2174
        public ushort? GainControl
 
2175
        {
 
2176
            get
 
2177
            {
 
2178
                return GetTagValue<ushort>("GainControl");
 
2179
            }
 
2180
            set
 
2181
            {
 
2182
                SetTagValue("GainControl", value);
 
2183
            }
 
2184
        }
 
2185
 
 
2186
        /// <summary>
 
2187
        /// Gets or sets the direction of contrast processing applied by the camera
 
2188
        /// when the image was shot.
 
2189
        /// See remarks for further information.
 
2190
        /// </summary>
 
2191
        /// <remarks>
 
2192
        /// The following values are definied:<para/>
 
2193
        /// <list type="table">
 
2194
        ///             <listheader>
 
2195
        ///                     <term>ID</term>
 
2196
        ///                     <description>Description</description>
 
2197
        ///             </listheader>
 
2198
        ///             <item>
 
2199
        ///                     <term>0</term>
 
2200
        ///                     <description>normal</description>
 
2201
        ///             </item>
 
2202
        ///             <item>
 
2203
        ///                     <term>1</term>
 
2204
        ///                     <description>soft</description>
 
2205
        ///             </item>
 
2206
        ///             <item>
 
2207
        ///                     <term>2</term>
 
2208
        ///                     <description>hard</description>
 
2209
        ///             </item>
 
2210
        ///             <item>
 
2211
        ///                     <term>other</term>
 
2212
        ///                     <description>reserved</description>
 
2213
        ///             </item>
 
2214
        /// </list>
 
2215
        /// <para/>
 
2216
        /// <br/><b>Handling of null values</b><para/>
 
2217
        /// A null value indicates, that the corresponding metadata tag is not
 
2218
        /// present in the metadata model.
 
2219
        /// Setting this property's value to a non-null reference creates the
 
2220
        /// metadata tag if necessary.
 
2221
        /// Setting this property's value to a null reference deletes the
 
2222
        /// metadata tag from the metadata model.
 
2223
        /// </remarks>
 
2224
        public ushort? Contrast
 
2225
        {
 
2226
            get
 
2227
            {
 
2228
                return GetTagValue<ushort>("Contrast");
 
2229
            }
 
2230
            set
 
2231
            {
 
2232
                SetTagValue("Contrast", value);
 
2233
            }
 
2234
        }
 
2235
 
 
2236
        /// <summary>
 
2237
        /// Gets or sets the direction of saturation processing applied by the camera
 
2238
        /// when the image was shot.
 
2239
        /// See remarks for further information.
 
2240
        /// </summary>
 
2241
        /// <remarks>
 
2242
        /// The following values are definied:<para/>
 
2243
        /// <list type="table">
 
2244
        ///             <listheader>
 
2245
        ///                     <term>ID</term>
 
2246
        ///                     <description>Description</description>
 
2247
        ///             </listheader>
 
2248
        ///             <item>
 
2249
        ///                     <term>0</term>
 
2250
        ///                     <description>normal</description>
 
2251
        ///             </item>
 
2252
        ///             <item>
 
2253
        ///                     <term>1</term>
 
2254
        ///                     <description>low saturation</description>
 
2255
        ///             </item>
 
2256
        ///             <item>
 
2257
        ///                     <term>2</term>
 
2258
        ///                     <description>high saturation</description>
 
2259
        ///             </item>
 
2260
        ///             <item>
 
2261
        ///                     <term>other</term>
 
2262
        ///                     <description>reserved</description>
 
2263
        ///             </item>
 
2264
        /// </list>
 
2265
        /// <para/>
 
2266
        /// <br/><b>Handling of null values</b><para/>
 
2267
        /// A null value indicates, that the corresponding metadata tag is not
 
2268
        /// present in the metadata model.
 
2269
        /// Setting this property's value to a non-null reference creates the
 
2270
        /// metadata tag if necessary.
 
2271
        /// Setting this property's value to a null reference deletes the
 
2272
        /// metadata tag from the metadata model.
 
2273
        /// </remarks>
 
2274
        public ushort? Saturation
 
2275
        {
 
2276
            get
 
2277
            {
 
2278
                return GetTagValue<ushort>("Saturation");
 
2279
            }
 
2280
            set
 
2281
            {
 
2282
                SetTagValue("Saturation", value);
 
2283
            }
 
2284
        }
 
2285
 
 
2286
        /// <summary>
 
2287
        /// Gets or sets the direction of sharpness processing applied by the camera
 
2288
        /// when the image was shot.
 
2289
        /// See remarks for further information.
 
2290
        /// </summary>
 
2291
        /// <remarks>
 
2292
        /// The following values are definied:<para/>
 
2293
        /// <list type="table">
 
2294
        ///             <listheader>
 
2295
        ///                     <term>ID</term>
 
2296
        ///                     <description>Description</description>
 
2297
        ///             </listheader>
 
2298
        ///             <item>
 
2299
        ///                     <term>0</term>
 
2300
        ///                     <description>normal</description>
 
2301
        ///             </item>
 
2302
        ///             <item>
 
2303
        ///                     <term>1</term>
 
2304
        ///                     <description>soft</description>
 
2305
        ///             </item>
 
2306
        ///             <item>
 
2307
        ///                     <term>2</term>
 
2308
        ///                     <description>hard</description>
 
2309
        ///             </item>
 
2310
        ///             <item>
 
2311
        ///                     <term>other</term>
 
2312
        ///                     <description>reserved</description>
 
2313
        ///             </item>
 
2314
        /// </list>
 
2315
        /// <para/>
 
2316
        /// <br/><b>Handling of null values</b><para/>
 
2317
        /// A null value indicates, that the corresponding metadata tag is not
 
2318
        /// present in the metadata model.
 
2319
        /// Setting this property's value to a non-null reference creates the
 
2320
        /// metadata tag if necessary.
 
2321
        /// Setting this property's value to a null reference deletes the
 
2322
        /// metadata tag from the metadata model.
 
2323
        /// </remarks>
 
2324
        public ushort? Sharpness
 
2325
        {
 
2326
            get
 
2327
            {
 
2328
                return GetTagValue<ushort>("Sharpness");
 
2329
            }
 
2330
            set
 
2331
            {
 
2332
                SetTagValue("Sharpness", value);
 
2333
            }
 
2334
        }
 
2335
 
 
2336
        /// <summary>
 
2337
        /// Gets or sets information on the picture-taking conditions of a particular camera model.
 
2338
        /// The tag is used only to indicate the picture-taking conditions in the reader.
 
2339
        /// </summary>
 
2340
        /// <remarks>
 
2341
        /// <b>Handling of null values</b><para/>
 
2342
        /// A null value indicates, that the corresponding metadata tag is not
 
2343
        /// present in the metadata model.
 
2344
        /// Setting this property's value to a non-null reference creates the
 
2345
        /// metadata tag if necessary.
 
2346
        /// Setting this property's value to a null reference deletes the
 
2347
        /// metadata tag from the metadata model.
 
2348
        /// </remarks>
 
2349
        public byte[] DeviceSettingDescription
 
2350
        {
 
2351
            get
 
2352
            {
 
2353
                return GetTagArray<byte>("DeviceSettingDescription");
 
2354
            }
 
2355
            set
 
2356
            {
 
2357
                SetTagValueUndefined("DeviceSettingDescription", value);
 
2358
            }
 
2359
        }
 
2360
 
 
2361
        /// <summary>
 
2362
        /// Gets or sets the distance to the subject.
 
2363
        /// See remarks for further information.
 
2364
        /// </summary>
 
2365
        /// <remarks>
 
2366
        /// The following values are definied:<para/>
 
2367
        /// <list type="table">
 
2368
        ///             <listheader>
 
2369
        ///                     <term>ID</term>
 
2370
        ///                     <description>Description</description>
 
2371
        ///             </listheader>
 
2372
        ///             <item>
 
2373
        ///                     <term>0</term>
 
2374
        ///                     <description>unknown</description>
 
2375
        ///             </item>
 
2376
        ///             <item>
 
2377
        ///                     <term>1</term>
 
2378
        ///                     <description>macro</description>
 
2379
        ///             </item>
 
2380
        ///             <item>
 
2381
        ///                     <term>2</term>
 
2382
        ///                     <description>close view</description>
 
2383
        ///             </item>
 
2384
        ///             <item>
 
2385
        ///                     <term>3</term>
 
2386
        ///                     <description>distant view</description>
 
2387
        ///             </item>
 
2388
        ///             <item>
 
2389
        ///                     <term>other</term>
 
2390
        ///                     <description>reserved</description>
 
2391
        ///             </item>
 
2392
        /// </list>
 
2393
        /// <para/>
 
2394
        /// <br/><b>Handling of null values</b><para/>
 
2395
        /// A null value indicates, that the corresponding metadata tag is not
 
2396
        /// present in the metadata model.
 
2397
        /// Setting this property's value to a non-null reference creates the
 
2398
        /// metadata tag if necessary.
 
2399
        /// Setting this property's value to a null reference deletes the
 
2400
        /// metadata tag from the metadata model.
 
2401
        /// </remarks>
 
2402
        public ushort? SubjectDistanceRange
 
2403
        {
 
2404
            get
 
2405
            {
 
2406
                return GetTagValue<ushort>("SubjectDistanceRange");
 
2407
            }
 
2408
            set
 
2409
            {
 
2410
                SetTagValue("SubjectDistanceRange", value);
 
2411
            }
 
2412
        }
 
2413
 
 
2414
        /// <summary>
 
2415
        /// Gets or sets an identifier assigned uniquely to each image.
 
2416
        /// It is recorded as an ASCII string equivalent to hexadecimal notation and 128-bit fixed length.
 
2417
        /// Constant length of 32.
 
2418
        /// </summary>
 
2419
        /// <remarks>
 
2420
        /// <b>Handling of null values</b><para/>
 
2421
        /// A null value indicates, that the corresponding metadata tag is not
 
2422
        /// present in the metadata model.
 
2423
        /// Setting this property's value to a non-null reference creates the
 
2424
        /// metadata tag if necessary.
 
2425
        /// Setting this property's value to a null reference deletes the
 
2426
        /// metadata tag from the metadata model.
 
2427
        /// </remarks>
 
2428
        public string ImageUniqueID
 
2429
        {
 
2430
            get
 
2431
            {
 
2432
                string text = GetTagText("ImageUniqueID");
 
2433
                if (!string.IsNullOrEmpty(text))
 
2434
                {
 
2435
                    text = text.Substring(0, text.Length - 1);
 
2436
                }
 
2437
                return text;
 
2438
            }
 
2439
            set
 
2440
            {
 
2441
                if (value != null)
 
2442
                {
 
2443
                    FreeImage.Resize(ref value, 32);
 
2444
                    value += '\0';
 
2445
                }
 
2446
                SetTagValue("ImageUniqueID", value);
 
2447
            }
 
2448
        }
 
2449
    }
 
2450
 
 
2451
    /// <summary>
 
2452
    /// Represents a collection of all tags contained in the metadata model
 
2453
    /// <see cref="FREE_IMAGE_MDMODEL.FIMD_EXIF_GPS"/>.
 
2454
    /// </summary>
 
2455
    public class MDM_EXIF_GPS : MetadataModel
 
2456
    {
 
2457
        /// <summary>
 
2458
        /// Initializes a new instance of this class.
 
2459
        /// </summary>
 
2460
        /// <param name="dib">Handle to a FreeImage bitmap.</param>
 
2461
        public MDM_EXIF_GPS(FIBITMAP dib) : base(dib) { }
 
2462
 
 
2463
        /// <summary>
 
2464
        /// Retrieves the datamodel that this instance represents.
 
2465
        /// </summary>
 
2466
        public override FREE_IMAGE_MDMODEL Model
 
2467
        {
 
2468
            get { return FREE_IMAGE_MDMODEL.FIMD_EXIF_GPS; }
 
2469
        }
 
2470
 
 
2471
        /// <summary>
 
2472
        /// Gets or sets the GPS version ID. Constant length of 4.
 
2473
        /// </summary>
 
2474
        /// <remarks>
 
2475
        /// <b>Handling of null values</b><para/>
 
2476
        /// A null value indicates, that the corresponding metadata tag is not
 
2477
        /// present in the metadata model.
 
2478
        /// Setting this property's value to a non-null reference creates the
 
2479
        /// metadata tag if necessary.
 
2480
        /// Setting this property's value to a null reference deletes the
 
2481
        /// metadata tag from the metadata model.
 
2482
        /// </remarks>
 
2483
        public byte[] VersionID
 
2484
        {
 
2485
            get
 
2486
            {
 
2487
                return GetTagArray<byte>("GPSVersionID");
 
2488
            }
 
2489
            set
 
2490
            {
 
2491
                FreeImage.Resize(ref value, 4);
 
2492
                SetTagValue("GPSVersionID", value);
 
2493
            }
 
2494
        }
 
2495
 
 
2496
        /// <summary>
 
2497
        /// Gets or sets a value indicating whether the <see cref="Latitude"/>
 
2498
        /// is north or south latitude.
 
2499
        /// </summary>
 
2500
        /// <remarks>
 
2501
        /// <b>Handling of null values</b><para/>
 
2502
        /// A null value indicates, that the corresponding metadata tag is not
 
2503
        /// present in the metadata model.
 
2504
        /// Setting this property's value to a non-null reference creates the
 
2505
        /// metadata tag if necessary.
 
2506
        /// Setting this property's value to a null reference deletes the
 
2507
        /// metadata tag from the metadata model.
 
2508
        /// </remarks>
 
2509
        public LatitudeType? LatitudeDirection
 
2510
        {
 
2511
            get
 
2512
            {
 
2513
                return ToLatitudeType(GetTagText("GPSLatitudeRef"));
 
2514
            }
 
2515
            set
 
2516
            {
 
2517
                SetTagValue("GPSLatitudeRef", ToString(value) + '\0');
 
2518
            }
 
2519
        }
 
2520
 
 
2521
        /// <summary>
 
2522
        /// Gets or sets the latitude of the image. The latitude is expressed as three rational
 
2523
        /// values giving the degrees, minutes, and seconds, respectively. Constant length of 3.
 
2524
        /// </summary>
 
2525
        /// <remarks>
 
2526
        /// <b>Handling of null values</b><para/>
 
2527
        /// A null value indicates, that the corresponding metadata tag is not
 
2528
        /// present in the metadata model.
 
2529
        /// Setting this property's value to a non-null reference creates the
 
2530
        /// metadata tag if necessary.
 
2531
        /// Setting this property's value to a null reference deletes the
 
2532
        /// metadata tag from the metadata model.
 
2533
        /// </remarks>
 
2534
        /// <seealso cref="LatitudeDirection"/>
 
2535
        public FIURational[] Latitude
 
2536
        {
 
2537
            get
 
2538
            {
 
2539
                return GetTagArray<FIURational>("GPSLatitude");
 
2540
            }
 
2541
            set
 
2542
            {
 
2543
                FreeImage.Resize(ref value, 3);
 
2544
                SetTagValue("GPSLatitude", value);
 
2545
            }
 
2546
        }
 
2547
 
 
2548
        /// <summary>
 
2549
        /// Gets or sets a value indicating whether <see cref="Longitude"/>
 
2550
        /// is east or west longitude.
 
2551
        /// </summary>
 
2552
        /// <remarks>
 
2553
        /// <b>Handling of null values</b><para/>
 
2554
        /// A null value indicates, that the corresponding metadata tag is not
 
2555
        /// present in the metadata model.
 
2556
        /// Setting this property's value to a non-null reference creates the
 
2557
        /// metadata tag if necessary.
 
2558
        /// Setting this property's value to a null reference deletes the
 
2559
        /// metadata tag from the metadata model.
 
2560
        /// </remarks>
 
2561
        public LongitudeType? LongitudeDirection
 
2562
        {
 
2563
            get
 
2564
            {
 
2565
                return ToLongitudeType(GetTagText("GPSLongitudeRef"));
 
2566
            }
 
2567
            set
 
2568
            {
 
2569
                SetTagValue("GPSLongitudeRef", ToString(value) + '\0');
 
2570
            }
 
2571
        }
 
2572
 
 
2573
        /// <summary>
 
2574
        /// Gets or sets the longitude of the image. The longitude is expressed as three rational
 
2575
        /// values giving the degrees, minutes, and seconds, respectively. Constant length of 3.
 
2576
        /// </summary>
 
2577
        /// <remarks>
 
2578
        /// <b>Handling of null values</b><para/>
 
2579
        /// A null value indicates, that the corresponding metadata tag is not
 
2580
        /// present in the metadata model.
 
2581
        /// Setting this property's value to a non-null reference creates the
 
2582
        /// metadata tag if necessary.
 
2583
        /// Setting this property's value to a null reference deletes the
 
2584
        /// metadata tag from the metadata model.
 
2585
        /// </remarks>
 
2586
        /// <seealso cref="LongitudeDirection"/>
 
2587
        public FIURational[] Longitude
 
2588
        {
 
2589
            get
 
2590
            {
 
2591
                return GetTagArray<FIURational>("GPSLongitude");
 
2592
            }
 
2593
            set
 
2594
            {
 
2595
                FreeImage.Resize(ref value, 3);
 
2596
                SetTagValue("GPSLongitude", value);
 
2597
            }
 
2598
        }
 
2599
 
 
2600
        /// <summary>
 
2601
        /// Gets a value indicating whether <see cref="Altitude"/> is sea level and the altitude
 
2602
        /// is above sea level. If the altitude is below sea level <see cref="Altitude"/> is
 
2603
        /// indicated as an absolute value.
 
2604
        /// </summary>
 
2605
        /// <remarks>
 
2606
        /// <b>Handling of null values</b><para/>
 
2607
        /// A null value indicates, that the corresponding metadata tag is not
 
2608
        /// present in the metadata model.
 
2609
        /// Setting this property's value to a non-null reference creates the
 
2610
        /// metadata tag if necessary.
 
2611
        /// Setting this property's value to a null reference deletes the
 
2612
        /// metadata tag from the metadata model.
 
2613
        /// </remarks>
 
2614
        public AltitudeType? AltitudeDirection
 
2615
        {
 
2616
            get
 
2617
            {
 
2618
                byte? flag = GetTagValue<byte>("GPSAltitudeRef");
 
2619
                if (flag.HasValue)
 
2620
                {
 
2621
                    switch (flag.Value)
 
2622
                    {
 
2623
                        case 0:
 
2624
                            return AltitudeType.AboveSeaLevel;
 
2625
                        case 1:
 
2626
                            return AltitudeType.BelowSeaLevel;
 
2627
                        default:
 
2628
                            return AltitudeType.Undefined;
 
2629
                    }
 
2630
                }
 
2631
                return null;
 
2632
            }
 
2633
            set
 
2634
            {
 
2635
                byte? val = null;
 
2636
                if (value.HasValue)
 
2637
                {
 
2638
                    switch (value.Value)
 
2639
                    {
 
2640
                        case AltitudeType.AboveSeaLevel:
 
2641
                            val = 0;
 
2642
                            break;
 
2643
 
 
2644
                        case AltitudeType.BelowSeaLevel:
 
2645
                            val = 1;
 
2646
                            break;
 
2647
 
 
2648
                        default:
 
2649
                            val = 2;
 
2650
                            break;
 
2651
                    }
 
2652
                }
 
2653
                SetTagValue("GPSAltitudeRef", val);
 
2654
            }
 
2655
        }
 
2656
 
 
2657
        /// <summary>
 
2658
        /// Gets or sets the altitude based on the reference in <see cref="AltitudeDirection"/>.
 
2659
        /// Altitude is expressed as one rational value. The reference unit is meters.
 
2660
        /// </summary>
 
2661
        /// <remarks>
 
2662
        /// <b>Handling of null values</b><para/>
 
2663
        /// A null value indicates, that the corresponding metadata tag is not
 
2664
        /// present in the metadata model.
 
2665
        /// Setting this property's value to a non-null reference creates the
 
2666
        /// metadata tag if necessary.
 
2667
        /// Setting this property's value to a null reference deletes the
 
2668
        /// metadata tag from the metadata model.
 
2669
        /// </remarks>
 
2670
        public FIURational? Altitude
 
2671
        {
 
2672
            get
 
2673
            {
 
2674
                return GetTagValue<FIURational>("GPSAltitude");
 
2675
            }
 
2676
            set
 
2677
            {
 
2678
                SetTagValue("GPSAltitude", value);
 
2679
            }
 
2680
        }
 
2681
 
 
2682
        /// <summary>
 
2683
        /// Gets or sets the sign of the <see cref="SignedAltitude"/>.
 
2684
        /// </summary>
 
2685
        /// <remarks>
 
2686
        /// This is a derived property. There is no metadata tag directly associated
 
2687
        /// with this property value.
 
2688
        /// <para/>
 
2689
        /// <br/><b>Handling of null values</b><para/>
 
2690
        /// A null value indicates, that the corresponding metadata tag is not
 
2691
        /// present in the metadata model.
 
2692
        /// Setting this property's value to a non-null reference creates the
 
2693
        /// metadata tag if necessary.
 
2694
        /// Setting this property's value to a null reference deletes the
 
2695
        /// metadata tag from the metadata model.
 
2696
        /// </remarks>
 
2697
        public int? AltitudeSign
 
2698
        {
 
2699
            get
 
2700
            {
 
2701
                AltitudeType? seaLevel = AltitudeDirection;
 
2702
                if (seaLevel.HasValue)
 
2703
                {
 
2704
                    return (seaLevel.Value == AltitudeType.BelowSeaLevel) ? -1 : 1;
 
2705
                }
 
2706
                return null;
 
2707
            }
 
2708
            set
 
2709
            {
 
2710
                if (value.HasValue)
 
2711
                {
 
2712
                    AltitudeDirection = value.Value >= 0 ? AltitudeType.AboveSeaLevel : AltitudeType.BelowSeaLevel;
 
2713
                }
 
2714
                else
 
2715
                {
 
2716
                    AltitudeDirection = null;
 
2717
                }
 
2718
            }
 
2719
        }
 
2720
 
 
2721
        /// <summary>
 
2722
        /// Gets or sets the signed altitude.
 
2723
        /// Altitude is expressed as one rational value. The reference unit is meters.
 
2724
        /// </summary>
 
2725
        /// <exception cref="OverflowException">
 
2726
        /// Altitude is too large to fit into a FIRational.
 
2727
        /// </exception>
 
2728
        /// <remarks>
 
2729
        /// This is a derived property. There is no metadata tag directly associated
 
2730
        /// with this property value.
 
2731
        /// <para/>
 
2732
        /// <br/><b>Handling of null values</b><para/>
 
2733
        /// A null value indicates, that the corresponding metadata tag is not
 
2734
        /// present in the metadata model.
 
2735
        /// Setting this property's value to a non-null reference creates the
 
2736
        /// metadata tag if necessary.
 
2737
        /// Setting this property's value to a null reference deletes the
 
2738
        /// metadata tag from the metadata model.
 
2739
        /// </remarks>
 
2740
        public FIRational? SignedAltitude
 
2741
        {
 
2742
            get
 
2743
            {
 
2744
                FIRational? result = null;
 
2745
                FIURational? altitude = Altitude;
 
2746
                if (altitude.HasValue)
 
2747
                {
 
2748
                    int sign = AltitudeSign ?? 1;
 
2749
                    if (((int)altitude.Value.Numerator < 0) || ((int)altitude.Value.Denominator < 0))
 
2750
                        throw new OverflowException();
 
2751
                    result = new FIRational((int)altitude.Value.Numerator * sign, (int)altitude.Value.Denominator);
 
2752
                }
 
2753
                return result;
 
2754
            }
 
2755
            set
 
2756
            {
 
2757
                FIURational? val = null;
 
2758
                if (value.HasValue)
 
2759
                {
 
2760
                    if (value.Value < 0)
 
2761
                    {
 
2762
                        AltitudeSign = -1;
 
2763
                        value = -value.Value;
 
2764
                    }
 
2765
                    else
 
2766
                    {
 
2767
                        AltitudeSign = 1;
 
2768
                    }
 
2769
                    val = new FIURational((uint)value.Value.Numerator, (uint)value.Value.Denominator);
 
2770
                }
 
2771
                Altitude = val;
 
2772
            }
 
2773
        }
 
2774
 
 
2775
 
 
2776
        /// <summary>
 
2777
        /// Gets or sets the time as UTC (Coordinated Universal Time). Constant length of 3.
 
2778
        /// </summary>
 
2779
        /// <remarks>
 
2780
        /// <b>Handling of null values</b><para/>
 
2781
        /// A null value indicates, that the corresponding metadata tag is not
 
2782
        /// present in the metadata model.
 
2783
        /// Setting this property's value to a non-null reference creates the
 
2784
        /// metadata tag if necessary.
 
2785
        /// Setting this property's value to a null reference deletes the
 
2786
        /// metadata tag from the metadata model.
 
2787
        /// </remarks>
 
2788
        public TimeSpan? TimeStamp
 
2789
        {
 
2790
            get
 
2791
            {
 
2792
                FIURational[] stamp = GetTagArray<FIURational>("GPSTimeStamp");
 
2793
                if ((stamp == null) || stamp.Length != 3)
 
2794
                {
 
2795
                    return null;
 
2796
                }
 
2797
                else
 
2798
                {
 
2799
                    return new TimeSpan((int)stamp[0], (int)stamp[1], (int)stamp[2]);
 
2800
                }
 
2801
            }
 
2802
            set
 
2803
            {
 
2804
                FIURational[] stamp = null;
 
2805
                if (value.HasValue)
 
2806
                {
 
2807
                    TimeSpan span = value.Value;
 
2808
                    stamp = new FIURational[3];
 
2809
                    stamp[0] = span.Hours;
 
2810
                    stamp[1] = span.Minutes;
 
2811
                    stamp[2] = span.Seconds;
 
2812
                }
 
2813
                SetTagValue("GPSTimeStamp", stamp);
 
2814
            }
 
2815
        }
 
2816
 
 
2817
        /// <summary>
 
2818
        /// Gets or sets the GPS satellites used for measurements. This tag can be used to describe
 
2819
        /// the number of satellites, their ID number, angle of elevation, azimuth, SNR and other
 
2820
        /// information in ASCII notation. The format is not specified.
 
2821
        /// </summary>
 
2822
        /// <remarks>
 
2823
        /// <b>Handling of null values</b><para/>
 
2824
        /// A null value indicates, that the corresponding metadata tag is not
 
2825
        /// present in the metadata model.
 
2826
        /// Setting this property's value to a non-null reference creates the
 
2827
        /// metadata tag if necessary.
 
2828
        /// Setting this property's value to a null reference deletes the
 
2829
        /// metadata tag from the metadata model.
 
2830
        /// </remarks>
 
2831
        public string Satellites
 
2832
        {
 
2833
            get
 
2834
            {
 
2835
                string result = GetTagText("GPSSatellites");
 
2836
                if (!string.IsNullOrEmpty(result))
 
2837
                {
 
2838
                    result = result.Substring(0, result.Length - 1);
 
2839
                }
 
2840
                return result;
 
2841
            }
 
2842
            set
 
2843
            {
 
2844
                if (value != null)
 
2845
                {
 
2846
                    value += '\0';
 
2847
                }
 
2848
                SetTagValue("GPSTimeStamp", value);
 
2849
            }
 
2850
        }
 
2851
 
 
2852
        /// <summary>
 
2853
        /// Gets or sets a value indicating the status of the GPS receiver when the image was recorded.
 
2854
        /// <b>true</b> indicates measurement was in progress;
 
2855
        /// <b>false</b> indicates measurement was Interoperability.
 
2856
        /// </summary>
 
2857
        /// <remarks>
 
2858
        /// <b>Handling of null values</b><para/>
 
2859
        /// A null value indicates, that the corresponding metadata tag is not
 
2860
        /// present in the metadata model.
 
2861
        /// Setting this property's value to a non-null reference creates the
 
2862
        /// metadata tag if necessary.
 
2863
        /// Setting this property's value to a null reference deletes the
 
2864
        /// metadata tag from the metadata model.
 
2865
        /// </remarks>
 
2866
        public bool? Status
 
2867
        {
 
2868
            get
 
2869
            {
 
2870
                string text = GetTagText("GPSStatus");
 
2871
                return string.IsNullOrEmpty(text) ? default(bool?) : text[0] == 'A';
 
2872
            }
 
2873
            set
 
2874
            {
 
2875
                SetTagValue("GPSStatus", value.HasValue ? (value.Value ? "A\0" : "V\0") : null);
 
2876
            }
 
2877
        }
 
2878
 
 
2879
        /// <summary>
 
2880
        /// Gets or sets a value indicating the GPS measurement mode.
 
2881
        /// <b>true</b> indicates three-dimensional measurement;
 
2882
        /// <b>false</b> indicated two-dimensional measurement was in progress.
 
2883
        /// </summary>
 
2884
        /// <remarks>
 
2885
        /// <b>Handling of null values</b><para/>
 
2886
        /// A null value indicates, that the corresponding metadata tag is not
 
2887
        /// present in the metadata model.
 
2888
        /// Setting this property's value to a non-null reference creates the
 
2889
        /// metadata tag if necessary.
 
2890
        /// Setting this property's value to a null reference deletes the
 
2891
        /// metadata tag from the metadata model.
 
2892
        /// </remarks>
 
2893
        public bool? MeasureMode3D
 
2894
        {
 
2895
            get
 
2896
            {
 
2897
                string text = GetTagText("GPSMeasureMode");
 
2898
                return string.IsNullOrEmpty(text) ? default(bool?) : text[0] == '3';
 
2899
            }
 
2900
            set
 
2901
            {
 
2902
                SetTagValue("GPSMeasureMode", value.HasValue ? (value.Value ? "3\0" : "2\0") : null);
 
2903
            }
 
2904
        }
 
2905
 
 
2906
        /// <summary>
 
2907
        /// Gets or sets the GPS DOP (data degree of precision). An HDOP value is written during
 
2908
        /// two-dimensional measurement, and PDOP during three-dimensional measurement.
 
2909
        /// </summary>
 
2910
        /// <remarks>
 
2911
        /// <b>Handling of null values</b><para/>
 
2912
        /// A null value indicates, that the corresponding metadata tag is not
 
2913
        /// present in the metadata model.
 
2914
        /// Setting this property's value to a non-null reference creates the
 
2915
        /// metadata tag if necessary.
 
2916
        /// Setting this property's value to a null reference deletes the
 
2917
        /// metadata tag from the metadata model.
 
2918
        /// </remarks>
 
2919
        public FIURational? DOP
 
2920
        {
 
2921
            get
 
2922
            {
 
2923
                return GetTagValue<FIURational>("GPSDOP");
 
2924
            }
 
2925
            set
 
2926
            {
 
2927
                SetTagValue("GPSDOP", value);
 
2928
            }
 
2929
        }
 
2930
 
 
2931
        /// <summary>
 
2932
        /// Gets or sets the unit used to express the GPS receiver <see cref="Speed"/> of movement.
 
2933
        /// </summary>
 
2934
        /// <remarks>
 
2935
        /// <b>Handling of null values</b><para/>
 
2936
        /// A null value indicates, that the corresponding metadata tag is not
 
2937
        /// present in the metadata model.
 
2938
        /// Setting this property's value to a non-null reference creates the
 
2939
        /// metadata tag if necessary.
 
2940
        /// Setting this property's value to a null reference deletes the
 
2941
        /// metadata tag from the metadata model.
 
2942
        /// </remarks>
 
2943
        /// <seealso cref="Speed"/>
 
2944
        public VelocityUnit? SpeedUnit
 
2945
        {
 
2946
            get
 
2947
            {
 
2948
                return ToUnitType(GetTagText("GPSSpeedRef"));
 
2949
            }
 
2950
            set
 
2951
            {
 
2952
                SetTagValue("GPSSpeedRef", ToString(value) + '\0');
 
2953
            }
 
2954
        }
 
2955
 
 
2956
        /// <summary>
 
2957
        /// Gets or sets the speed of GPS receiver movement.
 
2958
        /// </summary>
 
2959
        /// <remarks>
 
2960
        /// <b>Handling of null values</b><para/>
 
2961
        /// A null value indicates, that the corresponding metadata tag is not
 
2962
        /// present in the metadata model.
 
2963
        /// Setting this property's value to a non-null reference creates the
 
2964
        /// metadata tag if necessary.
 
2965
        /// Setting this property's value to a null reference deletes the
 
2966
        /// metadata tag from the metadata model.
 
2967
        /// </remarks>
 
2968
        /// <seealso cref="SpeedUnit"/>
 
2969
        public FIURational? Speed
 
2970
        {
 
2971
            get
 
2972
            {
 
2973
                return GetTagValue<FIURational>("GPSSpeed");
 
2974
            }
 
2975
            set
 
2976
            {
 
2977
                SetTagValue("GPSSpeed", value);
 
2978
            }
 
2979
        }
 
2980
 
 
2981
        /// <summary>
 
2982
        /// Gets or sets the reference for giving the direction of GPS receiver movement.
 
2983
        /// </summary>
 
2984
        /// <remarks>
 
2985
        /// <b>Handling of null values</b><para/>
 
2986
        /// A null value indicates, that the corresponding metadata tag is not
 
2987
        /// present in the metadata model.
 
2988
        /// Setting this property's value to a non-null reference creates the
 
2989
        /// metadata tag if necessary.
 
2990
        /// Setting this property's value to a null reference deletes the
 
2991
        /// metadata tag from the metadata model.
 
2992
        /// </remarks>
 
2993
        /// <seealso cref="Track"/>
 
2994
        public DirectionReference? TrackDirectionReference
 
2995
        {
 
2996
            get
 
2997
            {
 
2998
                return ToDirectionType(GetTagText("GPSTrackRef"));
 
2999
            }
 
3000
            set
 
3001
            {
 
3002
                SetTagValue("GPSTrackRef", ToString(value) + '\0');
 
3003
            }
 
3004
        }
 
3005
 
 
3006
        /// <summary>
 
3007
        /// Gets or sets the direction of GPS receiver movement.
 
3008
        /// The range of values is from 0.00 to 359.99.
 
3009
        /// </summary>
 
3010
        /// <remarks>
 
3011
        /// <b>Handling of null values</b><para/>
 
3012
        /// A null value indicates, that the corresponding metadata tag is not
 
3013
        /// present in the metadata model.
 
3014
        /// Setting this property's value to a non-null reference creates the
 
3015
        /// metadata tag if necessary.
 
3016
        /// Setting this property's value to a null reference deletes the
 
3017
        /// metadata tag from the metadata model.
 
3018
        /// </remarks>
 
3019
        /// <seealso cref="TrackDirectionReference"/>
 
3020
        public FIURational? Track
 
3021
        {
 
3022
            get
 
3023
            {
 
3024
                return GetTagValue<FIURational>("GPSTrack");
 
3025
            }
 
3026
            set
 
3027
            {
 
3028
                SetTagValue("GPSTrack", value);
 
3029
            }
 
3030
        }
 
3031
 
 
3032
        /// <summary>
 
3033
        /// Gets or sets the reference for giving the direction of GPS receiver movement.
 
3034
        /// </summary>
 
3035
        /// <remarks>
 
3036
        /// <b>Handling of null values</b><para/>
 
3037
        /// A null value indicates, that the corresponding metadata tag is not
 
3038
        /// present in the metadata model.
 
3039
        /// Setting this property's value to a non-null reference creates the
 
3040
        /// metadata tag if necessary.
 
3041
        /// Setting this property's value to a null reference deletes the
 
3042
        /// metadata tag from the metadata model.
 
3043
        /// </remarks>
 
3044
        /// <seealso cref="ImageDirection"/>
 
3045
        public DirectionReference? ImageDirectionReference
 
3046
        {
 
3047
            get
 
3048
            {
 
3049
                return ToDirectionType(GetTagText("GPSImgDirectionRef"));
 
3050
            }
 
3051
            set
 
3052
            {
 
3053
                SetTagValue("GPSImgDirectionRef", ToString(value) + '\0');
 
3054
            }
 
3055
        }
 
3056
 
 
3057
        /// <summary>
 
3058
        /// Gets or sets the direction of the image when it was captured.
 
3059
        /// The range of values is from 0.00 to 359.99.
 
3060
        /// </summary>
 
3061
        /// <remarks>
 
3062
        /// <b>Handling of null values</b><para/>
 
3063
        /// A null value indicates, that the corresponding metadata tag is not
 
3064
        /// present in the metadata model.
 
3065
        /// Setting this property's value to a non-null reference creates the
 
3066
        /// metadata tag if necessary.
 
3067
        /// Setting this property's value to a null reference deletes the
 
3068
        /// metadata tag from the metadata model.
 
3069
        /// </remarks>
 
3070
        /// <seealso cref="ImageDirectionReference"/>
 
3071
        public FIURational? ImageDirection
 
3072
        {
 
3073
            get
 
3074
            {
 
3075
                return GetTagValue<FIURational>("GPSImgDirection");
 
3076
            }
 
3077
            set
 
3078
            {
 
3079
                SetTagValue("GPSImgDirection", value);
 
3080
            }
 
3081
        }
 
3082
 
 
3083
        /// <summary>
 
3084
        /// Gets or sets the geodetic survey data used by the GPS receiver. If the survey data
 
3085
        /// is restricted to Japan, the value of this tag is 'TOKYO' or 'WGS-84'.
 
3086
        /// </summary>
 
3087
        /// <remarks>
 
3088
        /// <b>Handling of null values</b><para/>
 
3089
        /// A null value indicates, that the corresponding metadata tag is not
 
3090
        /// present in the metadata model.
 
3091
        /// Setting this property's value to a non-null reference creates the
 
3092
        /// metadata tag if necessary.
 
3093
        /// Setting this property's value to a null reference deletes the
 
3094
        /// metadata tag from the metadata model.
 
3095
        /// </remarks>
 
3096
        public string MapDatum
 
3097
        {
 
3098
            get
 
3099
            {
 
3100
                string result = GetTagText("GPSMapDatum");
 
3101
                if (!string.IsNullOrEmpty(result))
 
3102
                {
 
3103
                    result = result.Substring(0, result.Length - 1);
 
3104
                }
 
3105
                return result;
 
3106
            }
 
3107
            set
 
3108
            {
 
3109
                SetTagValue("GPSMapDatum", value + '\0');
 
3110
            }
 
3111
        }
 
3112
 
 
3113
        /// <summary>
 
3114
        /// Gets or sets a value indicating whether the destination point
 
3115
        /// is north or south latitude.
 
3116
        /// </summary>
 
3117
        /// <remarks>
 
3118
        /// <b>Handling of null values</b><para/>
 
3119
        /// A null value indicates, that the corresponding metadata tag is not
 
3120
        /// present in the metadata model.
 
3121
        /// Setting this property's value to a non-null reference creates the
 
3122
        /// metadata tag if necessary.
 
3123
        /// Setting this property's value to a null reference deletes the
 
3124
        /// metadata tag from the metadata model.
 
3125
        /// </remarks>
 
3126
        /// <seealso cref="Latitude"/>
 
3127
        public LatitudeType? DestinationLatitudeDirection
 
3128
        {
 
3129
            get
 
3130
            {
 
3131
                return ToLatitudeType(GetTagText("GPSDestLatitudeRef"));
 
3132
            }
 
3133
            set
 
3134
            {
 
3135
                SetTagValue("GPSDestLatitudeRef", ToString(value) + '\0');
 
3136
            }
 
3137
        }
 
3138
 
 
3139
        /// <summary>
 
3140
        /// Gets or sets the latitude of the destination point. The latitude is expressed as three rational
 
3141
        /// values giving the degrees, minutes, and seconds, respectively. Constant length of 3.
 
3142
        /// </summary>
 
3143
        /// <remarks>
 
3144
        /// <b>Handling of null values</b><para/>
 
3145
        /// A null value indicates, that the corresponding metadata tag is not
 
3146
        /// present in the metadata model.
 
3147
        /// Setting this property's value to a non-null reference creates the
 
3148
        /// metadata tag if necessary.
 
3149
        /// Setting this property's value to a null reference deletes the
 
3150
        /// metadata tag from the metadata model.
 
3151
        /// </remarks>
 
3152
        /// <seealso cref="DestinationLatitudeDirection"/>
 
3153
        public FIURational[] DestinationLatitude
 
3154
        {
 
3155
            get
 
3156
            {
 
3157
                return GetTagArray<FIURational>("GPSDestLatitude");
 
3158
            }
 
3159
            set
 
3160
            {
 
3161
                FreeImage.Resize(ref value, 3);
 
3162
                SetTagValue("GPSDestLatitude", value);
 
3163
            }
 
3164
        }
 
3165
 
 
3166
        /// <summary>
 
3167
        /// Gets or sets a value indicating whether the destination point
 
3168
        /// is east or west longitude.
 
3169
        /// </summary>
 
3170
        /// <remarks>
 
3171
        /// <b>Handling of null values</b><para/>
 
3172
        /// A null value indicates, that the corresponding metadata tag is not
 
3173
        /// present in the metadata model.
 
3174
        /// Setting this property's value to a non-null reference creates the
 
3175
        /// metadata tag if necessary.
 
3176
        /// Setting this property's value to a null reference deletes the
 
3177
        /// metadata tag from the metadata model.
 
3178
        /// </remarks>
 
3179
        /// <seealso cref="Latitude"/>
 
3180
        public LongitudeType? DestinationLongitudeDirection
 
3181
        {
 
3182
            get
 
3183
            {
 
3184
                return ToLongitudeType(GetTagText("GPSDestLongitudeRef"));
 
3185
            }
 
3186
            set
 
3187
            {
 
3188
                SetTagValue("GPSDestLongitudeRef", ToString(value) + '\0');
 
3189
            }
 
3190
        }
 
3191
 
 
3192
        /// <summary>
 
3193
        /// Gets or sets the longitude of the destination point. The longitude is expressed as three rational
 
3194
        /// values giving the degrees, minutes, and seconds, respectively. Constant length of 3.
 
3195
        /// </summary>
 
3196
        /// <remarks>
 
3197
        /// <b>Handling of null values</b><para/>
 
3198
        /// A null value indicates, that the corresponding metadata tag is not
 
3199
        /// present in the metadata model.
 
3200
        /// Setting this property's value to a non-null reference creates the
 
3201
        /// metadata tag if necessary.
 
3202
        /// Setting this property's value to a null reference deletes the
 
3203
        /// metadata tag from the metadata model.
 
3204
        /// </remarks>
 
3205
        public FIURational[] DestinationLongitude
 
3206
        {
 
3207
            get
 
3208
            {
 
3209
                return GetTagArray<FIURational>("GPSDestLongitude");
 
3210
            }
 
3211
            set
 
3212
            {
 
3213
                FreeImage.Resize(ref value, 3);
 
3214
                SetTagValue("GPSDestLongitude", value);
 
3215
            }
 
3216
        }
 
3217
 
 
3218
        /// <summary>
 
3219
        /// Gets or sets the reference used for giving the bearing to the destination point.
 
3220
        /// </summary>
 
3221
        /// <remarks>
 
3222
        /// <b>Handling of null values</b><para/>
 
3223
        /// A null value indicates, that the corresponding metadata tag is not
 
3224
        /// present in the metadata model.
 
3225
        /// Setting this property's value to a non-null reference creates the
 
3226
        /// metadata tag if necessary.
 
3227
        /// Setting this property's value to a null reference deletes the
 
3228
        /// metadata tag from the metadata model.
 
3229
        /// </remarks>
 
3230
        /// <seealso cref="DestinationBearing"/>
 
3231
        public DirectionReference? DestinationDirectionReference
 
3232
        {
 
3233
            get
 
3234
            {
 
3235
                return ToDirectionType(GetTagText("GPSDestBearingRef"));
 
3236
            }
 
3237
            set
 
3238
            {
 
3239
                SetTagValue("GPSDestBearingRef", ToString(value) + '\0');
 
3240
            }
 
3241
        }
 
3242
 
 
3243
        /// <summary>
 
3244
        /// Gets or sets the bearing to the destination point.
 
3245
        /// The range of values is from 0.00 to 359.99.
 
3246
        /// </summary>
 
3247
        /// <remarks>
 
3248
        /// <b>Handling of null values</b><para/>
 
3249
        /// A null value indicates, that the corresponding metadata tag is not
 
3250
        /// present in the metadata model.
 
3251
        /// Setting this property's value to a non-null reference creates the
 
3252
        /// metadata tag if necessary.
 
3253
        /// Setting this property's value to a null reference deletes the
 
3254
        /// metadata tag from the metadata model.
 
3255
        /// </remarks>
 
3256
        /// <seealso cref="DestinationDirectionReference"/>
 
3257
        public FIURational? DestinationBearing
 
3258
        {
 
3259
            get
 
3260
            {
 
3261
                return GetTagValue<FIURational>("GPSDestBearing");
 
3262
            }
 
3263
            set
 
3264
            {
 
3265
                SetTagValue("GPSDestBearing", value);
 
3266
            }
 
3267
        }
 
3268
 
 
3269
        /// <summary>
 
3270
        /// Gets or sets the unit used to express the distance to the destination point.
 
3271
        /// </summary>
 
3272
        /// <remarks>
 
3273
        /// <b>Handling of null values</b><para/>
 
3274
        /// A null value indicates, that the corresponding metadata tag is not
 
3275
        /// present in the metadata model.
 
3276
        /// Setting this property's value to a non-null reference creates the
 
3277
        /// metadata tag if necessary.
 
3278
        /// Setting this property's value to a null reference deletes the
 
3279
        /// metadata tag from the metadata model.
 
3280
        /// </remarks>
 
3281
        /// <seealso cref="DestinationBearing"/>
 
3282
        public VelocityUnit? DestinationUnit
 
3283
        {
 
3284
            get
 
3285
            {
 
3286
                return ToUnitType(GetTagText("GPSDestDistanceRef"));
 
3287
            }
 
3288
            set
 
3289
            {
 
3290
                SetTagValue("GPSDestDistanceRef", ToString(value) + '\0');
 
3291
            }
 
3292
        }
 
3293
 
 
3294
        /// <summary>
 
3295
        /// Gets or sets a character string recording the name of the method used
 
3296
        /// for location finding. The first byte indicates the character code used,
 
3297
        /// and this is followed by the name of the method. Since the Type is not ASCII,
 
3298
        /// NULL termination is not necessary.
 
3299
        /// </summary>
 
3300
        /// <remarks>
 
3301
        /// <b>Handling of null values</b><para/>
 
3302
        /// A null value indicates, that the corresponding metadata tag is not
 
3303
        /// present in the metadata model.
 
3304
        /// Setting this property's value to a non-null reference creates the
 
3305
        /// metadata tag if necessary.
 
3306
        /// Setting this property's value to a null reference deletes the
 
3307
        /// metadata tag from the metadata model.
 
3308
        /// </remarks>
 
3309
        public byte[] ProcessingMethod
 
3310
        {
 
3311
            get
 
3312
            {
 
3313
                return GetTagArray<byte>("GPSProcessingMethod");
 
3314
            }
 
3315
            set
 
3316
            {
 
3317
                SetTagValue("GPSProcessingMethod", value);
 
3318
            }
 
3319
        }
 
3320
 
 
3321
        /// <summary>
 
3322
        /// Gets or sets a character string recording the name of the GPS area.
 
3323
        /// The first byte indicates the character code used, and this is followed by
 
3324
        /// the name of the GPS area. Since the Type is not ASCII, NULL termination is
 
3325
        /// not necessary. 
 
3326
        /// </summary>
 
3327
        /// <remarks>
 
3328
        /// <b>Handling of null values</b><para/>
 
3329
        /// A null value indicates, that the corresponding metadata tag is not
 
3330
        /// present in the metadata model.
 
3331
        /// Setting this property's value to a non-null reference creates the
 
3332
        /// metadata tag if necessary.
 
3333
        /// Setting this property's value to a null reference deletes the
 
3334
        /// metadata tag from the metadata model.
 
3335
        /// </remarks>
 
3336
        public byte[] AreaInformation
 
3337
        {
 
3338
            get
 
3339
            {
 
3340
                return GetTagArray<byte>("GPSAreaInformation");
 
3341
            }
 
3342
            set
 
3343
            {
 
3344
                SetTagValue("GPSAreaInformation", value);
 
3345
            }
 
3346
        }
 
3347
 
 
3348
        /// <summary>
 
3349
        /// Gets or sets date and time information relative to UTC (Coordinated Universal Time). 
 
3350
        /// </summary>
 
3351
        /// <remarks>
 
3352
        /// This is a derived property. There is no metadata tag directly associated
 
3353
        /// with this property value.
 
3354
        /// <para/>
 
3355
        /// <br/><b>Handling of null values</b><para/>
 
3356
        /// A null value indicates, that the corresponding metadata tag is not
 
3357
        /// present in the metadata model.
 
3358
        /// Setting this property's value to a non-null reference creates the
 
3359
        /// metadata tag if necessary.
 
3360
        /// Setting this property's value to a null reference deletes the
 
3361
        /// metadata tag from the metadata model.
 
3362
        /// </remarks>
 
3363
        public DateTime? DateTimeStamp
 
3364
        {
 
3365
            get
 
3366
            {
 
3367
                DateTime? date = DateStamp;
 
3368
                TimeSpan? time = TimeStamp;
 
3369
                if ((date == null) && (time == null))
 
3370
                {
 
3371
                    return null;
 
3372
                }
 
3373
                else
 
3374
                {
 
3375
                    if (date == null)
 
3376
                    {
 
3377
                        date = DateTime.MinValue;
 
3378
                    }
 
3379
                    if (time == null)
 
3380
                    {
 
3381
                        time = TimeSpan.MinValue;
 
3382
                    }
 
3383
                    return date.Value.Add(time.Value);
 
3384
                }
 
3385
            }
 
3386
            set
 
3387
            {
 
3388
                if (value.HasValue)
 
3389
                {
 
3390
                    DateStamp = value.Value.Date;
 
3391
                    TimeStamp = value.Value.TimeOfDay;
 
3392
                }
 
3393
                else
 
3394
                {
 
3395
                    DateStamp = null;
 
3396
                    TimeStamp = null;
 
3397
                }
 
3398
            }
 
3399
        }
 
3400
 
 
3401
        /// <summary>
 
3402
        /// Gets or sets date information relative to UTC (Coordinated Universal Time).
 
3403
        /// </summary>
 
3404
        /// <remarks>
 
3405
        /// <b>Handling of null values</b><para/>
 
3406
        /// A null value indicates, that the corresponding metadata tag is not
 
3407
        /// present in the metadata model.
 
3408
        /// Setting this property's value to a non-null reference creates the
 
3409
        /// metadata tag if necessary.
 
3410
        /// Setting this property's value to a null reference deletes the
 
3411
        /// metadata tag from the metadata model.
 
3412
        /// </remarks>
 
3413
        public DateTime? DateStamp
 
3414
        {
 
3415
            get
 
3416
            {
 
3417
                string stamp = GetTagText("GPSDateStamp");
 
3418
                if (stamp != null)
 
3419
                {
 
3420
                    try
 
3421
                    {
 
3422
                        return DateTime.ParseExact(stamp, "yyyy:MM:dd\0", null);
 
3423
                    }
 
3424
                    catch
 
3425
                    {
 
3426
                    }
 
3427
                }
 
3428
                return null;
 
3429
            }
 
3430
            set
 
3431
            {
 
3432
                string val = null;
 
3433
                if (value.HasValue)
 
3434
                {
 
3435
                    try
 
3436
                    {
 
3437
                        val = value.Value.ToString("yyyy:MM:dd\0");
 
3438
                    }
 
3439
                    catch
 
3440
                    {
 
3441
                    }
 
3442
                }
 
3443
                SetTagValue("GPSDateStamp", val);
 
3444
            }
 
3445
        }
 
3446
 
 
3447
        /// <summary>
 
3448
        /// Gets or sets a value indicating whether differential correction was applied to
 
3449
        /// the GPS receiver. 
 
3450
        /// </summary>
 
3451
        /// <remarks>
 
3452
        /// <b>Handling of null values</b><para/>
 
3453
        /// A null value indicates, that the corresponding metadata tag is not
 
3454
        /// present in the metadata model.
 
3455
        /// Setting this property's value to a non-null reference creates the
 
3456
        /// metadata tag if necessary.
 
3457
        /// Setting this property's value to a null reference deletes the
 
3458
        /// metadata tag from the metadata model.
 
3459
        /// </remarks>
 
3460
        public bool? IsDifferential
 
3461
        {
 
3462
            get
 
3463
            {
 
3464
                ushort? value = GetTagValue<ushort>("GPSDifferential");
 
3465
                return value.HasValue ? (value != 0) : (default(bool?));
 
3466
            }
 
3467
            set
 
3468
            {
 
3469
                SetTagValue("GPSDifferential", value.HasValue ? (object)(value.Value ? (ushort)1 : (ushort)0) : (null));
 
3470
            }
 
3471
        }
 
3472
    }
 
3473
 
 
3474
    /// <summary>
 
3475
    /// Represents a collection of all tags contained in the metadata model
 
3476
    /// <see cref="FREE_IMAGE_MDMODEL.FIMD_EXIF_INTEROP"/>.
 
3477
    /// </summary>
 
3478
    public class MDM_INTEROP : MetadataModel
 
3479
    {
 
3480
        /// <summary>
 
3481
        /// Initializes a new instance of this class.
 
3482
        /// </summary>
 
3483
        /// <param name="dib">Handle to a FreeImage bitmap.</param>
 
3484
        public MDM_INTEROP(FIBITMAP dib) : base(dib) { }
 
3485
 
 
3486
        /// <summary>
 
3487
        /// Retrieves the datamodel that this instance represents.
 
3488
        /// </summary>
 
3489
        public override FREE_IMAGE_MDMODEL Model
 
3490
        {
 
3491
            get { return FREE_IMAGE_MDMODEL.FIMD_EXIF_INTEROP; }
 
3492
        }
 
3493
 
 
3494
        /// <summary>
 
3495
        /// Gets or sets the identification of the Interoperability rule.
 
3496
        /// </summary>
 
3497
        /// <remarks>
 
3498
        /// <b>Handling of null values</b><para/>
 
3499
        /// A null value indicates, that the corresponding metadata tag is not
 
3500
        /// present in the metadata model.
 
3501
        /// Setting this property's value to a non-null reference creates the
 
3502
        /// metadata tag if necessary.
 
3503
        /// Setting this property's value to a null reference deletes the
 
3504
        /// metadata tag from the metadata model.
 
3505
        /// </remarks>
 
3506
        public InteroperabilityMode? Identification
 
3507
        {
 
3508
            get
 
3509
            {
 
3510
                return ToInteroperabilityType(GetTagText("InteroperabilityIndex"));
 
3511
            }
 
3512
            set
 
3513
            {
 
3514
                SetTagValue("InteroperabilityIndex", ToString(value) + '\0');
 
3515
            }
 
3516
        }
 
3517
    }
 
3518
 
 
3519
    /// <summary>
 
3520
    /// Represents a collection of all tags contained in the metadata model
 
3521
    /// <see cref="FREE_IMAGE_MDMODEL.FIMD_EXIF_MAIN"/>.
 
3522
    /// <para/>
 
3523
    /// <b>This class is obsolete. Use class <see cref="MDM_EXIF_MAIN"/> instead.</b>
 
3524
    /// </summary>
 
3525
    [Obsolete("To be removed in future releases. Use MDM_EXIF_MAIN instead.")]
 
3526
    public class MDM_MAIN : MDM_EXIF_MAIN
 
3527
    {
 
3528
        /// <summary>
 
3529
        /// Initializes a new instance of this class.
 
3530
        /// </summary>
 
3531
        /// <param name="dib">Handle to a FreeImage bitmap.</param>
 
3532
        public MDM_MAIN(FIBITMAP dib) : base(dib) { }
 
3533
    }
 
3534
 
 
3535
    /// <summary>
 
3536
    /// Represents a collection of all tags contained in the metadata model
 
3537
    /// <see cref="FREE_IMAGE_MDMODEL.FIMD_EXIF_MAIN"/>.
 
3538
    /// </summary>
 
3539
    public class MDM_EXIF_MAIN : MetadataModel
 
3540
    {
 
3541
        /// <summary>
 
3542
        /// Initializes a new instance of this class.
 
3543
        /// </summary>
 
3544
        /// <param name="dib">Handle to a FreeImage bitmap.</param>
 
3545
        public MDM_EXIF_MAIN(FIBITMAP dib) : base(dib) { }
 
3546
 
 
3547
        /// <summary>
 
3548
        /// Retrieves the datamodel that this instance represents.
 
3549
        /// </summary>
 
3550
        public override FREE_IMAGE_MDMODEL Model
 
3551
        {
 
3552
            get { return FREE_IMAGE_MDMODEL.FIMD_EXIF_MAIN; }
 
3553
        }
 
3554
 
 
3555
        /// <summary>
 
3556
        /// Gets or sets the number of columns of image data, equal to the number
 
3557
        /// of pixels per row. In JPEG compressed data a JPEG marker is used
 
3558
        /// instead of this tag.
 
3559
        /// </summary>
 
3560
        /// <remarks>
 
3561
        /// <b>Handling of null values</b><para/>
 
3562
        /// A null value indicates, that the corresponding metadata tag is not
 
3563
        /// present in the metadata model.
 
3564
        /// Setting this property's value to a non-null reference creates the
 
3565
        /// metadata tag if necessary.
 
3566
        /// Setting this property's value to a null reference deletes the
 
3567
        /// metadata tag from the metadata model.
 
3568
        /// </remarks>
 
3569
        public uint? ImageWidth
 
3570
        {
 
3571
            get
 
3572
            {
 
3573
                return GetUInt32Value("ImageWidth");
 
3574
            }
 
3575
            set
 
3576
            {
 
3577
                RemoveTag("ImageWidth");
 
3578
                if (value.HasValue)
 
3579
                {
 
3580
                    SetTagValue("ImageWidth", value);
 
3581
                }
 
3582
            }
 
3583
        }
 
3584
 
 
3585
        /// <summary>
 
3586
        /// Gets or sets number of rows of image data. In JPEG compressed data a JPEG marker
 
3587
        /// is used instead of this tag.
 
3588
        /// </summary>
 
3589
        /// <remarks>
 
3590
        /// <b>Handling of null values</b><para/>
 
3591
        /// A null value indicates, that the corresponding metadata tag is not
 
3592
        /// present in the metadata model.
 
3593
        /// Setting this property's value to a non-null reference creates the
 
3594
        /// metadata tag if necessary.
 
3595
        /// Setting this property's value to a null reference deletes the
 
3596
        /// metadata tag from the metadata model.
 
3597
        /// </remarks>
 
3598
        public uint? ImageHeight
 
3599
        {
 
3600
            get
 
3601
            {
 
3602
                return GetUInt32Value("ImageLength");
 
3603
            }
 
3604
            set
 
3605
            {
 
3606
                RemoveTag("ImageLength");
 
3607
                if (value.HasValue)
 
3608
                {
 
3609
                    SetTagValue("ImageLength", value);
 
3610
                }
 
3611
            }
 
3612
        }
 
3613
 
 
3614
        /// <summary>
 
3615
        /// Gets or sets number of bits per image component. In this standard
 
3616
        /// each component of the image is 8 bits, so the value for this tag is 8.
 
3617
        /// Constant length of 3.
 
3618
        /// </summary>
 
3619
        /// <remarks>
 
3620
        /// <b>Handling of null values</b><para/>
 
3621
        /// A null value indicates, that the corresponding metadata tag is not
 
3622
        /// present in the metadata model.
 
3623
        /// Setting this property's value to a non-null reference creates the
 
3624
        /// metadata tag if necessary.
 
3625
        /// Setting this property's value to a null reference deletes the
 
3626
        /// metadata tag from the metadata model.
 
3627
        /// </remarks>
 
3628
        public ushort[] BitsPerSample
 
3629
        {
 
3630
            get
 
3631
            {
 
3632
                return GetTagArray<ushort>("BitsPerSample");
 
3633
            }
 
3634
            set
 
3635
            {
 
3636
                FreeImage.Resize(ref value, 3);
 
3637
                SetTagValue("BitsPerSample", value);
 
3638
            }
 
3639
        }
 
3640
 
 
3641
        /// <summary>
 
3642
        /// Gets or sets compression scheme used for the image data. When a primary image
 
3643
        /// is JPEG compressed, this designation is not necessary and is omitted.
 
3644
        /// When thumbnails use JPEG compression, this tag value is set to 6.
 
3645
        /// </summary>
 
3646
        /// <remarks>
 
3647
        /// <b>Handling of null values</b><para/>
 
3648
        /// A null value indicates, that the corresponding metadata tag is not
 
3649
        /// present in the metadata model.
 
3650
        /// Setting this property's value to a non-null reference creates the
 
3651
        /// metadata tag if necessary.
 
3652
        /// Setting this property's value to a null reference deletes the
 
3653
        /// metadata tag from the metadata model.
 
3654
        /// </remarks>
 
3655
        public ushort? Compression
 
3656
        {
 
3657
            get
 
3658
            {
 
3659
                return GetTagValue<ushort>("Compression");
 
3660
            }
 
3661
            set
 
3662
            {
 
3663
                SetTagValue("Compression", value);
 
3664
            }
 
3665
        }
 
3666
 
 
3667
        /// <summary>
 
3668
        /// Gets or sets pixel composition. In JPEG compressed data a JPEG marker is
 
3669
        /// used instead of this tag. See remarks for further information.
 
3670
        /// </summary>
 
3671
        /// <remarks>
 
3672
        /// The following values are definied:<para/>
 
3673
        /// <list type="table">
 
3674
        ///             <listheader>
 
3675
        ///                     <term>ID</term>
 
3676
        ///                     <description>Description</description>
 
3677
        ///             </listheader>
 
3678
        ///             <item>
 
3679
        ///                     <term>2</term>
 
3680
        ///                     <description>RGB</description>
 
3681
        ///             </item>
 
3682
        ///             <item>
 
3683
        ///                     <term>6</term>
 
3684
        ///                     <description>YCbCr</description>
 
3685
        ///             </item>
 
3686
        ///             <item>
 
3687
        ///                     <term>other</term>
 
3688
        ///                     <description>reserved</description>
 
3689
        ///             </item>
 
3690
        /// </list>
 
3691
        /// <para/>
 
3692
        /// <br/><b>Handling of null values</b><para/>
 
3693
        /// A null value indicates, that the corresponding metadata tag is not
 
3694
        /// present in the metadata model.
 
3695
        /// Setting this property's value to a non-null reference creates the
 
3696
        /// metadata tag if necessary.
 
3697
        /// Setting this property's value to a null reference deletes the
 
3698
        /// metadata tag from the metadata model.
 
3699
        /// </remarks>
 
3700
        public ushort? PhotometricInterpretation
 
3701
        {
 
3702
            get
 
3703
            {
 
3704
                return GetTagValue<ushort>("PhotometricInterpretation");
 
3705
            }
 
3706
            set
 
3707
            {
 
3708
                SetTagValue("PhotometricInterpretation", value);
 
3709
            }
 
3710
        }
 
3711
 
 
3712
        /// <summary>
 
3713
        /// Gets or sets the image orientation viewed in terms of rows and columns.
 
3714
        /// </summary>
 
3715
        /// <remarks>
 
3716
        /// <b>Handling of null values</b><para/>
 
3717
        /// A null value indicates, that the corresponding metadata tag is not
 
3718
        /// present in the metadata model.
 
3719
        /// Setting this property's value to a non-null reference creates the
 
3720
        /// metadata tag if necessary.
 
3721
        /// Setting this property's value to a null reference deletes the
 
3722
        /// metadata tag from the metadata model.
 
3723
        /// </remarks>
 
3724
        public ExifImageOrientation? Orientation
 
3725
        {
 
3726
            get
 
3727
            {
 
3728
                return (ExifImageOrientation?)GetTagValue<ushort>("Orientation");
 
3729
            }
 
3730
            set
 
3731
            {
 
3732
                SetTagValue("Orientation", (ushort?)value);
 
3733
            }
 
3734
        }
 
3735
 
 
3736
        /// <summary>
 
3737
        /// Gets or sets the number of components per pixel. Since this standard applies
 
3738
        /// to RGB and YCbCr images, the value set for this tag is 3. In JPEG compressed
 
3739
        /// data a JPEG marker is used instead of this tag.
 
3740
        /// </summary>
 
3741
        /// <remarks>
 
3742
        /// <b>Handling of null values</b><para/>
 
3743
        /// A null value indicates, that the corresponding metadata tag is not
 
3744
        /// present in the metadata model.
 
3745
        /// Setting this property's value to a non-null reference creates the
 
3746
        /// metadata tag if necessary.
 
3747
        /// Setting this property's value to a null reference deletes the
 
3748
        /// metadata tag from the metadata model.
 
3749
        /// </remarks>
 
3750
        public ushort? SamplesPerPixel
 
3751
        {
 
3752
            get
 
3753
            {
 
3754
                return GetTagValue<ushort>("SamplesPerPixel");
 
3755
            }
 
3756
            set
 
3757
            {
 
3758
                SetTagValue("SamplesPerPixel", value);
 
3759
            }
 
3760
        }
 
3761
 
 
3762
        /// <summary>
 
3763
        /// Gets or sets a value that indicates whether pixel components are recorded in
 
3764
        /// chunky or planar format. In JPEG compressed files a JPEG marker is used instead
 
3765
        /// of this tag. If this field does not exist, the TIFF default of 1 (chunky) is assumed.
 
3766
        /// See remarks for further information.
 
3767
        /// </summary>
 
3768
        /// <remarks>
 
3769
        /// The following values are definied:<para/>
 
3770
        /// <list type="table">
 
3771
        ///             <listheader>
 
3772
        ///                     <term>ID</term>
 
3773
        ///                     <description>Description</description>
 
3774
        ///             </listheader>
 
3775
        ///             <item>
 
3776
        ///                     <term>1</term>
 
3777
        ///                     <description>chunky format</description>
 
3778
        ///             </item>
 
3779
        ///             <item>
 
3780
        ///                     <term>2</term>
 
3781
        ///                     <description>planar format</description>
 
3782
        ///             </item>
 
3783
        ///             <item>
 
3784
        ///                     <term>other</term>
 
3785
        ///                     <description>reserved</description>
 
3786
        ///             </item>
 
3787
        /// </list>
 
3788
        /// <para/>
 
3789
        /// <br/><b>Handling of null values</b><para/>
 
3790
        /// A null value indicates, that the corresponding metadata tag is not
 
3791
        /// present in the metadata model.
 
3792
        /// Setting this property's value to a non-null reference creates the
 
3793
        /// metadata tag if necessary.
 
3794
        /// Setting this property's value to a null reference deletes the
 
3795
        /// metadata tag from the metadata model.
 
3796
        /// </remarks>
 
3797
        public ushort? PlanarConfiguration
 
3798
        {
 
3799
            get
 
3800
            {
 
3801
                return GetTagValue<ushort>("PlanarConfiguration");
 
3802
            }
 
3803
            set
 
3804
            {
 
3805
                SetTagValue("PlanarConfiguration", value);
 
3806
            }
 
3807
        }
 
3808
 
 
3809
        /// <summary>
 
3810
        /// Gets or sets the sampling ratio of chrominance components in relation to
 
3811
        /// the luminance component. In JPEG compressed dat a JPEG marker is used
 
3812
        /// instead of this tag.
 
3813
        /// See remarks for further information.
 
3814
        /// </summary>
 
3815
        /// <remarks>
 
3816
        /// The following values are definied:<para/>
 
3817
        /// <list type="table">
 
3818
        ///             <listheader>
 
3819
        ///                     <term>ID</term>
 
3820
        ///                     <description>Description</description>
 
3821
        ///             </listheader>
 
3822
        ///             <item>
 
3823
        ///                     <term>[2,1]</term>
 
3824
        ///                     <description>YCbCr4:2:2</description>
 
3825
        ///             </item>
 
3826
        ///             <item>
 
3827
        ///                     <term>[2,2]</term>
 
3828
        ///                     <description>YCbCr4:2:0</description>
 
3829
        ///             </item>
 
3830
        ///             <item>
 
3831
        ///                     <term>other</term>
 
3832
        ///                     <description>reserved</description>
 
3833
        ///             </item>
 
3834
        /// </list>
 
3835
        /// <para/>
 
3836
        /// <br/><b>Handling of null values</b><para/>
 
3837
        /// A null value indicates, that the corresponding metadata tag is not
 
3838
        /// present in the metadata model.
 
3839
        /// Setting this property's value to a non-null reference creates the
 
3840
        /// metadata tag if necessary.
 
3841
        /// Setting this property's value to a null reference deletes the
 
3842
        /// metadata tag from the metadata model.
 
3843
        /// </remarks>
 
3844
        public ushort[] YCbCrSubSampling
 
3845
        {
 
3846
            get
 
3847
            {
 
3848
                return GetTagArray<ushort>("YCbCrSubSampling");
 
3849
            }
 
3850
            set
 
3851
            {
 
3852
                FreeImage.Resize(ref value, 2);
 
3853
                SetTagValue("YCbCrSubSampling", value);
 
3854
            }
 
3855
        }
 
3856
 
 
3857
        /// <summary>
 
3858
        /// Gets or sets position of chrominance components in relation to the luminance component.
 
3859
        /// See remarks for further information.
 
3860
        /// </summary>
 
3861
        /// <remarks>
 
3862
        /// This field is designated only for JPEG compressed data or uncompressed YCbCr data.
 
3863
        /// The TIFF default is 1 (centered); but when Y:Cb:Cr = 4:2:2 it is recommended in
 
3864
        /// this standard that 2 (co-sited) be used to record data, in order to improve the
 
3865
        /// image quality when viewed on TV systems.
 
3866
        /// <para/>
 
3867
        /// When this field does not exist, the reader shall assume the TIFF default.
 
3868
        /// In the case of Y:Cb:Cr = 4:2:0, the TIFF default (centered) is recommended.
 
3869
        /// If the reader does not have the capability of supporting both kinds of YCbCrPositioning,
 
3870
        /// it shall follow the TIFF default regardless of the value in this field.
 
3871
        /// It is preferable that readers be able to support both centered and co-sited positioning.
 
3872
        /// <para/>
 
3873
        /// The following values are definied:<para/>
 
3874
        /// <list type="table">
 
3875
        ///             <listheader>
 
3876
        ///                     <term>ID</term>
 
3877
        ///                     <description>Description</description>
 
3878
        ///             </listheader>
 
3879
        ///             <item>
 
3880
        ///                     <term>1</term>
 
3881
        ///                     <description>centered</description>
 
3882
        ///             </item>
 
3883
        ///             <item>
 
3884
        ///                     <term>2</term>
 
3885
        ///                     <description>co-sited</description>
 
3886
        ///             </item>
 
3887
        ///             <item>
 
3888
        ///                     <term>other</term>
 
3889
        ///                     <description>reserved</description>
 
3890
        ///             </item>
 
3891
        /// </list>
 
3892
        /// <para/>
 
3893
        /// <br/><b>Handling of null values</b><para/>
 
3894
        /// A null value indicates, that the corresponding metadata tag is not
 
3895
        /// present in the metadata model.
 
3896
        /// Setting this property's value to a non-null reference creates the
 
3897
        /// metadata tag if necessary.
 
3898
        /// Setting this property's value to a null reference deletes the
 
3899
        /// metadata tag from the metadata model.
 
3900
        /// </remarks>
 
3901
        public ushort? YCbCrPositioning
 
3902
        {
 
3903
            get
 
3904
            {
 
3905
                return GetTagValue<ushort>("YCbCrPositioning");
 
3906
            }
 
3907
            set
 
3908
            {
 
3909
                SetTagValue("YCbCrPositioning", value);
 
3910
            }
 
3911
        }
 
3912
 
 
3913
        /// <summary>
 
3914
        /// Gets or sets the number of pixels per <see cref="ResolutionUnit"/>
 
3915
        /// in the <see cref="ImageWidth"/> direction. When the image resolution is unknown,
 
3916
        /// 72 [dpi] is designated.
 
3917
        /// </summary>
 
3918
        /// <remarks>
 
3919
        /// <b>Handling of null values</b><para/>
 
3920
        /// A null value indicates, that the corresponding metadata tag is not
 
3921
        /// present in the metadata model.
 
3922
        /// Setting this property's value to a non-null reference creates the
 
3923
        /// metadata tag if necessary.
 
3924
        /// Setting this property's value to a null reference deletes the
 
3925
        /// metadata tag from the metadata model.
 
3926
        /// </remarks>
 
3927
        public FIURational? XResolution
 
3928
        {
 
3929
            get
 
3930
            {
 
3931
                return GetTagValue<FIURational>("XResolution");
 
3932
            }
 
3933
            set
 
3934
            {
 
3935
                SetTagValue("XResolution", value);
 
3936
            }
 
3937
        }
 
3938
 
 
3939
        /// <summary>
 
3940
        /// Gets or sets the number of pixels per <see cref="ResolutionUnit"/>
 
3941
        /// in the <see cref="ImageHeight"/> direction. When the image resolution is unknown,
 
3942
        /// 72 [dpi] is designated.
 
3943
        /// </summary>
 
3944
        /// <remarks>
 
3945
        /// <b>Handling of null values</b><para/>
 
3946
        /// A null value indicates, that the corresponding metadata tag is not
 
3947
        /// present in the metadata model.
 
3948
        /// Setting this property's value to a non-null reference creates the
 
3949
        /// metadata tag if necessary.
 
3950
        /// Setting this property's value to a null reference deletes the
 
3951
        /// metadata tag from the metadata model.
 
3952
        /// </remarks>
 
3953
        public FIURational? YResolution
 
3954
        {
 
3955
            get
 
3956
            {
 
3957
                return GetTagValue<FIURational>("YResolution");
 
3958
            }
 
3959
            set
 
3960
            {
 
3961
                SetTagValue("YResolution", value);
 
3962
            }
 
3963
        }
 
3964
 
 
3965
        /// <summary>
 
3966
        /// Gets or sets the unit for measuring <see cref="XResolution"/> and <see cref="YResolution"/>.
 
3967
        /// The same unit is used for both <see cref="XResolution"/> and <see cref="YResolution"/>.
 
3968
        /// If the image resolution in unknown, 2 (inches) is designated.
 
3969
        /// See remarks for further information.
 
3970
        /// </summary>
 
3971
        /// <remarks>
 
3972
        /// The following values are definied:<para/>
 
3973
        /// <list type="table">
 
3974
        ///             <listheader>
 
3975
        ///                     <term>ID</term>
 
3976
        ///                     <description>Description</description>
 
3977
        ///             </listheader>
 
3978
        ///             <item>
 
3979
        ///                     <term>2</term>
 
3980
        ///                     <description>inches</description>
 
3981
        ///             </item>
 
3982
        ///             <item>
 
3983
        ///                     <term>3</term>
 
3984
        ///                     <description>YCbCr4:2:0</description>
 
3985
        ///             </item>
 
3986
        ///             <item>
 
3987
        ///                     <term>other</term>
 
3988
        ///                     <description>centimeters</description>
 
3989
        ///             </item>
 
3990
        /// </list>
 
3991
        /// <para/>
 
3992
        /// <br/><b>Handling of null values</b><para/>
 
3993
        /// A null value indicates, that the corresponding metadata tag is not
 
3994
        /// present in the metadata model.
 
3995
        /// Setting this property's value to a non-null reference creates the
 
3996
        /// metadata tag if necessary.
 
3997
        /// Setting this property's value to a null reference deletes the
 
3998
        /// metadata tag from the metadata model.
 
3999
        /// </remarks>
 
4000
        public ushort? ResolutionUnit
 
4001
        {
 
4002
            get
 
4003
            {
 
4004
                return GetTagValue<ushort>("ResolutionUnit");
 
4005
            }
 
4006
            set
 
4007
            {
 
4008
                SetTagValue("ResolutionUnit", value);
 
4009
            }
 
4010
        }
 
4011
 
 
4012
        /// <summary>
 
4013
        /// Gets or sets the byte offset of that strip.
 
4014
        /// It is recommended that this be selected so the number of strip bytes
 
4015
        /// does not exceed 64 Kbytes.
 
4016
        /// With JPEG compressed data this designation is not needed and is omitted.
 
4017
        /// Constant length of <see cref="SamplesPerPixel"/> * StripsPerImage.
 
4018
        /// </summary>
 
4019
        /// <remarks>
 
4020
        /// <b>Handling of null values</b><para/>
 
4021
        /// A null value indicates, that the corresponding metadata tag is not
 
4022
        /// present in the metadata model.
 
4023
        /// Setting this property's value to a non-null reference creates the
 
4024
        /// metadata tag if necessary.
 
4025
        /// Setting this property's value to a null reference deletes the
 
4026
        /// metadata tag from the metadata model.
 
4027
        /// </remarks>
 
4028
        /// <seealso cref="RowsPerStrip"/>
 
4029
        /// <see cref="StripByteCounts"/>
 
4030
        public uint[] StripOffsets
 
4031
        {
 
4032
            get
 
4033
            {
 
4034
                return GetUInt32Array("StripOffsets");
 
4035
            }
 
4036
            set
 
4037
            {
 
4038
                RemoveTag("StripOffsets");
 
4039
                if (value != null)
 
4040
                {
 
4041
                    SetTagValue("StripOffsets", value);
 
4042
                }
 
4043
            }
 
4044
        }
 
4045
 
 
4046
        /// <summary>
 
4047
        /// Gets or sets number of rows per strip. This is the number of rows in the image of
 
4048
        /// one strip when an image is divided into strips. With JPEG compressed data this
 
4049
        /// designation is not needed and is omitted.
 
4050
        /// </summary>
 
4051
        /// <remarks>
 
4052
        /// <b>Handling of null values</b><para/>
 
4053
        /// A null value indicates, that the corresponding metadata tag is not
 
4054
        /// present in the metadata model.
 
4055
        /// Setting this property's value to a non-null reference creates the
 
4056
        /// metadata tag if necessary.
 
4057
        /// Setting this property's value to a null reference deletes the
 
4058
        /// metadata tag from the metadata model.
 
4059
        /// </remarks>
 
4060
        /// <seealso cref="StripByteCounts"/>
 
4061
        public uint? RowsPerStrip
 
4062
        {
 
4063
            get
 
4064
            {
 
4065
                return GetUInt32Value("RowsPerStrip");
 
4066
            }
 
4067
            set
 
4068
            {
 
4069
                RemoveTag("RowsPerStrip");
 
4070
                if (value.HasValue)
 
4071
                {
 
4072
                    SetTagValue("RowsPerStrip", value);
 
4073
                }
 
4074
            }
 
4075
        }
 
4076
 
 
4077
        /// <summary>
 
4078
        /// Gets or sets the total number of bytes in each strip.
 
4079
        /// With JPEG compressed data this designation is not needed and is omitted.
 
4080
        /// Constant length of <see cref="SamplesPerPixel"/> * StripsPerImage.
 
4081
        /// </summary>
 
4082
        /// <remarks>
 
4083
        /// <b>Handling of null values</b><para/>
 
4084
        /// A null value indicates, that the corresponding metadata tag is not
 
4085
        /// present in the metadata model.
 
4086
        /// Setting this property's value to a non-null reference creates the
 
4087
        /// metadata tag if necessary.
 
4088
        /// Setting this property's value to a null reference deletes the
 
4089
        /// metadata tag from the metadata model.
 
4090
        /// </remarks>
 
4091
        public uint[] StripByteCounts
 
4092
        {
 
4093
            get
 
4094
            {
 
4095
                return GetUInt32Array("StripByteCounts");
 
4096
            }
 
4097
            set
 
4098
            {
 
4099
                RemoveTag("StripByteCounts");
 
4100
                if (value != null)
 
4101
                {
 
4102
                    SetTagValue("StripByteCounts", value);
 
4103
                }
 
4104
            }
 
4105
        }
 
4106
 
 
4107
        /// <summary>
 
4108
        /// Gets or sets the offset to the start byte (SOI) of JPEG compressed thumbnail data.
 
4109
        /// This is not used for primary image JPEG data.
 
4110
        /// </summary>
 
4111
        /// <remarks>
 
4112
        /// <b>Handling of null values</b><para/>
 
4113
        /// A null value indicates, that the corresponding metadata tag is not
 
4114
        /// present in the metadata model.
 
4115
        /// Setting this property's value to a non-null reference creates the
 
4116
        /// metadata tag if necessary.
 
4117
        /// Setting this property's value to a null reference deletes the
 
4118
        /// metadata tag from the metadata model.
 
4119
        /// </remarks>
 
4120
        public uint? JPEGInterchangeFormat
 
4121
        {
 
4122
            get
 
4123
            {
 
4124
                return GetTagValue<uint>("JPEGInterchangeFormat");
 
4125
            }
 
4126
            set
 
4127
            {
 
4128
                SetTagValue("JPEGInterchangeFormat", value);
 
4129
            }
 
4130
        }
 
4131
 
 
4132
        /// <summary>
 
4133
        /// Gets or sets the number of bytes of JPEG compressed thumbnail data.
 
4134
        /// </summary>
 
4135
        /// <remarks>
 
4136
        /// This is not used for primary image JPEG data.
 
4137
        /// JPEG thumbnails are not divided but are recorded as a continuous
 
4138
        /// JPEG bitstream from SOI to EOI. APPn and COM markers should not be recorded.
 
4139
        /// Compressed thumbnails shall be recorded in no more than 64 Kbytes,
 
4140
        /// including all other data to be recorded in APP1.
 
4141
        /// <para/>
 
4142
        /// <br/><b>Handling of null values</b><para/>
 
4143
        /// A null value indicates, that the corresponding metadata tag is not
 
4144
        /// present in the metadata model.
 
4145
        /// Setting this property's value to a non-null reference creates the
 
4146
        /// metadata tag if necessary.
 
4147
        /// Setting this property's value to a null reference deletes the
 
4148
        /// metadata tag from the metadata model.
 
4149
        /// </remarks>
 
4150
        public uint? JPEGInterchangeFormatLength
 
4151
        {
 
4152
            get
 
4153
            {
 
4154
                return GetTagValue<uint>("JPEGInterchangeFormatLength");
 
4155
            }
 
4156
            set
 
4157
            {
 
4158
                SetTagValue("JPEGInterchangeFormatLength", value);
 
4159
            }
 
4160
        }
 
4161
 
 
4162
        /// <summary>
 
4163
        /// Gets or sets a transfer function for the image, described in tabular style.
 
4164
        /// Constant length of 3 * 256.
 
4165
        /// </summary>
 
4166
        /// <remarks>
 
4167
        /// <b>Handling of null values</b><para/>
 
4168
        /// A null value indicates, that the corresponding metadata tag is not
 
4169
        /// present in the metadata model.
 
4170
        /// Setting this property's value to a non-null reference creates the
 
4171
        /// metadata tag if necessary.
 
4172
        /// Setting this property's value to a null reference deletes the
 
4173
        /// metadata tag from the metadata model.
 
4174
        /// </remarks>
 
4175
        public ushort[] TransferFunction
 
4176
        {
 
4177
            get
 
4178
            {
 
4179
                return GetTagArray<ushort>("TransferFunction");
 
4180
            }
 
4181
            set
 
4182
            {
 
4183
                FreeImage.Resize(ref value, 3 * 256);
 
4184
                SetTagValue("TransferFunction", value);
 
4185
            }
 
4186
        }
 
4187
 
 
4188
        /// <summary>
 
4189
        /// Gets or sets the chromaticity of the white point of the image.
 
4190
        /// Constant length of 2.
 
4191
        /// </summary>
 
4192
        /// <remarks>
 
4193
        /// <b>Handling of null values</b><para/>
 
4194
        /// A null value indicates, that the corresponding metadata tag is not
 
4195
        /// present in the metadata model.
 
4196
        /// Setting this property's value to a non-null reference creates the
 
4197
        /// metadata tag if necessary.
 
4198
        /// Setting this property's value to a null reference deletes the
 
4199
        /// metadata tag from the metadata model.
 
4200
        /// </remarks>
 
4201
        public FIURational[] WhitePoint
 
4202
        {
 
4203
            get
 
4204
            {
 
4205
                return GetTagArray<FIURational>("WhitePoint");
 
4206
            }
 
4207
            set
 
4208
            {
 
4209
                FreeImage.Resize(ref value, 2);
 
4210
                SetTagValue("WhitePoint", value);
 
4211
            }
 
4212
        }
 
4213
 
 
4214
        /// <summary>
 
4215
        /// Gets or sets the chromaticity of the three primary colors of the image.
 
4216
        /// Constant length of 6.
 
4217
        /// </summary>
 
4218
        /// <remarks>
 
4219
        /// <b>Handling of null values</b><para/>
 
4220
        /// A null value indicates, that the corresponding metadata tag is not
 
4221
        /// present in the metadata model.
 
4222
        /// Setting this property's value to a non-null reference creates the
 
4223
        /// metadata tag if necessary.
 
4224
        /// Setting this property's value to a null reference deletes the
 
4225
        /// metadata tag from the metadata model.
 
4226
        /// </remarks>
 
4227
        public FIURational[] PrimaryChromaticities
 
4228
        {
 
4229
            get
 
4230
            {
 
4231
                return GetTagArray<FIURational>("PrimaryChromaticities");
 
4232
            }
 
4233
            set
 
4234
            {
 
4235
                FreeImage.Resize(ref value, 6);
 
4236
                SetTagValue("PrimaryChromaticities", value);
 
4237
            }
 
4238
        }
 
4239
 
 
4240
        /// <summary>
 
4241
        /// Gets or sets the matrix coefficients for transformation from RGB to YCbCr image data.
 
4242
        /// Constant length of 3.
 
4243
        /// </summary>
 
4244
        /// <remarks>
 
4245
        /// <b>Handling of null values</b><para/>
 
4246
        /// A null value indicates, that the corresponding metadata tag is not
 
4247
        /// present in the metadata model.
 
4248
        /// Setting this property's value to a non-null reference creates the
 
4249
        /// metadata tag if necessary.
 
4250
        /// Setting this property's value to a null reference deletes the
 
4251
        /// metadata tag from the metadata model.
 
4252
        /// </remarks>
 
4253
        public FIURational[] YCbCrCoefficients
 
4254
        {
 
4255
            get
 
4256
            {
 
4257
                return GetTagArray<FIURational>("YCbCrCoefficients");
 
4258
            }
 
4259
            set
 
4260
            {
 
4261
                FreeImage.Resize(ref value, 3);
 
4262
                SetTagValue("PrimaryChromaticities", value);
 
4263
            }
 
4264
        }
 
4265
 
 
4266
        /// <summary>
 
4267
        /// Gets or sets the reference black point value and reference white point value.
 
4268
        /// Constant length of 6.
 
4269
        /// </summary>
 
4270
        /// <remarks>
 
4271
        /// <b>Handling of null values</b><para/>
 
4272
        /// A null value indicates, that the corresponding metadata tag is not
 
4273
        /// present in the metadata model.
 
4274
        /// Setting this property's value to a non-null reference creates the
 
4275
        /// metadata tag if necessary.
 
4276
        /// Setting this property's value to a null reference deletes the
 
4277
        /// metadata tag from the metadata model.
 
4278
        /// </remarks>
 
4279
        public FIURational[] ReferenceBlackWhite
 
4280
        {
 
4281
            get
 
4282
            {
 
4283
                return GetTagArray<FIURational>("ReferenceBlackWhite");
 
4284
            }
 
4285
            set
 
4286
            {
 
4287
                FreeImage.Resize(ref value, 6);
 
4288
                SetTagValue("ReferenceBlackWhite", value);
 
4289
            }
 
4290
        }
 
4291
 
 
4292
        /// <summary>
 
4293
        /// Gets or sets the date and time of image creation.
 
4294
        /// </summary>
 
4295
        /// <remarks>
 
4296
        /// <b>Handling of null values</b><para/>
 
4297
        /// A null value indicates, that the corresponding metadata tag is not
 
4298
        /// present in the metadata model.
 
4299
        /// Setting this property's value to a non-null reference creates the
 
4300
        /// metadata tag if necessary.
 
4301
        /// Setting this property's value to a null reference deletes the
 
4302
        /// metadata tag from the metadata model.
 
4303
        /// </remarks>
 
4304
        public DateTime? DateTime
 
4305
        {
 
4306
            get
 
4307
            {
 
4308
                DateTime? result = null;
 
4309
                string text = GetTagText("DateTime");
 
4310
                if (text != null)
 
4311
                {
 
4312
                    try
 
4313
                    {
 
4314
                        result = System.DateTime.ParseExact(text, "yyyy:MM:dd HH:mm:ss\0", null);
 
4315
                    }
 
4316
                    catch
 
4317
                    {
 
4318
                    }
 
4319
                }
 
4320
                return result;
 
4321
            }
 
4322
            set
 
4323
            {
 
4324
                string val = null;
 
4325
                if (value.HasValue)
 
4326
                {
 
4327
                    try
 
4328
                    {
 
4329
                        val = value.Value.ToString("yyyy:MM:dd HH:mm:ss\0");
 
4330
                    }
 
4331
                    catch
 
4332
                    {
 
4333
                    }
 
4334
                }
 
4335
                SetTagValue("DateTime", val);
 
4336
            }
 
4337
        }
 
4338
 
 
4339
        /// <summary>
 
4340
        /// Gets or sets a string giving the title of the image.
 
4341
        /// </summary>
 
4342
        /// <remarks>
 
4343
        /// <b>Handling of null values</b><para/>
 
4344
        /// A null value indicates, that the corresponding metadata tag is not
 
4345
        /// present in the metadata model.
 
4346
        /// Setting this property's value to a non-null reference creates the
 
4347
        /// metadata tag if necessary.
 
4348
        /// Setting this property's value to a null reference deletes the
 
4349
        /// metadata tag from the metadata model.
 
4350
        /// </remarks>
 
4351
        public string ImageDescription
 
4352
        {
 
4353
            get
 
4354
            {
 
4355
                string result = GetTagText("ImageDescription");
 
4356
                if (!string.IsNullOrEmpty(result))
 
4357
                {
 
4358
                    result = result.Substring(0, result.Length - 1);
 
4359
                }
 
4360
                return result;
 
4361
            }
 
4362
            set
 
4363
            {
 
4364
                if (value != null)
 
4365
                {
 
4366
                    value += '\0';
 
4367
                }
 
4368
                SetTagValue("ImageDescription", value);
 
4369
            }
 
4370
        }
 
4371
 
 
4372
        /// <summary>
 
4373
        /// Gets or sets the manufacturer of the recording equipment.
 
4374
        /// </summary>
 
4375
        /// <remarks>
 
4376
        /// <b>Handling of null values</b><para/>
 
4377
        /// A null value indicates, that the corresponding metadata tag is not
 
4378
        /// present in the metadata model.
 
4379
        /// Setting this property's value to a non-null reference creates the
 
4380
        /// metadata tag if necessary.
 
4381
        /// Setting this property's value to a null reference deletes the
 
4382
        /// metadata tag from the metadata model.
 
4383
        /// </remarks>
 
4384
        public string Make
 
4385
        {
 
4386
            get
 
4387
            {
 
4388
                string result = GetTagText("Make");
 
4389
                if (!string.IsNullOrEmpty(result))
 
4390
                {
 
4391
                    result = result.Substring(0, result.Length - 1);
 
4392
                }
 
4393
                return result;
 
4394
            }
 
4395
            set
 
4396
            {
 
4397
                if (value != null)
 
4398
                {
 
4399
                    value += '\0';
 
4400
                }
 
4401
                SetTagValue("Make", value);
 
4402
            }
 
4403
        }
 
4404
 
 
4405
        /// <summary>
 
4406
        /// Gets or sets the model name or model number of the equipment.
 
4407
        /// </summary>
 
4408
        /// <remarks>
 
4409
        /// <b>Handling of null values</b><para/>
 
4410
        /// A null value indicates, that the corresponding metadata tag is not
 
4411
        /// present in the metadata model.
 
4412
        /// Setting this property's value to a non-null reference creates the
 
4413
        /// metadata tag if necessary.
 
4414
        /// Setting this property's value to a null reference deletes the
 
4415
        /// metadata tag from the metadata model.
 
4416
        /// </remarks>
 
4417
        public string EquipmentModel
 
4418
        {
 
4419
            get
 
4420
            {
 
4421
                string result = GetTagText("Model");
 
4422
                if (!string.IsNullOrEmpty(result))
 
4423
                {
 
4424
                    result = result.Substring(0, result.Length - 1);
 
4425
                }
 
4426
                return result;
 
4427
            }
 
4428
            set
 
4429
            {
 
4430
                if (value != null)
 
4431
                {
 
4432
                    value += '\0';
 
4433
                }
 
4434
                SetTagValue("Model", value);
 
4435
            }
 
4436
        }
 
4437
 
 
4438
        /// <summary>
 
4439
        /// Gets or sets the name and version of the software or firmware of the camera
 
4440
        /// or image input device used to generate the image.
 
4441
        /// </summary>
 
4442
        /// <remarks>
 
4443
        /// <b>Handling of null values</b><para/>
 
4444
        /// A null value indicates, that the corresponding metadata tag is not
 
4445
        /// present in the metadata model.
 
4446
        /// Setting this property's value to a non-null reference creates the
 
4447
        /// metadata tag if necessary.
 
4448
        /// Setting this property's value to a null reference deletes the
 
4449
        /// metadata tag from the metadata model.
 
4450
        /// </remarks>
 
4451
        public string Software
 
4452
        {
 
4453
            get
 
4454
            {
 
4455
                string result = GetTagText("Software");
 
4456
                if (!string.IsNullOrEmpty(result))
 
4457
                {
 
4458
                    result = result.Substring(0, result.Length - 1);
 
4459
                }
 
4460
                return result;
 
4461
            }
 
4462
            set
 
4463
            {
 
4464
                if (value != null)
 
4465
                {
 
4466
                    value += '\0';
 
4467
                }
 
4468
                SetTagValue("Software", value);
 
4469
            }
 
4470
        }
 
4471
 
 
4472
        /// <summary>
 
4473
        /// Gets or sets the name of the camera owner, photographer or image creator.
 
4474
        /// </summary>
 
4475
        /// <remarks>
 
4476
        /// <b>Handling of null values</b><para/>
 
4477
        /// A null value indicates, that the corresponding metadata tag is not
 
4478
        /// present in the metadata model.
 
4479
        /// Setting this property's value to a non-null reference creates the
 
4480
        /// metadata tag if necessary.
 
4481
        /// Setting this property's value to a null reference deletes the
 
4482
        /// metadata tag from the metadata model.
 
4483
        /// </remarks>
 
4484
        public string Artist
 
4485
        {
 
4486
            get
 
4487
            {
 
4488
                string result = GetTagText("Artist");
 
4489
                if (!string.IsNullOrEmpty(result))
 
4490
                {
 
4491
                    result = result.Substring(0, result.Length - 1);
 
4492
                }
 
4493
                return result;
 
4494
            }
 
4495
            set
 
4496
            {
 
4497
                if (value != null)
 
4498
                {
 
4499
                    value += '\0';
 
4500
                }
 
4501
                SetTagValue("Artist", value);
 
4502
            }
 
4503
        }
 
4504
 
 
4505
        /// <summary>
 
4506
        /// Gets or sets the photographer and editor copyrights.
 
4507
        /// Constant length of 1-2.
 
4508
        /// </summary>
 
4509
        /// <remarks>
 
4510
        /// <b>Handling of null values</b><para/>
 
4511
        /// A null value indicates, that the corresponding metadata tag is not
 
4512
        /// present in the metadata model.
 
4513
        /// Setting this property's value to a non-null reference creates the
 
4514
        /// metadata tag if necessary.
 
4515
        /// Setting this property's value to a null reference deletes the
 
4516
        /// metadata tag from the metadata model.
 
4517
        /// </remarks>
 
4518
        public string[] Copyright
 
4519
        {
 
4520
            get
 
4521
            {
 
4522
                string[] result = null;
 
4523
                string text = GetTagText("Copyright");
 
4524
                if (!string.IsNullOrEmpty(text))
 
4525
                {
 
4526
                    result = text.Split(new char[] { '\0' }, StringSplitOptions.RemoveEmptyEntries);
 
4527
                }
 
4528
                return result;
 
4529
            }
 
4530
            set
 
4531
            {
 
4532
                string val = null;
 
4533
                if (value != null)
 
4534
                {
 
4535
                    if (value.Length == 1)
 
4536
                    {
 
4537
                        if (value[0] != null)
 
4538
                        {
 
4539
                            val = value[0] + '\0';
 
4540
                        }
 
4541
                    }
 
4542
                    else if (value.Length == 2)
 
4543
                    {
 
4544
                        if ((value[0] != null) && (value[1] != null))
 
4545
                        {
 
4546
                            val = value[0] + '\0' + value[1] + '\0';
 
4547
                        }
 
4548
                    }
 
4549
                }
 
4550
                SetTagValue("Copyright", val);
 
4551
            }
 
4552
        }
 
4553
    }
 
4554
 
 
4555
    /// <summary>
 
4556
    /// Represents a collection of all tags contained in the metadata model
 
4557
    /// <see cref="FREE_IMAGE_MDMODEL.FIMD_EXIF_MAKERNOTE"/>.
 
4558
    /// </summary>
 
4559
    public class MDM_MAKERNOTE : MetadataModel
 
4560
    {
 
4561
        /// <summary>
 
4562
        /// Initializes a new instance of this class.
 
4563
        /// </summary>
 
4564
        /// <param name="dib">Handle to a FreeImage bitmap.</param>
 
4565
        public MDM_MAKERNOTE(FIBITMAP dib) : base(dib) { }
 
4566
 
 
4567
        /// <summary>
 
4568
        /// Retrieves the datamodel that this instance represents.
 
4569
        /// </summary>
 
4570
        public override FREE_IMAGE_MDMODEL Model
 
4571
        {
 
4572
            get { return FREE_IMAGE_MDMODEL.FIMD_EXIF_MAKERNOTE; }
 
4573
        }
 
4574
    }
 
4575
 
 
4576
    /// <summary>
 
4577
    /// Represents a collection of all tags contained in the metadata model
 
4578
    /// <see cref="FREE_IMAGE_MDMODEL.FIMD_GEOTIFF"/>.
 
4579
    /// </summary>
 
4580
    public class MDM_GEOTIFF : MetadataModel
 
4581
    {
 
4582
        /// <summary>
 
4583
        /// Initializes a new instance of this class.
 
4584
        /// </summary>
 
4585
        /// <param name="dib">Handle to a FreeImage bitmap.</param>
 
4586
        public MDM_GEOTIFF(FIBITMAP dib) : base(dib) { }
 
4587
 
 
4588
        /// <summary>
 
4589
        /// Retrieves the datamodel that this instance represents.
 
4590
        /// </summary>
 
4591
        public override FREE_IMAGE_MDMODEL Model
 
4592
        {
 
4593
            get { return FREE_IMAGE_MDMODEL.FIMD_GEOTIFF; }
 
4594
        }
 
4595
 
 
4596
        /// <summary>
 
4597
        /// Gets or sets the value of the GeoTIFF GeoASCIIParamsTag.
 
4598
        /// </summary>
 
4599
        /// <remarks>
 
4600
        /// The GeoASCIIParamsTag is used to store all of the <see cref="String"/> valued
 
4601
        /// GeoKeys, referenced by the <see cref="GeoKeyDirectory"/> property. Since keys
 
4602
        /// defined in the GeoKeyDirectoryTag use offsets into this tag, any special
 
4603
        /// comments may be placed at the beginning of this tag.
 
4604
        /// For the most part, the only keys that are <see cref="String"/> valued are
 
4605
        /// <i>Citation</i> keys, giving documentation and references for obscure
 
4606
        /// projections, datums, etc.
 
4607
        /// <para/>
 
4608
        /// Special handling is required for <see cref="String"/>-valued keys. While it
 
4609
        /// is true that TIFF 6.0 permits multiple NULL-delimited strings within a single
 
4610
        /// ASCII tag, the secondary strings might not appear in the output of naive
 
4611
        /// <i>tiffdump</i> programs. For this reason, the NULL delimiter of each ASCII key
 
4612
        /// value shall be converted to a "|" (pipe) character before being installed
 
4613
        /// back into the <see cref="String"/> holding tag, so that a dump of the tag
 
4614
        /// will look like this.
 
4615
        /// <para/>
 
4616
        /// AsciiTag="first_value|second_value|etc...last_value|"
 
4617
        /// <para/>
 
4618
        /// A baseline GeoTIFF-reader must check for and convert the final "|" pipe 
 
4619
        /// character of a key back into a NULL before returning it to the client 
 
4620
        /// software.
 
4621
        /// <para/>
 
4622
        /// <br/><b>Handling of null values</b><para/>
 
4623
        /// A null value indicates, that the corresponding metadata tag is not
 
4624
        /// present in the metadata model.
 
4625
        /// Setting this property's value to a non-null reference creates the
 
4626
        /// metadata tag if necessary.
 
4627
        /// Setting this property's value to a null reference deletes the
 
4628
        /// metadata tag from the metadata model.
 
4629
        /// </remarks>
 
4630
        public string GeoASCIIParams
 
4631
        {
 
4632
            get
 
4633
            {
 
4634
                string text = GetTagText("GeoASCIIParams");
 
4635
                if (!string.IsNullOrEmpty(text))
 
4636
                {
 
4637
                    text = text.Substring(0, text.Length - 1);
 
4638
                }
 
4639
                return text;
 
4640
            }
 
4641
            set
 
4642
            {
 
4643
                if (value != null)
 
4644
                {
 
4645
                    value += '\0';
 
4646
                }
 
4647
                SetTagValue("GeoASCIIParams", value);
 
4648
            }
 
4649
        }
 
4650
 
 
4651
        /// <summary>
 
4652
        /// Gets or sets the value of the GeoTIFF GeoDoubleParamsTag.
 
4653
        /// </summary>
 
4654
        /// <remarks>
 
4655
        /// The GeoDoubleParamsTag is used to store all of the <see cref="Double"/> valued
 
4656
        /// GeoKeys, referenced by the <see cref="GeoKeyDirectory"/> property. The meaning of
 
4657
        /// any value of this double array is determined from the GeoKeyDirectoryTag reference
 
4658
        /// pointing to it. <see cref="Single"/> values should first be converted to
 
4659
        /// <see cref="Double"/> and stored here.
 
4660
        /// <para/>
 
4661
        /// <br/><b>Handling of null values</b><para/>
 
4662
        /// A null value indicates, that the corresponding metadata tag is not
 
4663
        /// present in the metadata model.
 
4664
        /// Setting this property's value to a non-null reference creates the
 
4665
        /// metadata tag if necessary.
 
4666
        /// Setting this property's value to a null reference deletes the
 
4667
        /// metadata tag from the metadata model.
 
4668
        /// </remarks>
 
4669
        public double[] GeoDoubleParams
 
4670
        {
 
4671
            get
 
4672
            {
 
4673
                return GetTagArray<double>("GeoDoubleParams");
 
4674
            }
 
4675
            set
 
4676
            {
 
4677
                SetTagValue("GeoDoubleParams", value);
 
4678
            }
 
4679
        }
 
4680
 
 
4681
        /// <summary>
 
4682
        /// Gets or sets the value of the GeoTIFF GeoKeyDirectoryTag.
 
4683
        /// </summary>
 
4684
        /// <remarks>
 
4685
        /// The GeoKeyDirectoryTag may be used to store the GeoKey Directory, which defines and
 
4686
        /// references the <i>GeoKeys</i>.
 
4687
        /// <para/>
 
4688
        /// The tag is an array of unsigned <see cref="UInt16"/> values, which are primarily
 
4689
        /// grouped into blocks of 4. The first 4 values are special, and contain GeoKey directory
 
4690
        /// header information. The header values consist of the following information, in order:
 
4691
        /// <para/>
 
4692
        /// Header={KeyDirectoryVersion, KeyRevision, MinorRevision, NumberOfKeys}
 
4693
        /// <para/>
 
4694
        /// where
 
4695
        /// <para/>
 
4696
        /// <i>KeyDirectoryVersion</i> indicates the current version of Key implementation, and will
 
4697
        /// only change if this Tag's Key structure is changed. (Similar to the TIFFVersion (42)).
 
4698
        /// The current DirectoryVersion number is 1. This value will most likely never change,
 
4699
        /// and may be used to ensure that this is a valid Key-implementation.
 
4700
        /// <para/>
 
4701
        /// <i>KeyRevision</i> indicates what revision of Key-Sets are used.
 
4702
        /// <para/>
 
4703
        /// <i>MinorRevision</i> indicates what set of Key-Codes are used. The complete revision number
 
4704
        /// is denoted &lt;KeyRevision&gt;.&lt;MinorRevision&gt;.
 
4705
        /// <para/>
 
4706
        /// <i>NumberOfKeys</i> indicates how many Keys are defined by the rest of this Tag.
 
4707
        /// <para/>
 
4708
        /// This header is immediately followed by a collection of &lt;NumberOfKeys&gt; KeyEntry
 
4709
        /// sets, each of which is also 4-<see cref="UInt16"/> long. Each KeyEntry is modeled on the
 
4710
        /// <i>TIFFEntry</i> format of the TIFF directory header, and is of the form:
 
4711
        /// <para/>
 
4712
        /// KeyEntry = { KeyID, TIFFTagLocation, Count, Value_Offset }
 
4713
        /// <para/>
 
4714
        /// where
 
4715
        /// <para/>
 
4716
        /// <i>KeyID</i> gives the Key-ID value of the Key (identical in function to TIFF tag ID,
 
4717
        /// but completely independent of TIFF tag-space),
 
4718
        /// <para/>
 
4719
        /// <i>TIFFTagLocation</i> indicates which TIFF tag contains the value(s) of the Key: if
 
4720
        /// TIFFTagLocation is 0, then the value is <see cref="UInt16"/>, and is contained in the
 
4721
        /// <i>Value_Offset</i> entry. Otherwise, the type (format) of the value is implied by the
 
4722
        /// TIFF-Type of the tag containing the value.
 
4723
        /// <para/>
 
4724
        /// <i>Count</i> indicates the number of values in this key.
 
4725
        /// <para/>
 
4726
        /// <i>Value_Offset</i> Value_Offset indicates the index-offset into the TagArray indicated
 
4727
        /// by TIFFTagLocation, if it is nonzero. If TIFFTagLocation is 0 (zero) , then Value_Offset 
 
4728
        /// contains the actual (<see cref="UInt16"/>) value of the Key, and Count=1 is implied.
 
4729
        /// Note that the offset is not a byte-offset, but rather an index based on the natural data
 
4730
        /// type of the specified tag array.
 
4731
        /// <para/>
 
4732
        /// Following the KeyEntry definitions, the KeyDirectory tag may also contain additional
 
4733
        /// values. For example, if a key requires multiple <see cref="UInt16"/> values, they shall
 
4734
        /// be placed at the end of this tag, and the KeyEntry will set
 
4735
        /// TIFFTagLocation=GeoKeyDirectoryTag, with the Value_Offset pointing to the location of the
 
4736
        /// value(s).
 
4737
        /// <para/>
 
4738
        /// <br/><b>Handling of null values</b><para/>
 
4739
        /// A null value indicates, that the corresponding metadata tag is not
 
4740
        /// present in the metadata model.
 
4741
        /// Setting this property's value to a non-null reference creates the
 
4742
        /// metadata tag if necessary.
 
4743
        /// Setting this property's value to a null reference deletes the
 
4744
        /// metadata tag from the metadata model.
 
4745
        /// </remarks>
 
4746
        public ushort[] GeoKeyDirectory
 
4747
        {
 
4748
            get
 
4749
            {
 
4750
                return GetTagArray<ushort>("GeoKeyDirectory");
 
4751
            }
 
4752
            set
 
4753
            {
 
4754
                SetTagValue("GeoKeyDirectory", value);
 
4755
            }
 
4756
        }
 
4757
 
 
4758
        /// <summary>
 
4759
        /// Gets or sets the value of the GeoTIFF ModelPixelScaleTag.
 
4760
        /// </summary>
 
4761
        /// <remarks>
 
4762
        /// The ModelPixelScaleTag tag may be used to specify the size of raster pixel spacing
 
4763
        /// in the model space units, when the raster space can be embedded in the model space
 
4764
        /// coordinate system without rotation, and consists of the following 3 values:
 
4765
        /// <para/>
 
4766
        /// ModelPixelScaleTag = (ScaleX, ScaleY, ScaleZ)
 
4767
        /// <para/>
 
4768
        /// where <i>ScaleX</i> and <i>ScaleY</i> give the horizontal and vertical spacing of
 
4769
        /// raster pixels. The <i>ScaleZ</i> is primarily used to map the pixel value of a
 
4770
        /// digital elevation model into the correct Z-scale, and so for most other purposes
 
4771
        /// this value should be zero (since most model spaces are 2-D, with Z=0).
 
4772
        /// <para/>
 
4773
        /// A single tiepoint in the <see cref="ModelTiePoints"/> tag, together with this tag,
 
4774
        /// completely determine the relationship between raster and model space; thus they
 
4775
        /// comprise the two tags which Baseline GeoTIFF files most often will use to place a
 
4776
        /// raster image into a "standard position" in model space.
 
4777
        /// <para/>
 
4778
        /// Like the <see cref="ModelTiePoints"/> tag, this tag information is independent of the
 
4779
        /// XPosition, YPosition, Resolution and Orientation tags of the standard TIFF 6.0 spec.
 
4780
        /// However, simple reversals of orientation between raster and model space
 
4781
        /// (e.g. horizontal or vertical flips) may be indicated by reversal of sign in the
 
4782
        /// corresponding component of the ModelPixelScaleTag. GeoTIFF compliant readers must
 
4783
        /// honor this signreversal convention.
 
4784
        /// <para/>
 
4785
        /// This tag must not be used if the raster image requires rotation or shearing to place
 
4786
        /// it into the standard model space. In such cases the transformation shall be defined
 
4787
        /// with the more general <see cref="ModelTransformationMatrix"/>.
 
4788
        /// <para/>
 
4789
        /// <br/><b>Naming differences</b><para/>
 
4790
        /// In the native FreeImage library and thus, in the FreeImage API documentation, this
 
4791
        /// property's key is named <i>GeoPixelScale</i>. Since the GeoTIFF specification
 
4792
        /// as well as Java's <c>EXIFTIFFTagSet</c> class call this tag
 
4793
        /// <see cref="ModelPixelScale"/>, this property was renamed accordingly.
 
4794
        /// However, when accessing this property's tag by its <see cref="MetadataTag"/> object,
 
4795
        /// the native FreeImage tag key <i>GeoPixelScale</i> must be used.
 
4796
        /// <para/>
 
4797
        /// <br/><b>Handling of null values</b><para/>
 
4798
        /// A null value indicates, that the corresponding metadata tag is not
 
4799
        /// present in the metadata model.
 
4800
        /// Setting this property's value to a non-null reference creates the
 
4801
        /// metadata tag if necessary.
 
4802
        /// Setting this property's value to a null reference deletes the
 
4803
        /// metadata tag from the metadata model.
 
4804
        /// </remarks>
 
4805
        public double[] ModelPixelScale
 
4806
        {
 
4807
            get
 
4808
            {
 
4809
                return GetTagArray<double>("GeoPixelScale");
 
4810
            }
 
4811
            set
 
4812
            {
 
4813
                SetTagValue("GeoPixelScale", value);
 
4814
            }
 
4815
        }
 
4816
 
 
4817
        /// <summary>
 
4818
        /// Gets or sets the value of the GeoTIFF GeoTiePointsTag.
 
4819
        /// </summary>
 
4820
        /// <remarks>
 
4821
        /// The GeoTiePointsTag stores raster -> model tiepoint pairs in the order
 
4822
        /// <para/>
 
4823
        /// ModelTiePoints = (...,I,J,K, X,Y,Z...),
 
4824
        /// <para/>
 
4825
        /// where <i>(I,J,K)</i> is the point at location <i>(I,J)</i> in raster space with 
 
4826
        /// pixel-value <i>K</i>, and <i>(X,Y,Z)</i> is a vector in model space. In most cases
 
4827
        /// the model space is only two-dimensional, in which case both K and Z should be set
 
4828
        /// to zero; this third dimension is provided in anticipation of future support for 3D
 
4829
        /// digital elevation models and vertical coordinate systems.
 
4830
        /// <para/>
 
4831
        /// A raster image may be georeferenced simply by specifying its location, size and
 
4832
        /// orientation in the model coordinate space M. This may be done by specifying the
 
4833
        /// location of three of the four bounding corner points. However, tiepoints are only
 
4834
        /// to be considered exact at the points specified; thus defining such a set of
 
4835
        /// bounding tiepoints does not imply that the model space locations of the interior
 
4836
        /// of the image may be exactly computed by a linear interpolation of these tiepoints.
 
4837
        /// <para/>
 
4838
        /// However, since the relationship between the Raster space and the model space will
 
4839
        /// often be an exact, affine transformation, this relationship can be defined using
 
4840
        /// one set of tiepoints and the <see cref="ModelPixelScale"/>, described below, which
 
4841
        /// gives the vertical and horizontal raster grid cell size, specified in model units.
 
4842
        /// <para/>
 
4843
        /// If possible, the first tiepoint placed in this tag shall be the one establishing
 
4844
        /// the location of the point (0,0) in raster space. However, if this is not possible
 
4845
        /// (for example, if (0,0) is goes to a part of model space in which the projection is
 
4846
        /// ill-defined), then there is no particular order in which the tiepoints need be
 
4847
        /// listed.
 
4848
        /// <para/>
 
4849
        /// For orthorectification or mosaicking applications a large number of tiepoints may
 
4850
        /// be specified on a mesh over the raster image. However, the definition of associated
 
4851
        /// grid interpolation methods is not in the scope of the current GeoTIFF spec.
 
4852
        /// <para/>
 
4853
        /// <br/><b>Naming differences</b><para/>
 
4854
        /// In the native FreeImage library and thus, in the FreeImage API documentation, this
 
4855
        /// property's key is named <i>GeoTiePoints</i>. Since the GeoTIFF specification
 
4856
        /// as well as Java's <c>EXIFTIFFTagSet</c> class call this tag
 
4857
        /// <see cref="ModelTiePoints"/>, this property was renamed accordingly.
 
4858
        /// However, when accessing this property's tag by its <see cref="MetadataTag"/> object,
 
4859
        /// the native FreeImage tag key <i>GeoTiePoints</i> must be used.
 
4860
        /// <para/>
 
4861
        /// <br/><b>Handling of null values</b><para/>
 
4862
        /// A null value indicates, that the corresponding metadata tag is not
 
4863
        /// present in the metadata model.
 
4864
        /// Setting this property's value to a non-null reference creates the
 
4865
        /// metadata tag if necessary.
 
4866
        /// Setting this property's value to a null reference deletes the
 
4867
        /// metadata tag from the metadata model.
 
4868
        /// </remarks>
 
4869
        public double[] ModelTiePoints
 
4870
        {
 
4871
            get
 
4872
            {
 
4873
                return GetTagArray<double>("GeoTiePoints");
 
4874
            }
 
4875
            set
 
4876
            {
 
4877
                SetTagValue("GeoTiePoints", value);
 
4878
            }
 
4879
        }
 
4880
 
 
4881
        /// <summary>
 
4882
        /// Gets or sets the value of the GeoTIFF ModelTransformationMatrixTag.
 
4883
        /// </summary>
 
4884
        /// <remarks>
 
4885
        /// This tag may be used to specify the transformation matrix between the raster space
 
4886
        /// (and its dependent pixel-value space) and the (possibly 3D) model space.
 
4887
        /// <para/>
 
4888
        /// <br/><b>Naming differences</b><para/>
 
4889
        /// In the native FreeImage library and thus, in the FreeImage API documentation, this
 
4890
        /// property's key is named <i>GeoTransformationMatrix</i>. Since the GeoTIFF specification
 
4891
        /// as well as Java's <c>EXIFTIFFTagSet</c> class call this tag
 
4892
        /// <see cref="ModelTransformationMatrix"/>, this property was renamed accordingly.
 
4893
        /// However, when accessing this property's tag by its <see cref="MetadataTag"/> object,
 
4894
        /// the native FreeImage tag key <i>GeoTransformationMatrix</i> must be used.
 
4895
        /// <para/>
 
4896
        /// <br/><b>Handling of null values</b><para/>
 
4897
        /// A null value indicates, that the corresponding metadata tag is not
 
4898
        /// present in the metadata model.
 
4899
        /// Setting this property's value to a non-null reference creates the
 
4900
        /// metadata tag if necessary.
 
4901
        /// Setting this property's value to a null reference deletes the
 
4902
        /// metadata tag from the metadata model.
 
4903
        /// </remarks>
 
4904
        public double[] ModelTransformationMatrix
 
4905
        {
 
4906
            get
 
4907
            {
 
4908
                return GetTagArray<double>("GeoTransformationMatrix");
 
4909
            }
 
4910
            set
 
4911
            {
 
4912
                SetTagValue("GeoTransformationMatrix", value);
 
4913
            }
 
4914
        }
 
4915
 
 
4916
        /// <summary>
 
4917
        /// Gets or sets the value of the GeoTIFF IntergraphTransformationMatrixTag.
 
4918
        /// </summary>
 
4919
        /// <remarks>
 
4920
        /// The IntergraphTransformationMatrixTag conflicts with an internal software implementation
 
4921
        /// at Intergraph, and so its use is no longer encouraged. A GeoTIFF reader should look first
 
4922
        /// for the new tag, and only if it is not found should it check for this older tag. If found,
 
4923
        /// it should only consider it to be contain valid GeoTIFF matrix information if the tag-count
 
4924
        /// is 16; the Intergraph version uses 17 values.
 
4925
        /// <para/>
 
4926
        /// <br/><b>Handling of null values</b><para/>
 
4927
        /// A null value indicates, that the corresponding metadata tag is not
 
4928
        /// present in the metadata model.
 
4929
        /// Setting this property's value to a non-null reference creates the
 
4930
        /// metadata tag if necessary.
 
4931
        /// Setting this property's value to a null reference deletes the
 
4932
        /// metadata tag from the metadata model.
 
4933
        /// </remarks>
 
4934
        public double[] IntergraphTransformationMatrix
 
4935
        {
 
4936
            get
 
4937
            {
 
4938
                return GetTagArray<double>("Intergraph TransformationMatrix");
 
4939
            }
 
4940
            set
 
4941
            {
 
4942
                SetTagValue("Intergraph TransformationMatrix", value);
 
4943
            }
 
4944
        }
 
4945
 
 
4946
        /// <summary>
 
4947
        /// Gets or sets the value of the GeoTIFF JPLCartoIFDOffsetTag.
 
4948
        /// </summary>
 
4949
        /// <remarks>
 
4950
        /// <b>Handling of null values</b><para/>
 
4951
        /// A null value indicates, that the corresponding metadata tag is not
 
4952
        /// present in the metadata model.
 
4953
        /// Setting this property's value to a non-null reference creates the
 
4954
        /// metadata tag if necessary.
 
4955
        /// Setting this property's value to a null reference deletes the
 
4956
        /// metadata tag from the metadata model.
 
4957
        /// </remarks>
 
4958
        public uint? JPLCartoIFDOffset
 
4959
        {
 
4960
            get
 
4961
            {
 
4962
                return GetTagValue<uint>("JPL Carto IFD offset");
 
4963
            }
 
4964
            set
 
4965
            {
 
4966
                SetTagValue("JPL Carto IFD offset", value);
 
4967
            }
 
4968
        }
 
4969
    }
 
4970
 
 
4971
    /// <summary>
 
4972
    /// Represents a collection of all tags contained in the metadata model
 
4973
    /// <see cref="FREE_IMAGE_MDMODEL.FIMD_IPTC"/>.
 
4974
    /// </summary>
 
4975
    public class MDM_IPTC : MetadataModel
 
4976
    {
 
4977
        /// <summary>
 
4978
        /// Initializes a new instance of this class.
 
4979
        /// </summary>
 
4980
        /// <param name="dib">Handle to a FreeImage bitmap.</param>
 
4981
        public MDM_IPTC(FIBITMAP dib) : base(dib) { }
 
4982
 
 
4983
        /// <summary>
 
4984
        /// Retrieves the datamodel that this instance represents.
 
4985
        /// </summary>
 
4986
        /// <remarks>
 
4987
        /// <b>Handling of null values</b><para/>
 
4988
        /// A null value indicates, that the corresponding metadata tag is not
 
4989
        /// present in the metadata model.
 
4990
        /// Setting this property's value to a non-null reference creates the
 
4991
        /// metadata tag if necessary.
 
4992
        /// Setting this property's value to a null reference deletes the
 
4993
        /// metadata tag from the metadata model.
 
4994
        /// </remarks>
 
4995
        public override FREE_IMAGE_MDMODEL Model
 
4996
        {
 
4997
            get { return FREE_IMAGE_MDMODEL.FIMD_IPTC; }
 
4998
        }
 
4999
 
 
5000
        /// <summary>
 
5001
        /// Gets the Application Record Version.
 
5002
        /// </summary>
 
5003
        /// <remarks>
 
5004
        /// <b>Handling of null values</b><para/>
 
5005
        /// A null value indicates, that the corresponding metadata tag is not
 
5006
        /// present in the metadata model.
 
5007
        /// Setting this property's value to a non-null reference creates the
 
5008
        /// metadata tag if necessary.
 
5009
        /// Setting this property's value to a null reference deletes the
 
5010
        /// metadata tag from the metadata model.
 
5011
        /// </remarks>
 
5012
        public short? ApplicationRecordVersion
 
5013
        {
 
5014
            get
 
5015
            {
 
5016
                return GetTagValue<short>("ApplicationRecordVersion");
 
5017
            }
 
5018
        }
 
5019
 
 
5020
        /// <summary>
 
5021
        /// Gets or sets the value of the IPTC/NAA tag Object Type Reference.
 
5022
        /// </summary>
 
5023
        /// <remarks>
 
5024
        /// <b>Handling of null values</b><para/>
 
5025
        /// A null value indicates, that the corresponding metadata tag is not
 
5026
        /// present in the metadata model.
 
5027
        /// Setting this property's value to a non-null reference creates the
 
5028
        /// metadata tag if necessary.
 
5029
        /// Setting this property's value to a null reference deletes the
 
5030
        /// metadata tag from the metadata model.
 
5031
        /// </remarks>
 
5032
        public string ObjectTypeReference
 
5033
        {
 
5034
            get
 
5035
            {
 
5036
                return GetTagText("ObjectTypeReference");
 
5037
            }
 
5038
            set
 
5039
            {
 
5040
                SetTagValue("ObjectTypeReference", value);
 
5041
            }
 
5042
        }
 
5043
 
 
5044
        /// <summary>
 
5045
        /// Gets or sets the value of the IPTC/NAA tag Object Attribute Reference.
 
5046
        /// </summary>
 
5047
        /// <remarks>
 
5048
        /// <b>Handling of null values</b><para/>
 
5049
        /// A null value indicates, that the corresponding metadata tag is not
 
5050
        /// present in the metadata model.
 
5051
        /// Setting this property's value to a non-null reference creates the
 
5052
        /// metadata tag if necessary.
 
5053
        /// Setting this property's value to a null reference deletes the
 
5054
        /// metadata tag from the metadata model.
 
5055
        /// </remarks>
 
5056
        public string ObjectAttributeReference
 
5057
        {
 
5058
            get
 
5059
            {
 
5060
                return GetTagText("ObjectAttributeReference");
 
5061
            }
 
5062
            set
 
5063
            {
 
5064
                SetTagValue("ObjectAttributeReference", value);
 
5065
            }
 
5066
        }
 
5067
 
 
5068
        /// <summary>
 
5069
        /// Gets or sets the value of the IPTC/NAA tag Object Name.
 
5070
        /// This is also referred to as Title.
 
5071
        /// </summary>
 
5072
        /// <remarks>
 
5073
        /// <b>Handling of null values</b><para/>
 
5074
        /// A null value indicates, that the corresponding metadata tag is not
 
5075
        /// present in the metadata model.
 
5076
        /// Setting this property's value to a non-null reference creates the
 
5077
        /// metadata tag if necessary.
 
5078
        /// Setting this property's value to a null reference deletes the
 
5079
        /// metadata tag from the metadata model.
 
5080
        /// </remarks>
 
5081
        public string ObjectName
 
5082
        {
 
5083
            get
 
5084
            {
 
5085
                return GetTagText("ObjectName");
 
5086
            }
 
5087
            set
 
5088
            {
 
5089
                SetTagValue("ObjectName", value);
 
5090
            }
 
5091
        }
 
5092
 
 
5093
        /// <summary>
 
5094
        /// Gets or sets the value of the IPTC/NAA tag Edit Status.
 
5095
        /// </summary>
 
5096
        /// <remarks>
 
5097
        /// <b>Handling of null values</b><para/>
 
5098
        /// A null value indicates, that the corresponding metadata tag is not
 
5099
        /// present in the metadata model.
 
5100
        /// Setting this property's value to a non-null reference creates the
 
5101
        /// metadata tag if necessary.
 
5102
        /// Setting this property's value to a null reference deletes the
 
5103
        /// metadata tag from the metadata model.
 
5104
        /// </remarks>
 
5105
        public string EditStatus
 
5106
        {
 
5107
            get
 
5108
            {
 
5109
                return GetTagText("EditStatus");
 
5110
            }
 
5111
            set
 
5112
            {
 
5113
                SetTagValue("EditStatus", value);
 
5114
            }
 
5115
        }
 
5116
 
 
5117
        /// <summary>
 
5118
        /// Gets or sets the value of the IPTC/NAA tag Editorial Update.
 
5119
        /// </summary>
 
5120
        /// <remarks>
 
5121
        /// <b>Handling of null values</b><para/>
 
5122
        /// A null value indicates, that the corresponding metadata tag is not
 
5123
        /// present in the metadata model.
 
5124
        /// Setting this property's value to a non-null reference creates the
 
5125
        /// metadata tag if necessary.
 
5126
        /// Setting this property's value to a null reference deletes the
 
5127
        /// metadata tag from the metadata model.
 
5128
        /// </remarks>
 
5129
        public string EditorialUpdate
 
5130
        {
 
5131
            get
 
5132
            {
 
5133
                return GetTagText("EditorialUpdate");
 
5134
            }
 
5135
            set
 
5136
            {
 
5137
                SetTagValue("EditorialUpdate", value);
 
5138
            }
 
5139
        }
 
5140
 
 
5141
        /// <summary>
 
5142
        /// Gets or sets the value of the IPTC/NAA tag Urgency.
 
5143
        /// </summary>
 
5144
        /// <remarks>
 
5145
        /// <b>Handling of null values</b><para/>
 
5146
        /// A null value indicates, that the corresponding metadata tag is not
 
5147
        /// present in the metadata model.
 
5148
        /// Setting this property's value to a non-null reference creates the
 
5149
        /// metadata tag if necessary.
 
5150
        /// Setting this property's value to a null reference deletes the
 
5151
        /// metadata tag from the metadata model.
 
5152
        /// </remarks>
 
5153
        public string Urgency
 
5154
        {
 
5155
            get
 
5156
            {
 
5157
                return GetTagText("Urgency");
 
5158
            }
 
5159
            set
 
5160
            {
 
5161
                SetTagValue("Urgency", value);
 
5162
            }
 
5163
        }
 
5164
 
 
5165
        /// <summary>
 
5166
        /// Gets or sets the value of the IPTC/NAA tag Subject Reference.
 
5167
        /// </summary>
 
5168
        /// <remarks>
 
5169
        /// <b>Handling of null values</b><para/>
 
5170
        /// A null value indicates, that the corresponding metadata tag is not
 
5171
        /// present in the metadata model.
 
5172
        /// Setting this property's value to a non-null reference creates the
 
5173
        /// metadata tag if necessary.
 
5174
        /// Setting this property's value to a null reference deletes the
 
5175
        /// metadata tag from the metadata model.
 
5176
        /// </remarks>
 
5177
        public string SubjectReference
 
5178
        {
 
5179
            get
 
5180
            {
 
5181
                return GetTagText("SubjectReference");
 
5182
            }
 
5183
            set
 
5184
            {
 
5185
                SetTagValue("SubjectReference", value);
 
5186
            }
 
5187
        }
 
5188
 
 
5189
        /// <summary>
 
5190
        /// Gets or sets the value of the IPTC/NAA tag Category.
 
5191
        /// </summary>
 
5192
        /// <remarks>
 
5193
        /// <b>Handling of null values</b><para/>
 
5194
        /// A null value indicates, that the corresponding metadata tag is not
 
5195
        /// present in the metadata model.
 
5196
        /// Setting this property's value to a non-null reference creates the
 
5197
        /// metadata tag if necessary.
 
5198
        /// Setting this property's value to a null reference deletes the
 
5199
        /// metadata tag from the metadata model.
 
5200
        /// </remarks>
 
5201
        public string Category
 
5202
        {
 
5203
            get
 
5204
            {
 
5205
                return GetTagText("Category");
 
5206
            }
 
5207
            set
 
5208
            {
 
5209
                SetTagValue("Category", value);
 
5210
            }
 
5211
        }
 
5212
 
 
5213
        /// <summary>
 
5214
        /// Gets or sets the value of the IPTC/NAA tag Supplemental Categories.
 
5215
        /// </summary>
 
5216
        /// <remarks>
 
5217
        /// <b>Handling of null values</b><para/>
 
5218
        /// A null value indicates, that the corresponding metadata tag is not
 
5219
        /// present in the metadata model.
 
5220
        /// Setting this property's value to a non-null reference creates the
 
5221
        /// metadata tag if necessary.
 
5222
        /// Setting this property's value to a null reference deletes the
 
5223
        /// metadata tag from the metadata model.
 
5224
        /// </remarks>
 
5225
        public string SupplementalCategories
 
5226
        {
 
5227
            get
 
5228
            {
 
5229
                return GetTagText("SupplementalCategories");
 
5230
            }
 
5231
            set
 
5232
            {
 
5233
                SetTagValue("SupplementalCategories", value);
 
5234
            }
 
5235
        }
 
5236
 
 
5237
        /// <summary>
 
5238
        /// Gets or sets the value of the IPTC/NAA tag Fixture Identifier.
 
5239
        /// </summary>
 
5240
        /// <remarks>
 
5241
        /// <b>Handling of null values</b><para/>
 
5242
        /// A null value indicates, that the corresponding metadata tag is not
 
5243
        /// present in the metadata model.
 
5244
        /// Setting this property's value to a non-null reference creates the
 
5245
        /// metadata tag if necessary.
 
5246
        /// Setting this property's value to a null reference deletes the
 
5247
        /// metadata tag from the metadata model.
 
5248
        /// </remarks>
 
5249
        public string FixtureIdentifier
 
5250
        {
 
5251
            get
 
5252
            {
 
5253
                return GetTagText("FixtureIdentifier");
 
5254
            }
 
5255
            set
 
5256
            {
 
5257
                SetTagValue("FixtureIdentifier", value);
 
5258
            }
 
5259
        }
 
5260
 
 
5261
        /// <summary>
 
5262
        /// Gets or sets the value of the IPTC/NAA tag Keywords.
 
5263
        /// </summary>
 
5264
        /// <remarks>
 
5265
        /// <b>Handling of null values</b><para/>
 
5266
        /// A null value indicates, that the corresponding metadata tag is not
 
5267
        /// present in the metadata model.
 
5268
        /// Setting this property's value to a non-null reference creates the
 
5269
        /// metadata tag if necessary.
 
5270
        /// Setting this property's value to a null reference deletes the
 
5271
        /// metadata tag from the metadata model.
 
5272
        /// </remarks>
 
5273
        public string Keywords
 
5274
        {
 
5275
            get
 
5276
            {
 
5277
                return GetTagText("Keywords");
 
5278
            }
 
5279
            set
 
5280
            {
 
5281
                SetTagValue("Keywords", value);
 
5282
            }
 
5283
        }
 
5284
 
 
5285
        /// <summary>
 
5286
        /// Gets or sets the value of the IPTC/NAA tag Content Location Code.
 
5287
        /// </summary>
 
5288
        /// <remarks>
 
5289
        /// <b>Handling of null values</b><para/>
 
5290
        /// A null value indicates, that the corresponding metadata tag is not
 
5291
        /// present in the metadata model.
 
5292
        /// Setting this property's value to a non-null reference creates the
 
5293
        /// metadata tag if necessary.
 
5294
        /// Setting this property's value to a null reference deletes the
 
5295
        /// metadata tag from the metadata model.
 
5296
        /// </remarks>
 
5297
        public string ContentLocationCode
 
5298
        {
 
5299
            get
 
5300
            {
 
5301
                return GetTagText("ContentLocationCode");
 
5302
            }
 
5303
            set
 
5304
            {
 
5305
                SetTagValue("ContentLocationCode", value);
 
5306
            }
 
5307
        }
 
5308
 
 
5309
        /// <summary>
 
5310
        /// Gets or sets the value of the IPTC/NAA tag Content Location Name.
 
5311
        /// </summary>
 
5312
        /// <remarks>
 
5313
        /// <b>Handling of null values</b><para/>
 
5314
        /// A null value indicates, that the corresponding metadata tag is not
 
5315
        /// present in the metadata model.
 
5316
        /// Setting this property's value to a non-null reference creates the
 
5317
        /// metadata tag if necessary.
 
5318
        /// Setting this property's value to a null reference deletes the
 
5319
        /// metadata tag from the metadata model.
 
5320
        /// </remarks>
 
5321
        public string ContentLocationName
 
5322
        {
 
5323
            get
 
5324
            {
 
5325
                return GetTagText("ContentLocationName");
 
5326
            }
 
5327
            set
 
5328
            {
 
5329
                SetTagValue("ContentLocationName", value);
 
5330
            }
 
5331
        }
 
5332
 
 
5333
        /// <summary>
 
5334
        /// Gets or sets the value of the IPTC/NAA tag Release Date.
 
5335
        /// </summary>
 
5336
        /// <remarks>
 
5337
        /// <b>Handling of null values</b><para/>
 
5338
        /// A null value indicates, that the corresponding metadata tag is not
 
5339
        /// present in the metadata model.
 
5340
        /// Setting this property's value to a non-null reference creates the
 
5341
        /// metadata tag if necessary.
 
5342
        /// Setting this property's value to a null reference deletes the
 
5343
        /// metadata tag from the metadata model.
 
5344
        /// </remarks>
 
5345
        public string ReleaseDate
 
5346
        {
 
5347
            get
 
5348
            {
 
5349
                return GetTagText("ReleaseDate");
 
5350
            }
 
5351
            set
 
5352
            {
 
5353
                SetTagValue("ReleaseDate", value);
 
5354
            }
 
5355
        }
 
5356
 
 
5357
        /// <summary>
 
5358
        /// Gets or sets the value of the IPTC/NAA tag Release Time.
 
5359
        /// </summary>
 
5360
        /// <remarks>
 
5361
        /// <b>Handling of null values</b><para/>
 
5362
        /// A null value indicates, that the corresponding metadata tag is not
 
5363
        /// present in the metadata model.
 
5364
        /// Setting this property's value to a non-null reference creates the
 
5365
        /// metadata tag if necessary.
 
5366
        /// Setting this property's value to a null reference deletes the
 
5367
        /// metadata tag from the metadata model.
 
5368
        /// </remarks>
 
5369
        public string ReleaseTime
 
5370
        {
 
5371
            get
 
5372
            {
 
5373
                return GetTagText("ReleaseTime");
 
5374
            }
 
5375
            set
 
5376
            {
 
5377
                SetTagValue("ReleaseTime", value);
 
5378
            }
 
5379
        }
 
5380
 
 
5381
        /// <summary>
 
5382
        /// Gets or sets the value of the IPTC/NAA tag Expiration Date.
 
5383
        /// </summary>
 
5384
        /// <remarks>
 
5385
        /// <b>Handling of null values</b><para/>
 
5386
        /// A null value indicates, that the corresponding metadata tag is not
 
5387
        /// present in the metadata model.
 
5388
        /// Setting this property's value to a non-null reference creates the
 
5389
        /// metadata tag if necessary.
 
5390
        /// Setting this property's value to a null reference deletes the
 
5391
        /// metadata tag from the metadata model.
 
5392
        /// </remarks>
 
5393
        public string ExpirationDate
 
5394
        {
 
5395
            get
 
5396
            {
 
5397
                return GetTagText("ExpirationDate");
 
5398
            }
 
5399
            set
 
5400
            {
 
5401
                SetTagValue("ExpirationDate", value);
 
5402
            }
 
5403
        }
 
5404
 
 
5405
        /// <summary>
 
5406
        /// Gets or sets the value of the IPTC/NAA tag Expiration Time.
 
5407
        /// </summary>
 
5408
        /// <remarks>
 
5409
        /// <b>Handling of null values</b><para/>
 
5410
        /// A null value indicates, that the corresponding metadata tag is not
 
5411
        /// present in the metadata model.
 
5412
        /// Setting this property's value to a non-null reference creates the
 
5413
        /// metadata tag if necessary.
 
5414
        /// Setting this property's value to a null reference deletes the
 
5415
        /// metadata tag from the metadata model.
 
5416
        /// </remarks>
 
5417
        public string ExpirationTime
 
5418
        {
 
5419
            get
 
5420
            {
 
5421
                return GetTagText("ExpirationTime");
 
5422
            }
 
5423
            set
 
5424
            {
 
5425
                SetTagValue("ExpirationTime", value);
 
5426
            }
 
5427
        }
 
5428
 
 
5429
        /// <summary>
 
5430
        /// Gets or sets the value of the IPTC/NAA tag Special Instructions.
 
5431
        /// </summary>
 
5432
        /// <remarks>
 
5433
        /// <b>Handling of null values</b><para/>
 
5434
        /// A null value indicates, that the corresponding metadata tag is not
 
5435
        /// present in the metadata model.
 
5436
        /// Setting this property's value to a non-null reference creates the
 
5437
        /// metadata tag if necessary.
 
5438
        /// Setting this property's value to a null reference deletes the
 
5439
        /// metadata tag from the metadata model.
 
5440
        /// </remarks>
 
5441
        public string SpecialInstructions
 
5442
        {
 
5443
            get
 
5444
            {
 
5445
                return GetTagText("SpecialInstructions");
 
5446
            }
 
5447
            set
 
5448
            {
 
5449
                SetTagValue("SpecialInstructions", value);
 
5450
            }
 
5451
        }
 
5452
 
 
5453
        /// <summary>
 
5454
        /// Gets or sets the value of the IPTC/NAA tag Action Advised.
 
5455
        /// </summary>
 
5456
        /// <remarks>
 
5457
        /// <b>Handling of null values</b><para/>
 
5458
        /// A null value indicates, that the corresponding metadata tag is not
 
5459
        /// present in the metadata model.
 
5460
        /// Setting this property's value to a non-null reference creates the
 
5461
        /// metadata tag if necessary.
 
5462
        /// Setting this property's value to a null reference deletes the
 
5463
        /// metadata tag from the metadata model.
 
5464
        /// </remarks>
 
5465
        public string ActionAdvised
 
5466
        {
 
5467
            get
 
5468
            {
 
5469
                return GetTagText("ActionAdvised");
 
5470
            }
 
5471
            set
 
5472
            {
 
5473
                SetTagValue("ActionAdvised", value);
 
5474
            }
 
5475
        }
 
5476
 
 
5477
        /// <summary>
 
5478
        /// Gets or sets the value of the IPTC/NAA tag Reference Service.
 
5479
        /// </summary>
 
5480
        /// <remarks>
 
5481
        /// <b>Handling of null values</b><para/>
 
5482
        /// A null value indicates, that the corresponding metadata tag is not
 
5483
        /// present in the metadata model.
 
5484
        /// Setting this property's value to a non-null reference creates the
 
5485
        /// metadata tag if necessary.
 
5486
        /// Setting this property's value to a null reference deletes the
 
5487
        /// metadata tag from the metadata model.
 
5488
        /// </remarks>
 
5489
        public string ReferenceService
 
5490
        {
 
5491
            get
 
5492
            {
 
5493
                return GetTagText("ReferenceService");
 
5494
            }
 
5495
            set
 
5496
            {
 
5497
                SetTagValue("ReferenceService", value);
 
5498
            }
 
5499
        }
 
5500
 
 
5501
        /// <summary>
 
5502
        /// Gets or sets the value of the IPTC/NAA tag Reference Date.
 
5503
        /// </summary>
 
5504
        /// <remarks>
 
5505
        /// <b>Handling of null values</b><para/>
 
5506
        /// A null value indicates, that the corresponding metadata tag is not
 
5507
        /// present in the metadata model.
 
5508
        /// Setting this property's value to a non-null reference creates the
 
5509
        /// metadata tag if necessary.
 
5510
        /// Setting this property's value to a null reference deletes the
 
5511
        /// metadata tag from the metadata model.
 
5512
        /// </remarks>
 
5513
        public string ReferenceDate
 
5514
        {
 
5515
            get
 
5516
            {
 
5517
                return GetTagText("ReferenceDate");
 
5518
            }
 
5519
            set
 
5520
            {
 
5521
                SetTagValue("ReferenceDate", value);
 
5522
            }
 
5523
        }
 
5524
 
 
5525
        /// <summary>
 
5526
        /// Gets or sets the value of the IPTC/NAA tag Reference Number.
 
5527
        /// </summary>
 
5528
        /// <remarks>
 
5529
        /// <b>Handling of null values</b><para/>
 
5530
        /// A null value indicates, that the corresponding metadata tag is not
 
5531
        /// present in the metadata model.
 
5532
        /// Setting this property's value to a non-null reference creates the
 
5533
        /// metadata tag if necessary.
 
5534
        /// Setting this property's value to a null reference deletes the
 
5535
        /// metadata tag from the metadata model.
 
5536
        /// </remarks>
 
5537
        public string ReferenceNumber
 
5538
        {
 
5539
            get
 
5540
            {
 
5541
                return GetTagText("ReferenceNumber");
 
5542
            }
 
5543
            set
 
5544
            {
 
5545
                SetTagValue("ReferenceNumber", value);
 
5546
            }
 
5547
        }
 
5548
 
 
5549
        /// <summary>
 
5550
        /// Gets or sets the value of the IPTC/NAA tag Date Created.
 
5551
        /// </summary>
 
5552
        /// <remarks>
 
5553
        /// <b>Handling of null values</b><para/>
 
5554
        /// A null value indicates, that the corresponding metadata tag is not
 
5555
        /// present in the metadata model.
 
5556
        /// Setting this property's value to a non-null reference creates the
 
5557
        /// metadata tag if necessary.
 
5558
        /// Setting this property's value to a null reference deletes the
 
5559
        /// metadata tag from the metadata model.
 
5560
        /// </remarks>
 
5561
        public string DateCreated
 
5562
        {
 
5563
            get
 
5564
            {
 
5565
                return GetTagText("DateCreated");
 
5566
            }
 
5567
            set
 
5568
            {
 
5569
                SetTagValue("DateCreated", value);
 
5570
            }
 
5571
        }
 
5572
 
 
5573
        /// <summary>
 
5574
        /// Gets or sets the value of the IPTC/NAA tag Time Created.
 
5575
        /// </summary>
 
5576
        /// <remarks>
 
5577
        /// <b>Handling of null values</b><para/>
 
5578
        /// A null value indicates, that the corresponding metadata tag is not
 
5579
        /// present in the metadata model.
 
5580
        /// Setting this property's value to a non-null reference creates the
 
5581
        /// metadata tag if necessary.
 
5582
        /// Setting this property's value to a null reference deletes the
 
5583
        /// metadata tag from the metadata model.
 
5584
        /// </remarks>
 
5585
        public string TimeCreated
 
5586
        {
 
5587
            get
 
5588
            {
 
5589
                return GetTagText("TimeCreated");
 
5590
            }
 
5591
            set
 
5592
            {
 
5593
                SetTagValue("TimeCreated", value);
 
5594
            }
 
5595
        }
 
5596
 
 
5597
        /// <summary>
 
5598
        /// Gets or sets the value of the IPTC/NAA tag Digital Creation Date.
 
5599
        /// </summary>
 
5600
        /// <remarks>
 
5601
        /// <b>Handling of null values</b><para/>
 
5602
        /// A null value indicates, that the corresponding metadata tag is not
 
5603
        /// present in the metadata model.
 
5604
        /// Setting this property's value to a non-null reference creates the
 
5605
        /// metadata tag if necessary.
 
5606
        /// Setting this property's value to a null reference deletes the
 
5607
        /// metadata tag from the metadata model.
 
5608
        /// </remarks>
 
5609
        public string DigitalCreationDate
 
5610
        {
 
5611
            get
 
5612
            {
 
5613
                return GetTagText("DigitalCreationDate");
 
5614
            }
 
5615
            set
 
5616
            {
 
5617
                SetTagValue("DigitalCreationDate", value);
 
5618
            }
 
5619
        }
 
5620
 
 
5621
        /// <summary>
 
5622
        /// Gets or sets the value of the IPTC/NAA tag Digital Creation Time.
 
5623
        /// </summary>
 
5624
        /// <remarks>
 
5625
        /// <b>Handling of null values</b><para/>
 
5626
        /// A null value indicates, that the corresponding metadata tag is not
 
5627
        /// present in the metadata model.
 
5628
        /// Setting this property's value to a non-null reference creates the
 
5629
        /// metadata tag if necessary.
 
5630
        /// Setting this property's value to a null reference deletes the
 
5631
        /// metadata tag from the metadata model.
 
5632
        /// </remarks>
 
5633
        public string DigitalCreationTime
 
5634
        {
 
5635
            get
 
5636
            {
 
5637
                return GetTagText("DigitalCreationTime");
 
5638
            }
 
5639
            set
 
5640
            {
 
5641
                SetTagValue("DigitalCreationTime", value);
 
5642
            }
 
5643
        }
 
5644
 
 
5645
        /// <summary>
 
5646
        /// Gets or sets the value of the IPTC/NAA tag Originating Program.
 
5647
        /// </summary>
 
5648
        /// <remarks>
 
5649
        /// <b>Handling of null values</b><para/>
 
5650
        /// A null value indicates, that the corresponding metadata tag is not
 
5651
        /// present in the metadata model.
 
5652
        /// Setting this property's value to a non-null reference creates the
 
5653
        /// metadata tag if necessary.
 
5654
        /// Setting this property's value to a null reference deletes the
 
5655
        /// metadata tag from the metadata model.
 
5656
        /// </remarks>
 
5657
        public string OriginatingProgram
 
5658
        {
 
5659
            get
 
5660
            {
 
5661
                return GetTagText("OriginatingProgram");
 
5662
            }
 
5663
            set
 
5664
            {
 
5665
                SetTagValue("OriginatingProgram", value);
 
5666
            }
 
5667
        }
 
5668
 
 
5669
        /// <summary>
 
5670
        /// Gets or sets the value of the IPTC/NAA tag Program Version.
 
5671
        /// </summary>
 
5672
        /// <remarks>
 
5673
        /// <b>Handling of null values</b><para/>
 
5674
        /// A null value indicates, that the corresponding metadata tag is not
 
5675
        /// present in the metadata model.
 
5676
        /// Setting this property's value to a non-null reference creates the
 
5677
        /// metadata tag if necessary.
 
5678
        /// Setting this property's value to a null reference deletes the
 
5679
        /// metadata tag from the metadata model.
 
5680
        /// </remarks>
 
5681
        public string ProgramVersion
 
5682
        {
 
5683
            get
 
5684
            {
 
5685
                return GetTagText("ProgramVersion");
 
5686
            }
 
5687
            set
 
5688
            {
 
5689
                SetTagValue("ProgramVersion", value);
 
5690
            }
 
5691
        }
 
5692
 
 
5693
        /// <summary>
 
5694
        /// Gets or sets the value of the IPTC/NAA tag Object Cycle.
 
5695
        /// </summary>
 
5696
        /// <remarks>
 
5697
        /// <b>Handling of null values</b><para/>
 
5698
        /// A null value indicates, that the corresponding metadata tag is not
 
5699
        /// present in the metadata model.
 
5700
        /// Setting this property's value to a non-null reference creates the
 
5701
        /// metadata tag if necessary.
 
5702
        /// Setting this property's value to a null reference deletes the
 
5703
        /// metadata tag from the metadata model.
 
5704
        /// </remarks>
 
5705
        public string ObjectCycle
 
5706
        {
 
5707
            get
 
5708
            {
 
5709
                return GetTagText("ObjectCycle");
 
5710
            }
 
5711
            set
 
5712
            {
 
5713
                SetTagValue("ObjectCycle", value);
 
5714
            }
 
5715
        }
 
5716
 
 
5717
        /// <summary>
 
5718
        /// Gets or sets the value of the IPTC/NAA tag By Line.
 
5719
        /// This is the author's name.
 
5720
        /// </summary>
 
5721
        /// <remarks>
 
5722
        /// <b>Handling of null values</b><para/>
 
5723
        /// A null value indicates, that the corresponding metadata tag is not
 
5724
        /// present in the metadata model.
 
5725
        /// Setting this property's value to a non-null reference creates the
 
5726
        /// metadata tag if necessary.
 
5727
        /// Setting this property's value to a null reference deletes the
 
5728
        /// metadata tag from the metadata model.
 
5729
        /// </remarks>
 
5730
        public string ByLine
 
5731
        {
 
5732
            get
 
5733
            {
 
5734
                return GetTagText("By-line");
 
5735
            }
 
5736
            set
 
5737
            {
 
5738
                SetTagValue("By-line", value);
 
5739
            }
 
5740
        }
 
5741
 
 
5742
        /// <summary>
 
5743
        /// Gets or sets the value of the IPTC/NAA tag By Line Title.
 
5744
        /// This is the author's position.
 
5745
        /// </summary>
 
5746
        /// <remarks>
 
5747
        /// <b>Handling of null values</b><para/>
 
5748
        /// A null value indicates, that the corresponding metadata tag is not
 
5749
        /// present in the metadata model.
 
5750
        /// Setting this property's value to a non-null reference creates the
 
5751
        /// metadata tag if necessary.
 
5752
        /// Setting this property's value to a null reference deletes the
 
5753
        /// metadata tag from the metadata model.
 
5754
        /// </remarks>
 
5755
        public string ByLineTitle
 
5756
        {
 
5757
            get
 
5758
            {
 
5759
                return GetTagText("By-lineTitle");
 
5760
            }
 
5761
            set
 
5762
            {
 
5763
                SetTagValue("By-lineTitle", value);
 
5764
            }
 
5765
        }
 
5766
 
 
5767
        /// <summary>
 
5768
        /// Gets or sets the value of the IPTC/NAA tag City.
 
5769
        /// </summary>
 
5770
        /// <remarks>
 
5771
        /// <b>Handling of null values</b><para/>
 
5772
        /// A null value indicates, that the corresponding metadata tag is not
 
5773
        /// present in the metadata model.
 
5774
        /// Setting this property's value to a non-null reference creates the
 
5775
        /// metadata tag if necessary.
 
5776
        /// Setting this property's value to a null reference deletes the
 
5777
        /// metadata tag from the metadata model.
 
5778
        /// </remarks>
 
5779
        public string City
 
5780
        {
 
5781
            get
 
5782
            {
 
5783
                return GetTagText("City");
 
5784
            }
 
5785
            set
 
5786
            {
 
5787
                SetTagValue("City", value);
 
5788
            }
 
5789
        }
 
5790
 
 
5791
        /// <summary>
 
5792
        /// Gets or sets the value of the IPTC/NAA tag Sub Location.
 
5793
        /// </summary>
 
5794
        /// <remarks>
 
5795
        /// <b>Handling of null values</b><para/>
 
5796
        /// A null value indicates, that the corresponding metadata tag is not
 
5797
        /// present in the metadata model.
 
5798
        /// Setting this property's value to a non-null reference creates the
 
5799
        /// metadata tag if necessary.
 
5800
        /// Setting this property's value to a null reference deletes the
 
5801
        /// metadata tag from the metadata model.
 
5802
        /// </remarks>
 
5803
        public string SubLocation
 
5804
        {
 
5805
            get
 
5806
            {
 
5807
                return GetTagText("SubLocation");
 
5808
            }
 
5809
            set
 
5810
            {
 
5811
                SetTagValue("SubLocation", value);
 
5812
            }
 
5813
        }
 
5814
 
 
5815
        /// <summary>
 
5816
        /// Gets or sets the value of the IPTC/NAA tag Province State.
 
5817
        /// </summary>
 
5818
        /// <remarks>
 
5819
        /// <b>Handling of null values</b><para/>
 
5820
        /// A null value indicates, that the corresponding metadata tag is not
 
5821
        /// present in the metadata model.
 
5822
        /// Setting this property's value to a non-null reference creates the
 
5823
        /// metadata tag if necessary.
 
5824
        /// Setting this property's value to a null reference deletes the
 
5825
        /// metadata tag from the metadata model.
 
5826
        /// </remarks>
 
5827
        public string ProvinceState
 
5828
        {
 
5829
            get
 
5830
            {
 
5831
                return GetTagText("ProvinceState");
 
5832
            }
 
5833
            set
 
5834
            {
 
5835
                SetTagValue("ProvinceState", value);
 
5836
            }
 
5837
        }
 
5838
 
 
5839
        /// <summary>
 
5840
        /// Gets or sets the value of the IPTC/NAA tag Country Primary Location Code.
 
5841
        /// </summary>
 
5842
        /// <remarks>
 
5843
        /// <b>Handling of null values</b><para/>
 
5844
        /// A null value indicates, that the corresponding metadata tag is not
 
5845
        /// present in the metadata model.
 
5846
        /// Setting this property's value to a non-null reference creates the
 
5847
        /// metadata tag if necessary.
 
5848
        /// Setting this property's value to a null reference deletes the
 
5849
        /// metadata tag from the metadata model.
 
5850
        /// </remarks>
 
5851
        public string CountryPrimaryLocationCode
 
5852
        {
 
5853
            get
 
5854
            {
 
5855
                return GetTagText("Country-PrimaryLocationCode");
 
5856
            }
 
5857
            set
 
5858
            {
 
5859
                SetTagValue("Country-PrimaryLocationCode", value);
 
5860
            }
 
5861
        }
 
5862
 
 
5863
        /// <summary>
 
5864
        /// Gets or sets the value of the IPTC/NAA tag Country Primary Location Name.
 
5865
        /// </summary>
 
5866
        /// <remarks>
 
5867
        /// <b>Handling of null values</b><para/>
 
5868
        /// A null value indicates, that the corresponding metadata tag is not
 
5869
        /// present in the metadata model.
 
5870
        /// Setting this property's value to a non-null reference creates the
 
5871
        /// metadata tag if necessary.
 
5872
        /// Setting this property's value to a null reference deletes the
 
5873
        /// metadata tag from the metadata model.
 
5874
        /// </remarks>
 
5875
        public string CountryPrimaryLocationName
 
5876
        {
 
5877
            get
 
5878
            {
 
5879
                return GetTagText("Country-PrimaryLocationName");
 
5880
            }
 
5881
            set
 
5882
            {
 
5883
                SetTagValue("Country-PrimaryLocationName", value);
 
5884
            }
 
5885
        }
 
5886
 
 
5887
        /// <summary>
 
5888
        /// Gets or sets the value of the IPTC/NAA tag Original Transmission Reference.
 
5889
        /// </summary>
 
5890
        /// <remarks>
 
5891
        /// <b>Handling of null values</b><para/>
 
5892
        /// A null value indicates, that the corresponding metadata tag is not
 
5893
        /// present in the metadata model.
 
5894
        /// Setting this property's value to a non-null reference creates the
 
5895
        /// metadata tag if necessary.
 
5896
        /// Setting this property's value to a null reference deletes the
 
5897
        /// metadata tag from the metadata model.
 
5898
        /// </remarks>
 
5899
        public string OriginalTransmissionReference
 
5900
        {
 
5901
            get
 
5902
            {
 
5903
                return GetTagText("OriginalTransmissionReference");
 
5904
            }
 
5905
            set
 
5906
            {
 
5907
                SetTagValue("OriginalTransmissionReference", value);
 
5908
            }
 
5909
        }
 
5910
 
 
5911
        /// <summary>
 
5912
        /// Gets or sets the value of the IPTC/NAA tag Headline.
 
5913
        /// </summary>
 
5914
        /// <remarks>
 
5915
        /// <b>Handling of null values</b><para/>
 
5916
        /// A null value indicates, that the corresponding metadata tag is not
 
5917
        /// present in the metadata model.
 
5918
        /// Setting this property's value to a non-null reference creates the
 
5919
        /// metadata tag if necessary.
 
5920
        /// Setting this property's value to a null reference deletes the
 
5921
        /// metadata tag from the metadata model.
 
5922
        /// </remarks>
 
5923
        public string Headline
 
5924
        {
 
5925
            get
 
5926
            {
 
5927
                return GetTagText("Headline");
 
5928
            }
 
5929
            set
 
5930
            {
 
5931
                SetTagValue("Headline", value);
 
5932
            }
 
5933
        }
 
5934
 
 
5935
        /// <summary>
 
5936
        /// Gets or sets the value of the IPTC/NAA tag Credit.
 
5937
        /// </summary>
 
5938
        /// <remarks>
 
5939
        /// <b>Handling of null values</b><para/>
 
5940
        /// A null value indicates, that the corresponding metadata tag is not
 
5941
        /// present in the metadata model.
 
5942
        /// Setting this property's value to a non-null reference creates the
 
5943
        /// metadata tag if necessary.
 
5944
        /// Setting this property's value to a null reference deletes the
 
5945
        /// metadata tag from the metadata model.
 
5946
        /// </remarks>
 
5947
        public string Credit
 
5948
        {
 
5949
            get
 
5950
            {
 
5951
                return GetTagText("Credit");
 
5952
            }
 
5953
            set
 
5954
            {
 
5955
                SetTagValue("Credit", value);
 
5956
            }
 
5957
        }
 
5958
 
 
5959
        /// <summary>
 
5960
        /// Gets or sets the value of the IPTC/NAA tag Source.
 
5961
        /// </summary>
 
5962
        /// <remarks>
 
5963
        /// <b>Handling of null values</b><para/>
 
5964
        /// A null value indicates, that the corresponding metadata tag is not
 
5965
        /// present in the metadata model.
 
5966
        /// Setting this property's value to a non-null reference creates the
 
5967
        /// metadata tag if necessary.
 
5968
        /// Setting this property's value to a null reference deletes the
 
5969
        /// metadata tag from the metadata model.
 
5970
        /// </remarks>
 
5971
        public string Source
 
5972
        {
 
5973
            get
 
5974
            {
 
5975
                return GetTagText("Source");
 
5976
            }
 
5977
            set
 
5978
            {
 
5979
                SetTagValue("Source", value);
 
5980
            }
 
5981
        }
 
5982
 
 
5983
        /// <summary>
 
5984
        /// Gets or sets the value of the IPTC/NAA tag Copyright Notice.
 
5985
        /// </summary>
 
5986
        /// <remarks>
 
5987
        /// <b>Handling of null values</b><para/>
 
5988
        /// A null value indicates, that the corresponding metadata tag is not
 
5989
        /// present in the metadata model.
 
5990
        /// Setting this property's value to a non-null reference creates the
 
5991
        /// metadata tag if necessary.
 
5992
        /// Setting this property's value to a null reference deletes the
 
5993
        /// metadata tag from the metadata model.
 
5994
        /// </remarks>
 
5995
        public string CopyrightNotice
 
5996
        {
 
5997
            get
 
5998
            {
 
5999
                return GetTagText("CopyrightNotice");
 
6000
            }
 
6001
            set
 
6002
            {
 
6003
                SetTagValue("CopyrightNotice", value);
 
6004
            }
 
6005
        }
 
6006
 
 
6007
        /// <summary>
 
6008
        /// Gets or sets the value of the IPTC/NAA tag Contact.
 
6009
        /// </summary>
 
6010
        /// <remarks>
 
6011
        /// <b>Handling of null values</b><para/>
 
6012
        /// A null value indicates, that the corresponding metadata tag is not
 
6013
        /// present in the metadata model.
 
6014
        /// Setting this property's value to a non-null reference creates the
 
6015
        /// metadata tag if necessary.
 
6016
        /// Setting this property's value to a null reference deletes the
 
6017
        /// metadata tag from the metadata model.
 
6018
        /// </remarks>
 
6019
        public string Contact
 
6020
        {
 
6021
            get
 
6022
            {
 
6023
                return GetTagText("Contact");
 
6024
            }
 
6025
            set
 
6026
            {
 
6027
                SetTagValue("Contact", value);
 
6028
            }
 
6029
        }
 
6030
 
 
6031
        /// <summary>
 
6032
        /// Gets or sets the value of the IPTC/NAA tag Caption Abstract.
 
6033
        /// </summary>
 
6034
        /// <remarks>
 
6035
        /// <b>Handling of null values</b><para/>
 
6036
        /// A null value indicates, that the corresponding metadata tag is not
 
6037
        /// present in the metadata model.
 
6038
        /// Setting this property's value to a non-null reference creates the
 
6039
        /// metadata tag if necessary.
 
6040
        /// Setting this property's value to a null reference deletes the
 
6041
        /// metadata tag from the metadata model.
 
6042
        /// </remarks>
 
6043
        public string CaptionAbstract
 
6044
        {
 
6045
            get
 
6046
            {
 
6047
                return GetTagText("CaptionAbstract");
 
6048
            }
 
6049
            set
 
6050
            {
 
6051
                SetTagValue("CaptionAbstract", value);
 
6052
            }
 
6053
        }
 
6054
 
 
6055
        /// <summary>
 
6056
        /// Gets or sets the value of the IPTC/NAA tag Writer Editor.
 
6057
        /// This is also referred to as Caption Writer.
 
6058
        /// </summary>
 
6059
        /// <remarks>
 
6060
        /// <b>Handling of null values</b><para/>
 
6061
        /// A null value indicates, that the corresponding metadata tag is not
 
6062
        /// present in the metadata model.
 
6063
        /// Setting this property's value to a non-null reference creates the
 
6064
        /// metadata tag if necessary.
 
6065
        /// Setting this property's value to a null reference deletes the
 
6066
        /// metadata tag from the metadata model.
 
6067
        /// </remarks>
 
6068
        public string WriterEditor
 
6069
        {
 
6070
            get
 
6071
            {
 
6072
                return GetTagText("WriterEditor");
 
6073
            }
 
6074
            set
 
6075
            {
 
6076
                SetTagValue("WriterEditor", value);
 
6077
            }
 
6078
        }
 
6079
 
 
6080
        /// <summary>
 
6081
        /// Gets or sets the value of the IPTC/NAA tag Rasterized Caption.
 
6082
        /// </summary>
 
6083
        /// <remarks>
 
6084
        /// <b>Handling of null values</b><para/>
 
6085
        /// A null value indicates, that the corresponding metadata tag is not
 
6086
        /// present in the metadata model.
 
6087
        /// Setting this property's value to a non-null reference creates the
 
6088
        /// metadata tag if necessary.
 
6089
        /// Setting this property's value to a null reference deletes the
 
6090
        /// metadata tag from the metadata model.
 
6091
        /// </remarks>
 
6092
        public string RasterizedCaption
 
6093
        {
 
6094
            get
 
6095
            {
 
6096
                return GetTagText("RasterizedCaption");
 
6097
            }
 
6098
            set
 
6099
            {
 
6100
                SetTagValue("RasterizedCaption", value);
 
6101
            }
 
6102
        }
 
6103
 
 
6104
        /// <summary>
 
6105
        /// Gets or sets the value of the IPTC/NAA tag Image Type.
 
6106
        /// </summary>
 
6107
        /// <remarks>
 
6108
        /// <b>Handling of null values</b><para/>
 
6109
        /// A null value indicates, that the corresponding metadata tag is not
 
6110
        /// present in the metadata model.
 
6111
        /// Setting this property's value to a non-null reference creates the
 
6112
        /// metadata tag if necessary.
 
6113
        /// Setting this property's value to a null reference deletes the
 
6114
        /// metadata tag from the metadata model.
 
6115
        /// </remarks>
 
6116
        public string ImageType
 
6117
        {
 
6118
            get
 
6119
            {
 
6120
                return GetTagText("ImageType");
 
6121
            }
 
6122
            set
 
6123
            {
 
6124
                SetTagValue("ImageType", value);
 
6125
            }
 
6126
        }
 
6127
 
 
6128
        /// <summary>
 
6129
        /// Gets or sets the value of the IPTC/NAA tag Image Orientation.
 
6130
        /// </summary>
 
6131
        /// <remarks>
 
6132
        /// <b>Handling of null values</b><para/>
 
6133
        /// A null value indicates, that the corresponding metadata tag is not
 
6134
        /// present in the metadata model.
 
6135
        /// Setting this property's value to a non-null reference creates the
 
6136
        /// metadata tag if necessary.
 
6137
        /// Setting this property's value to a null reference deletes the
 
6138
        /// metadata tag from the metadata model.
 
6139
        /// </remarks>
 
6140
        public string ImageOrientation
 
6141
        {
 
6142
            get
 
6143
            {
 
6144
                return GetTagText("ImageOrientation");
 
6145
            }
 
6146
            set
 
6147
            {
 
6148
                SetTagValue("ImageOrientation", value);
 
6149
            }
 
6150
        }
 
6151
 
 
6152
        /// <summary>
 
6153
        /// Gets or sets the value of the IPTC/NAA tag Language Identifier.
 
6154
        /// </summary>
 
6155
        /// <remarks>
 
6156
        /// <b>Handling of null values</b><para/>
 
6157
        /// A null value indicates, that the corresponding metadata tag is not
 
6158
        /// present in the metadata model.
 
6159
        /// Setting this property's value to a non-null reference creates the
 
6160
        /// metadata tag if necessary.
 
6161
        /// Setting this property's value to a null reference deletes the
 
6162
        /// metadata tag from the metadata model.
 
6163
        /// </remarks>
 
6164
        public string LanguageIdentifier
 
6165
        {
 
6166
            get
 
6167
            {
 
6168
                return GetTagText("LanguageIdentifier");
 
6169
            }
 
6170
            set
 
6171
            {
 
6172
                SetTagValue("LanguageIdentifier", value);
 
6173
            }
 
6174
        }
 
6175
 
 
6176
        /// <summary>
 
6177
        /// Gets or sets the value of the IPTC/NAA tag Audio Type.
 
6178
        /// </summary>
 
6179
        /// <remarks>
 
6180
        /// <b>Handling of null values</b><para/>
 
6181
        /// A null value indicates, that the corresponding metadata tag is not
 
6182
        /// present in the metadata model.
 
6183
        /// Setting this property's value to a non-null reference creates the
 
6184
        /// metadata tag if necessary.
 
6185
        /// Setting this property's value to a null reference deletes the
 
6186
        /// metadata tag from the metadata model.
 
6187
        /// </remarks>
 
6188
        public string AudioType
 
6189
        {
 
6190
            get
 
6191
            {
 
6192
                return GetTagText("AudioType");
 
6193
            }
 
6194
            set
 
6195
            {
 
6196
                SetTagValue("AudioType", value);
 
6197
            }
 
6198
        }
 
6199
 
 
6200
        /// <summary>
 
6201
        /// Gets or sets the value of the IPTC/NAA tag Audio Sampling Rate.
 
6202
        /// </summary>
 
6203
        /// <remarks>
 
6204
        /// <b>Handling of null values</b><para/>
 
6205
        /// A null value indicates, that the corresponding metadata tag is not
 
6206
        /// present in the metadata model.
 
6207
        /// Setting this property's value to a non-null reference creates the
 
6208
        /// metadata tag if necessary.
 
6209
        /// Setting this property's value to a null reference deletes the
 
6210
        /// metadata tag from the metadata model.
 
6211
        /// </remarks>
 
6212
        public string AudioSamplingRate
 
6213
        {
 
6214
            get
 
6215
            {
 
6216
                return GetTagText("AudioSamplingRate");
 
6217
            }
 
6218
            set
 
6219
            {
 
6220
                SetTagValue("AudioSamplingRate", value);
 
6221
            }
 
6222
        }
 
6223
 
 
6224
        /// <summary>
 
6225
        /// Gets or sets the value of the IPTC/NAA tag Audio Sampling Resolution.
 
6226
        /// </summary>
 
6227
        /// <remarks>
 
6228
        /// <b>Handling of null values</b><para/>
 
6229
        /// A null value indicates, that the corresponding metadata tag is not
 
6230
        /// present in the metadata model.
 
6231
        /// Setting this property's value to a non-null reference creates the
 
6232
        /// metadata tag if necessary.
 
6233
        /// Setting this property's value to a null reference deletes the
 
6234
        /// metadata tag from the metadata model.
 
6235
        /// </remarks>
 
6236
        public string AudioSamplingResolution
 
6237
        {
 
6238
            get
 
6239
            {
 
6240
                return GetTagText("AudioSamplingResolution");
 
6241
            }
 
6242
            set
 
6243
            {
 
6244
                SetTagValue("AudioSamplingResolution", value);
 
6245
            }
 
6246
        }
 
6247
 
 
6248
        /// <summary>
 
6249
        /// Gets or sets the value of the IPTC/NAA tag Audio Duration.
 
6250
        /// </summary>
 
6251
        /// <remarks>
 
6252
        /// <b>Handling of null values</b><para/>
 
6253
        /// A null value indicates, that the corresponding metadata tag is not
 
6254
        /// present in the metadata model.
 
6255
        /// Setting this property's value to a non-null reference creates the
 
6256
        /// metadata tag if necessary.
 
6257
        /// Setting this property's value to a null reference deletes the
 
6258
        /// metadata tag from the metadata model.
 
6259
        /// </remarks>
 
6260
        public string AudioDuration
 
6261
        {
 
6262
            get
 
6263
            {
 
6264
                return GetTagText("AudioDuration");
 
6265
            }
 
6266
            set
 
6267
            {
 
6268
                SetTagValue("AudioDuration", value);
 
6269
            }
 
6270
        }
 
6271
 
 
6272
        /// <summary>
 
6273
        /// Gets or sets the value of the IPTC/NAA tag Audio Outcue.
 
6274
        /// </summary>
 
6275
        /// <remarks>
 
6276
        /// <b>Handling of null values</b><para/>
 
6277
        /// A null value indicates, that the corresponding metadata tag is not
 
6278
        /// present in the metadata model.
 
6279
        /// Setting this property's value to a non-null reference creates the
 
6280
        /// metadata tag if necessary.
 
6281
        /// Setting this property's value to a null reference deletes the
 
6282
        /// metadata tag from the metadata model.
 
6283
        /// </remarks>
 
6284
        public string AudioOutcue
 
6285
        {
 
6286
            get
 
6287
            {
 
6288
                return GetTagText("AudioOutcue");
 
6289
            }
 
6290
            set
 
6291
            {
 
6292
                SetTagValue("AudioOutcue", value);
 
6293
            }
 
6294
        }
 
6295
 
 
6296
        /// <summary>
 
6297
        /// Gets or sets the value of the IPTC/NAA tag Job I D.
 
6298
        /// </summary>
 
6299
        /// <remarks>
 
6300
        /// <b>Handling of null values</b><para/>
 
6301
        /// A null value indicates, that the corresponding metadata tag is not
 
6302
        /// present in the metadata model.
 
6303
        /// Setting this property's value to a non-null reference creates the
 
6304
        /// metadata tag if necessary.
 
6305
        /// Setting this property's value to a null reference deletes the
 
6306
        /// metadata tag from the metadata model.
 
6307
        /// </remarks>
 
6308
        public string JobID
 
6309
        {
 
6310
            get
 
6311
            {
 
6312
                return GetTagText("JobID");
 
6313
            }
 
6314
            set
 
6315
            {
 
6316
                SetTagValue("JobID", value);
 
6317
            }
 
6318
        }
 
6319
 
 
6320
        /// <summary>
 
6321
        /// Gets or sets the value of the IPTC/NAA tag Master Document I D.
 
6322
        /// </summary>
 
6323
        /// <remarks>
 
6324
        /// <b>Handling of null values</b><para/>
 
6325
        /// A null value indicates, that the corresponding metadata tag is not
 
6326
        /// present in the metadata model.
 
6327
        /// Setting this property's value to a non-null reference creates the
 
6328
        /// metadata tag if necessary.
 
6329
        /// Setting this property's value to a null reference deletes the
 
6330
        /// metadata tag from the metadata model.
 
6331
        /// </remarks>
 
6332
        public string MasterDocumentID
 
6333
        {
 
6334
            get
 
6335
            {
 
6336
                return GetTagText("MasterDocumentID");
 
6337
            }
 
6338
            set
 
6339
            {
 
6340
                SetTagValue("MasterDocumentID", value);
 
6341
            }
 
6342
        }
 
6343
 
 
6344
        /// <summary>
 
6345
        /// Gets or sets the value of the IPTC/NAA tag Short Document I D.
 
6346
        /// </summary>
 
6347
        /// <remarks>
 
6348
        /// <b>Handling of null values</b><para/>
 
6349
        /// A null value indicates, that the corresponding metadata tag is not
 
6350
        /// present in the metadata model.
 
6351
        /// Setting this property's value to a non-null reference creates the
 
6352
        /// metadata tag if necessary.
 
6353
        /// Setting this property's value to a null reference deletes the
 
6354
        /// metadata tag from the metadata model.
 
6355
        /// </remarks>
 
6356
        public string ShortDocumentID
 
6357
        {
 
6358
            get
 
6359
            {
 
6360
                return GetTagText("ShortDocumentID");
 
6361
            }
 
6362
            set
 
6363
            {
 
6364
                SetTagValue("ShortDocumentID", value);
 
6365
            }
 
6366
        }
 
6367
 
 
6368
        /// <summary>
 
6369
        /// Gets or sets the value of the IPTC/NAA tag Unique Document I D.
 
6370
        /// </summary>
 
6371
        /// <remarks>
 
6372
        /// <b>Handling of null values</b><para/>
 
6373
        /// A null value indicates, that the corresponding metadata tag is not
 
6374
        /// present in the metadata model.
 
6375
        /// Setting this property's value to a non-null reference creates the
 
6376
        /// metadata tag if necessary.
 
6377
        /// Setting this property's value to a null reference deletes the
 
6378
        /// metadata tag from the metadata model.
 
6379
        /// </remarks>
 
6380
        public string UniqueDocumentID
 
6381
        {
 
6382
            get
 
6383
            {
 
6384
                return GetTagText("UniqueDocumentID");
 
6385
            }
 
6386
            set
 
6387
            {
 
6388
                SetTagValue("UniqueDocumentID", value);
 
6389
            }
 
6390
        }
 
6391
 
 
6392
        /// <summary>
 
6393
        /// Gets or sets the value of the IPTC/NAA tag Owner I D.
 
6394
        /// </summary>
 
6395
        /// <remarks>
 
6396
        /// <b>Handling of null values</b><para/>
 
6397
        /// A null value indicates, that the corresponding metadata tag is not
 
6398
        /// present in the metadata model.
 
6399
        /// Setting this property's value to a non-null reference creates the
 
6400
        /// metadata tag if necessary.
 
6401
        /// Setting this property's value to a null reference deletes the
 
6402
        /// metadata tag from the metadata model.
 
6403
        /// </remarks>
 
6404
        public string OwnerID
 
6405
        {
 
6406
            get
 
6407
            {
 
6408
                return GetTagText("OwnerID");
 
6409
            }
 
6410
            set
 
6411
            {
 
6412
                SetTagValue("OwnerID", value);
 
6413
            }
 
6414
        }
 
6415
 
 
6416
        /// <summary>
 
6417
        /// Gets or sets the value of the IPTC/NAA tag Object Preview File Format.
 
6418
        /// </summary>
 
6419
        /// <remarks>
 
6420
        /// <b>Handling of null values</b><para/>
 
6421
        /// A null value indicates, that the corresponding metadata tag is not
 
6422
        /// present in the metadata model.
 
6423
        /// Setting this property's value to a non-null reference creates the
 
6424
        /// metadata tag if necessary.
 
6425
        /// Setting this property's value to a null reference deletes the
 
6426
        /// metadata tag from the metadata model.
 
6427
        /// </remarks>
 
6428
        public string ObjectPreviewFileFormat
 
6429
        {
 
6430
            get
 
6431
            {
 
6432
                return GetTagText("ObjectPreviewFileFormat");
 
6433
            }
 
6434
            set
 
6435
            {
 
6436
                SetTagValue("ObjectPreviewFileFormat", value);
 
6437
            }
 
6438
        }
 
6439
 
 
6440
        /// <summary>
 
6441
        /// Gets or sets the value of the IPTC/NAA tag Object Preview File Version.
 
6442
        /// </summary>
 
6443
        /// <remarks>
 
6444
        /// <b>Handling of null values</b><para/>
 
6445
        /// A null value indicates, that the corresponding metadata tag is not
 
6446
        /// present in the metadata model.
 
6447
        /// Setting this property's value to a non-null reference creates the
 
6448
        /// metadata tag if necessary.
 
6449
        /// Setting this property's value to a null reference deletes the
 
6450
        /// metadata tag from the metadata model.
 
6451
        /// </remarks>
 
6452
        public string ObjectPreviewFileVersion
 
6453
        {
 
6454
            get
 
6455
            {
 
6456
                return GetTagText("ObjectPreviewFileVersion");
 
6457
            }
 
6458
            set
 
6459
            {
 
6460
                SetTagValue("ObjectPreviewFileVersion", value);
 
6461
            }
 
6462
        }
 
6463
 
 
6464
        /// <summary>
 
6465
        /// Gets or sets the value of the IPTC/NAA tag Object Preview Data.
 
6466
        /// This is also referred to as Audio Outcue.
 
6467
        /// </summary>
 
6468
        /// <remarks>
 
6469
        /// <b>Handling of null values</b><para/>
 
6470
        /// A null value indicates, that the corresponding metadata tag is not
 
6471
        /// present in the metadata model.
 
6472
        /// Setting this property's value to a non-null reference creates the
 
6473
        /// metadata tag if necessary.
 
6474
        /// Setting this property's value to a null reference deletes the
 
6475
        /// metadata tag from the metadata model.
 
6476
        /// </remarks>
 
6477
        public string ObjectPreviewData
 
6478
        {
 
6479
            get
 
6480
            {
 
6481
                return GetTagText("ObjectPreviewData");
 
6482
            }
 
6483
            set
 
6484
            {
 
6485
                SetTagValue("ObjectPreviewData", value);
 
6486
            }
 
6487
        }
 
6488
 
 
6489
        /// <summary>
 
6490
        /// Gets or sets the value of the IPTC/NAA tag Prefs.
 
6491
        /// This is also referred to as photo-mechanic preferences.
 
6492
        /// </summary>
 
6493
        /// <remarks>
 
6494
        /// <b>Handling of null values</b><para/>
 
6495
        /// A null value indicates, that the corresponding metadata tag is not
 
6496
        /// present in the metadata model.
 
6497
        /// Setting this property's value to a non-null reference creates the
 
6498
        /// metadata tag if necessary.
 
6499
        /// Setting this property's value to a null reference deletes the
 
6500
        /// metadata tag from the metadata model.
 
6501
        /// </remarks>
 
6502
        public string Prefs
 
6503
        {
 
6504
            get
 
6505
            {
 
6506
                return GetTagText("Prefs");
 
6507
            }
 
6508
            set
 
6509
            {
 
6510
                SetTagValue("Prefs", value);
 
6511
            }
 
6512
        }
 
6513
 
 
6514
        /// <summary>
 
6515
        /// Gets or sets the value of the IPTC/NAA tag Classify State.
 
6516
        /// </summary>
 
6517
        /// <remarks>
 
6518
        /// <b>Handling of null values</b><para/>
 
6519
        /// A null value indicates, that the corresponding metadata tag is not
 
6520
        /// present in the metadata model.
 
6521
        /// Setting this property's value to a non-null reference creates the
 
6522
        /// metadata tag if necessary.
 
6523
        /// Setting this property's value to a null reference deletes the
 
6524
        /// metadata tag from the metadata model.
 
6525
        /// </remarks>
 
6526
        public string ClassifyState
 
6527
        {
 
6528
            get
 
6529
            {
 
6530
                return GetTagText("ClassifyState");
 
6531
            }
 
6532
            set
 
6533
            {
 
6534
                SetTagValue("ClassifyState", value);
 
6535
            }
 
6536
        }
 
6537
 
 
6538
        /// <summary>
 
6539
        /// Gets or sets the value of the IPTC/NAA tag Similarity Index.
 
6540
        /// </summary>
 
6541
        /// <remarks>
 
6542
        /// <b>Handling of null values</b><para/>
 
6543
        /// A null value indicates, that the corresponding metadata tag is not
 
6544
        /// present in the metadata model.
 
6545
        /// Setting this property's value to a non-null reference creates the
 
6546
        /// metadata tag if necessary.
 
6547
        /// Setting this property's value to a null reference deletes the
 
6548
        /// metadata tag from the metadata model.
 
6549
        /// </remarks>
 
6550
        public string SimilarityIndex
 
6551
        {
 
6552
            get
 
6553
            {
 
6554
                return GetTagText("SimilarityIndex");
 
6555
            }
 
6556
            set
 
6557
            {
 
6558
                SetTagValue("SimilarityIndex", value);
 
6559
            }
 
6560
        }
 
6561
 
 
6562
        /// <summary>
 
6563
        /// Gets or sets the value of the IPTC/NAA tag Document Notes.
 
6564
        /// </summary>
 
6565
        /// <remarks>
 
6566
        /// <b>Handling of null values</b><para/>
 
6567
        /// A null value indicates, that the corresponding metadata tag is not
 
6568
        /// present in the metadata model.
 
6569
        /// Setting this property's value to a non-null reference creates the
 
6570
        /// metadata tag if necessary.
 
6571
        /// Setting this property's value to a null reference deletes the
 
6572
        /// metadata tag from the metadata model.
 
6573
        /// </remarks>
 
6574
        public string DocumentNotes
 
6575
        {
 
6576
            get
 
6577
            {
 
6578
                return GetTagText("DocumentNotes");
 
6579
            }
 
6580
            set
 
6581
            {
 
6582
                SetTagValue("DocumentNotes", value);
 
6583
            }
 
6584
        }
 
6585
 
 
6586
        /// <summary>
 
6587
        /// Gets or sets the value of the IPTC/NAA tag Document History.
 
6588
        /// </summary>
 
6589
        /// <remarks>
 
6590
        /// <b>Handling of null values</b><para/>
 
6591
        /// A null value indicates, that the corresponding metadata tag is not
 
6592
        /// present in the metadata model.
 
6593
        /// Setting this property's value to a non-null reference creates the
 
6594
        /// metadata tag if necessary.
 
6595
        /// Setting this property's value to a null reference deletes the
 
6596
        /// metadata tag from the metadata model.
 
6597
        /// </remarks>
 
6598
        public string DocumentHistory
 
6599
        {
 
6600
            get
 
6601
            {
 
6602
                return GetTagText("DocumentHistory");
 
6603
            }
 
6604
            set
 
6605
            {
 
6606
                SetTagValue("DocumentHistory", value);
 
6607
            }
 
6608
        }
 
6609
 
 
6610
        /// <summary>
 
6611
        /// Gets or sets the value of the IPTC/NAA tag Exif Camera Info.
 
6612
        /// </summary>
 
6613
        /// <remarks>
 
6614
        /// <b>Handling of null values</b><para/>
 
6615
        /// A null value indicates, that the corresponding metadata tag is not
 
6616
        /// present in the metadata model.
 
6617
        /// Setting this property's value to a non-null reference creates the
 
6618
        /// metadata tag if necessary.
 
6619
        /// Setting this property's value to a null reference deletes the
 
6620
        /// metadata tag from the metadata model.
 
6621
        /// </remarks>
 
6622
        public string ExifCameraInfo
 
6623
        {
 
6624
            get
 
6625
            {
 
6626
                return GetTagText("ExifCameraInfo");
 
6627
            }
 
6628
            set
 
6629
            {
 
6630
                SetTagValue("ExifCameraInfo", value);
 
6631
            }
 
6632
        }
 
6633
    }
 
6634
 
 
6635
    /// <summary>
 
6636
    /// Represents a collection of all tags contained in the metadata model
 
6637
    /// <see cref="FREE_IMAGE_MDMODEL.FIMD_NODATA"/>.
 
6638
    /// </summary>
 
6639
    public class MDM_NODATA : MetadataModel
 
6640
    {
 
6641
        /// <summary>
 
6642
        /// Initializes a new instance of this class.
 
6643
        /// </summary>
 
6644
        /// <param name="dib">Handle to a FreeImage bitmap.</param>
 
6645
        public MDM_NODATA(FIBITMAP dib) : base(dib) { }
 
6646
 
 
6647
        /// <summary>
 
6648
        /// Retrieves the datamodel that this instance represents.
 
6649
        /// </summary>
 
6650
        public override FREE_IMAGE_MDMODEL Model
 
6651
        {
 
6652
            get { return FREE_IMAGE_MDMODEL.FIMD_NODATA; }
 
6653
        }
 
6654
    }
 
6655
 
 
6656
    /// <summary>
 
6657
    /// Represents a collection of all tags contained in the metadata model
 
6658
    /// <see cref="FREE_IMAGE_MDMODEL.FIMD_XMP"/>.
 
6659
    /// </summary>
 
6660
    public class MDM_XMP : MetadataModel
 
6661
    {
 
6662
        /// <summary>
 
6663
        /// Initializes a new instance of this class.
 
6664
        /// </summary>
 
6665
        /// <param name="dib">Handle to a FreeImage bitmap.</param>
 
6666
        public MDM_XMP(FIBITMAP dib) : base(dib) { }
 
6667
 
 
6668
        /// <summary>
 
6669
        /// Retrieves the datamodel that this instance represents.
 
6670
        /// </summary>
 
6671
        public override FREE_IMAGE_MDMODEL Model
 
6672
        {
 
6673
            get { return FREE_IMAGE_MDMODEL.FIMD_XMP; }
 
6674
        }
 
6675
 
 
6676
        /// <summary>
 
6677
        /// Gets or sets the XMP XML content.
 
6678
        /// </summary>
 
6679
        /// <remarks>
 
6680
        /// <b>Handling of null values</b><para/>
 
6681
        /// A null value indicates, that the corresponding metadata tag is not
 
6682
        /// present in the metadata model.
 
6683
        /// Setting this property's value to a non-null reference creates the
 
6684
        /// metadata tag if necessary.
 
6685
        /// Setting this property's value to a null reference deletes the
 
6686
        /// metadata tag from the metadata model.
 
6687
        /// </remarks>
 
6688
        public string Xml
 
6689
        {
 
6690
            get
 
6691
            {
 
6692
                return GetTagText("XMLPacket");
 
6693
            }
 
6694
            set
 
6695
            {
 
6696
                SetTagValue("XMLPacket", value);
 
6697
            }
 
6698
        }
 
6699
 
 
6700
        /// <summary>
 
6701
        /// Gets an <see cref="XmlReader"/> initialized to read the XMP XML content.
 
6702
        /// Returns null, if the metadata tag <i>XMLPacket</i> is not present in
 
6703
        /// this model.
 
6704
        /// </summary>
 
6705
        public XmlReader XmlReader
 
6706
        {
 
6707
            get
 
6708
            {
 
6709
                string xmlString = Xml;
 
6710
                if (xmlString == null)
 
6711
                {
 
6712
                    return null;
 
6713
                }
 
6714
                else
 
6715
                {
 
6716
                    MemoryStream stream = new MemoryStream();
 
6717
                    StreamWriter writer = new StreamWriter(stream);
 
6718
                    writer.Write(xmlString);
 
6719
                    return XmlReader.Create(stream);
 
6720
                }
 
6721
            }
 
6722
        }
 
6723
    }
 
6724
}
 
 
b'\\ No newline at end of file'