// ==========================================================
// FreeImage 3 .NET wrapper
// Original FreeImage 3 functions and .NET compatible derived functions
//
// Design and implementation by
// - Jean-Philippe Goerke (jpgoerke@users.sourceforge.net)
// - Carsten Klein (cklein05@users.sourceforge.net)
//
// Contributors:
// - David Boland (davidboland@vodafone.ie)
//
// Main reference : MSDN Knowlede Base
//
// This file is part of FreeImage 3
//
// COVERED CODE IS PROVIDED UNDER THIS LICENSE ON AN "AS IS" BASIS, WITHOUT WARRANTY
// OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, WITHOUT LIMITATION, WARRANTIES
// THAT THE COVERED CODE IS FREE OF DEFECTS, MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE
// OR NON-INFRINGING. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE COVERED
// CODE IS WITH YOU. SHOULD ANY COVERED CODE PROVE DEFECTIVE IN ANY RESPECT, YOU (NOT
// THE INITIAL DEVELOPER OR ANY OTHER CONTRIBUTOR) ASSUME THE COST OF ANY NECESSARY
// SERVICING, REPAIR OR CORRECTION. THIS DISCLAIMER OF WARRANTY CONSTITUTES AN ESSENTIAL
// PART OF THIS LICENSE. NO USE OF ANY COVERED CODE IS AUTHORIZED HEREUNDER EXCEPT UNDER
// THIS DISCLAIMER.
//
// Use at your own risk!
// ==========================================================
// ==========================================================
// CVS
// $Revision: 1.6 $
// $Date: 2009/09/15 11:49:24 $
// $Id: MetadataModels.cs,v 1.6 2009/09/15 11:49:24 cklein05 Exp $
// ==========================================================
using System;
using System.Xml;
using System.IO;
using System.Text;
namespace FreeImageAPI.Metadata
{
///
/// Represents a collection of all tags contained in the metadata model
/// .
///
public class MDM_ANIMATION : MetadataModel
{
///
/// Initializes a new instance of this class.
///
/// Handle to a FreeImage bitmap.
public MDM_ANIMATION(FIBITMAP dib) : base(dib) { }
///
/// Retrieves the datamodel that this instance represents.
///
public override FREE_IMAGE_MDMODEL Model
{
get { return FREE_IMAGE_MDMODEL.FIMD_ANIMATION; }
}
///
/// Gets or sets the width of the entire canvas area, that each page is displayed in.
///
///
/// Handling of null values
/// A null value indicates, that the corresponding metadata tag is not
/// present in the metadata model.
/// Setting this property's value to a non-null reference creates the
/// metadata tag if necessary.
/// Setting this property's value to a null reference deletes the
/// metadata tag from the metadata model.
///
public ushort? LogicalWidth
{
get
{
return GetTagValue("LogicalWidth");
}
set
{
SetTagValue("LogicalWidth", value);
}
}
///
/// Gets or sets the height of the entire canvas area, that each page is displayed in.
///
///
/// Handling of null values
/// A null value indicates, that the corresponding metadata tag is not
/// present in the metadata model.
/// Setting this property's value to a non-null reference creates the
/// metadata tag if necessary.
/// Setting this property's value to a null reference deletes the
/// metadata tag from the metadata model.
///
public ushort? LogicalHeight
{
get
{
return GetTagValue("LogicalHeight");
}
set
{
SetTagValue("LogicalHeight", value);
}
}
///
/// Gets or sets the global palette of the GIF image.
///
///
/// Handling of null values
/// A null value indicates, that the corresponding metadata tag is not
/// present in the metadata model.
/// Setting this property's value to a non-null reference creates the
/// metadata tag if necessary.
/// Setting this property's value to a null reference deletes the
/// metadata tag from the metadata model.
///
public Palette GlobalPalette
{
get
{
MetadataTag mdtag = GetTag("GlobalPalette");
return (mdtag == null) ? null : new Palette(mdtag);
}
set
{
SetTagValue("GlobalPalette", (value != null) ? null : value.Data);
}
}
///
/// Gets or sets the number of replays for the animation.
/// Use 0 (zero) to specify an infinte number of replays.
///
///
/// Handling of null values
/// A null value indicates, that the corresponding metadata tag is not
/// present in the metadata model.
/// Setting this property's value to a non-null reference creates the
/// metadata tag if necessary.
/// Setting this property's value to a null reference deletes the
/// metadata tag from the metadata model.
///
public uint? LoopCount
{
get
{
return GetTagValue("Loop");
}
set
{
SetTagValue("Loop", value);
}
}
///
/// Gets or sets the horizontal offset within the logical canvas area, this frame is to be displayed at.
///
///
/// Handling of null values
/// A null value indicates, that the corresponding metadata tag is not
/// present in the metadata model.
/// Setting this property's value to a non-null reference creates the
/// metadata tag if necessary.
/// Setting this property's value to a null reference deletes the
/// metadata tag from the metadata model.
///
public ushort? FrameLeft
{
get
{
return GetTagValue("FrameLeft");
}
set
{
SetTagValue("FrameLeft", value);
}
}
///
/// Gets or sets the vertical offset within the logical canvas area, this frame is to be displayed at.
///
///
/// Handling of null values
/// A null value indicates, that the corresponding metadata tag is not
/// present in the metadata model.
/// Setting this property's value to a non-null reference creates the
/// metadata tag if necessary.
/// Setting this property's value to a null reference deletes the
/// metadata tag from the metadata model.
///
public ushort? FrameTop
{
get
{
return GetTagValue("FrameTop");
}
set
{
SetTagValue("FrameTop", value);
}
}
///
/// Gets or sets a flag to supress saving the dib's attached palette
/// (making it use the global palette). The local palette is the palette used by a page.
///
///
/// Handling of null values
/// A null value indicates, that the corresponding metadata tag is not
/// present in the metadata model.
/// Setting this property's value to a non-null reference creates the
/// metadata tag if necessary.
/// Setting this property's value to a null reference deletes the
/// metadata tag from the metadata model.
///
public bool? NoLocalPalette
{
get
{
byte? useGlobalPalette = GetTagValue("NoLocalPalette");
return useGlobalPalette.HasValue ? (useGlobalPalette.Value != 0) : default(bool?);
}
set
{
byte? val = null;
if (value.HasValue)
{
val = (byte)(value.Value ? 1 : 0);
}
SetTagValue("NoLocalPalette", val);
}
}
///
/// Gets or sets a value indicating whether the image is interlaced.
///
///
/// Handling of null values
/// A null value indicates, that the corresponding metadata tag is not
/// present in the metadata model.
/// Setting this property's value to a non-null reference creates the
/// metadata tag if necessary.
/// Setting this property's value to a null reference deletes the
/// metadata tag from the metadata model.
///
public bool? Interlaced
{
get
{
byte? useGlobalPalette = GetTagValue("Interlaced");
return useGlobalPalette.HasValue ? (useGlobalPalette.Value != 0) : default(bool?);
}
set
{
byte? val = null;
if (value.HasValue)
{
val = (byte)(value.Value ? 1 : 0);
}
SetTagValue("Interlaced", val);
}
}
///
/// Gets or sets the amout of time in milliseconds this frame is to be displayed.
///
///
/// Handling of null values
/// A null value indicates, that the corresponding metadata tag is not
/// present in the metadata model.
/// Setting this property's value to a non-null reference creates the
/// metadata tag if necessary.
/// Setting this property's value to a null reference deletes the
/// metadata tag from the metadata model.
///
public uint? FrameTime
{
get
{
return GetTagValue("FrameTime");
}
set
{
SetTagValue("FrameTime", value);
}
}
///
/// Gets or sets this frame's disposal method. Generally, this method defines, how to
/// remove or replace a frame when the next frame has to be drawn.
///
///
/// Handling of null values
/// A null value indicates, that the corresponding metadata tag is not
/// present in the metadata model.
/// Setting this property's value to a non-null reference creates the
/// metadata tag if necessary.
/// Setting this property's value to a null reference deletes the
/// metadata tag from the metadata model.
///
public DisposalMethodType? DisposalMethod
{
get
{
return GetTagValue("DisposalMethod");
}
set
{
SetTagValue("DisposalMethod", value);
}
}
}
///
/// Represents a collection of all tags contained in the metadata model
/// .
///
public class MDM_COMMENTS : MetadataModel
{
///
/// Initializes a new instance of this class.
///
/// Handle to a FreeImage bitmap.
public MDM_COMMENTS(FIBITMAP dib) : base(dib) { }
///
/// Retrieves the datamodel that this instance represents.
///
public override FREE_IMAGE_MDMODEL Model
{
get { return FREE_IMAGE_MDMODEL.FIMD_COMMENTS; }
}
///
/// Gets or sets the comment of the image.
/// Supported formats are JPEG, PNG and GIF.
///
///
/// Handling of null values
/// A null value indicates, that the corresponding metadata tag is not
/// present in the metadata model.
/// Setting this property's value to a non-null reference creates the
/// metadata tag if necessary.
/// Setting this property's value to a null reference deletes the
/// metadata tag from the metadata model.
///
public string Comment
{
get
{
return GetTagText("Comment");
}
set
{
SetTagValue("Comment", value);
}
}
}
///
/// Represents a collection of all tags contained in the metadata model
/// .
///
public class MDM_CUSTOM : MetadataModel
{
///
/// Initializes a new instance of this class.
///
/// Handle to a FreeImage bitmap.
public MDM_CUSTOM(FIBITMAP dib) : base(dib) { }
///
/// Retrieves the datamodel that this instance represents.
///
public override FREE_IMAGE_MDMODEL Model
{
get { return FREE_IMAGE_MDMODEL.FIMD_CUSTOM; }
}
}
///
/// Represents a collection of all tags contained in the metadata model
/// .
///
public class MDM_EXIF_EXIF : MetadataModel
{
///
/// Initializes a new instance of this class.
///
/// Handle to a FreeImage bitmap.
public MDM_EXIF_EXIF(FIBITMAP dib) : base(dib) { }
///
/// Retrieves the datamodel that this instance represents.
///
public override FREE_IMAGE_MDMODEL Model
{
get { return FREE_IMAGE_MDMODEL.FIMD_EXIF_EXIF; }
}
///
/// Gets or sets the version of this standard supported.
/// Constant length or 4.
///
///
/// Handling of null values
/// A null value indicates, that the corresponding metadata tag is not
/// present in the metadata model.
/// Setting this property's value to a non-null reference creates the
/// metadata tag if necessary.
/// Setting this property's value to a null reference deletes the
/// metadata tag from the metadata model.
///
public byte[] ExifVersion
{
get
{
return GetTagArray("ExifVersion");
}
set
{
FreeImage.Resize(ref value, 4);
SetTagValueUndefined("ExifVersion", value);
}
}
///
/// Gets or sets the Flashpix format version supported by a FPXR file.
/// Constant length or 4.
///
///
/// Handling of null values
/// A null value indicates, that the corresponding metadata tag is not
/// present in the metadata model.
/// Setting this property's value to a non-null reference creates the
/// metadata tag if necessary.
/// Setting this property's value to a null reference deletes the
/// metadata tag from the metadata model.
///
public byte[] FlashpixVersion
{
get
{
return GetTagArray("FlashpixVersion");
}
set
{
FreeImage.Resize(ref value, 4);
SetTagValueUndefined("FlashpixVersion", value);
}
}
///
/// Gets or sets the color space information tag.
/// See remarks for further information.
///
///
/// The following values are defined:
///
///
/// ID
/// Description
///
/// -
/// 1
/// sRGB (default)
///
/// -
/// 0xFFFF
/// uncalibrated
///
/// -
/// other
/// reserved
///
///
///
///
Handling of null values
/// A null value indicates, that the corresponding metadata tag is not
/// present in the metadata model.
/// Setting this property's value to a non-null reference creates the
/// metadata tag if necessary.
/// Setting this property's value to a null reference deletes the
/// metadata tag from the metadata model.
///
public ushort? ColorSpace
{
get
{
return GetTagValue("ColorSpace");
}
set
{
SetTagValue("ColorSpace", value);
}
}
///
/// Gets or sets the valid width of a compressed image.
///
///
/// Handling of null values
/// A null value indicates, that the corresponding metadata tag is not
/// present in the metadata model.
/// Setting this property's value to a non-null reference creates the
/// metadata tag if necessary.
/// Setting this property's value to a null reference deletes the
/// metadata tag from the metadata model.
///
public uint? PixelXDimension
{
get
{
return GetUInt32Value("PixelXDimension");
}
set
{
RemoveTag("PixelXDimension");
if (value.HasValue)
{
SetTagValue("PixelXDimension", value.Value);
}
}
}
///
/// Gets or sets the valid height of a compressed image.
///
///
/// Handling of null values
/// A null value indicates, that the corresponding metadata tag is not
/// present in the metadata model.
/// Setting this property's value to a non-null reference creates the
/// metadata tag if necessary.
/// Setting this property's value to a null reference deletes the
/// metadata tag from the metadata model.
///
public uint? PixelYDimension
{
get
{
return GetUInt32Value("PixelYDimension");
}
set
{
RemoveTag("PixelYDimension");
if (value.HasValue)
{
SetTagValue("PixelYDimension", value.Value);
}
}
}
///
/// Gets or sets components configuration. See remarks for further information.
/// Constant length of 4.
///
///
/// The channels of each component are arranged in order from the 1st component to the 4th.
/// For uncompressed data the data arrangement is given in the PhotometricInterpretation tag.
/// However, since PhotometricInterpretation can only express the order of Y,Cb and Cr,
/// this tag is provided for cases when compressed data uses components other than Y, Cb,
/// and Cr and to enable support of other sequences.
/// Default = 4 5 6 0 (if RGB uncompressed)
/// The following values are defined:
///
///
/// ID
/// Description
///
/// -
/// 0
/// does not exist
///
/// -
/// 1
/// Y
///
/// -
/// 2
/// Cb
///
/// -
/// 3
/// Cr
///
/// -
/// 4
/// R
///
/// -
/// 5
/// R
///
/// -
/// 6
/// R
///
/// -
/// other
/// reserved
///
///
///
///
Handling of null values
/// A null value indicates, that the corresponding metadata tag is not
/// present in the metadata model.
/// Setting this property's value to a non-null reference creates the
/// metadata tag if necessary.
/// Setting this property's value to a null reference deletes the
/// metadata tag from the metadata model.
///
public byte[] ComponentsConfiguration
{
get
{
return GetTagArray("ComponentsConfiguration");
}
set
{
FreeImage.Resize(ref value, 4);
SetTagValueUndefined("ComponentsConfiguration", value);
}
}
///
/// Gets or sets compression mode used for a compressed image is indicated
/// in unit bits per pixel.
///
///
/// Handling of null values
/// A null value indicates, that the corresponding metadata tag is not
/// present in the metadata model.
/// Setting this property's value to a non-null reference creates the
/// metadata tag if necessary.
/// Setting this property's value to a null reference deletes the
/// metadata tag from the metadata model.
///
public FIURational? CompressedBitsPerPixel
{
get
{
return GetTagValue("CompressedBitsPerPixel");
}
set
{
SetTagValue("CompressedBitsPerPixel", value);
}
}
///
/// Gets or sets a tag for manufacturers of Exif writers to record any desired information.
/// The contents are up to the manufacturer, but this tag should not be used for any other
/// than its intended purpose.
///
///
/// Handling of null values
/// A null value indicates, that the corresponding metadata tag is not
/// present in the metadata model.
/// Setting this property's value to a non-null reference creates the
/// metadata tag if necessary.
/// Setting this property's value to a null reference deletes the
/// metadata tag from the metadata model.
///
public byte[] MakerNote
{
get
{
return GetTagArray("FlashpixVersion");
}
set
{
SetTagValueUndefined("FlashpixVersion", value);
}
}
///
/// Gets or sets a tag for Exif users to write keywords or comments on the image besides
/// those in ImageDescription, and without the character code limitations of the ImageDescription tag.
/// Minimum length of 8. See remarks for further information.
///
///
/// The character code used in the UserComment tag is identified based on an ID code in a fixed 8-byte
/// area at the start of the tag data area. The unused portion of the area is padded with NULL.
/// The ID code for the UserComment area may be a Defined code such as JIS or ASCII, or may be Undefined.
///
///
Handling of null values
/// A null value indicates, that the corresponding metadata tag is not
/// present in the metadata model.
/// Setting this property's value to a non-null reference creates the
/// metadata tag if necessary.
/// Setting this property's value to a null reference deletes the
/// metadata tag from the metadata model.
///
public byte[] UserComment
{
get
{
return GetTagArray("UserComment");
}
set
{
FreeImage.Resize(ref value, 8, int.MaxValue);
SetTagValueUndefined("UserComment", value);
}
}
///
/// Gets or sets the name of an audio file related to the image data.
/// The format is 8.3.
/// Constant length of 12
///
///
/// Handling of null values
/// A null value indicates, that the corresponding metadata tag is not
/// present in the metadata model.
/// Setting this property's value to a non-null reference creates the
/// metadata tag if necessary.
/// Setting this property's value to a null reference deletes the
/// metadata tag from the metadata model.
///
public string RelatedSoundFile
{
get
{
string text = GetTagText("RelatedSoundFile");
if (!string.IsNullOrEmpty(text))
{
text = text.Substring(0, text.Length - 1);
}
return text;
}
set
{
if (value != null)
{
FreeImage.Resize(ref value, 12);
value += '\0';
}
SetTagValue("RelatedSoundFile", value);
}
}
///
/// Gets or sets the date and time when the original image data was generated.
///
///
/// Handling of null values
/// A null value indicates, that the corresponding metadata tag is not
/// present in the metadata model.
/// Setting this property's value to a non-null reference creates the
/// metadata tag if necessary.
/// Setting this property's value to a null reference deletes the
/// metadata tag from the metadata model.
///
public DateTime? DateTimeOriginal
{
get
{
DateTime? result = null;
string text = GetTagText("DateTimeOriginal");
if (text != null)
{
try
{
result = System.DateTime.ParseExact(text, "yyyy:MM:dd HH:mm:ss\0", null);
}
catch
{
}
}
return result;
}
set
{
string val = null;
if (value.HasValue)
{
try
{
val = value.Value.ToString("yyyy:MM:dd HH:mm:ss\0");
}
catch
{
}
}
SetTagValue("DateTimeOriginal", val);
}
}
///
/// Gets or sets the date and time when the image was stored as digital data.
///
///
/// Handling of null values
/// A null value indicates, that the corresponding metadata tag is not
/// present in the metadata model.
/// Setting this property's value to a non-null reference creates the
/// metadata tag if necessary.
/// Setting this property's value to a null reference deletes the
/// metadata tag from the metadata model.
///
public DateTime? DateTimeDigitized
{
get
{
DateTime? result = null;
string text = GetTagText("DateTimeDigitized");
if (text != null)
{
try
{
result = System.DateTime.ParseExact(text, "yyyy:MM:dd HH:mm:ss\0", null);
}
catch
{
}
}
return result;
}
set
{
string val = null;
if (value.HasValue)
{
try
{
val = value.Value.ToString("yyyy:MM:dd HH:mm:ss\0");
}
catch
{
}
}
SetTagValue("DateTimeDigitized", val);
}
}
///
/// Gets or sets a tag used to record fractions of seconds for the DateTime tag.
///
///
/// Handling of null values
/// A null value indicates, that the corresponding metadata tag is not
/// present in the metadata model.
/// Setting this property's value to a non-null reference creates the
/// metadata tag if necessary.
/// Setting this property's value to a null reference deletes the
/// metadata tag from the metadata model.
///
public string SubsecTime
{
get
{
string text = GetTagText("SubsecTime");
if (!string.IsNullOrEmpty(text))
{
text = text.Substring(0, text.Length - 1);
}
return text;
}
set
{
if (value != null)
{
value += '\0';
}
SetTagValue("SubsecTime", value);
}
}
///
/// Gets or sets a tag used to record fractions of seconds for the DateTimeOriginal tag.
///
///
/// Handling of null values
/// A null value indicates, that the corresponding metadata tag is not
/// present in the metadata model.
/// Setting this property's value to a non-null reference creates the
/// metadata tag if necessary.
/// Setting this property's value to a null reference deletes the
/// metadata tag from the metadata model.
///
public string SubsecTimeOriginal
{
get
{
string text = GetTagText("SubsecTimeOriginal");
if (!string.IsNullOrEmpty(text))
{
text = text.Substring(0, text.Length - 1);
}
return text;
}
set
{
if (value != null)
{
value += '\0';
}
SetTagValue("SubsecTimeOriginal", value);
}
}
///
/// Gets or sets a tag used to record fractions of seconds for the DateTimeDigitized tag.
///
///
/// Handling of null values
/// A null value indicates, that the corresponding metadata tag is not
/// present in the metadata model.
/// Setting this property's value to a non-null reference creates the
/// metadata tag if necessary.
/// Setting this property's value to a null reference deletes the
/// metadata tag from the metadata model.
///
public string SubsecTimeDigitized
{
get
{
string text = GetTagText("SubsecTimeDigitized");
if (!string.IsNullOrEmpty(text))
{
text = text.Substring(0, text.Length - 1);
}
return text;
}
set
{
if (value != null)
{
value += '\0';
}
SetTagValue("SubsecTimeDigitized", value);
}
}
///
/// Gets or the exposure time, given in seconds (sec).
///
///
/// Handling of null values
/// A null value indicates, that the corresponding metadata tag is not
/// present in the metadata model.
/// Setting this property's value to a non-null reference creates the
/// metadata tag if necessary.
/// Setting this property's value to a null reference deletes the
/// metadata tag from the metadata model.
///
public FIURational? ExposureTime
{
get
{
return GetTagValue("ExposureTime");
}
set
{
SetTagValue("ExposureTime", value);
}
}
///
/// Gets or the F number.
///
///
/// Handling of null values
/// A null value indicates, that the corresponding metadata tag is not
/// present in the metadata model.
/// Setting this property's value to a non-null reference creates the
/// metadata tag if necessary.
/// Setting this property's value to a null reference deletes the
/// metadata tag from the metadata model.
///
public FIURational? FNumber
{
get
{
return GetTagValue("FNumber");
}
set
{
SetTagValue("FNumber", value);
}
}
///
/// Gets or sets the class of the program used by the camera to set exposure when the
/// picture is taken.
/// See remarks for further information.
///
///
/// The following values are defined:
///
///
/// ID
/// Description
///
/// -
/// 0
/// not defined
///
/// -
/// 1
/// manual
///
/// -
/// 2
/// normal program
///
/// -
/// 3
/// aperture priority
///
/// -
/// 4
/// shutter priority
///
/// -
/// 5
/// create program
///
/// -
/// 6
/// action program
///
/// -
/// 7
/// portrait mode
///
/// -
/// 8
/// landscape mode
///
/// -
/// others
/// reserved
///
///
///
///
Handling of null values
/// A null value indicates, that the corresponding metadata tag is not
/// present in the metadata model.
/// Setting this property's value to a non-null reference creates the
/// metadata tag if necessary.
/// Setting this property's value to a null reference deletes the
/// metadata tag from the metadata model.
///
public ushort? ExposureProgram
{
get
{
return GetTagValue("ExposureProgram");
}
set
{
SetTagValue("ExposureProgram", value);
}
}
///
/// Gets or sets the spectral sensitivity of each channel of the camera used.
///
///
/// Handling of null values
/// A null value indicates, that the corresponding metadata tag is not
/// present in the metadata model.
/// Setting this property's value to a non-null reference creates the
/// metadata tag if necessary.
/// Setting this property's value to a null reference deletes the
/// metadata tag from the metadata model.
///
public string SpectralSensitivity
{
get
{
string text = GetTagText("SpectralSensitivity");
if (!string.IsNullOrEmpty(text))
{
text = text.Substring(0, text.Length - 1);
}
return text;
}
set
{
if (value != null)
{
value += '\0';
}
SetTagValue("SpectralSensitivity", value);
}
}
///
/// Gets or sets the the ISO Speed and ISO Latitude of the camera or input device as
/// specified in ISO 12232.
///
///
/// Handling of null values
/// A null value indicates, that the corresponding metadata tag is not
/// present in the metadata model.
/// Setting this property's value to a non-null reference creates the
/// metadata tag if necessary.
/// Setting this property's value to a null reference deletes the
/// metadata tag from the metadata model.
///
public ushort[] ISOSpeedRatings
{
get
{
return GetTagArray("ISOSpeedRatings");
}
set
{
SetTagValue("ISOSpeedRatings", value);
}
}
///
/// Gets or sets the Opto-Electric Conversion Function (OECF) specified in ISO 14524.
/// OECF is the relationship between the camera optical input and the image values.
///
///
/// Handling of null values
/// A null value indicates, that the corresponding metadata tag is not
/// present in the metadata model.
/// Setting this property's value to a non-null reference creates the
/// metadata tag if necessary.
/// Setting this property's value to a null reference deletes the
/// metadata tag from the metadata model.
///
public byte[] OECF
{
get
{
return GetTagArray("OECF");
}
set
{
SetTagValueUndefined("OECF", value);
}
}
///
/// Gets or sets the shutter speed. The unit is the APEX (Additive System of Photographic Exposure).
///
///
/// Handling of null values
/// A null value indicates, that the corresponding metadata tag is not
/// present in the metadata model.
/// Setting this property's value to a non-null reference creates the
/// metadata tag if necessary.
/// Setting this property's value to a null reference deletes the
/// metadata tag from the metadata model.
///
public FIRational? ShutterSpeedValue
{
get
{
return GetTagValue("ShutterSpeedValue");
}
set
{
SetTagValue("ShutterSpeedValue", value);
}
}
///
/// Gets or sets the lens aperture. The unit is the APEX value.
///
///
/// Handling of null values
/// A null value indicates, that the corresponding metadata tag is not
/// present in the metadata model.
/// Setting this property's value to a non-null reference creates the
/// metadata tag if necessary.
/// Setting this property's value to a null reference deletes the
/// metadata tag from the metadata model.
///
public FIURational? ApertureValue
{
get
{
return GetTagValue("ApertureValue");
}
set
{
SetTagValue("ApertureValue", value);
}
}
///
/// Gets or sets the value of brightness. The unit is the APEX value.
/// Ordinarily it is given in the range of -99.99 to 99.99.
///
///
/// Handling of null values
/// A null value indicates, that the corresponding metadata tag is not
/// present in the metadata model.
/// Setting this property's value to a non-null reference creates the
/// metadata tag if necessary.
/// Setting this property's value to a null reference deletes the
/// metadata tag from the metadata model.
///
public FIRational? BrightnessValue
{
get
{
return GetTagValue("BrightnessValue");
}
set
{
SetTagValue("BrightnessValue", value);
}
}
///
/// Gets or sets the exposure bias. The unit is the APEX value.
/// Ordinarily it is given in the range of –99.99 to 99.99.
///
///
/// Handling of null values
/// A null value indicates, that the corresponding metadata tag is not
/// present in the metadata model.
/// Setting this property's value to a non-null reference creates the
/// metadata tag if necessary.
/// Setting this property's value to a null reference deletes the
/// metadata tag from the metadata model.
///
public FIRational? ExposureBiasValue
{
get
{
return GetTagValue("ExposureBiasValue");
}
set
{
SetTagValue("ExposureBiasValue", value);
}
}
///
/// Gets or sets the smallest F number of the lens. The unit is the APEX value.
/// Ordinarily it is given in the range of 00.00 to 99.99,
/// but it is not limited to this range.
///
///
/// Handling of null values
/// A null value indicates, that the corresponding metadata tag is not
/// present in the metadata model.
/// Setting this property's value to a non-null reference creates the
/// metadata tag if necessary.
/// Setting this property's value to a null reference deletes the
/// metadata tag from the metadata model.
///
public FIURational? MaxApertureValue
{
get
{
return GetTagValue("MaxApertureValue");
}
set
{
SetTagValue("MaxApertureValue", value);
}
}
///
/// Gets or sets distance to the subject, given in meters.
/// Note that if the numerator of the recorded value is FFFFFFFF, infinity shall be indicated;
/// and if the numerator is 0, distance unknown shall be indicated.
///
///
/// Handling of null values
/// A null value indicates, that the corresponding metadata tag is not
/// present in the metadata model.
/// Setting this property's value to a non-null reference creates the
/// metadata tag if necessary.
/// Setting this property's value to a null reference deletes the
/// metadata tag from the metadata model.
///
public FIURational? SubjectDistance
{
get
{
return GetTagValue("SubjectDistance");
}
set
{
SetTagValue("SubjectDistance", value);
}
}
///
/// Gets or sets the metering mode. See remarks for further information.
///
///
/// The following values are defined:
///
///
/// ID
/// Description
///
/// -
/// 0
/// unknown
///
/// -
/// 1
/// average
///
/// -
/// 2
/// center-weighted-average
///
/// -
/// 3
/// spot
///
/// -
/// 4
/// multi-spot
///
/// -
/// 5
/// pattern
///
/// -
/// 6
/// partial
///
/// -
/// other
/// reserved
///
/// -
/// 255
/// other
///
///
///
///
Handling of null values
/// A null value indicates, that the corresponding metadata tag is not
/// present in the metadata model.
/// Setting this property's value to a non-null reference creates the
/// metadata tag if necessary.
/// Setting this property's value to a null reference deletes the
/// metadata tag from the metadata model.
///
public ushort? MeteringMode
{
get
{
return GetTagValue("MeteringMode");
}
set
{
SetTagValue("MeteringMode", value);
}
}
///
/// Gets or sets the kind of light source.
/// See remarks for further information.
///
///
/// The following values are defined:
///
///
/// ID
/// Description
///
/// -
/// 0
/// unknown
///
/// -
/// 1
/// daylight
///
/// -
/// 2
/// fluorescent
///
/// -
/// 3
/// tungsten
///
/// -
/// 4
/// flash
///
/// -
/// 9
/// fine weather
///
/// -
/// 10
/// cloudy weather
///
/// -
/// 11
/// shade
///
/// -
/// 12
/// daylight fluorecent (D 5700 - 7100K)
///
/// -
/// 13
/// day white fluorescent (N 4600 - 5400K)
///
/// -
/// 14
/// cool white fluorescent (W 3900 - 4500K)
///
/// -
/// 15
/// white fluorescent (WW 3200 - 3700K)
///
/// -
/// 17
/// standard light A
///
/// -
/// 18
/// standard light B
///
/// -
/// 19
/// standard light C
///
/// -
/// 20
/// D55
///
/// -
/// 21
/// D65
///
/// -
/// 22
/// D75
///
/// -
/// 23
/// D50
///
/// -
/// 24
/// ISO studio tungsten
///
/// -
/// 255
/// other light source
///
/// -
/// other
/// reserved
///
///
///
///
Handling of null values
/// A null value indicates, that the corresponding metadata tag is not
/// present in the metadata model.
/// Setting this property's value to a non-null reference creates the
/// metadata tag if necessary.
/// Setting this property's value to a null reference deletes the
/// metadata tag from the metadata model.
///
public ushort? LightSource
{
get
{
return GetTagValue("LightSource");
}
set
{
SetTagValue("LightSource", value);
}
}
///
/// Gets or sets a value indicating the status of flash when the image was shot.
/// Bit 0 indicates the flash firing status, bits 1 and 2 indicate the flash return
/// status, bits 3 and 4 indicate the flash mode, bit 5 indicates whether the flash
/// function is present, and bit 6 indicates "red eye" mode.
///
///
/// Handling of null values
/// A null value indicates, that the corresponding metadata tag is not
/// present in the metadata model.
/// Setting this property's value to a non-null reference creates the
/// metadata tag if necessary.
/// Setting this property's value to a null reference deletes the
/// metadata tag from the metadata model.
///
public ushort? Flash
{
get
{
return GetTagValue("Flash");
}
set
{
SetTagValue("Flash", value);
}
}
///
/// Gets or sets a value indicating the location and area of the main subject in
/// the overall scene. Variable length between 2 and 4.
///
///
/// Handling of null values
/// A null value indicates, that the corresponding metadata tag is not
/// present in the metadata model.
/// Setting this property's value to a non-null reference creates the
/// metadata tag if necessary.
/// Setting this property's value to a null reference deletes the
/// metadata tag from the metadata model.
///
public ushort[] SubjectArea
{
get
{
return GetTagArray("SubjectArea");
}
set
{
FreeImage.Resize(ref value, 2, 4);
SetTagValue("SubjectArea", value);
}
}
///
/// Gets or sets the actual focal length of the lens, in mm.
/// Conversion is not made to the focal length of a 35 mm film camera.
///
///
/// Handling of null values
/// A null value indicates, that the corresponding metadata tag is not
/// present in the metadata model.
/// Setting this property's value to a non-null reference creates the
/// metadata tag if necessary.
/// Setting this property's value to a null reference deletes the
/// metadata tag from the metadata model.
///
public FIURational? FocalLength
{
get
{
return GetTagValue("FocalLength");
}
set
{
SetTagValue("FocalLength", value);
}
}
///
/// Gets or sets the strobe energy at the time the image is captured,
/// as measured in Beam Candle Power Seconds (BCPS).
///
///
/// Handling of null values
/// A null value indicates, that the corresponding metadata tag is not
/// present in the metadata model.
/// Setting this property's value to a non-null reference creates the
/// metadata tag if necessary.
/// Setting this property's value to a null reference deletes the
/// metadata tag from the metadata model.
///
public FIURational? FlashEnergy
{
get
{
return GetTagValue("FlashEnergy");
}
set
{
SetTagValue("FlashEnergy", value);
}
}
///
/// Gets or sets the camera or input device spatial frequency table and SFR values
/// in the direction of image width, image height, and diagonal direction,
/// as specified in ISO 12233.
///
///
/// Handling of null values
/// A null value indicates, that the corresponding metadata tag is not
/// present in the metadata model.
/// Setting this property's value to a non-null reference creates the
/// metadata tag if necessary.
/// Setting this property's value to a null reference deletes the
/// metadata tag from the metadata model.
///
public byte[] SpatialFrequencyResponse
{
get
{
return GetTagArray("SpatialFrequencyResponse");
}
set
{
SetTagValueUndefined("SpatialFrequencyResponse", value);
}
}
///
/// Gets or sets the number of pixels in the image width (X) direction per
/// FocalPlaneResolutionUnit on the camera focal plane.
///
///
/// Handling of null values
/// A null value indicates, that the corresponding metadata tag is not
/// present in the metadata model.
/// Setting this property's value to a non-null reference creates the
/// metadata tag if necessary.
/// Setting this property's value to a null reference deletes the
/// metadata tag from the metadata model.
///
public FIURational? FocalPlaneXResolution
{
get
{
return GetTagValue("FocalPlaneXResolution");
}
set
{
SetTagValue("FocalPlaneXResolution", value);
}
}
///
/// Gets or sets the number of pixels in the image height (Y) direction per
/// FocalPlaneResolutionUnit on the camera focal plane.
///
///
/// Handling of null values
/// A null value indicates, that the corresponding metadata tag is not
/// present in the metadata model.
/// Setting this property's value to a non-null reference creates the
/// metadata tag if necessary.
/// Setting this property's value to a null reference deletes the
/// metadata tag from the metadata model.
///
public FIURational? FocalPlaneYResolution
{
get
{
return GetTagValue("FocalPlaneYResolution");
}
set
{
SetTagValue("FocalPlaneYResolution", value);
}
}
///
/// Gets or sets the unit for measuring FocalPlaneXResolution and FocalPlaneYResolution.
/// This value is the same as the ResolutionUnit.
///
///
/// Handling of null values
/// A null value indicates, that the corresponding metadata tag is not
/// present in the metadata model.
/// Setting this property's value to a non-null reference creates the
/// metadata tag if necessary.
/// Setting this property's value to a null reference deletes the
/// metadata tag from the metadata model.
///
public ushort? FocalPlaneResolutionUnit
{
get
{
return GetTagValue("FocalPlaneResolutionUnit");
}
set
{
SetTagValue("FocalPlaneResolutionUnit", value);
}
}
///
/// Gets or sets the location of the main subject in the scene.
/// The value of this tag represents the pixel at the center of the main subject
/// relative to the left edge, prior to rotation processing as per the Rotation tag.
/// The first value indicates the X column number and second indicates the Y row number.
///
///
/// Handling of null values
/// A null value indicates, that the corresponding metadata tag is not
/// present in the metadata model.
/// Setting this property's value to a non-null reference creates the
/// metadata tag if necessary.
/// Setting this property's value to a null reference deletes the
/// metadata tag from the metadata model.
///
public ushort? SubjectLocation
{
get
{
return GetTagValue("SubjectLocation");
}
set
{
SetTagValue("SubjectLocation", value);
}
}
///
/// Gets or sets the exposure index selected on the camera or input device at the
/// time the image was captured.
///
///
/// Handling of null values
/// A null value indicates, that the corresponding metadata tag is not
/// present in the metadata model.
/// Setting this property's value to a non-null reference creates the
/// metadata tag if necessary.
/// Setting this property's value to a null reference deletes the
/// metadata tag from the metadata model.
///
public FIURational? ExposureIndex
{
get
{
return GetTagValue("ExposureIndex");
}
set
{
SetTagValue("ExposureIndex", value);
}
}
///
/// Gets or sets the image sensor type on the camera or input device.
/// See remarks for further information.
///
///
/// The following values are defined:
///
///
/// ID
/// Description
///
/// -
/// 1
/// not defined
///
/// -
/// 2
/// one-chip color area sensor
///
/// -
/// 3
/// two-chip color area sensor
///
/// -
/// 4
/// three-chip color area sensor
///
/// -
/// 5
/// color sequential area sensor
///
/// -
/// 7
/// trilinear sensor
///
/// -
/// 8
/// color sequential linear sensor
///
/// -
/// other
/// reserved
///
///
///
///
Handling of null values
/// A null value indicates, that the corresponding metadata tag is not
/// present in the metadata model.
/// Setting this property's value to a non-null reference creates the
/// metadata tag if necessary.
/// Setting this property's value to a null reference deletes the
/// metadata tag from the metadata model.
///
public ushort? SensingMethod
{
get
{
return GetTagValue("SensingMethod");
}
set
{
SetTagValue("SensingMethod", value);
}
}
///
/// Gets or sets the image source. If a DSC recorded the image, this tag value of this
/// tag always be set to 3, indicating that the image was recorded on a DSC.
///
///
/// Handling of null values
/// A null value indicates, that the corresponding metadata tag is not
/// present in the metadata model.
/// Setting this property's value to a non-null reference creates the
/// metadata tag if necessary.
/// Setting this property's value to a null reference deletes the
/// metadata tag from the metadata model.
///
public byte? FileSource
{
get
{
return GetTagValue("FileSource");
}
set
{
SetTagValueUndefined("FileSource", value.HasValue ? new byte[] { value.Value } : null);
}
}
///
/// Gets or sets the type of scene. If a DSC recorded the image, this tag value shall
/// always be set to 1, indicating that the image was directly photographed.
///
///
/// Handling of null values
/// A null value indicates, that the corresponding metadata tag is not
/// present in the metadata model.
/// Setting this property's value to a non-null reference creates the
/// metadata tag if necessary.
/// Setting this property's value to a null reference deletes the
/// metadata tag from the metadata model.
///
public byte? SceneType
{
get
{
return GetTagValue("SceneType");
}
set
{
SetTagValueUndefined("SceneType", value.HasValue ? new byte[] { value.Value } : null);
}
}
///
/// Gets or sets the color filter array (CFA) geometric pattern of the image sensor
/// when a one-chip color area sensor is used. It does not apply to all sensing methods.
///
///
/// Handling of null values
/// A null value indicates, that the corresponding metadata tag is not
/// present in the metadata model.
/// Setting this property's value to a non-null reference creates the
/// metadata tag if necessary.
/// Setting this property's value to a null reference deletes the
/// metadata tag from the metadata model.
///
public byte[] CFAPattern
{
get
{
return GetTagArray("CFAPattern");
}
set
{
SetTagValueUndefined("CFAPattern", value);
}
}
///
/// Gets or sets the use of special processing on image data, such as rendering geared to output.
/// When special processing is performed, the reader is expected to disable or minimize any
/// further processing. See remarks for further information.
///
///
/// The following values are definied:
///
///
/// ID
/// Description
///
/// -
/// 0
/// normal process
///
/// -
/// 1
/// custom process
///
/// -
/// other
/// reserved
///
///
///
///
Handling of null values
/// A null value indicates, that the corresponding metadata tag is not
/// present in the metadata model.
/// Setting this property's value to a non-null reference creates the
/// metadata tag if necessary.
/// Setting this property's value to a null reference deletes the
/// metadata tag from the metadata model.
///
public ushort? CustomRendered
{
get
{
return GetTagValue("CustomRendered");
}
set
{
SetTagValue("CustomRendered", value);
}
}
///
/// Gets or sets the exposure mode set when the image was shot.
/// In auto-bracketing mode, the camera shoots a series of frames of the same scene
/// at different exposure settings. See remarks for further information.
///
///
/// The following values are definied:
///
///
/// ID
/// Description
///
/// -
/// 0
/// auto exposure
///
/// -
/// 1
/// manual exposure
///
/// -
/// 2
/// auto bracket
///
/// -
/// other
/// reserved
///
///
///
///
Handling of null values
/// A null value indicates, that the corresponding metadata tag is not
/// present in the metadata model.
/// Setting this property's value to a non-null reference creates the
/// metadata tag if necessary.
/// Setting this property's value to a null reference deletes the
/// metadata tag from the metadata model.
///
public ushort? ExposureMode
{
get
{
return GetTagValue("ExposureMode");
}
set
{
SetTagValue("ExposureMode", value);
}
}
///
/// Gets or sets the white balance mode set when the image was shot.
/// See remarks for further information.
///
///
/// The following values are definied:
///
///
/// ID
/// Description
///
/// -
/// 0
/// auto white balance
///
/// -
/// 1
/// manual white balance
///
/// -
/// other
/// reserved
///
///
///
///
Handling of null values
/// A null value indicates, that the corresponding metadata tag is not
/// present in the metadata model.
/// Setting this property's value to a non-null reference creates the
/// metadata tag if necessary.
/// Setting this property's value to a null reference deletes the
/// metadata tag from the metadata model.
///
public ushort? WhiteBalance
{
get
{
return GetTagValue("WhiteBalance");
}
set
{
SetTagValue("WhiteBalance", value);
}
}
///
/// Gets or sets the digital zoom ratio when the image was shot.
/// If the numerator of the recorded value is 0, this indicates that digital zoom was not used.
///
///
/// Handling of null values
/// A null value indicates, that the corresponding metadata tag is not
/// present in the metadata model.
/// Setting this property's value to a non-null reference creates the
/// metadata tag if necessary.
/// Setting this property's value to a null reference deletes the
/// metadata tag from the metadata model.
///
public FIURational? DigitalZoomRatio
{
get
{
return GetTagValue("DigitalZoomRatio");
}
set
{
SetTagValue("DigitalZoomRatio", value);
}
}
///
/// Gets or sets the equivalent focal length assuming a 35mm film camera, in mm.
/// A value of 0 means the focal length is unknown. Note that this tag differs
/// from the FocalLength tag.
///
///
/// Handling of null values
/// A null value indicates, that the corresponding metadata tag is not
/// present in the metadata model.
/// Setting this property's value to a non-null reference creates the
/// metadata tag if necessary.
/// Setting this property's value to a null reference deletes the
/// metadata tag from the metadata model.
///
public ushort? FocalLengthIn35mmFilm
{
get
{
return GetTagValue("DigitalZoomRatio");
}
set
{
SetTagValue("DigitalZoomRatio", value);
}
}
///
/// Gets or sets the type of scene that was shot.
/// It can also be used to record the mode in which the image was shot.
/// See remarks for further information.
///
///
/// The following values are definied:
///
///
/// ID
/// Description
///
/// -
/// 0
/// standard
///
/// -
/// 1
/// landscape
///
/// -
/// 2
/// portrait
///
/// -
/// 3
/// night scene
///
/// -
/// other
/// reserved
///
///
///
///
Handling of null values
/// A null value indicates, that the corresponding metadata tag is not
/// present in the metadata model.
/// Setting this property's value to a non-null reference creates the
/// metadata tag if necessary.
/// Setting this property's value to a null reference deletes the
/// metadata tag from the metadata model.
///
public ushort? SceneCaptureType
{
get
{
return GetTagValue("SceneCaptureType");
}
set
{
SetTagValue("SceneCaptureType", value);
}
}
///
/// Gets or sets the degree of overall image gain adjustment.
/// See remarks for further information.
///
///
/// The following values are definied:
///
///
/// ID
/// Description
///
/// -
/// 0
/// none
///
/// -
/// 1
/// low gain up
///
/// -
/// 2
/// high gain up
///
/// -
/// 3
/// low gain down
///
/// -
/// 4
/// high gain down
///
/// -
/// other
/// reserved
///
///
///
///
Handling of null values
/// A null value indicates, that the corresponding metadata tag is not
/// present in the metadata model.
/// Setting this property's value to a non-null reference creates the
/// metadata tag if necessary.
/// Setting this property's value to a null reference deletes the
/// metadata tag from the metadata model.
///
public ushort? GainControl
{
get
{
return GetTagValue("GainControl");
}
set
{
SetTagValue("GainControl", value);
}
}
///
/// Gets or sets the direction of contrast processing applied by the camera
/// when the image was shot.
/// See remarks for further information.
///
///
/// The following values are definied:
///
///
/// ID
/// Description
///
/// -
/// 0
/// normal
///
/// -
/// 1
/// soft
///
/// -
/// 2
/// hard
///
/// -
/// other
/// reserved
///
///
///
///
Handling of null values
/// A null value indicates, that the corresponding metadata tag is not
/// present in the metadata model.
/// Setting this property's value to a non-null reference creates the
/// metadata tag if necessary.
/// Setting this property's value to a null reference deletes the
/// metadata tag from the metadata model.
///
public ushort? Contrast
{
get
{
return GetTagValue("Contrast");
}
set
{
SetTagValue("Contrast", value);
}
}
///
/// Gets or sets the direction of saturation processing applied by the camera
/// when the image was shot.
/// See remarks for further information.
///
///
/// The following values are definied:
///
///
/// ID
/// Description
///
/// -
/// 0
/// normal
///
/// -
/// 1
/// low saturation
///
/// -
/// 2
/// high saturation
///
/// -
/// other
/// reserved
///
///
///
///
Handling of null values
/// A null value indicates, that the corresponding metadata tag is not
/// present in the metadata model.
/// Setting this property's value to a non-null reference creates the
/// metadata tag if necessary.
/// Setting this property's value to a null reference deletes the
/// metadata tag from the metadata model.
///
public ushort? Saturation
{
get
{
return GetTagValue("Saturation");
}
set
{
SetTagValue("Saturation", value);
}
}
///
/// Gets or sets the direction of sharpness processing applied by the camera
/// when the image was shot.
/// See remarks for further information.
///
///
/// The following values are definied:
///
///
/// ID
/// Description
///
/// -
/// 0
/// normal
///
/// -
/// 1
/// soft
///
/// -
/// 2
/// hard
///
/// -
/// other
/// reserved
///
///
///
///
Handling of null values
/// A null value indicates, that the corresponding metadata tag is not
/// present in the metadata model.
/// Setting this property's value to a non-null reference creates the
/// metadata tag if necessary.
/// Setting this property's value to a null reference deletes the
/// metadata tag from the metadata model.
///
public ushort? Sharpness
{
get
{
return GetTagValue("Sharpness");
}
set
{
SetTagValue("Sharpness", value);
}
}
///
/// Gets or sets information on the picture-taking conditions of a particular camera model.
/// The tag is used only to indicate the picture-taking conditions in the reader.
///
///
/// Handling of null values
/// A null value indicates, that the corresponding metadata tag is not
/// present in the metadata model.
/// Setting this property's value to a non-null reference creates the
/// metadata tag if necessary.
/// Setting this property's value to a null reference deletes the
/// metadata tag from the metadata model.
///
public byte[] DeviceSettingDescription
{
get
{
return GetTagArray("DeviceSettingDescription");
}
set
{
SetTagValueUndefined("DeviceSettingDescription", value);
}
}
///
/// Gets or sets the distance to the subject.
/// See remarks for further information.
///
///
/// The following values are definied:
///
///
/// ID
/// Description
///
/// -
/// 0
/// unknown
///
/// -
/// 1
/// macro
///
/// -
/// 2
/// close view
///
/// -
/// 3
/// distant view
///
/// -
/// other
/// reserved
///
///
///
///
Handling of null values
/// A null value indicates, that the corresponding metadata tag is not
/// present in the metadata model.
/// Setting this property's value to a non-null reference creates the
/// metadata tag if necessary.
/// Setting this property's value to a null reference deletes the
/// metadata tag from the metadata model.
///
public ushort? SubjectDistanceRange
{
get
{
return GetTagValue("SubjectDistanceRange");
}
set
{
SetTagValue("SubjectDistanceRange", value);
}
}
///
/// Gets or sets an identifier assigned uniquely to each image.
/// It is recorded as an ASCII string equivalent to hexadecimal notation and 128-bit fixed length.
/// Constant length of 32.
///
///
/// Handling of null values
/// A null value indicates, that the corresponding metadata tag is not
/// present in the metadata model.
/// Setting this property's value to a non-null reference creates the
/// metadata tag if necessary.
/// Setting this property's value to a null reference deletes the
/// metadata tag from the metadata model.
///
public string ImageUniqueID
{
get
{
string text = GetTagText("ImageUniqueID");
if (!string.IsNullOrEmpty(text))
{
text = text.Substring(0, text.Length - 1);
}
return text;
}
set
{
if (value != null)
{
FreeImage.Resize(ref value, 32);
value += '\0';
}
SetTagValue("ImageUniqueID", value);
}
}
}
///
/// Represents a collection of all tags contained in the metadata model
/// .
///
public class MDM_EXIF_GPS : MetadataModel
{
///
/// Initializes a new instance of this class.
///
/// Handle to a FreeImage bitmap.
public MDM_EXIF_GPS(FIBITMAP dib) : base(dib) { }
///
/// Retrieves the datamodel that this instance represents.
///
public override FREE_IMAGE_MDMODEL Model
{
get { return FREE_IMAGE_MDMODEL.FIMD_EXIF_GPS; }
}
///
/// Gets or sets the GPS version ID. Constant length of 4.
///
///
/// Handling of null values
/// A null value indicates, that the corresponding metadata tag is not
/// present in the metadata model.
/// Setting this property's value to a non-null reference creates the
/// metadata tag if necessary.
/// Setting this property's value to a null reference deletes the
/// metadata tag from the metadata model.
///
public byte[] VersionID
{
get
{
return GetTagArray("GPSVersionID");
}
set
{
FreeImage.Resize(ref value, 4);
SetTagValue("GPSVersionID", value);
}
}
///
/// Gets or sets a value indicating whether the
/// is north or south latitude.
///
///
/// Handling of null values
/// A null value indicates, that the corresponding metadata tag is not
/// present in the metadata model.
/// Setting this property's value to a non-null reference creates the
/// metadata tag if necessary.
/// Setting this property's value to a null reference deletes the
/// metadata tag from the metadata model.
///
public LatitudeType? LatitudeDirection
{
get
{
return ToLatitudeType(GetTagText("GPSLatitudeRef"));
}
set
{
SetTagValue("GPSLatitudeRef", ToString(value) + '\0');
}
}
///
/// Gets or sets the latitude of the image. The latitude is expressed as three rational
/// values giving the degrees, minutes, and seconds, respectively. Constant length of 3.
///
///
/// Handling of null values
/// A null value indicates, that the corresponding metadata tag is not
/// present in the metadata model.
/// Setting this property's value to a non-null reference creates the
/// metadata tag if necessary.
/// Setting this property's value to a null reference deletes the
/// metadata tag from the metadata model.
///
///
public FIURational[] Latitude
{
get
{
return GetTagArray("GPSLatitude");
}
set
{
FreeImage.Resize(ref value, 3);
SetTagValue("GPSLatitude", value);
}
}
///
/// Gets or sets a value indicating whether
/// is east or west longitude.
///
///
/// Handling of null values
/// A null value indicates, that the corresponding metadata tag is not
/// present in the metadata model.
/// Setting this property's value to a non-null reference creates the
/// metadata tag if necessary.
/// Setting this property's value to a null reference deletes the
/// metadata tag from the metadata model.
///
public LongitudeType? LongitudeDirection
{
get
{
return ToLongitudeType(GetTagText("GPSLongitudeRef"));
}
set
{
SetTagValue("GPSLongitudeRef", ToString(value) + '\0');
}
}
///
/// Gets or sets the longitude of the image. The longitude is expressed as three rational
/// values giving the degrees, minutes, and seconds, respectively. Constant length of 3.
///
///
/// Handling of null values
/// A null value indicates, that the corresponding metadata tag is not
/// present in the metadata model.
/// Setting this property's value to a non-null reference creates the
/// metadata tag if necessary.
/// Setting this property's value to a null reference deletes the
/// metadata tag from the metadata model.
///
///
public FIURational[] Longitude
{
get
{
return GetTagArray("GPSLongitude");
}
set
{
FreeImage.Resize(ref value, 3);
SetTagValue("GPSLongitude", value);
}
}
///
/// Gets a value indicating whether is sea level and the altitude
/// is above sea level. If the altitude is below sea level is
/// indicated as an absolute value.
///
///
/// Handling of null values
/// A null value indicates, that the corresponding metadata tag is not
/// present in the metadata model.
/// Setting this property's value to a non-null reference creates the
/// metadata tag if necessary.
/// Setting this property's value to a null reference deletes the
/// metadata tag from the metadata model.
///
public AltitudeType? AltitudeDirection
{
get
{
byte? flag = GetTagValue("GPSAltitudeRef");
if (flag.HasValue)
{
switch (flag.Value)
{
case 0:
return AltitudeType.AboveSeaLevel;
case 1:
return AltitudeType.BelowSeaLevel;
default:
return AltitudeType.Undefined;
}
}
return null;
}
set
{
byte? val = null;
if (value.HasValue)
{
switch (value.Value)
{
case AltitudeType.AboveSeaLevel:
val = 0;
break;
case AltitudeType.BelowSeaLevel:
val = 1;
break;
default:
val = 2;
break;
}
}
SetTagValue("GPSAltitudeRef", val);
}
}
///
/// Gets or sets the altitude based on the reference in .
/// Altitude is expressed as one rational value. The reference unit is meters.
///
///
/// Handling of null values
/// A null value indicates, that the corresponding metadata tag is not
/// present in the metadata model.
/// Setting this property's value to a non-null reference creates the
/// metadata tag if necessary.
/// Setting this property's value to a null reference deletes the
/// metadata tag from the metadata model.
///
public FIURational? Altitude
{
get
{
return GetTagValue("GPSAltitude");
}
set
{
SetTagValue("GPSAltitude", value);
}
}
///
/// Gets or sets the sign of the .
///
///
/// This is a derived property. There is no metadata tag directly associated
/// with this property value.
///
///
Handling of null values
/// A null value indicates, that the corresponding metadata tag is not
/// present in the metadata model.
/// Setting this property's value to a non-null reference creates the
/// metadata tag if necessary.
/// Setting this property's value to a null reference deletes the
/// metadata tag from the metadata model.
///
public int? AltitudeSign
{
get
{
AltitudeType? seaLevel = AltitudeDirection;
if (seaLevel.HasValue)
{
return (seaLevel.Value == AltitudeType.BelowSeaLevel) ? -1 : 1;
}
return null;
}
set
{
if (value.HasValue)
{
AltitudeDirection = value.Value >= 0 ? AltitudeType.AboveSeaLevel : AltitudeType.BelowSeaLevel;
}
else
{
AltitudeDirection = null;
}
}
}
///
/// Gets or sets the signed altitude.
/// Altitude is expressed as one rational value. The reference unit is meters.
///
///
/// Altitude is too large to fit into a FIRational.
///
///
/// This is a derived property. There is no metadata tag directly associated
/// with this property value.
///
///
Handling of null values
/// A null value indicates, that the corresponding metadata tag is not
/// present in the metadata model.
/// Setting this property's value to a non-null reference creates the
/// metadata tag if necessary.
/// Setting this property's value to a null reference deletes the
/// metadata tag from the metadata model.
///
public FIRational? SignedAltitude
{
get
{
FIRational? result = null;
FIURational? altitude = Altitude;
if (altitude.HasValue)
{
int sign = AltitudeSign ?? 1;
if (((int)altitude.Value.Numerator < 0) || ((int)altitude.Value.Denominator < 0))
throw new OverflowException();
result = new FIRational((int)altitude.Value.Numerator * sign, (int)altitude.Value.Denominator);
}
return result;
}
set
{
FIURational? val = null;
if (value.HasValue)
{
if (value.Value < 0)
{
AltitudeSign = -1;
value = -value.Value;
}
else
{
AltitudeSign = 1;
}
val = new FIURational((uint)value.Value.Numerator, (uint)value.Value.Denominator);
}
Altitude = val;
}
}
///
/// Gets or sets the time as UTC (Coordinated Universal Time). Constant length of 3.
///
///
/// Handling of null values
/// A null value indicates, that the corresponding metadata tag is not
/// present in the metadata model.
/// Setting this property's value to a non-null reference creates the
/// metadata tag if necessary.
/// Setting this property's value to a null reference deletes the
/// metadata tag from the metadata model.
///
public TimeSpan? TimeStamp
{
get
{
FIURational[] stamp = GetTagArray("GPSTimeStamp");
if ((stamp == null) || stamp.Length != 3)
{
return null;
}
else
{
return new TimeSpan((int)stamp[0], (int)stamp[1], (int)stamp[2]);
}
}
set
{
FIURational[] stamp = null;
if (value.HasValue)
{
TimeSpan span = value.Value;
stamp = new FIURational[3];
stamp[0] = span.Hours;
stamp[1] = span.Minutes;
stamp[2] = span.Seconds;
}
SetTagValue("GPSTimeStamp", stamp);
}
}
///
/// Gets or sets the GPS satellites used for measurements. This tag can be used to describe
/// the number of satellites, their ID number, angle of elevation, azimuth, SNR and other
/// information in ASCII notation. The format is not specified.
///
///
/// Handling of null values
/// A null value indicates, that the corresponding metadata tag is not
/// present in the metadata model.
/// Setting this property's value to a non-null reference creates the
/// metadata tag if necessary.
/// Setting this property's value to a null reference deletes the
/// metadata tag from the metadata model.
///
public string Satellites
{
get
{
string result = GetTagText("GPSSatellites");
if (!string.IsNullOrEmpty(result))
{
result = result.Substring(0, result.Length - 1);
}
return result;
}
set
{
if (value != null)
{
value += '\0';
}
SetTagValue("GPSTimeStamp", value);
}
}
///
/// Gets or sets a value indicating the status of the GPS receiver when the image was recorded.
/// true indicates measurement was in progress;
/// false indicates measurement was Interoperability.
///
///
/// Handling of null values
/// A null value indicates, that the corresponding metadata tag is not
/// present in the metadata model.
/// Setting this property's value to a non-null reference creates the
/// metadata tag if necessary.
/// Setting this property's value to a null reference deletes the
/// metadata tag from the metadata model.
///
public bool? Status
{
get
{
string text = GetTagText("GPSStatus");
return string.IsNullOrEmpty(text) ? default(bool?) : text[0] == 'A';
}
set
{
SetTagValue("GPSStatus", value.HasValue ? (value.Value ? "A\0" : "V\0") : null);
}
}
///
/// Gets or sets a value indicating the GPS measurement mode.
/// true indicates three-dimensional measurement;
/// false indicated two-dimensional measurement was in progress.
///
///
/// Handling of null values
/// A null value indicates, that the corresponding metadata tag is not
/// present in the metadata model.
/// Setting this property's value to a non-null reference creates the
/// metadata tag if necessary.
/// Setting this property's value to a null reference deletes the
/// metadata tag from the metadata model.
///
public bool? MeasureMode3D
{
get
{
string text = GetTagText("GPSMeasureMode");
return string.IsNullOrEmpty(text) ? default(bool?) : text[0] == '3';
}
set
{
SetTagValue("GPSMeasureMode", value.HasValue ? (value.Value ? "3\0" : "2\0") : null);
}
}
///
/// Gets or sets the GPS DOP (data degree of precision). An HDOP value is written during
/// two-dimensional measurement, and PDOP during three-dimensional measurement.
///
///
/// Handling of null values
/// A null value indicates, that the corresponding metadata tag is not
/// present in the metadata model.
/// Setting this property's value to a non-null reference creates the
/// metadata tag if necessary.
/// Setting this property's value to a null reference deletes the
/// metadata tag from the metadata model.
///
public FIURational? DOP
{
get
{
return GetTagValue("GPSDOP");
}
set
{
SetTagValue("GPSDOP", value);
}
}
///
/// Gets or sets the unit used to express the GPS receiver of movement.
///
///
/// Handling of null values
/// A null value indicates, that the corresponding metadata tag is not
/// present in the metadata model.
/// Setting this property's value to a non-null reference creates the
/// metadata tag if necessary.
/// Setting this property's value to a null reference deletes the
/// metadata tag from the metadata model.
///
///
public VelocityUnit? SpeedUnit
{
get
{
return ToUnitType(GetTagText("GPSSpeedRef"));
}
set
{
SetTagValue("GPSSpeedRef", ToString(value) + '\0');
}
}
///
/// Gets or sets the speed of GPS receiver movement.
///
///
/// Handling of null values
/// A null value indicates, that the corresponding metadata tag is not
/// present in the metadata model.
/// Setting this property's value to a non-null reference creates the
/// metadata tag if necessary.
/// Setting this property's value to a null reference deletes the
/// metadata tag from the metadata model.
///
///
public FIURational? Speed
{
get
{
return GetTagValue("GPSSpeed");
}
set
{
SetTagValue("GPSSpeed", value);
}
}
///
/// Gets or sets the reference for giving the direction of GPS receiver movement.
///
///
/// Handling of null values
/// A null value indicates, that the corresponding metadata tag is not
/// present in the metadata model.
/// Setting this property's value to a non-null reference creates the
/// metadata tag if necessary.
/// Setting this property's value to a null reference deletes the
/// metadata tag from the metadata model.
///
///
public DirectionReference? TrackDirectionReference
{
get
{
return ToDirectionType(GetTagText("GPSTrackRef"));
}
set
{
SetTagValue("GPSTrackRef", ToString(value) + '\0');
}
}
///
/// Gets or sets the direction of GPS receiver movement.
/// The range of values is from 0.00 to 359.99.
///
///
/// Handling of null values
/// A null value indicates, that the corresponding metadata tag is not
/// present in the metadata model.
/// Setting this property's value to a non-null reference creates the
/// metadata tag if necessary.
/// Setting this property's value to a null reference deletes the
/// metadata tag from the metadata model.
///
///
public FIURational? Track
{
get
{
return GetTagValue("GPSTrack");
}
set
{
SetTagValue("GPSTrack", value);
}
}
///
/// Gets or sets the reference for giving the direction of GPS receiver movement.
///
///
/// Handling of null values
/// A null value indicates, that the corresponding metadata tag is not
/// present in the metadata model.
/// Setting this property's value to a non-null reference creates the
/// metadata tag if necessary.
/// Setting this property's value to a null reference deletes the
/// metadata tag from the metadata model.
///
///
public DirectionReference? ImageDirectionReference
{
get
{
return ToDirectionType(GetTagText("GPSImgDirectionRef"));
}
set
{
SetTagValue("GPSImgDirectionRef", ToString(value) + '\0');
}
}
///
/// Gets or sets the direction of the image when it was captured.
/// The range of values is from 0.00 to 359.99.
///
///
/// Handling of null values
/// A null value indicates, that the corresponding metadata tag is not
/// present in the metadata model.
/// Setting this property's value to a non-null reference creates the
/// metadata tag if necessary.
/// Setting this property's value to a null reference deletes the
/// metadata tag from the metadata model.
///
///
public FIURational? ImageDirection
{
get
{
return GetTagValue("GPSImgDirection");
}
set
{
SetTagValue("GPSImgDirection", value);
}
}
///
/// Gets or sets the geodetic survey data used by the GPS receiver. If the survey data
/// is restricted to Japan, the value of this tag is 'TOKYO' or 'WGS-84'.
///
///
/// Handling of null values
/// A null value indicates, that the corresponding metadata tag is not
/// present in the metadata model.
/// Setting this property's value to a non-null reference creates the
/// metadata tag if necessary.
/// Setting this property's value to a null reference deletes the
/// metadata tag from the metadata model.
///
public string MapDatum
{
get
{
string result = GetTagText("GPSMapDatum");
if (!string.IsNullOrEmpty(result))
{
result = result.Substring(0, result.Length - 1);
}
return result;
}
set
{
SetTagValue("GPSMapDatum", value + '\0');
}
}
///
/// Gets or sets a value indicating whether the destination point
/// is north or south latitude.
///
///
/// Handling of null values
/// A null value indicates, that the corresponding metadata tag is not
/// present in the metadata model.
/// Setting this property's value to a non-null reference creates the
/// metadata tag if necessary.
/// Setting this property's value to a null reference deletes the
/// metadata tag from the metadata model.
///
///
public LatitudeType? DestinationLatitudeDirection
{
get
{
return ToLatitudeType(GetTagText("GPSDestLatitudeRef"));
}
set
{
SetTagValue("GPSDestLatitudeRef", ToString(value) + '\0');
}
}
///
/// Gets or sets the latitude of the destination point. The latitude is expressed as three rational
/// values giving the degrees, minutes, and seconds, respectively. Constant length of 3.
///
///
/// Handling of null values
/// A null value indicates, that the corresponding metadata tag is not
/// present in the metadata model.
/// Setting this property's value to a non-null reference creates the
/// metadata tag if necessary.
/// Setting this property's value to a null reference deletes the
/// metadata tag from the metadata model.
///
///
public FIURational[] DestinationLatitude
{
get
{
return GetTagArray("GPSDestLatitude");
}
set
{
FreeImage.Resize(ref value, 3);
SetTagValue("GPSDestLatitude", value);
}
}
///
/// Gets or sets a value indicating whether the destination point
/// is east or west longitude.
///
///
/// Handling of null values
/// A null value indicates, that the corresponding metadata tag is not
/// present in the metadata model.
/// Setting this property's value to a non-null reference creates the
/// metadata tag if necessary.
/// Setting this property's value to a null reference deletes the
/// metadata tag from the metadata model.
///
///
public LongitudeType? DestinationLongitudeDirection
{
get
{
return ToLongitudeType(GetTagText("GPSDestLongitudeRef"));
}
set
{
SetTagValue("GPSDestLongitudeRef", ToString(value) + '\0');
}
}
///
/// Gets or sets the longitude of the destination point. The longitude is expressed as three rational
/// values giving the degrees, minutes, and seconds, respectively. Constant length of 3.
///
///
/// Handling of null values
/// A null value indicates, that the corresponding metadata tag is not
/// present in the metadata model.
/// Setting this property's value to a non-null reference creates the
/// metadata tag if necessary.
/// Setting this property's value to a null reference deletes the
/// metadata tag from the metadata model.
///
public FIURational[] DestinationLongitude
{
get
{
return GetTagArray("GPSDestLongitude");
}
set
{
FreeImage.Resize(ref value, 3);
SetTagValue("GPSDestLongitude", value);
}
}
///
/// Gets or sets the reference used for giving the bearing to the destination point.
///
///
/// Handling of null values
/// A null value indicates, that the corresponding metadata tag is not
/// present in the metadata model.
/// Setting this property's value to a non-null reference creates the
/// metadata tag if necessary.
/// Setting this property's value to a null reference deletes the
/// metadata tag from the metadata model.
///
///
public DirectionReference? DestinationDirectionReference
{
get
{
return ToDirectionType(GetTagText("GPSDestBearingRef"));
}
set
{
SetTagValue("GPSDestBearingRef", ToString(value) + '\0');
}
}
///
/// Gets or sets the bearing to the destination point.
/// The range of values is from 0.00 to 359.99.
///
///
/// Handling of null values
/// A null value indicates, that the corresponding metadata tag is not
/// present in the metadata model.
/// Setting this property's value to a non-null reference creates the
/// metadata tag if necessary.
/// Setting this property's value to a null reference deletes the
/// metadata tag from the metadata model.
///
///
public FIURational? DestinationBearing
{
get
{
return GetTagValue("GPSDestBearing");
}
set
{
SetTagValue("GPSDestBearing", value);
}
}
///
/// Gets or sets the unit used to express the distance to the destination point.
///
///
/// Handling of null values
/// A null value indicates, that the corresponding metadata tag is not
/// present in the metadata model.
/// Setting this property's value to a non-null reference creates the
/// metadata tag if necessary.
/// Setting this property's value to a null reference deletes the
/// metadata tag from the metadata model.
///
///
public VelocityUnit? DestinationUnit
{
get
{
return ToUnitType(GetTagText("GPSDestDistanceRef"));
}
set
{
SetTagValue("GPSDestDistanceRef", ToString(value) + '\0');
}
}
///
/// Gets or sets a character string recording the name of the method used
/// for location finding. The first byte indicates the character code used,
/// and this is followed by the name of the method. Since the Type is not ASCII,
/// NULL termination is not necessary.
///
///
/// Handling of null values
/// A null value indicates, that the corresponding metadata tag is not
/// present in the metadata model.
/// Setting this property's value to a non-null reference creates the
/// metadata tag if necessary.
/// Setting this property's value to a null reference deletes the
/// metadata tag from the metadata model.
///
public byte[] ProcessingMethod
{
get
{
return GetTagArray("GPSProcessingMethod");
}
set
{
SetTagValue("GPSProcessingMethod", value);
}
}
///
/// Gets or sets a character string recording the name of the GPS area.
/// The first byte indicates the character code used, and this is followed by
/// the name of the GPS area. Since the Type is not ASCII, NULL termination is
/// not necessary.
///
///
/// Handling of null values
/// A null value indicates, that the corresponding metadata tag is not
/// present in the metadata model.
/// Setting this property's value to a non-null reference creates the
/// metadata tag if necessary.
/// Setting this property's value to a null reference deletes the
/// metadata tag from the metadata model.
///
public byte[] AreaInformation
{
get
{
return GetTagArray("GPSAreaInformation");
}
set
{
SetTagValue("GPSAreaInformation", value);
}
}
///
/// Gets or sets date and time information relative to UTC (Coordinated Universal Time).
///
///
/// This is a derived property. There is no metadata tag directly associated
/// with this property value.
///
///
Handling of null values
/// A null value indicates, that the corresponding metadata tag is not
/// present in the metadata model.
/// Setting this property's value to a non-null reference creates the
/// metadata tag if necessary.
/// Setting this property's value to a null reference deletes the
/// metadata tag from the metadata model.
///
public DateTime? DateTimeStamp
{
get
{
DateTime? date = DateStamp;
TimeSpan? time = TimeStamp;
if ((date == null) && (time == null))
{
return null;
}
else
{
if (date == null)
{
date = DateTime.MinValue;
}
if (time == null)
{
time = TimeSpan.MinValue;
}
return date.Value.Add(time.Value);
}
}
set
{
if (value.HasValue)
{
DateStamp = value.Value.Date;
TimeStamp = value.Value.TimeOfDay;
}
else
{
DateStamp = null;
TimeStamp = null;
}
}
}
///
/// Gets or sets date information relative to UTC (Coordinated Universal Time).
///
///
/// Handling of null values
/// A null value indicates, that the corresponding metadata tag is not
/// present in the metadata model.
/// Setting this property's value to a non-null reference creates the
/// metadata tag if necessary.
/// Setting this property's value to a null reference deletes the
/// metadata tag from the metadata model.
///
public DateTime? DateStamp
{
get
{
string stamp = GetTagText("GPSDateStamp");
if (stamp != null)
{
try
{
return DateTime.ParseExact(stamp, "yyyy:MM:dd\0", null);
}
catch
{
}
}
return null;
}
set
{
string val = null;
if (value.HasValue)
{
try
{
val = value.Value.ToString("yyyy:MM:dd\0");
}
catch
{
}
}
SetTagValue("GPSDateStamp", val);
}
}
///
/// Gets or sets a value indicating whether differential correction was applied to
/// the GPS receiver.
///
///
/// Handling of null values
/// A null value indicates, that the corresponding metadata tag is not
/// present in the metadata model.
/// Setting this property's value to a non-null reference creates the
/// metadata tag if necessary.
/// Setting this property's value to a null reference deletes the
/// metadata tag from the metadata model.
///
public bool? IsDifferential
{
get
{
ushort? value = GetTagValue("GPSDifferential");
return value.HasValue ? (value != 0) : (default(bool?));
}
set
{
SetTagValue("GPSDifferential", value.HasValue ? (object)(value.Value ? (ushort)1 : (ushort)0) : (null));
}
}
}
///
/// Represents a collection of all tags contained in the metadata model
/// .
///
public class MDM_INTEROP : MetadataModel
{
///
/// Initializes a new instance of this class.
///
/// Handle to a FreeImage bitmap.
public MDM_INTEROP(FIBITMAP dib) : base(dib) { }
///
/// Retrieves the datamodel that this instance represents.
///
public override FREE_IMAGE_MDMODEL Model
{
get { return FREE_IMAGE_MDMODEL.FIMD_EXIF_INTEROP; }
}
///
/// Gets or sets the identification of the Interoperability rule.
///
///
/// Handling of null values
/// A null value indicates, that the corresponding metadata tag is not
/// present in the metadata model.
/// Setting this property's value to a non-null reference creates the
/// metadata tag if necessary.
/// Setting this property's value to a null reference deletes the
/// metadata tag from the metadata model.
///
public InteroperabilityMode? Identification
{
get
{
return ToInteroperabilityType(GetTagText("InteroperabilityIndex"));
}
set
{
SetTagValue("InteroperabilityIndex", ToString(value) + '\0');
}
}
}
///
/// Represents a collection of all tags contained in the metadata model
/// .
///
/// This class is obsolete. Use class instead.
///
[Obsolete("To be removed in future releases. Use MDM_EXIF_MAIN instead.")]
public class MDM_MAIN : MDM_EXIF_MAIN
{
///
/// Initializes a new instance of this class.
///
/// Handle to a FreeImage bitmap.
public MDM_MAIN(FIBITMAP dib) : base(dib) { }
}
///
/// Represents a collection of all tags contained in the metadata model
/// .
///
public class MDM_EXIF_MAIN : MetadataModel
{
///
/// Initializes a new instance of this class.
///
/// Handle to a FreeImage bitmap.
public MDM_EXIF_MAIN(FIBITMAP dib) : base(dib) { }
///
/// Retrieves the datamodel that this instance represents.
///
public override FREE_IMAGE_MDMODEL Model
{
get { return FREE_IMAGE_MDMODEL.FIMD_EXIF_MAIN; }
}
///
/// Gets or sets the number of columns of image data, equal to the number
/// of pixels per row. In JPEG compressed data a JPEG marker is used
/// instead of this tag.
///
///
/// Handling of null values
/// A null value indicates, that the corresponding metadata tag is not
/// present in the metadata model.
/// Setting this property's value to a non-null reference creates the
/// metadata tag if necessary.
/// Setting this property's value to a null reference deletes the
/// metadata tag from the metadata model.
///
public uint? ImageWidth
{
get
{
return GetUInt32Value("ImageWidth");
}
set
{
RemoveTag("ImageWidth");
if (value.HasValue)
{
SetTagValue("ImageWidth", value);
}
}
}
///
/// Gets or sets number of rows of image data. In JPEG compressed data a JPEG marker
/// is used instead of this tag.
///
///
/// Handling of null values
/// A null value indicates, that the corresponding metadata tag is not
/// present in the metadata model.
/// Setting this property's value to a non-null reference creates the
/// metadata tag if necessary.
/// Setting this property's value to a null reference deletes the
/// metadata tag from the metadata model.
///
public uint? ImageHeight
{
get
{
return GetUInt32Value("ImageLength");
}
set
{
RemoveTag("ImageLength");
if (value.HasValue)
{
SetTagValue("ImageLength", value);
}
}
}
///
/// Gets or sets number of bits per image component. In this standard
/// each component of the image is 8 bits, so the value for this tag is 8.
/// Constant length of 3.
///
///
/// Handling of null values
/// A null value indicates, that the corresponding metadata tag is not
/// present in the metadata model.
/// Setting this property's value to a non-null reference creates the
/// metadata tag if necessary.
/// Setting this property's value to a null reference deletes the
/// metadata tag from the metadata model.
///
public ushort[] BitsPerSample
{
get
{
return GetTagArray("BitsPerSample");
}
set
{
FreeImage.Resize(ref value, 3);
SetTagValue("BitsPerSample", value);
}
}
///
/// Gets or sets compression scheme used for the image data. When a primary image
/// is JPEG compressed, this designation is not necessary and is omitted.
/// When thumbnails use JPEG compression, this tag value is set to 6.
///
///
/// Handling of null values
/// A null value indicates, that the corresponding metadata tag is not
/// present in the metadata model.
/// Setting this property's value to a non-null reference creates the
/// metadata tag if necessary.
/// Setting this property's value to a null reference deletes the
/// metadata tag from the metadata model.
///
public ushort? Compression
{
get
{
return GetTagValue("Compression");
}
set
{
SetTagValue("Compression", value);
}
}
///
/// Gets or sets pixel composition. In JPEG compressed data a JPEG marker is
/// used instead of this tag. See remarks for further information.
///
///
/// The following values are definied:
///
///
/// ID
/// Description
///
/// -
/// 2
/// RGB
///
/// -
/// 6
/// YCbCr
///
/// -
/// other
/// reserved
///
///
///
///
Handling of null values
/// A null value indicates, that the corresponding metadata tag is not
/// present in the metadata model.
/// Setting this property's value to a non-null reference creates the
/// metadata tag if necessary.
/// Setting this property's value to a null reference deletes the
/// metadata tag from the metadata model.
///
public ushort? PhotometricInterpretation
{
get
{
return GetTagValue("PhotometricInterpretation");
}
set
{
SetTagValue("PhotometricInterpretation", value);
}
}
///
/// Gets or sets the image orientation viewed in terms of rows and columns.
///
///
/// Handling of null values
/// A null value indicates, that the corresponding metadata tag is not
/// present in the metadata model.
/// Setting this property's value to a non-null reference creates the
/// metadata tag if necessary.
/// Setting this property's value to a null reference deletes the
/// metadata tag from the metadata model.
///
public ExifImageOrientation? Orientation
{
get
{
return (ExifImageOrientation?)GetTagValue("Orientation");
}
set
{
SetTagValue("Orientation", (ushort?)value);
}
}
///
/// Gets or sets the number of components per pixel. Since this standard applies
/// to RGB and YCbCr images, the value set for this tag is 3. In JPEG compressed
/// data a JPEG marker is used instead of this tag.
///
///
/// Handling of null values
/// A null value indicates, that the corresponding metadata tag is not
/// present in the metadata model.
/// Setting this property's value to a non-null reference creates the
/// metadata tag if necessary.
/// Setting this property's value to a null reference deletes the
/// metadata tag from the metadata model.
///
public ushort? SamplesPerPixel
{
get
{
return GetTagValue("SamplesPerPixel");
}
set
{
SetTagValue("SamplesPerPixel", value);
}
}
///
/// Gets or sets a value that indicates whether pixel components are recorded in
/// chunky or planar format. In JPEG compressed files a JPEG marker is used instead
/// of this tag. If this field does not exist, the TIFF default of 1 (chunky) is assumed.
/// See remarks for further information.
///
///
/// The following values are definied:
///
///
/// ID
/// Description
///
/// -
/// 1
/// chunky format
///
/// -
/// 2
/// planar format
///
/// -
/// other
/// reserved
///
///
///
///
Handling of null values
/// A null value indicates, that the corresponding metadata tag is not
/// present in the metadata model.
/// Setting this property's value to a non-null reference creates the
/// metadata tag if necessary.
/// Setting this property's value to a null reference deletes the
/// metadata tag from the metadata model.
///
public ushort? PlanarConfiguration
{
get
{
return GetTagValue("PlanarConfiguration");
}
set
{
SetTagValue("PlanarConfiguration", value);
}
}
///
/// Gets or sets the sampling ratio of chrominance components in relation to
/// the luminance component. In JPEG compressed dat a JPEG marker is used
/// instead of this tag.
/// See remarks for further information.
///
///
/// The following values are definied:
///
///
/// ID
/// Description
///
/// -
/// [2,1]
/// YCbCr4:2:2
///
/// -
/// [2,2]
/// YCbCr4:2:0
///
/// -
/// other
/// reserved
///
///
///
///
Handling of null values
/// A null value indicates, that the corresponding metadata tag is not
/// present in the metadata model.
/// Setting this property's value to a non-null reference creates the
/// metadata tag if necessary.
/// Setting this property's value to a null reference deletes the
/// metadata tag from the metadata model.
///
public ushort[] YCbCrSubSampling
{
get
{
return GetTagArray("YCbCrSubSampling");
}
set
{
FreeImage.Resize(ref value, 2);
SetTagValue("YCbCrSubSampling", value);
}
}
///
/// Gets or sets position of chrominance components in relation to the luminance component.
/// See remarks for further information.
///
///
/// This field is designated only for JPEG compressed data or uncompressed YCbCr data.
/// The TIFF default is 1 (centered); but when Y:Cb:Cr = 4:2:2 it is recommended in
/// this standard that 2 (co-sited) be used to record data, in order to improve the
/// image quality when viewed on TV systems.
///
/// When this field does not exist, the reader shall assume the TIFF default.
/// In the case of Y:Cb:Cr = 4:2:0, the TIFF default (centered) is recommended.
/// If the reader does not have the capability of supporting both kinds of YCbCrPositioning,
/// it shall follow the TIFF default regardless of the value in this field.
/// It is preferable that readers be able to support both centered and co-sited positioning.
///
/// The following values are definied:
///
///
/// ID
/// Description
///
/// -
/// 1
/// centered
///
/// -
/// 2
/// co-sited
///
/// -
/// other
/// reserved
///
///
///
///
Handling of null values
/// A null value indicates, that the corresponding metadata tag is not
/// present in the metadata model.
/// Setting this property's value to a non-null reference creates the
/// metadata tag if necessary.
/// Setting this property's value to a null reference deletes the
/// metadata tag from the metadata model.
///
public ushort? YCbCrPositioning
{
get
{
return GetTagValue("YCbCrPositioning");
}
set
{
SetTagValue("YCbCrPositioning", value);
}
}
///
/// Gets or sets the number of pixels per
/// in the direction. When the image resolution is unknown,
/// 72 [dpi] is designated.
///
///
/// Handling of null values
/// A null value indicates, that the corresponding metadata tag is not
/// present in the metadata model.
/// Setting this property's value to a non-null reference creates the
/// metadata tag if necessary.
/// Setting this property's value to a null reference deletes the
/// metadata tag from the metadata model.
///
public FIURational? XResolution
{
get
{
return GetTagValue("XResolution");
}
set
{
SetTagValue("XResolution", value);
}
}
///
/// Gets or sets the number of pixels per
/// in the direction. When the image resolution is unknown,
/// 72 [dpi] is designated.
///
///
/// Handling of null values
/// A null value indicates, that the corresponding metadata tag is not
/// present in the metadata model.
/// Setting this property's value to a non-null reference creates the
/// metadata tag if necessary.
/// Setting this property's value to a null reference deletes the
/// metadata tag from the metadata model.
///
public FIURational? YResolution
{
get
{
return GetTagValue("YResolution");
}
set
{
SetTagValue("YResolution", value);
}
}
///
/// Gets or sets the unit for measuring and .
/// The same unit is used for both and .
/// If the image resolution in unknown, 2 (inches) is designated.
/// See remarks for further information.
///
///
/// The following values are definied:
///
///
/// ID
/// Description
///
/// -
/// 2
/// inches
///
/// -
/// 3
/// YCbCr4:2:0
///
/// -
/// other
/// centimeters
///
///
///
///
Handling of null values
/// A null value indicates, that the corresponding metadata tag is not
/// present in the metadata model.
/// Setting this property's value to a non-null reference creates the
/// metadata tag if necessary.
/// Setting this property's value to a null reference deletes the
/// metadata tag from the metadata model.
///
public ushort? ResolutionUnit
{
get
{
return GetTagValue("ResolutionUnit");
}
set
{
SetTagValue("ResolutionUnit", value);
}
}
///
/// Gets or sets the byte offset of that strip.
/// It is recommended that this be selected so the number of strip bytes
/// does not exceed 64 Kbytes.
/// With JPEG compressed data this designation is not needed and is omitted.
/// Constant length of * StripsPerImage.
///
///
/// Handling of null values
/// A null value indicates, that the corresponding metadata tag is not
/// present in the metadata model.
/// Setting this property's value to a non-null reference creates the
/// metadata tag if necessary.
/// Setting this property's value to a null reference deletes the
/// metadata tag from the metadata model.
///
///
///
public uint[] StripOffsets
{
get
{
return GetUInt32Array("StripOffsets");
}
set
{
RemoveTag("StripOffsets");
if (value != null)
{
SetTagValue("StripOffsets", value);
}
}
}
///
/// Gets or sets number of rows per strip. This is the number of rows in the image of
/// one strip when an image is divided into strips. With JPEG compressed data this
/// designation is not needed and is omitted.
///
///
/// Handling of null values
/// A null value indicates, that the corresponding metadata tag is not
/// present in the metadata model.
/// Setting this property's value to a non-null reference creates the
/// metadata tag if necessary.
/// Setting this property's value to a null reference deletes the
/// metadata tag from the metadata model.
///
///
public uint? RowsPerStrip
{
get
{
return GetUInt32Value("RowsPerStrip");
}
set
{
RemoveTag("RowsPerStrip");
if (value.HasValue)
{
SetTagValue("RowsPerStrip", value);
}
}
}
///
/// Gets or sets the total number of bytes in each strip.
/// With JPEG compressed data this designation is not needed and is omitted.
/// Constant length of * StripsPerImage.
///
///
/// Handling of null values
/// A null value indicates, that the corresponding metadata tag is not
/// present in the metadata model.
/// Setting this property's value to a non-null reference creates the
/// metadata tag if necessary.
/// Setting this property's value to a null reference deletes the
/// metadata tag from the metadata model.
///
public uint[] StripByteCounts
{
get
{
return GetUInt32Array("StripByteCounts");
}
set
{
RemoveTag("StripByteCounts");
if (value != null)
{
SetTagValue("StripByteCounts", value);
}
}
}
///
/// Gets or sets the offset to the start byte (SOI) of JPEG compressed thumbnail data.
/// This is not used for primary image JPEG data.
///
///
/// Handling of null values
/// A null value indicates, that the corresponding metadata tag is not
/// present in the metadata model.
/// Setting this property's value to a non-null reference creates the
/// metadata tag if necessary.
/// Setting this property's value to a null reference deletes the
/// metadata tag from the metadata model.
///
public uint? JPEGInterchangeFormat
{
get
{
return GetTagValue("JPEGInterchangeFormat");
}
set
{
SetTagValue("JPEGInterchangeFormat", value);
}
}
///
/// Gets or sets the number of bytes of JPEG compressed thumbnail data.
///
///
/// This is not used for primary image JPEG data.
/// JPEG thumbnails are not divided but are recorded as a continuous
/// JPEG bitstream from SOI to EOI. APPn and COM markers should not be recorded.
/// Compressed thumbnails shall be recorded in no more than 64 Kbytes,
/// including all other data to be recorded in APP1.
///
///
Handling of null values
/// A null value indicates, that the corresponding metadata tag is not
/// present in the metadata model.
/// Setting this property's value to a non-null reference creates the
/// metadata tag if necessary.
/// Setting this property's value to a null reference deletes the
/// metadata tag from the metadata model.
///
public uint? JPEGInterchangeFormatLength
{
get
{
return GetTagValue("JPEGInterchangeFormatLength");
}
set
{
SetTagValue("JPEGInterchangeFormatLength", value);
}
}
///
/// Gets or sets a transfer function for the image, described in tabular style.
/// Constant length of 3 * 256.
///
///
/// Handling of null values
/// A null value indicates, that the corresponding metadata tag is not
/// present in the metadata model.
/// Setting this property's value to a non-null reference creates the
/// metadata tag if necessary.
/// Setting this property's value to a null reference deletes the
/// metadata tag from the metadata model.
///
public ushort[] TransferFunction
{
get
{
return GetTagArray("TransferFunction");
}
set
{
FreeImage.Resize(ref value, 3 * 256);
SetTagValue("TransferFunction", value);
}
}
///
/// Gets or sets the chromaticity of the white point of the image.
/// Constant length of 2.
///
///
/// Handling of null values
/// A null value indicates, that the corresponding metadata tag is not
/// present in the metadata model.
/// Setting this property's value to a non-null reference creates the
/// metadata tag if necessary.
/// Setting this property's value to a null reference deletes the
/// metadata tag from the metadata model.
///
public FIURational[] WhitePoint
{
get
{
return GetTagArray("WhitePoint");
}
set
{
FreeImage.Resize(ref value, 2);
SetTagValue("WhitePoint", value);
}
}
///
/// Gets or sets the chromaticity of the three primary colors of the image.
/// Constant length of 6.
///
///
/// Handling of null values
/// A null value indicates, that the corresponding metadata tag is not
/// present in the metadata model.
/// Setting this property's value to a non-null reference creates the
/// metadata tag if necessary.
/// Setting this property's value to a null reference deletes the
/// metadata tag from the metadata model.
///
public FIURational[] PrimaryChromaticities
{
get
{
return GetTagArray("PrimaryChromaticities");
}
set
{
FreeImage.Resize(ref value, 6);
SetTagValue("PrimaryChromaticities", value);
}
}
///
/// Gets or sets the matrix coefficients for transformation from RGB to YCbCr image data.
/// Constant length of 3.
///
///
/// Handling of null values
/// A null value indicates, that the corresponding metadata tag is not
/// present in the metadata model.
/// Setting this property's value to a non-null reference creates the
/// metadata tag if necessary.
/// Setting this property's value to a null reference deletes the
/// metadata tag from the metadata model.
///
public FIURational[] YCbCrCoefficients
{
get
{
return GetTagArray("YCbCrCoefficients");
}
set
{
FreeImage.Resize(ref value, 3);
SetTagValue("PrimaryChromaticities", value);
}
}
///
/// Gets or sets the reference black point value and reference white point value.
/// Constant length of 6.
///
///
/// Handling of null values
/// A null value indicates, that the corresponding metadata tag is not
/// present in the metadata model.
/// Setting this property's value to a non-null reference creates the
/// metadata tag if necessary.
/// Setting this property's value to a null reference deletes the
/// metadata tag from the metadata model.
///
public FIURational[] ReferenceBlackWhite
{
get
{
return GetTagArray("ReferenceBlackWhite");
}
set
{
FreeImage.Resize(ref value, 6);
SetTagValue("ReferenceBlackWhite", value);
}
}
///
/// Gets or sets the date and time of image creation.
///
///
/// Handling of null values
/// A null value indicates, that the corresponding metadata tag is not
/// present in the metadata model.
/// Setting this property's value to a non-null reference creates the
/// metadata tag if necessary.
/// Setting this property's value to a null reference deletes the
/// metadata tag from the metadata model.
///
public DateTime? DateTime
{
get
{
DateTime? result = null;
string text = GetTagText("DateTime");
if (text != null)
{
try
{
result = System.DateTime.ParseExact(text, "yyyy:MM:dd HH:mm:ss\0", null);
}
catch
{
}
}
return result;
}
set
{
string val = null;
if (value.HasValue)
{
try
{
val = value.Value.ToString("yyyy:MM:dd HH:mm:ss\0");
}
catch
{
}
}
SetTagValue("DateTime", val);
}
}
///
/// Gets or sets a string giving the title of the image.
///
///
/// Handling of null values
/// A null value indicates, that the corresponding metadata tag is not
/// present in the metadata model.
/// Setting this property's value to a non-null reference creates the
/// metadata tag if necessary.
/// Setting this property's value to a null reference deletes the
/// metadata tag from the metadata model.
///
public string ImageDescription
{
get
{
string result = GetTagText("ImageDescription");
if (!string.IsNullOrEmpty(result))
{
result = result.Substring(0, result.Length - 1);
}
return result;
}
set
{
if (value != null)
{
value += '\0';
}
SetTagValue("ImageDescription", value);
}
}
///
/// Gets or sets the manufacturer of the recording equipment.
///
///
/// Handling of null values
/// A null value indicates, that the corresponding metadata tag is not
/// present in the metadata model.
/// Setting this property's value to a non-null reference creates the
/// metadata tag if necessary.
/// Setting this property's value to a null reference deletes the
/// metadata tag from the metadata model.
///
public string Make
{
get
{
string result = GetTagText("Make");
if (!string.IsNullOrEmpty(result))
{
result = result.Substring(0, result.Length - 1);
}
return result;
}
set
{
if (value != null)
{
value += '\0';
}
SetTagValue("Make", value);
}
}
///
/// Gets or sets the model name or model number of the equipment.
///
///
/// Handling of null values
/// A null value indicates, that the corresponding metadata tag is not
/// present in the metadata model.
/// Setting this property's value to a non-null reference creates the
/// metadata tag if necessary.
/// Setting this property's value to a null reference deletes the
/// metadata tag from the metadata model.
///
public string EquipmentModel
{
get
{
string result = GetTagText("Model");
if (!string.IsNullOrEmpty(result))
{
result = result.Substring(0, result.Length - 1);
}
return result;
}
set
{
if (value != null)
{
value += '\0';
}
SetTagValue("Model", value);
}
}
///
/// Gets or sets the name and version of the software or firmware of the camera
/// or image input device used to generate the image.
///
///
/// Handling of null values
/// A null value indicates, that the corresponding metadata tag is not
/// present in the metadata model.
/// Setting this property's value to a non-null reference creates the
/// metadata tag if necessary.
/// Setting this property's value to a null reference deletes the
/// metadata tag from the metadata model.
///
public string Software
{
get
{
string result = GetTagText("Software");
if (!string.IsNullOrEmpty(result))
{
result = result.Substring(0, result.Length - 1);
}
return result;
}
set
{
if (value != null)
{
value += '\0';
}
SetTagValue("Software", value);
}
}
///
/// Gets or sets the name of the camera owner, photographer or image creator.
///
///
/// Handling of null values
/// A null value indicates, that the corresponding metadata tag is not
/// present in the metadata model.
/// Setting this property's value to a non-null reference creates the
/// metadata tag if necessary.
/// Setting this property's value to a null reference deletes the
/// metadata tag from the metadata model.
///
public string Artist
{
get
{
string result = GetTagText("Artist");
if (!string.IsNullOrEmpty(result))
{
result = result.Substring(0, result.Length - 1);
}
return result;
}
set
{
if (value != null)
{
value += '\0';
}
SetTagValue("Artist", value);
}
}
///
/// Gets or sets the photographer and editor copyrights.
/// Constant length of 1-2.
///
///
/// Handling of null values
/// A null value indicates, that the corresponding metadata tag is not
/// present in the metadata model.
/// Setting this property's value to a non-null reference creates the
/// metadata tag if necessary.
/// Setting this property's value to a null reference deletes the
/// metadata tag from the metadata model.
///
public string[] Copyright
{
get
{
string[] result = null;
string text = GetTagText("Copyright");
if (!string.IsNullOrEmpty(text))
{
result = text.Split(new char[] { '\0' }, StringSplitOptions.RemoveEmptyEntries);
}
return result;
}
set
{
string val = null;
if (value != null)
{
if (value.Length == 1)
{
if (value[0] != null)
{
val = value[0] + '\0';
}
}
else if (value.Length == 2)
{
if ((value[0] != null) && (value[1] != null))
{
val = value[0] + '\0' + value[1] + '\0';
}
}
}
SetTagValue("Copyright", val);
}
}
}
///
/// Represents a collection of all tags contained in the metadata model
/// .
///
public class MDM_MAKERNOTE : MetadataModel
{
///
/// Initializes a new instance of this class.
///
/// Handle to a FreeImage bitmap.
public MDM_MAKERNOTE(FIBITMAP dib) : base(dib) { }
///
/// Retrieves the datamodel that this instance represents.
///
public override FREE_IMAGE_MDMODEL Model
{
get { return FREE_IMAGE_MDMODEL.FIMD_EXIF_MAKERNOTE; }
}
}
///
/// Represents a collection of all tags contained in the metadata model
/// .
///
public class MDM_GEOTIFF : MetadataModel
{
///
/// Initializes a new instance of this class.
///
/// Handle to a FreeImage bitmap.
public MDM_GEOTIFF(FIBITMAP dib) : base(dib) { }
///
/// Retrieves the datamodel that this instance represents.
///
public override FREE_IMAGE_MDMODEL Model
{
get { return FREE_IMAGE_MDMODEL.FIMD_GEOTIFF; }
}
///
/// Gets or sets the value of the GeoTIFF GeoASCIIParamsTag.
///
///
/// The GeoASCIIParamsTag is used to store all of the valued
/// GeoKeys, referenced by the property. Since keys
/// defined in the GeoKeyDirectoryTag use offsets into this tag, any special
/// comments may be placed at the beginning of this tag.
/// For the most part, the only keys that are valued are
/// Citation keys, giving documentation and references for obscure
/// projections, datums, etc.
///
/// Special handling is required for -valued keys. While it
/// is true that TIFF 6.0 permits multiple NULL-delimited strings within a single
/// ASCII tag, the secondary strings might not appear in the output of naive
/// tiffdump programs. For this reason, the NULL delimiter of each ASCII key
/// value shall be converted to a "|" (pipe) character before being installed
/// back into the holding tag, so that a dump of the tag
/// will look like this.
///
/// AsciiTag="first_value|second_value|etc...last_value|"
///
/// A baseline GeoTIFF-reader must check for and convert the final "|" pipe
/// character of a key back into a NULL before returning it to the client
/// software.
///
///
Handling of null values
/// A null value indicates, that the corresponding metadata tag is not
/// present in the metadata model.
/// Setting this property's value to a non-null reference creates the
/// metadata tag if necessary.
/// Setting this property's value to a null reference deletes the
/// metadata tag from the metadata model.
///
public string GeoASCIIParams
{
get
{
string text = GetTagText("GeoASCIIParams");
if (!string.IsNullOrEmpty(text))
{
text = text.Substring(0, text.Length - 1);
}
return text;
}
set
{
if (value != null)
{
value += '\0';
}
SetTagValue("GeoASCIIParams", value);
}
}
///
/// Gets or sets the value of the GeoTIFF GeoDoubleParamsTag.
///
///
/// The GeoDoubleParamsTag is used to store all of the valued
/// GeoKeys, referenced by the property. The meaning of
/// any value of this double array is determined from the GeoKeyDirectoryTag reference
/// pointing to it. values should first be converted to
/// and stored here.
///
///
Handling of null values
/// A null value indicates, that the corresponding metadata tag is not
/// present in the metadata model.
/// Setting this property's value to a non-null reference creates the
/// metadata tag if necessary.
/// Setting this property's value to a null reference deletes the
/// metadata tag from the metadata model.
///
public double[] GeoDoubleParams
{
get
{
return GetTagArray("GeoDoubleParams");
}
set
{
SetTagValue("GeoDoubleParams", value);
}
}
///
/// Gets or sets the value of the GeoTIFF GeoKeyDirectoryTag.
///
///
/// The GeoKeyDirectoryTag may be used to store the GeoKey Directory, which defines and
/// references the GeoKeys.
///
/// The tag is an array of unsigned values, which are primarily
/// grouped into blocks of 4. The first 4 values are special, and contain GeoKey directory
/// header information. The header values consist of the following information, in order:
///
/// Header={KeyDirectoryVersion, KeyRevision, MinorRevision, NumberOfKeys}
///
/// where
///
/// KeyDirectoryVersion indicates the current version of Key implementation, and will
/// only change if this Tag's Key structure is changed. (Similar to the TIFFVersion (42)).
/// The current DirectoryVersion number is 1. This value will most likely never change,
/// and may be used to ensure that this is a valid Key-implementation.
///
/// KeyRevision indicates what revision of Key-Sets are used.
///
/// MinorRevision indicates what set of Key-Codes are used. The complete revision number
/// is denoted <KeyRevision>.<MinorRevision>.
///
/// NumberOfKeys indicates how many Keys are defined by the rest of this Tag.
///
/// This header is immediately followed by a collection of <NumberOfKeys> KeyEntry
/// sets, each of which is also 4- long. Each KeyEntry is modeled on the
/// TIFFEntry format of the TIFF directory header, and is of the form:
///
/// KeyEntry = { KeyID, TIFFTagLocation, Count, Value_Offset }
///
/// where
///
/// KeyID gives the Key-ID value of the Key (identical in function to TIFF tag ID,
/// but completely independent of TIFF tag-space),
///
/// TIFFTagLocation indicates which TIFF tag contains the value(s) of the Key: if
/// TIFFTagLocation is 0, then the value is , and is contained in the
/// Value_Offset entry. Otherwise, the type (format) of the value is implied by the
/// TIFF-Type of the tag containing the value.
///
/// Count indicates the number of values in this key.
///
/// Value_Offset Value_Offset indicates the index-offset into the TagArray indicated
/// by TIFFTagLocation, if it is nonzero. If TIFFTagLocation is 0 (zero) , then Value_Offset
/// contains the actual () value of the Key, and Count=1 is implied.
/// Note that the offset is not a byte-offset, but rather an index based on the natural data
/// type of the specified tag array.
///
/// Following the KeyEntry definitions, the KeyDirectory tag may also contain additional
/// values. For example, if a key requires multiple values, they shall
/// be placed at the end of this tag, and the KeyEntry will set
/// TIFFTagLocation=GeoKeyDirectoryTag, with the Value_Offset pointing to the location of the
/// value(s).
///
///
Handling of null values
/// A null value indicates, that the corresponding metadata tag is not
/// present in the metadata model.
/// Setting this property's value to a non-null reference creates the
/// metadata tag if necessary.
/// Setting this property's value to a null reference deletes the
/// metadata tag from the metadata model.
///
public ushort[] GeoKeyDirectory
{
get
{
return GetTagArray("GeoKeyDirectory");
}
set
{
SetTagValue("GeoKeyDirectory", value);
}
}
///
/// Gets or sets the value of the GeoTIFF ModelPixelScaleTag.
///
///
/// The ModelPixelScaleTag tag may be used to specify the size of raster pixel spacing
/// in the model space units, when the raster space can be embedded in the model space
/// coordinate system without rotation, and consists of the following 3 values:
///
/// ModelPixelScaleTag = (ScaleX, ScaleY, ScaleZ)
///
/// where ScaleX and ScaleY give the horizontal and vertical spacing of
/// raster pixels. The ScaleZ is primarily used to map the pixel value of a
/// digital elevation model into the correct Z-scale, and so for most other purposes
/// this value should be zero (since most model spaces are 2-D, with Z=0).
///
/// A single tiepoint in the tag, together with this tag,
/// completely determine the relationship between raster and model space; thus they
/// comprise the two tags which Baseline GeoTIFF files most often will use to place a
/// raster image into a "standard position" in model space.
///
/// Like the tag, this tag information is independent of the
/// XPosition, YPosition, Resolution and Orientation tags of the standard TIFF 6.0 spec.
/// However, simple reversals of orientation between raster and model space
/// (e.g. horizontal or vertical flips) may be indicated by reversal of sign in the
/// corresponding component of the ModelPixelScaleTag. GeoTIFF compliant readers must
/// honor this signreversal convention.
///
/// This tag must not be used if the raster image requires rotation or shearing to place
/// it into the standard model space. In such cases the transformation shall be defined
/// with the more general .
///
///
Naming differences
/// In the native FreeImage library and thus, in the FreeImage API documentation, this
/// property's key is named GeoPixelScale. Since the GeoTIFF specification
/// as well as Java's EXIFTIFFTagSet class call this tag
/// , this property was renamed accordingly.
/// However, when accessing this property's tag by its object,
/// the native FreeImage tag key GeoPixelScale must be used.
///
///
Handling of null values
/// A null value indicates, that the corresponding metadata tag is not
/// present in the metadata model.
/// Setting this property's value to a non-null reference creates the
/// metadata tag if necessary.
/// Setting this property's value to a null reference deletes the
/// metadata tag from the metadata model.
///
public double[] ModelPixelScale
{
get
{
return GetTagArray("GeoPixelScale");
}
set
{
SetTagValue("GeoPixelScale", value);
}
}
///
/// Gets or sets the value of the GeoTIFF GeoTiePointsTag.
///
///
/// The GeoTiePointsTag stores raster -> model tiepoint pairs in the order
///
/// ModelTiePoints = (...,I,J,K, X,Y,Z...),
///
/// where (I,J,K) is the point at location (I,J) in raster space with
/// pixel-value K, and (X,Y,Z) is a vector in model space. In most cases
/// the model space is only two-dimensional, in which case both K and Z should be set
/// to zero; this third dimension is provided in anticipation of future support for 3D
/// digital elevation models and vertical coordinate systems.
///
/// A raster image may be georeferenced simply by specifying its location, size and
/// orientation in the model coordinate space M. This may be done by specifying the
/// location of three of the four bounding corner points. However, tiepoints are only
/// to be considered exact at the points specified; thus defining such a set of
/// bounding tiepoints does not imply that the model space locations of the interior
/// of the image may be exactly computed by a linear interpolation of these tiepoints.
///
/// However, since the relationship between the Raster space and the model space will
/// often be an exact, affine transformation, this relationship can be defined using
/// one set of tiepoints and the , described below, which
/// gives the vertical and horizontal raster grid cell size, specified in model units.
///
/// If possible, the first tiepoint placed in this tag shall be the one establishing
/// the location of the point (0,0) in raster space. However, if this is not possible
/// (for example, if (0,0) is goes to a part of model space in which the projection is
/// ill-defined), then there is no particular order in which the tiepoints need be
/// listed.
///
/// For orthorectification or mosaicking applications a large number of tiepoints may
/// be specified on a mesh over the raster image. However, the definition of associated
/// grid interpolation methods is not in the scope of the current GeoTIFF spec.
///
///
Naming differences
/// In the native FreeImage library and thus, in the FreeImage API documentation, this
/// property's key is named GeoTiePoints. Since the GeoTIFF specification
/// as well as Java's EXIFTIFFTagSet class call this tag
/// , this property was renamed accordingly.
/// However, when accessing this property's tag by its object,
/// the native FreeImage tag key GeoTiePoints must be used.
///
///
Handling of null values
/// A null value indicates, that the corresponding metadata tag is not
/// present in the metadata model.
/// Setting this property's value to a non-null reference creates the
/// metadata tag if necessary.
/// Setting this property's value to a null reference deletes the
/// metadata tag from the metadata model.
///
public double[] ModelTiePoints
{
get
{
return GetTagArray("GeoTiePoints");
}
set
{
SetTagValue("GeoTiePoints", value);
}
}
///
/// Gets or sets the value of the GeoTIFF ModelTransformationMatrixTag.
///
///
/// This tag may be used to specify the transformation matrix between the raster space
/// (and its dependent pixel-value space) and the (possibly 3D) model space.
///
///
Naming differences
/// In the native FreeImage library and thus, in the FreeImage API documentation, this
/// property's key is named GeoTransformationMatrix. Since the GeoTIFF specification
/// as well as Java's EXIFTIFFTagSet class call this tag
/// , this property was renamed accordingly.
/// However, when accessing this property's tag by its object,
/// the native FreeImage tag key GeoTransformationMatrix must be used.
///
///
Handling of null values
/// A null value indicates, that the corresponding metadata tag is not
/// present in the metadata model.
/// Setting this property's value to a non-null reference creates the
/// metadata tag if necessary.
/// Setting this property's value to a null reference deletes the
/// metadata tag from the metadata model.
///
public double[] ModelTransformationMatrix
{
get
{
return GetTagArray("GeoTransformationMatrix");
}
set
{
SetTagValue("GeoTransformationMatrix", value);
}
}
///
/// Gets or sets the value of the GeoTIFF IntergraphTransformationMatrixTag.
///
///
/// The IntergraphTransformationMatrixTag conflicts with an internal software implementation
/// at Intergraph, and so its use is no longer encouraged. A GeoTIFF reader should look first
/// for the new tag, and only if it is not found should it check for this older tag. If found,
/// it should only consider it to be contain valid GeoTIFF matrix information if the tag-count
/// is 16; the Intergraph version uses 17 values.
///
///
Handling of null values
/// A null value indicates, that the corresponding metadata tag is not
/// present in the metadata model.
/// Setting this property's value to a non-null reference creates the
/// metadata tag if necessary.
/// Setting this property's value to a null reference deletes the
/// metadata tag from the metadata model.
///
public double[] IntergraphTransformationMatrix
{
get
{
return GetTagArray("Intergraph TransformationMatrix");
}
set
{
SetTagValue("Intergraph TransformationMatrix", value);
}
}
///
/// Gets or sets the value of the GeoTIFF JPLCartoIFDOffsetTag.
///
///
/// Handling of null values
/// A null value indicates, that the corresponding metadata tag is not
/// present in the metadata model.
/// Setting this property's value to a non-null reference creates the
/// metadata tag if necessary.
/// Setting this property's value to a null reference deletes the
/// metadata tag from the metadata model.
///
public uint? JPLCartoIFDOffset
{
get
{
return GetTagValue("JPL Carto IFD offset");
}
set
{
SetTagValue("JPL Carto IFD offset", value);
}
}
}
///
/// Represents a collection of all tags contained in the metadata model
/// .
///
public class MDM_IPTC : MetadataModel
{
///
/// Initializes a new instance of this class.
///
/// Handle to a FreeImage bitmap.
public MDM_IPTC(FIBITMAP dib) : base(dib) { }
///
/// Retrieves the datamodel that this instance represents.
///
///
/// Handling of null values
/// A null value indicates, that the corresponding metadata tag is not
/// present in the metadata model.
/// Setting this property's value to a non-null reference creates the
/// metadata tag if necessary.
/// Setting this property's value to a null reference deletes the
/// metadata tag from the metadata model.
///
public override FREE_IMAGE_MDMODEL Model
{
get { return FREE_IMAGE_MDMODEL.FIMD_IPTC; }
}
///
/// Gets the Application Record Version.
///
///
/// Handling of null values
/// A null value indicates, that the corresponding metadata tag is not
/// present in the metadata model.
/// Setting this property's value to a non-null reference creates the
/// metadata tag if necessary.
/// Setting this property's value to a null reference deletes the
/// metadata tag from the metadata model.
///
public short? ApplicationRecordVersion
{
get
{
return GetTagValue("ApplicationRecordVersion");
}
}
///
/// Gets or sets the value of the IPTC/NAA tag Object Type Reference.
///
///
/// Handling of null values
/// A null value indicates, that the corresponding metadata tag is not
/// present in the metadata model.
/// Setting this property's value to a non-null reference creates the
/// metadata tag if necessary.
/// Setting this property's value to a null reference deletes the
/// metadata tag from the metadata model.
///
public string ObjectTypeReference
{
get
{
return GetTagText("ObjectTypeReference");
}
set
{
SetTagValue("ObjectTypeReference", value);
}
}
///
/// Gets or sets the value of the IPTC/NAA tag Object Attribute Reference.
///
///
/// Handling of null values
/// A null value indicates, that the corresponding metadata tag is not
/// present in the metadata model.
/// Setting this property's value to a non-null reference creates the
/// metadata tag if necessary.
/// Setting this property's value to a null reference deletes the
/// metadata tag from the metadata model.
///
public string ObjectAttributeReference
{
get
{
return GetTagText("ObjectAttributeReference");
}
set
{
SetTagValue("ObjectAttributeReference", value);
}
}
///
/// Gets or sets the value of the IPTC/NAA tag Object Name.
/// This is also referred to as Title.
///
///
/// Handling of null values
/// A null value indicates, that the corresponding metadata tag is not
/// present in the metadata model.
/// Setting this property's value to a non-null reference creates the
/// metadata tag if necessary.
/// Setting this property's value to a null reference deletes the
/// metadata tag from the metadata model.
///
public string ObjectName
{
get
{
return GetTagText("ObjectName");
}
set
{
SetTagValue("ObjectName", value);
}
}
///
/// Gets or sets the value of the IPTC/NAA tag Edit Status.
///
///
/// Handling of null values
/// A null value indicates, that the corresponding metadata tag is not
/// present in the metadata model.
/// Setting this property's value to a non-null reference creates the
/// metadata tag if necessary.
/// Setting this property's value to a null reference deletes the
/// metadata tag from the metadata model.
///
public string EditStatus
{
get
{
return GetTagText("EditStatus");
}
set
{
SetTagValue("EditStatus", value);
}
}
///
/// Gets or sets the value of the IPTC/NAA tag Editorial Update.
///
///
/// Handling of null values
/// A null value indicates, that the corresponding metadata tag is not
/// present in the metadata model.
/// Setting this property's value to a non-null reference creates the
/// metadata tag if necessary.
/// Setting this property's value to a null reference deletes the
/// metadata tag from the metadata model.
///
public string EditorialUpdate
{
get
{
return GetTagText("EditorialUpdate");
}
set
{
SetTagValue("EditorialUpdate", value);
}
}
///
/// Gets or sets the value of the IPTC/NAA tag Urgency.
///
///
/// Handling of null values
/// A null value indicates, that the corresponding metadata tag is not
/// present in the metadata model.
/// Setting this property's value to a non-null reference creates the
/// metadata tag if necessary.
/// Setting this property's value to a null reference deletes the
/// metadata tag from the metadata model.
///
public string Urgency
{
get
{
return GetTagText("Urgency");
}
set
{
SetTagValue("Urgency", value);
}
}
///
/// Gets or sets the value of the IPTC/NAA tag Subject Reference.
///
///
/// Handling of null values
/// A null value indicates, that the corresponding metadata tag is not
/// present in the metadata model.
/// Setting this property's value to a non-null reference creates the
/// metadata tag if necessary.
/// Setting this property's value to a null reference deletes the
/// metadata tag from the metadata model.
///
public string SubjectReference
{
get
{
return GetTagText("SubjectReference");
}
set
{
SetTagValue("SubjectReference", value);
}
}
///
/// Gets or sets the value of the IPTC/NAA tag Category.
///
///
/// Handling of null values
/// A null value indicates, that the corresponding metadata tag is not
/// present in the metadata model.
/// Setting this property's value to a non-null reference creates the
/// metadata tag if necessary.
/// Setting this property's value to a null reference deletes the
/// metadata tag from the metadata model.
///
public string Category
{
get
{
return GetTagText("Category");
}
set
{
SetTagValue("Category", value);
}
}
///
/// Gets or sets the value of the IPTC/NAA tag Supplemental Categories.
///
///
/// Handling of null values
/// A null value indicates, that the corresponding metadata tag is not
/// present in the metadata model.
/// Setting this property's value to a non-null reference creates the
/// metadata tag if necessary.
/// Setting this property's value to a null reference deletes the
/// metadata tag from the metadata model.
///
public string SupplementalCategories
{
get
{
return GetTagText("SupplementalCategories");
}
set
{
SetTagValue("SupplementalCategories", value);
}
}
///
/// Gets or sets the value of the IPTC/NAA tag Fixture Identifier.
///
///
/// Handling of null values
/// A null value indicates, that the corresponding metadata tag is not
/// present in the metadata model.
/// Setting this property's value to a non-null reference creates the
/// metadata tag if necessary.
/// Setting this property's value to a null reference deletes the
/// metadata tag from the metadata model.
///
public string FixtureIdentifier
{
get
{
return GetTagText("FixtureIdentifier");
}
set
{
SetTagValue("FixtureIdentifier", value);
}
}
///
/// Gets or sets the value of the IPTC/NAA tag Keywords.
///
///
/// Handling of null values
/// A null value indicates, that the corresponding metadata tag is not
/// present in the metadata model.
/// Setting this property's value to a non-null reference creates the
/// metadata tag if necessary.
/// Setting this property's value to a null reference deletes the
/// metadata tag from the metadata model.
///
public string Keywords
{
get
{
return GetTagText("Keywords");
}
set
{
SetTagValue("Keywords", value);
}
}
///
/// Gets or sets the value of the IPTC/NAA tag Content Location Code.
///
///
/// Handling of null values
/// A null value indicates, that the corresponding metadata tag is not
/// present in the metadata model.
/// Setting this property's value to a non-null reference creates the
/// metadata tag if necessary.
/// Setting this property's value to a null reference deletes the
/// metadata tag from the metadata model.
///
public string ContentLocationCode
{
get
{
return GetTagText("ContentLocationCode");
}
set
{
SetTagValue("ContentLocationCode", value);
}
}
///
/// Gets or sets the value of the IPTC/NAA tag Content Location Name.
///
///
/// Handling of null values
/// A null value indicates, that the corresponding metadata tag is not
/// present in the metadata model.
/// Setting this property's value to a non-null reference creates the
/// metadata tag if necessary.
/// Setting this property's value to a null reference deletes the
/// metadata tag from the metadata model.
///
public string ContentLocationName
{
get
{
return GetTagText("ContentLocationName");
}
set
{
SetTagValue("ContentLocationName", value);
}
}
///
/// Gets or sets the value of the IPTC/NAA tag Release Date.
///
///
/// Handling of null values
/// A null value indicates, that the corresponding metadata tag is not
/// present in the metadata model.
/// Setting this property's value to a non-null reference creates the
/// metadata tag if necessary.
/// Setting this property's value to a null reference deletes the
/// metadata tag from the metadata model.
///
public string ReleaseDate
{
get
{
return GetTagText("ReleaseDate");
}
set
{
SetTagValue("ReleaseDate", value);
}
}
///
/// Gets or sets the value of the IPTC/NAA tag Release Time.
///
///
/// Handling of null values
/// A null value indicates, that the corresponding metadata tag is not
/// present in the metadata model.
/// Setting this property's value to a non-null reference creates the
/// metadata tag if necessary.
/// Setting this property's value to a null reference deletes the
/// metadata tag from the metadata model.
///
public string ReleaseTime
{
get
{
return GetTagText("ReleaseTime");
}
set
{
SetTagValue("ReleaseTime", value);
}
}
///
/// Gets or sets the value of the IPTC/NAA tag Expiration Date.
///
///
/// Handling of null values
/// A null value indicates, that the corresponding metadata tag is not
/// present in the metadata model.
/// Setting this property's value to a non-null reference creates the
/// metadata tag if necessary.
/// Setting this property's value to a null reference deletes the
/// metadata tag from the metadata model.
///
public string ExpirationDate
{
get
{
return GetTagText("ExpirationDate");
}
set
{
SetTagValue("ExpirationDate", value);
}
}
///
/// Gets or sets the value of the IPTC/NAA tag Expiration Time.
///
///
/// Handling of null values
/// A null value indicates, that the corresponding metadata tag is not
/// present in the metadata model.
/// Setting this property's value to a non-null reference creates the
/// metadata tag if necessary.
/// Setting this property's value to a null reference deletes the
/// metadata tag from the metadata model.
///
public string ExpirationTime
{
get
{
return GetTagText("ExpirationTime");
}
set
{
SetTagValue("ExpirationTime", value);
}
}
///
/// Gets or sets the value of the IPTC/NAA tag Special Instructions.
///
///
/// Handling of null values
/// A null value indicates, that the corresponding metadata tag is not
/// present in the metadata model.
/// Setting this property's value to a non-null reference creates the
/// metadata tag if necessary.
/// Setting this property's value to a null reference deletes the
/// metadata tag from the metadata model.
///
public string SpecialInstructions
{
get
{
return GetTagText("SpecialInstructions");
}
set
{
SetTagValue("SpecialInstructions", value);
}
}
///
/// Gets or sets the value of the IPTC/NAA tag Action Advised.
///
///
/// Handling of null values
/// A null value indicates, that the corresponding metadata tag is not
/// present in the metadata model.
/// Setting this property's value to a non-null reference creates the
/// metadata tag if necessary.
/// Setting this property's value to a null reference deletes the
/// metadata tag from the metadata model.
///
public string ActionAdvised
{
get
{
return GetTagText("ActionAdvised");
}
set
{
SetTagValue("ActionAdvised", value);
}
}
///
/// Gets or sets the value of the IPTC/NAA tag Reference Service.
///
///
/// Handling of null values
/// A null value indicates, that the corresponding metadata tag is not
/// present in the metadata model.
/// Setting this property's value to a non-null reference creates the
/// metadata tag if necessary.
/// Setting this property's value to a null reference deletes the
/// metadata tag from the metadata model.
///
public string ReferenceService
{
get
{
return GetTagText("ReferenceService");
}
set
{
SetTagValue("ReferenceService", value);
}
}
///
/// Gets or sets the value of the IPTC/NAA tag Reference Date.
///
///
/// Handling of null values
/// A null value indicates, that the corresponding metadata tag is not
/// present in the metadata model.
/// Setting this property's value to a non-null reference creates the
/// metadata tag if necessary.
/// Setting this property's value to a null reference deletes the
/// metadata tag from the metadata model.
///
public string ReferenceDate
{
get
{
return GetTagText("ReferenceDate");
}
set
{
SetTagValue("ReferenceDate", value);
}
}
///
/// Gets or sets the value of the IPTC/NAA tag Reference Number.
///
///
/// Handling of null values
/// A null value indicates, that the corresponding metadata tag is not
/// present in the metadata model.
/// Setting this property's value to a non-null reference creates the
/// metadata tag if necessary.
/// Setting this property's value to a null reference deletes the
/// metadata tag from the metadata model.
///
public string ReferenceNumber
{
get
{
return GetTagText("ReferenceNumber");
}
set
{
SetTagValue("ReferenceNumber", value);
}
}
///
/// Gets or sets the value of the IPTC/NAA tag Date Created.
///
///
/// Handling of null values
/// A null value indicates, that the corresponding metadata tag is not
/// present in the metadata model.
/// Setting this property's value to a non-null reference creates the
/// metadata tag if necessary.
/// Setting this property's value to a null reference deletes the
/// metadata tag from the metadata model.
///
public string DateCreated
{
get
{
return GetTagText("DateCreated");
}
set
{
SetTagValue("DateCreated", value);
}
}
///
/// Gets or sets the value of the IPTC/NAA tag Time Created.
///
///
/// Handling of null values
/// A null value indicates, that the corresponding metadata tag is not
/// present in the metadata model.
/// Setting this property's value to a non-null reference creates the
/// metadata tag if necessary.
/// Setting this property's value to a null reference deletes the
/// metadata tag from the metadata model.
///
public string TimeCreated
{
get
{
return GetTagText("TimeCreated");
}
set
{
SetTagValue("TimeCreated", value);
}
}
///
/// Gets or sets the value of the IPTC/NAA tag Digital Creation Date.
///
///
/// Handling of null values
/// A null value indicates, that the corresponding metadata tag is not
/// present in the metadata model.
/// Setting this property's value to a non-null reference creates the
/// metadata tag if necessary.
/// Setting this property's value to a null reference deletes the
/// metadata tag from the metadata model.
///
public string DigitalCreationDate
{
get
{
return GetTagText("DigitalCreationDate");
}
set
{
SetTagValue("DigitalCreationDate", value);
}
}
///
/// Gets or sets the value of the IPTC/NAA tag Digital Creation Time.
///
///
/// Handling of null values
/// A null value indicates, that the corresponding metadata tag is not
/// present in the metadata model.
/// Setting this property's value to a non-null reference creates the
/// metadata tag if necessary.
/// Setting this property's value to a null reference deletes the
/// metadata tag from the metadata model.
///
public string DigitalCreationTime
{
get
{
return GetTagText("DigitalCreationTime");
}
set
{
SetTagValue("DigitalCreationTime", value);
}
}
///
/// Gets or sets the value of the IPTC/NAA tag Originating Program.
///
///
/// Handling of null values
/// A null value indicates, that the corresponding metadata tag is not
/// present in the metadata model.
/// Setting this property's value to a non-null reference creates the
/// metadata tag if necessary.
/// Setting this property's value to a null reference deletes the
/// metadata tag from the metadata model.
///
public string OriginatingProgram
{
get
{
return GetTagText("OriginatingProgram");
}
set
{
SetTagValue("OriginatingProgram", value);
}
}
///
/// Gets or sets the value of the IPTC/NAA tag Program Version.
///
///
/// Handling of null values
/// A null value indicates, that the corresponding metadata tag is not
/// present in the metadata model.
/// Setting this property's value to a non-null reference creates the
/// metadata tag if necessary.
/// Setting this property's value to a null reference deletes the
/// metadata tag from the metadata model.
///
public string ProgramVersion
{
get
{
return GetTagText("ProgramVersion");
}
set
{
SetTagValue("ProgramVersion", value);
}
}
///
/// Gets or sets the value of the IPTC/NAA tag Object Cycle.
///
///
/// Handling of null values
/// A null value indicates, that the corresponding metadata tag is not
/// present in the metadata model.
/// Setting this property's value to a non-null reference creates the
/// metadata tag if necessary.
/// Setting this property's value to a null reference deletes the
/// metadata tag from the metadata model.
///
public string ObjectCycle
{
get
{
return GetTagText("ObjectCycle");
}
set
{
SetTagValue("ObjectCycle", value);
}
}
///
/// Gets or sets the value of the IPTC/NAA tag By Line.
/// This is the author's name.
///
///
/// Handling of null values
/// A null value indicates, that the corresponding metadata tag is not
/// present in the metadata model.
/// Setting this property's value to a non-null reference creates the
/// metadata tag if necessary.
/// Setting this property's value to a null reference deletes the
/// metadata tag from the metadata model.
///
public string ByLine
{
get
{
return GetTagText("By-line");
}
set
{
SetTagValue("By-line", value);
}
}
///
/// Gets or sets the value of the IPTC/NAA tag By Line Title.
/// This is the author's position.
///
///
/// Handling of null values
/// A null value indicates, that the corresponding metadata tag is not
/// present in the metadata model.
/// Setting this property's value to a non-null reference creates the
/// metadata tag if necessary.
/// Setting this property's value to a null reference deletes the
/// metadata tag from the metadata model.
///
public string ByLineTitle
{
get
{
return GetTagText("By-lineTitle");
}
set
{
SetTagValue("By-lineTitle", value);
}
}
///
/// Gets or sets the value of the IPTC/NAA tag City.
///
///
/// Handling of null values
/// A null value indicates, that the corresponding metadata tag is not
/// present in the metadata model.
/// Setting this property's value to a non-null reference creates the
/// metadata tag if necessary.
/// Setting this property's value to a null reference deletes the
/// metadata tag from the metadata model.
///
public string City
{
get
{
return GetTagText("City");
}
set
{
SetTagValue("City", value);
}
}
///
/// Gets or sets the value of the IPTC/NAA tag Sub Location.
///
///
/// Handling of null values
/// A null value indicates, that the corresponding metadata tag is not
/// present in the metadata model.
/// Setting this property's value to a non-null reference creates the
/// metadata tag if necessary.
/// Setting this property's value to a null reference deletes the
/// metadata tag from the metadata model.
///
public string SubLocation
{
get
{
return GetTagText("SubLocation");
}
set
{
SetTagValue("SubLocation", value);
}
}
///
/// Gets or sets the value of the IPTC/NAA tag Province State.
///
///
/// Handling of null values
/// A null value indicates, that the corresponding metadata tag is not
/// present in the metadata model.
/// Setting this property's value to a non-null reference creates the
/// metadata tag if necessary.
/// Setting this property's value to a null reference deletes the
/// metadata tag from the metadata model.
///
public string ProvinceState
{
get
{
return GetTagText("ProvinceState");
}
set
{
SetTagValue("ProvinceState", value);
}
}
///
/// Gets or sets the value of the IPTC/NAA tag Country Primary Location Code.
///
///
/// Handling of null values
/// A null value indicates, that the corresponding metadata tag is not
/// present in the metadata model.
/// Setting this property's value to a non-null reference creates the
/// metadata tag if necessary.
/// Setting this property's value to a null reference deletes the
/// metadata tag from the metadata model.
///
public string CountryPrimaryLocationCode
{
get
{
return GetTagText("Country-PrimaryLocationCode");
}
set
{
SetTagValue("Country-PrimaryLocationCode", value);
}
}
///
/// Gets or sets the value of the IPTC/NAA tag Country Primary Location Name.
///
///
/// Handling of null values
/// A null value indicates, that the corresponding metadata tag is not
/// present in the metadata model.
/// Setting this property's value to a non-null reference creates the
/// metadata tag if necessary.
/// Setting this property's value to a null reference deletes the
/// metadata tag from the metadata model.
///
public string CountryPrimaryLocationName
{
get
{
return GetTagText("Country-PrimaryLocationName");
}
set
{
SetTagValue("Country-PrimaryLocationName", value);
}
}
///
/// Gets or sets the value of the IPTC/NAA tag Original Transmission Reference.
///
///
/// Handling of null values
/// A null value indicates, that the corresponding metadata tag is not
/// present in the metadata model.
/// Setting this property's value to a non-null reference creates the
/// metadata tag if necessary.
/// Setting this property's value to a null reference deletes the
/// metadata tag from the metadata model.
///
public string OriginalTransmissionReference
{
get
{
return GetTagText("OriginalTransmissionReference");
}
set
{
SetTagValue("OriginalTransmissionReference", value);
}
}
///
/// Gets or sets the value of the IPTC/NAA tag Headline.
///
///
/// Handling of null values
/// A null value indicates, that the corresponding metadata tag is not
/// present in the metadata model.
/// Setting this property's value to a non-null reference creates the
/// metadata tag if necessary.
/// Setting this property's value to a null reference deletes the
/// metadata tag from the metadata model.
///
public string Headline
{
get
{
return GetTagText("Headline");
}
set
{
SetTagValue("Headline", value);
}
}
///
/// Gets or sets the value of the IPTC/NAA tag Credit.
///
///
/// Handling of null values
/// A null value indicates, that the corresponding metadata tag is not
/// present in the metadata model.
/// Setting this property's value to a non-null reference creates the
/// metadata tag if necessary.
/// Setting this property's value to a null reference deletes the
/// metadata tag from the metadata model.
///
public string Credit
{
get
{
return GetTagText("Credit");
}
set
{
SetTagValue("Credit", value);
}
}
///
/// Gets or sets the value of the IPTC/NAA tag Source.
///
///
/// Handling of null values
/// A null value indicates, that the corresponding metadata tag is not
/// present in the metadata model.
/// Setting this property's value to a non-null reference creates the
/// metadata tag if necessary.
/// Setting this property's value to a null reference deletes the
/// metadata tag from the metadata model.
///
public string Source
{
get
{
return GetTagText("Source");
}
set
{
SetTagValue("Source", value);
}
}
///
/// Gets or sets the value of the IPTC/NAA tag Copyright Notice.
///
///
/// Handling of null values
/// A null value indicates, that the corresponding metadata tag is not
/// present in the metadata model.
/// Setting this property's value to a non-null reference creates the
/// metadata tag if necessary.
/// Setting this property's value to a null reference deletes the
/// metadata tag from the metadata model.
///
public string CopyrightNotice
{
get
{
return GetTagText("CopyrightNotice");
}
set
{
SetTagValue("CopyrightNotice", value);
}
}
///
/// Gets or sets the value of the IPTC/NAA tag Contact.
///
///
/// Handling of null values
/// A null value indicates, that the corresponding metadata tag is not
/// present in the metadata model.
/// Setting this property's value to a non-null reference creates the
/// metadata tag if necessary.
/// Setting this property's value to a null reference deletes the
/// metadata tag from the metadata model.
///
public string Contact
{
get
{
return GetTagText("Contact");
}
set
{
SetTagValue("Contact", value);
}
}
///
/// Gets or sets the value of the IPTC/NAA tag Caption Abstract.
///
///
/// Handling of null values
/// A null value indicates, that the corresponding metadata tag is not
/// present in the metadata model.
/// Setting this property's value to a non-null reference creates the
/// metadata tag if necessary.
/// Setting this property's value to a null reference deletes the
/// metadata tag from the metadata model.
///
public string CaptionAbstract
{
get
{
return GetTagText("CaptionAbstract");
}
set
{
SetTagValue("CaptionAbstract", value);
}
}
///
/// Gets or sets the value of the IPTC/NAA tag Writer Editor.
/// This is also referred to as Caption Writer.
///
///
/// Handling of null values
/// A null value indicates, that the corresponding metadata tag is not
/// present in the metadata model.
/// Setting this property's value to a non-null reference creates the
/// metadata tag if necessary.
/// Setting this property's value to a null reference deletes the
/// metadata tag from the metadata model.
///
public string WriterEditor
{
get
{
return GetTagText("WriterEditor");
}
set
{
SetTagValue("WriterEditor", value);
}
}
///
/// Gets or sets the value of the IPTC/NAA tag Rasterized Caption.
///
///
/// Handling of null values
/// A null value indicates, that the corresponding metadata tag is not
/// present in the metadata model.
/// Setting this property's value to a non-null reference creates the
/// metadata tag if necessary.
/// Setting this property's value to a null reference deletes the
/// metadata tag from the metadata model.
///
public string RasterizedCaption
{
get
{
return GetTagText("RasterizedCaption");
}
set
{
SetTagValue("RasterizedCaption", value);
}
}
///
/// Gets or sets the value of the IPTC/NAA tag Image Type.
///
///
/// Handling of null values
/// A null value indicates, that the corresponding metadata tag is not
/// present in the metadata model.
/// Setting this property's value to a non-null reference creates the
/// metadata tag if necessary.
/// Setting this property's value to a null reference deletes the
/// metadata tag from the metadata model.
///
public string ImageType
{
get
{
return GetTagText("ImageType");
}
set
{
SetTagValue("ImageType", value);
}
}
///
/// Gets or sets the value of the IPTC/NAA tag Image Orientation.
///
///
/// Handling of null values
/// A null value indicates, that the corresponding metadata tag is not
/// present in the metadata model.
/// Setting this property's value to a non-null reference creates the
/// metadata tag if necessary.
/// Setting this property's value to a null reference deletes the
/// metadata tag from the metadata model.
///
public string ImageOrientation
{
get
{
return GetTagText("ImageOrientation");
}
set
{
SetTagValue("ImageOrientation", value);
}
}
///
/// Gets or sets the value of the IPTC/NAA tag Language Identifier.
///
///
/// Handling of null values
/// A null value indicates, that the corresponding metadata tag is not
/// present in the metadata model.
/// Setting this property's value to a non-null reference creates the
/// metadata tag if necessary.
/// Setting this property's value to a null reference deletes the
/// metadata tag from the metadata model.
///
public string LanguageIdentifier
{
get
{
return GetTagText("LanguageIdentifier");
}
set
{
SetTagValue("LanguageIdentifier", value);
}
}
///
/// Gets or sets the value of the IPTC/NAA tag Audio Type.
///
///
/// Handling of null values
/// A null value indicates, that the corresponding metadata tag is not
/// present in the metadata model.
/// Setting this property's value to a non-null reference creates the
/// metadata tag if necessary.
/// Setting this property's value to a null reference deletes the
/// metadata tag from the metadata model.
///
public string AudioType
{
get
{
return GetTagText("AudioType");
}
set
{
SetTagValue("AudioType", value);
}
}
///
/// Gets or sets the value of the IPTC/NAA tag Audio Sampling Rate.
///
///
/// Handling of null values
/// A null value indicates, that the corresponding metadata tag is not
/// present in the metadata model.
/// Setting this property's value to a non-null reference creates the
/// metadata tag if necessary.
/// Setting this property's value to a null reference deletes the
/// metadata tag from the metadata model.
///
public string AudioSamplingRate
{
get
{
return GetTagText("AudioSamplingRate");
}
set
{
SetTagValue("AudioSamplingRate", value);
}
}
///
/// Gets or sets the value of the IPTC/NAA tag Audio Sampling Resolution.
///
///
/// Handling of null values
/// A null value indicates, that the corresponding metadata tag is not
/// present in the metadata model.
/// Setting this property's value to a non-null reference creates the
/// metadata tag if necessary.
/// Setting this property's value to a null reference deletes the
/// metadata tag from the metadata model.
///
public string AudioSamplingResolution
{
get
{
return GetTagText("AudioSamplingResolution");
}
set
{
SetTagValue("AudioSamplingResolution", value);
}
}
///
/// Gets or sets the value of the IPTC/NAA tag Audio Duration.
///
///
/// Handling of null values
/// A null value indicates, that the corresponding metadata tag is not
/// present in the metadata model.
/// Setting this property's value to a non-null reference creates the
/// metadata tag if necessary.
/// Setting this property's value to a null reference deletes the
/// metadata tag from the metadata model.
///
public string AudioDuration
{
get
{
return GetTagText("AudioDuration");
}
set
{
SetTagValue("AudioDuration", value);
}
}
///
/// Gets or sets the value of the IPTC/NAA tag Audio Outcue.
///
///
/// Handling of null values
/// A null value indicates, that the corresponding metadata tag is not
/// present in the metadata model.
/// Setting this property's value to a non-null reference creates the
/// metadata tag if necessary.
/// Setting this property's value to a null reference deletes the
/// metadata tag from the metadata model.
///
public string AudioOutcue
{
get
{
return GetTagText("AudioOutcue");
}
set
{
SetTagValue("AudioOutcue", value);
}
}
///
/// Gets or sets the value of the IPTC/NAA tag Job I D.
///
///
/// Handling of null values
/// A null value indicates, that the corresponding metadata tag is not
/// present in the metadata model.
/// Setting this property's value to a non-null reference creates the
/// metadata tag if necessary.
/// Setting this property's value to a null reference deletes the
/// metadata tag from the metadata model.
///
public string JobID
{
get
{
return GetTagText("JobID");
}
set
{
SetTagValue("JobID", value);
}
}
///
/// Gets or sets the value of the IPTC/NAA tag Master Document I D.
///
///
/// Handling of null values
/// A null value indicates, that the corresponding metadata tag is not
/// present in the metadata model.
/// Setting this property's value to a non-null reference creates the
/// metadata tag if necessary.
/// Setting this property's value to a null reference deletes the
/// metadata tag from the metadata model.
///
public string MasterDocumentID
{
get
{
return GetTagText("MasterDocumentID");
}
set
{
SetTagValue("MasterDocumentID", value);
}
}
///
/// Gets or sets the value of the IPTC/NAA tag Short Document I D.
///
///
/// Handling of null values
/// A null value indicates, that the corresponding metadata tag is not
/// present in the metadata model.
/// Setting this property's value to a non-null reference creates the
/// metadata tag if necessary.
/// Setting this property's value to a null reference deletes the
/// metadata tag from the metadata model.
///
public string ShortDocumentID
{
get
{
return GetTagText("ShortDocumentID");
}
set
{
SetTagValue("ShortDocumentID", value);
}
}
///
/// Gets or sets the value of the IPTC/NAA tag Unique Document I D.
///
///
/// Handling of null values
/// A null value indicates, that the corresponding metadata tag is not
/// present in the metadata model.
/// Setting this property's value to a non-null reference creates the
/// metadata tag if necessary.
/// Setting this property's value to a null reference deletes the
/// metadata tag from the metadata model.
///
public string UniqueDocumentID
{
get
{
return GetTagText("UniqueDocumentID");
}
set
{
SetTagValue("UniqueDocumentID", value);
}
}
///
/// Gets or sets the value of the IPTC/NAA tag Owner I D.
///
///
/// Handling of null values
/// A null value indicates, that the corresponding metadata tag is not
/// present in the metadata model.
/// Setting this property's value to a non-null reference creates the
/// metadata tag if necessary.
/// Setting this property's value to a null reference deletes the
/// metadata tag from the metadata model.
///
public string OwnerID
{
get
{
return GetTagText("OwnerID");
}
set
{
SetTagValue("OwnerID", value);
}
}
///
/// Gets or sets the value of the IPTC/NAA tag Object Preview File Format.
///
///
/// Handling of null values
/// A null value indicates, that the corresponding metadata tag is not
/// present in the metadata model.
/// Setting this property's value to a non-null reference creates the
/// metadata tag if necessary.
/// Setting this property's value to a null reference deletes the
/// metadata tag from the metadata model.
///
public string ObjectPreviewFileFormat
{
get
{
return GetTagText("ObjectPreviewFileFormat");
}
set
{
SetTagValue("ObjectPreviewFileFormat", value);
}
}
///
/// Gets or sets the value of the IPTC/NAA tag Object Preview File Version.
///
///
/// Handling of null values
/// A null value indicates, that the corresponding metadata tag is not
/// present in the metadata model.
/// Setting this property's value to a non-null reference creates the
/// metadata tag if necessary.
/// Setting this property's value to a null reference deletes the
/// metadata tag from the metadata model.
///
public string ObjectPreviewFileVersion
{
get
{
return GetTagText("ObjectPreviewFileVersion");
}
set
{
SetTagValue("ObjectPreviewFileVersion", value);
}
}
///
/// Gets or sets the value of the IPTC/NAA tag Object Preview Data.
/// This is also referred to as Audio Outcue.
///
///
/// Handling of null values
/// A null value indicates, that the corresponding metadata tag is not
/// present in the metadata model.
/// Setting this property's value to a non-null reference creates the
/// metadata tag if necessary.
/// Setting this property's value to a null reference deletes the
/// metadata tag from the metadata model.
///
public string ObjectPreviewData
{
get
{
return GetTagText("ObjectPreviewData");
}
set
{
SetTagValue("ObjectPreviewData", value);
}
}
///
/// Gets or sets the value of the IPTC/NAA tag Prefs.
/// This is also referred to as photo-mechanic preferences.
///
///
/// Handling of null values
/// A null value indicates, that the corresponding metadata tag is not
/// present in the metadata model.
/// Setting this property's value to a non-null reference creates the
/// metadata tag if necessary.
/// Setting this property's value to a null reference deletes the
/// metadata tag from the metadata model.
///
public string Prefs
{
get
{
return GetTagText("Prefs");
}
set
{
SetTagValue("Prefs", value);
}
}
///
/// Gets or sets the value of the IPTC/NAA tag Classify State.
///
///
/// Handling of null values
/// A null value indicates, that the corresponding metadata tag is not
/// present in the metadata model.
/// Setting this property's value to a non-null reference creates the
/// metadata tag if necessary.
/// Setting this property's value to a null reference deletes the
/// metadata tag from the metadata model.
///
public string ClassifyState
{
get
{
return GetTagText("ClassifyState");
}
set
{
SetTagValue("ClassifyState", value);
}
}
///
/// Gets or sets the value of the IPTC/NAA tag Similarity Index.
///
///
/// Handling of null values
/// A null value indicates, that the corresponding metadata tag is not
/// present in the metadata model.
/// Setting this property's value to a non-null reference creates the
/// metadata tag if necessary.
/// Setting this property's value to a null reference deletes the
/// metadata tag from the metadata model.
///
public string SimilarityIndex
{
get
{
return GetTagText("SimilarityIndex");
}
set
{
SetTagValue("SimilarityIndex", value);
}
}
///
/// Gets or sets the value of the IPTC/NAA tag Document Notes.
///
///
/// Handling of null values
/// A null value indicates, that the corresponding metadata tag is not
/// present in the metadata model.
/// Setting this property's value to a non-null reference creates the
/// metadata tag if necessary.
/// Setting this property's value to a null reference deletes the
/// metadata tag from the metadata model.
///
public string DocumentNotes
{
get
{
return GetTagText("DocumentNotes");
}
set
{
SetTagValue("DocumentNotes", value);
}
}
///
/// Gets or sets the value of the IPTC/NAA tag Document History.
///
///
/// Handling of null values
/// A null value indicates, that the corresponding metadata tag is not
/// present in the metadata model.
/// Setting this property's value to a non-null reference creates the
/// metadata tag if necessary.
/// Setting this property's value to a null reference deletes the
/// metadata tag from the metadata model.
///
public string DocumentHistory
{
get
{
return GetTagText("DocumentHistory");
}
set
{
SetTagValue("DocumentHistory", value);
}
}
///
/// Gets or sets the value of the IPTC/NAA tag Exif Camera Info.
///
///
/// Handling of null values
/// A null value indicates, that the corresponding metadata tag is not
/// present in the metadata model.
/// Setting this property's value to a non-null reference creates the
/// metadata tag if necessary.
/// Setting this property's value to a null reference deletes the
/// metadata tag from the metadata model.
///
public string ExifCameraInfo
{
get
{
return GetTagText("ExifCameraInfo");
}
set
{
SetTagValue("ExifCameraInfo", value);
}
}
}
///
/// Represents a collection of all tags contained in the metadata model
/// .
///
public class MDM_NODATA : MetadataModel
{
///
/// Initializes a new instance of this class.
///
/// Handle to a FreeImage bitmap.
public MDM_NODATA(FIBITMAP dib) : base(dib) { }
///
/// Retrieves the datamodel that this instance represents.
///
public override FREE_IMAGE_MDMODEL Model
{
get { return FREE_IMAGE_MDMODEL.FIMD_NODATA; }
}
}
///
/// Represents a collection of all tags contained in the metadata model
/// .
///
public class MDM_XMP : MetadataModel
{
///
/// Initializes a new instance of this class.
///
/// Handle to a FreeImage bitmap.
public MDM_XMP(FIBITMAP dib) : base(dib) { }
///
/// Retrieves the datamodel that this instance represents.
///
public override FREE_IMAGE_MDMODEL Model
{
get { return FREE_IMAGE_MDMODEL.FIMD_XMP; }
}
///
/// Gets or sets the XMP XML content.
///
///
/// Handling of null values
/// A null value indicates, that the corresponding metadata tag is not
/// present in the metadata model.
/// Setting this property's value to a non-null reference creates the
/// metadata tag if necessary.
/// Setting this property's value to a null reference deletes the
/// metadata tag from the metadata model.
///
public string Xml
{
get
{
return GetTagText("XMLPacket");
}
set
{
SetTagValue("XMLPacket", value);
}
}
///
/// Gets an initialized to read the XMP XML content.
/// Returns null, if the metadata tag XMLPacket is not present in
/// this model.
///
public XmlReader XmlReader
{
get
{
string xmlString = Xml;
if (xmlString == null)
{
return null;
}
else
{
MemoryStream stream = new MemoryStream();
StreamWriter writer = new StreamWriter(stream);
writer.Write(xmlString);
return XmlReader.Create(stream);
}
}
}
}
}