Class ExifData

Class ExifData

Namespace: Aspose.Imaging.Exif
Assembly: Aspose.Imaging.dll (25.7.0)

EXIF data container.

[JsonObject(MemberSerialization.OptIn)]
   public class ExifData : TiffDataTypeController
   {
   }

Inheritance

object TiffDataTypeController ExifData

Derived

JpegExifData

Inherited Members

TiffDataTypeController.Exists(ushort) , TiffDataTypeController.RemoveTagByID(ushort) , TiffDataTypeController.GetSectionTags(int) , TiffDataTypeController.SetSectionTags(int, TiffDataType[]) , TiffDataTypeController.GetTiffLongTypeValue(ushort, uint) , TiffDataTypeController.SetTiffLongTypeValue(ushort, uint, int) , TiffDataTypeController.GetTiffByteValue(ushort) , TiffDataTypeController.SetTiffByteValue(ushort, byte[], int) , TiffDataTypeController.GetTiffSRationalValue(ushort) , TiffDataTypeController.SetTiffSRationalValue(ushort, TiffSRational, int) , TiffDataTypeController.GetTiffRationalArray(ushort) , TiffDataTypeController.SetTiffRationalArray(ushort, TiffRational[], int) , TiffDataTypeController.GetTiffRationalValue(ushort) , TiffDataTypeController.SetTiffRational(ushort, TiffRational, int) , TiffDataTypeController.GetTiffStringValue(ushort) , TiffDataTypeController.SetTiffStringValue(ushort, string, int) , TiffDataTypeController.GetTiffUndefinedValue(ushort) , TiffDataTypeController.SetTiffUndefinedValue(ushort, byte[], int) , TiffDataTypeController.GetTiffShortValue(ushort, ushort) , TiffDataTypeController.SetTiffShortValue(ushort, ushort, int) , TiffDataTypeController.GetTiffShortArray(ushort) , TiffDataTypeController.SetTiffShortArray(ushort, ushort[], int) , TiffDataTypeController.GetTiffType(ushort) , TiffDataTypeController.SetTiffType(TiffDataType, int) , object.GetType() , object.MemberwiseClone() , object.ToString() , object.Equals(object?) , object.Equals(object?, object?) , object.ReferenceEquals(object?, object?) , object.GetHashCode()

Examples

Access camera manufacturer maker notes in Jpeg image.

using (var image = (JpegImage)Image.Load("Sample.jpg"))
   {
       foreach (var makerNote in image.ExifData.MakerNotes)
       {
           Console.WriteLine("Name = {0}, Value = {1}", makerNote.Name, makerNote.Value);
       }
   }

Constructors

ExifData()

Initializes a new instance of the Aspose.Imaging.Exif.ExifData class.

[JsonConstructor]
   public ExifData()
   {
   }

ExifData(TiffDataType[])

Initializes a new instance of the Aspose.Imaging.Exif.ExifData class with data from array.

public ExifData(TiffDataType[] exifData)
   {
   }

Parameters

exifdata TiffDataType []

Array of EXIF tags together with common and GPS tags.

ExifData(TiffDataType[], TiffDataType[], TiffDataType[])

Initializes a new instance of the Aspose.Imaging.Exif.ExifData class with data from array.

public ExifData(
      TiffDataType[] commonTags,
      TiffDataType[] exifTags,
      TiffDataType[] gpsTags)
   {
   }

Parameters

commonTags TiffDataType []

The common tags.

exifTags TiffDataType []

The EXIF tags.

gpsTags TiffDataType []

The GPS tags.

Properties

ApertureValue

Gets or sets the aperture value.

public TiffRational ApertureValue
   {
      get;
      set;
   }

Property Value

TiffRational

BodySerialNumber

Gets or sets camera body serial number.

public string BodySerialNumber
    {
        get;
        set;
    }

Property Value

string

BrightnessValue

Gets or sets the brightness value.

public TiffSRational BrightnessValue
   {
      get;
      set;
   }

Property Value

TiffSRational

CFAPattern

Gets or sets the CFA pattern.

public byte[] CFAPattern
{
    get;
    set;
}

Property Value

byte []

CameraOwnerName

Gets or sets camera owner name

public string CameraOwnerName
   {
       get;
       set;
   }

Property Value

string

ColorSpace

Gets or sets the color space.

public ExifColorSpace ColorSpace
    {
        get;
        set;
    }

Property Value

ExifColorSpace

CommonTags

Gets or sets tags, which belong to common section. This applies only to jpeg images, in tiff format tiffOptions are being used instead

public TiffDataType[] CommonTags
{
    get;
    set;
}

Property Value

TiffDataType []

ComponentsConfiguration

Gets or sets the components configuration.

public byte[] ComponentsConfiguration
    {
        get;
        set;
    }

Property Value

byte []

CompressedBitsPerPixel

Gets or sets the compressed bits per pixel.

public TiffRational CompressedBitsPerPixel
    {
        get;
        set;
    }

Property Value

TiffRational

Contrast

Gets or sets the contrast.

public ExifContrast Contrast
   {
      get;
      set;
   }

Property Value

ExifContrast

CustomRendered

Gets or sets the custom rendered.

public ExifCustomRendered CustomRendered { get; set; }

Property Value

ExifCustomRendered

DateTimeDigitized

Gets or sets the date time digitized.

public string DateTimeDigitized { get; set; }

Property Value

string

DateTimeOriginal

Gets or sets the date time original.

public string DateTimeOriginal
{
    get;
    set;
}

Property Value

string

DeviceSettingDescription

Gets or sets device settings description

public byte[] DeviceSettingDescription
{
    get;
    set;
}

Property Value

byte []

DigitalZoomRatio

Gets or sets the digital zoom ratio.

public TiffRational DigitalZoomRatio
   {
      get;
      set;
   }

Property Value

TiffRational

ExifTags

Gets or sets tags which belong to EXIF section only.

public TiffDataType[] ExifTags
   {
      get;
      set;
   }

Property Value

TiffDataType []

ExifVersion

Gets or sets the EXIF version.

public byte[] ExifVersion
{
    get;
    set;
}

Property Value

byte []

ExposureBiasValue

Gets or sets the exposure bias value.

public TiffSRational ExposureBiasValue
   {
      get;
      set;
   }

Property Value

TiffSRational

ExposureIndex

Gets or sets the exposure index.

public TiffRational ExposureIndex
    {
        get;
        set;
    }

Property Value

TiffRational

ExposureMode

Gets or sets the exposure mode.

public ExifExposureMode ExposureMode
    {
        get;
        set;
    }

Property Value

ExifExposureMode

ExposureProgram

Gets or sets the exposure program.

public ExifExposureProgram ExposureProgram
    {
        get;
        set;
    }

Property Value

ExifExposureProgram

ExposureTime

Gets or sets the exposure time.

public TiffRational ExposureTime
   {
      get;
      set;
   }

Property Value

TiffRational

FNumber

Gets or sets the F-number.

public TiffRational FNumber
   {
      get;
      set;
   }

Property Value

TiffRational

FileSource

Gets or sets the file source type.

public ExifFileSource FileSource
    {
        get;
        set;
    }

Property Value

ExifFileSource

Flash

Gets or sets the flash.

public ExifFlash _flash;
   private set { _flash = value; }
   public ExifFlash Flash
   {
      get { return this._flash; }
   }

Property Value

ExifFlash

FlashEnergy

Gets or sets the flash energy.

public TiffRational Flash Energy
   {
      get { return this.FlashEnergy; }
      set { this.FlashEnergy = value; }
   }

Property Value

TiffRational

FlashpixVersion

Gets or sets the flash pix version.

public byte[] FlashpixVersion { get; set; }

Property Value

byte []

FocalLength

Gets or sets the focal length.

public TiffRational FocalLength
   {
      get;
      set;
   }

Property Value

TiffRational

FocalLengthIn35MmFilm

Gets or sets the focal length in 35 mm film.

public ushort FocalLengthIn35MMFilm { get; set; }

Property Value

ushort

FocalPlaneResolutionUnit

Gets or sets the focal plane resolution unit.

public ExifUnit FocalPlaneResolutionUnit
    {
        get;
        set;
    }

Property Value

ExifUnit

FocalPlaneXResolution

Gets or sets the focal plane x resolution.

public TiffRational FocalPlaneXResolution
   {
      get;
      set;
   }

Property Value

TiffRational

FocalPlaneYResolution

Gets or sets the focal plane y resolution.

public TiffRational FocalPlaneYResolution
   {
      get;
      set;
   }

Property Value

TiffRational

GPSAltitude

Gets or sets the GPS altitude.

public TiffRational gpsAltitude
   {
      get
      {
         return this.gPSAltitude;
      }
      set
      {
         this.gPSAltitude = value;
      }
   }

Property Value

TiffRational

GPSAltitudeRef

Gets or sets the GPS altitude used as the reference altitude.

public ExifGPSAltitudeRef GPS_Altitude_Ref { get; set; }

Property Value

ExifGPSAltitudeRef

GPSAreaInformation

Gets or sets the GPS area information.

public byte[] GPSAreaInformation
{
    get;
    set;
}

Property Value

byte []

GPSDOP

Gets or sets the GPS DOP (data degree of precision).

public TiffRational gpsDop
   {
      get { return this.gPSDop; }
      set { this.gPSDop = value; }
   }

Property Value

TiffRational

GPSDateStamp

Gets or sets the GPS character string recording date and time information relative to UTC (Coordinated Universal Time).

public string GpsDateStamp
    {
        get;
        set;
    }

Property Value

string

GPSDestBearing

Gets or sets the GPS bearing to the destination point.

public TiffRational gPSDestBearing
   {
      get;
      set;
   }

Property Value

TiffRational

GPSDestBearingRef

Gets or sets the GPS reference used for giving the bearing to the destination point.

public string GpsDestBearingRef { get; set; }

Property Value

string

GPSDestDistance

Gets or sets the GPS distance to the destination point.

public TiffRational gPSDestDistance { get; set; }

Property Value

TiffRational

GPSDestDistanceRef

Gets or sets the GPS unit used to express the distance to the destination point.

public string GpsDestinationDistanceRef
    {
        get
        {
        }
        set
        {
        }
    }

Property Value

string

GPSDestLatitude

Gets or sets the GPS latitude of the destination point.

public TiffRational[] GPSDestLatitude
{
    get;
    set;
}

Property Value

TiffRational []

GPSDestLatitudeRef

Gets or sets the GPS value which indicates whether the latitude of the destination point is north or south latitude.

public string GpsDestinationLatitudeRef
    {
        get;
        set;
    }

Property Value

string

GPSDestLongitude

Gets or sets the GPS longitude of the destination point.

public TiffRational[] gPSDestLongitude { get; set; }

Property Value

TiffRational []

GPSDestLongitudeRef

Gets or sets the GPS value which indicates whether the longitude of the destination point is east or west longitude.

public string GpsDestLongitudeRef
    {
        get;
        set;
    }

Property Value

string

GPSDifferential

Gets or sets a GPS value which indicates whether differential correction is applied to the GPS receiver.

public ushort GPSDifferential
    {
        get;
        set;
    }

Property Value

ushort

GPSImgDirection

Gets or sets the GPS direction of the image when it was captured.

public TiffRational GPSImgDirection
   {
      get;
      set;
   }

Property Value

TiffRational

GPSImgDirectionRef

Gets or sets the GPS reference for giving the direction of the image when it is captured.

public string GPSImgDirectionRef
   {
      get;
      set;
   }

Property Value

string

GPSLatitude

Gets or sets the GPS latitude.

public TiffRational[] gPSLatitude { get; set; }

Property Value

TiffRational []

GPSLatitudeRef

Gets or sets the GPS latitude is north or south latitude.

public string GPSLatitudeRef { get; set; }

Property Value

string

GPSLongitude

Gets or sets the GPS longitude.

public TiffRational[] GPSLongitude
{
    get;
    set;
}

Property Value

TiffRational []

GPSLongitudeRef

Gets or sets the GPS longitude is east or west longitude.

public string GpsLongitudeRef { get; set; }

Property Value

string

GPSMapDatum

Gets or sets the GPS geodetic survey data used by the GPS receiver.

public string GPSSMapDatum
    {
        get;
        set;
    }

Property Value

string

GPSMeasureMode

Gets or sets the GPS measurement mode.

public string GPSMeasureMode
{
    get;
    set;
}

Property Value

string

GPSProcessingMethod

Gets or sets the GPS character string recording the name of the method used for location finding.

public byte[] GPSProcessingMethod
{
    get;
    set;
}

Property Value

byte []

GPSSatellites

Gets or sets the GPS satellites used for measurements.

public string GpsSatellites
{
    get;
    set;
}

Property Value

string

GPSSpeed

Gets or sets the speed of GPS receiver movement.

public TiffRational gPSSpeed
   {
      get;
      set;
   }

Property Value

TiffRational

GPSSpeedRef

Gets or sets the unit used to express the GPS receiver speed of movement.

public string GpsSpeedRef
    {
        get
        {
        }
        set
        {
        }
    }

Property Value

string

GPSStatus

Gets or sets the status of the GPS receiver when the image is recorded.

public string GPSStatus
    {
        get;
        set;
    }

Property Value

string

GPSTags

Gets or sets tags, which belong to GPS section only.

public TiffDataType[] GPSTags
   {
      get;
      set;
   }

Property Value

TiffDataType []

GPSTimestamp

Gets or sets the GPS time as UTC (Coordinated Universal Time).

public TiffRational[] gpSTimestamp { get; set; }

Property Value

TiffRational []

GPSTrack

Gets or sets direction of GPS receiver movement.

public string GpsTrack
    {
        get
        {
        }
        set
        {
        }
    }

Property Value

string

GPSTrackRef

Gets or sets the reference for giving the direction of GPS receiver movement.

public string GpsTrackRef { get; set; }

Property Value

string

GPSVersionID

Gets or sets the GPS version identifier.

public byte[] GPSVersionID
{
    get;
    set;
}

Property Value

byte []

GainControl

Gets or sets the degree of overall image gain adjustment.

public ExifGainControl gainControl // notice capitalization for identifiers and spacing after the type name
    {
        get; // no space before 'get' or 'set'
        set; // no space before 'set'
    } // no new line before closing brace, consistent indentation, and closing brace at same level as opening brace.

Property Value

ExifGainControl

Gamma

Gets or sets the gamma.

public TiffRational gamma { get; set; }

Property Value

TiffRational

ISOSpeed

Gets or sets ISO speed

public uint IsoSpeed
    {
        get;
        set;
    }

Property Value

uint

ISOSpeedLatitudeYYY

Gets or sets the ISO speed latitude yyy value of a camera or input device that is defined in ISO 12232.

public uint ISOSpeedLatitudeYYY
   {
      get;
      set;
   }

Property Value

uint

Remarks

This tag shall not be recorded without ISOSpeed and ISOSpeedLatitudezzz

ISOSpeedLatitudeZZZ

Gets or sets the ISO speed latitude zzz value of a camera or input device that is defined in ISO 12232.

public uint ISOSpeedLatitudeZZZ
   {
      get;
      set;
   }

Property Value

uint

Remarks

This tag shall not be recorded without ISOSpeed and ISOSpeedLatitudeyyy

ImageUniqueID

Gets or sets the image unique identifier.

public string ImageUniqueID
    {
        get;
        set;
    }

Property Value

string

IsBigEndian

Gets or sets a value indicating whether the stream EXIF data created from is big endian.

[JsonProperty]
    public bool IsBigEndian
    {
        get;
        set;
    }

Property Value

bool

LensMake

Gets or sets the maker of lens.

public string LensMake
   {
      get;
      set;
   }

Property Value

string

LensModel

Gets or sets the lens model.

public string LensModel
    {
        get;
        set;
    }

Property Value

string

LensSerialNumber

Gets or sets the lens serial number.

public string LensSerialNumber
   {
      get;
      set;
   }

Property Value

string

LensSpecification

Gets or sets the lens specification

public TiffRational[] LensSpecification
   {
      get;
      set;
   }

Property Value

TiffRational []

LightSource

Gets or sets the light source.

public ExifLightSource LightSource
   {
      get;
      set;
   }

Property Value

ExifLightSource

Make

Gets or sets the manufacturer of the recording equipment.

public string Make
{
    get;
    set;
}

Property Value

string

MakerNoteData

Gets the maker note data.

public TiffDataType[] MakerNoteData
   {
      get;
   }

Property Value

TiffDataType []

MakerNoteRawData

Gets or sets the maker note raw data.

public byte[] MakerNoteRawData
    {
        get;
        set;
    }

Property Value

byte []

MakerNotes

Gets the maker notes.

public MakerNote[] MakerNotes { get; };

Property Value

MakerNote []

Examples

Access camera manufacturer maker notes in Jpeg image.

using (var image = (JpegImage)Image.Load("Sample.jpg"))
   {
       foreach (var makerNote in image.ExifData.MakerNotes)
       {
           Console.WriteLine("Name = {0}, Value = {1}", makerNote.Name, makerNote.Value);
       }
   }

MaxApertureValue

Gets or sets the maximum aperture value.

public TiffRational MaxApertureValue
    {
        get;
        set;
    }

Property Value

TiffRational

MeteringMode

Gets or sets the metering mode.

public ExifMeteringMode MeteringMode
   {
      get;
      set;
   }

Property Value

ExifMeteringMode

OECF

Gets or sets the Opto-Electric Conversion Function (OECF) specified in ISO 14524.

public byte[] OECF
{
    get;
    set;
}

Property Value

byte []

Orientation

Gets or sets the orientation.

public ExifOrientation Orientation
    {
        get;
        set;
    }

Property Value

ExifOrientation

PhotographicSensitivity

Gets or sets the photographic sensitivity.

public uint PhotographicSensitivity
    {
        get;
        set;
    }

Property Value

uint

PixelXDimension

Gets or sets the pixel x dimension.

public uint PixelXDimension
    {
        get;
        set;
    }

Property Value

uint

PixelYDimension

Gets or sets the pixel y dimension.

public uint PixelYDimension
   {
      get;
      set;
   }

Property Value

uint

Properties

Gets or sets all the EXIF tags (including common and GPS tags).

public TiffDataType[] Properties
{
    get;
    set;
}

Property Value

TiffDataType []

RecommendedExposureIndex

Gets or sets the recommended exposure index.

public uint RecommendedExposureIndex
    {
        get;
        set;
    }

Property Value

uint

RelatedSoundFile

Gets or sets the related sound file.

public string RelatedSoundFile
{
    get;
    set;
}

Property Value

string

Saturation

Gets or sets the saturation.

public ExifSaturation Saturation
   {
      get;
      set;
   }

Property Value

ExifSaturation

SceneCaptureType

Gets or sets the scene capture type.

public ExifSceneCaptureType SceneCaptureType
   {
      get;
      set;
   }

Property Value

ExifSceneCaptureType

SceneType

Gets or sets the scene type.

public byte SceneType
    {
        get;
        set;
    }

Property Value

byte

SensingMethod

Gets or sets the sensing method.

public ExifSensingMethod SensingMethod
   {
      get;
      set;
   }

Property Value

ExifSensingMethod

SensitivityType

Gets or sets the sensitivity type.

public ushort SensitivityType
   {
      get;
      set;
   }

Property Value

ushort

Sharpness

Gets or sets the sharpness.

public ushort Sharpness
    {
        get;
        set;
    }

Property Value

ushort

ShutterSpeedValue

Gets or sets the shutter speed value.

public TiffSRational ShutterSpeedValue
   {
      get;
      set;
   }

Property Value

TiffSRational

SpatialFrequencyResponse

Gets or sets the spatial frequency response.

public byte[] SpatialFrequencyResponse
{
    get;
    set;
}

Property Value

byte []

SpectralSensitivity

Gets or sets the spectral sensitivity.

public string SpectralSensitivity
{
    get;
    set;
}

Property Value

string

StandardOutputSensitivity

Gets or sets standard output sensitivity

public uint StandardOutputSensitivity
    {
        get;
        set;
    }

Property Value

uint

SubjectArea

Gets or sets the subject area.

public ushort[] SubjectArea
    {
        get;
        set;
    }

Property Value

ushort []

SubjectDistance

Gets or sets the subject distance.

public TiffRational SubjectDistance
   {
      get;
      set;
   }

Property Value

TiffRational

SubjectDistanceRange

Gets or sets the subject distance range.

public ExifSubjectDistanceRange SubjectDistanceRange
    {
        get;
        set;
    }

Property Value

ExifSubjectDistanceRange

SubjectLocation

Gets or sets the subject location.

public ushort[] SubjectLocation
{
    get;
    set;
}

Property Value

ushort []

SubsecTime

Gets or sets the fractions of seconds for the DateTime tag.

public string SubsecTime
    {
        get;
        set;
    }

Property Value

string

SubsecTimeDigitized

Gets or sets the fractions of seconds for the DateTimeDigitized tag.

public string SubsecTimeDigitized
{
    get;
    set;
}

Property Value

string

SubsecTimeOriginal

Gets or sets the fractions of seconds for the DateTimeOriginal tag.

public string SubsecTimeOriginal { get; set; }

Property Value

string

UserComment

Gets or sets the user comment.

public string UserComment
{
    get;
    set;
}

Property Value

string

WhiteBalance

Gets or sets the white balance.

public ExifWhiteBalance WhiteBalance
   {
      get;
      set;
   }

Property Value

ExifWhiteBalance

WhitePoint

Gets or sets the chromaticity of the white point of the image.

public TiffRational[] WhitePoint
   {
      get;
      set;
   }

Property Value

TiffRational []

Methods

GetShortOrLong(ushort)

Gets short or long value.

protected uint GetShortOrLong(ushort key)
{
    if (key < 1000)
        return (uint)key;
    return KeyToLong[(ushort)(key - 1000)];
}

Parameters

key ushort

The key to get value for.

Returns

uint

Short or long value converted to integer.

RemoveTag(ExifProperties)

Remove tag from container

public void RemoveTag(ExifProperties tag)
   {
   }

Parameters

tag ExifProperties

The tag to remove

RemoveTag(ushort)

Remove tag from container

public void RemoveTag(ushort tagId)
{
}
Here's the code with added curly braces and consistent indentation for better readability:
public void RemoveTag(ushort tagId)
{
}
If you want to add a block of code within the method, consider using curly braces consistently for readability and clarity:
public void RemoveTag(ushort tagId)
{
    if (IsTagValid(tagId))
    {
    }
}

Parameters

tagId ushort

The tag identifier to remove.

SetShortOrLong(ushort, uint, int)

Sets short or long value depending on the value.

protected void SetShortOrLong(ushort key, uint value, int section)
   {
   }

Parameters

key ushort

The key to set for.

value uint

The value to set.

section int

The section to put entry to.

 English