Class ExifData
Namespace: Aspose.Imaging.Exif
Assembly: Aspose.Imaging.dll (25.2.0)
EXIF 数据容器。
[JsonObject(MemberSerialization.OptIn)]
public class ExifData : TiffDataTypeController
继承
object ← TiffDataTypeController ← ExifData
派生
继承成员
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()
示例
访问 Jpeg 图像中的相机制造商备注。```csharp [C#]
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);
}
}
## 构造函数
### <a id="Aspose_Imaging_Exif_ExifData__ctor"></a> ExifData\(\)
初始化 Aspose.Imaging.Exif.ExifData 类的新实例。
```csharp
[JsonConstructor]
public ExifData()
ExifData(TiffDataType[])
用数组中的数据初始化 Aspose.Imaging.Exif.ExifData 类的新实例。
public ExifData(TiffDataType[] exifdata)
参数
exifdata
TiffDataType[]
包含常规和 GPS 标签的 EXIF 标签数组。
ExifData(TiffDataType[], TiffDataType[], TiffDataType[])
用数组中的数据初始化 Aspose.Imaging.Exif.ExifData 类的新实例。
public ExifData(TiffDataType[] commonTags, TiffDataType[] exifTags, TiffDataType[] gpsTags)
参数
commonTags
TiffDataType[]
常规标签。
exifTags
TiffDataType[]
EXIF 标签。
gpsTags
TiffDataType[]
GPS 标签。
属性
ApertureValue
获取或设置光圈值。
public TiffRational ApertureValue { get; set; }
属性值
BodySerialNumber
获取或设置相机机身序列号。
public string BodySerialNumber { get; set; }
属性值
BrightnessValue
获取或设置亮度值。
public TiffSRational BrightnessValue { get; set; }
属性值
CFAPattern
获取或设置 CFA 模式。
public byte[] CFAPattern { get; set; }
属性值
byte[]
CameraOwnerName
获取或设置相机拥有者名称。
public string CameraOwnerName { get; set; }
属性值
ColorSpace
获取或设置色彩空间。
public ExifColorSpace ColorSpace { get; set; }
属性值
CommonTags
获取或设置属于公共部分的标签。这仅适用于 jpeg 图像,在 tiff 格式中使用 tiffOptions。
public TiffDataType[] CommonTags { get; set; }
属性值
ComponentsConfiguration
获取或设置组件配置。
public byte[] ComponentsConfiguration { get; set; }
属性值
byte[]
CompressedBitsPerPixel
获取或设置每像素的压缩位数。
public TiffRational CompressedBitsPerPixel { get; set; }
属性值
Contrast
获取或设置对比度。
public ExifContrast Contrast { get; set; }
属性值
CustomRendered
获取或设置自定义渲染。
public ExifCustomRendered CustomRendered { get; set; }
属性值
DateTimeDigitized
获取或设置数字化日期时间。
public string DateTimeDigitized { get; set; }
属性值
DateTimeOriginal
获取或设置原始日期时间。
public string DateTimeOriginal { get; set; }
属性值
DeviceSettingDescription
获取或设置设备设置描述。
public byte[] DeviceSettingDescription { get; set; }
属性值
byte[]
DigitalZoomRatio
获取或设置数字变焦比。
public TiffRational DigitalZoomRatio { get; set; }
属性值
ExifTags
获取或设置仅属于 EXIF 部分的标签。
public TiffDataType[] ExifTags { get; set; }
属性值
ExifVersion
获取或设置 EXIF 版本。
public byte[] ExifVersion { get; set; }
属性值
byte[]
ExposureBiasValue
获取或设置曝光补偿值。
public TiffSRational ExposureBiasValue { get; set; }
属性值
ExposureIndex
获取或设置曝光指数。
public TiffRational ExposureIndex { get; set; }
属性值
ExposureMode
获取或设置曝光模式。
public ExifExposureMode ExposureMode { get; set; }
属性值
ExposureProgram
获取或设置曝光程序。
public ExifExposureProgram ExposureProgram { get; set; }
属性值
ExposureTime
获取或设置曝光时间。
public TiffRational ExposureTime { get; set; }
属性值
FNumber
获取或设置 F 值。
public TiffRational FNumber { get; set; }
属性值
FileSource
获取或设置文件源类型。
public ExifFileSource FileSource { get; set; }
属性值
Flash
获取或设置闪光灯。
public ExifFlash Flash { get; set; }
属性值
FlashEnergy
获取或设置闪光能量。
public TiffRational FlashEnergy { get; set; }
属性值
FlashpixVersion
获取或设置闪光像素版本。
public byte[] FlashpixVersion { get; set; }
属性值
byte[]
FocalLength
获取或设置焦距。
public TiffRational FocalLength { get; set; }
属性值
FocalLengthIn35MmFilm
获取或设置 35 毫米胶卷的焦距。
public ushort FocalLengthIn35MmFilm { get; set; }
属性值
FocalPlaneResolutionUnit
获取或设置焦平面分辨率单位。
public ExifUnit FocalPlaneResolutionUnit { get; set; }
属性值
FocalPlaneXResolution
获取或设置焦平面 x 分辨率。
public TiffRational FocalPlaneXResolution { get; set; }
属性值
FocalPlaneYResolution
获取或设置焦平面 y 分辨率。
public TiffRational FocalPlaneYResolution { get; set; }
属性值
GPSAltitude
获取或设置 GPS 高度。
public TiffRational GPSAltitude { get; set; }
属性值
GPSAltitudeRef
获取或设置作为参考高度的 GPS 高度。
public ExifGPSAltitudeRef GPSAltitudeRef { get; set; }
属性值
GPSAreaInformation
获取或设置 GPS 区域信息。
public byte[] GPSAreaInformation { get; set; }
属性值
byte[]
GPSDOP
获取或设置 GPS DOP(数据精度度数)。
public TiffRational GPSDOP { get; set; }
属性值
GPSDateStamp
获取或设置 GPS 字符串记录的日期和时间信息,相对于 UTC(协调世界时)。
public string GPSDateStamp { get; set; }
属性值
GPSDestBearing
获取或设置到目的地的 GPS 方位。
public TiffRational GPSDestBearing { get; set; }
属性值
GPSDestBearingRef
获取或设置用于给出到目的地的方位的 GPS 引用。
public string GPSDestBearingRef { get; set; }
属性值
GPSDestDistance
获取或设置到目的地的 GPS 距离。
public TiffRational GPSDestDistance { get; set; }
属性值
GPSDestDistanceRef
获取或设置用于表示到目的地的距离的 GPS 单位。
public string GPSDestDistanceRef { get; set; }
属性值
GPSDestLatitude
获取或设置目的地的 GPS 纬度。
public TiffRational[] GPSDestLatitude { get; set; }
属性值
GPSDestLatitudeRef
获取或设置 GPS 值,指示目的地的纬度是北纬还是南纬。
public string GPSDestLatitudeRef { get; set; }
属性值
GPSDestLongitude
获取或设置目的地的 GPS 经度。
public TiffRational[] GPSDestLongitude { get; set; }
属性值
GPSDestLongitudeRef
获取或设置 GPS 值,指示目的地的经度是东经还是西经。
public string GPSDestLongitudeRef { get; set; }
属性值
GPSDifferential
获取或设置 GPS 值,指示是否对 GPS 接收器应用了差分修正。
public ushort GPSDifferential { get; set; }
属性值
GPSImgDirection
获取或设置图像拍摄时的 GPS 方向。
public TiffRational GPSImgDirection { get; set; }
属性值
GPSImgDirectionRef
获取或设置用于给出图像拍摄时方向的 GPS 引用。
public string GPSImgDirectionRef { get; set; }
属性值
GPSLatitude
获取或设置 GPS 纬度。
public TiffRational[] GPSLatitude { get; set; }
属性值
GPSLatitudeRef
获取或设置 GPS 纬度是北纬还是南纬。
public string GPSLatitudeRef { get; set; }
属性值
GPSLongitude
获取或设置 GPS 经度。
public TiffRational[] GPSLongitude { get; set; }
属性值
GPSLongitudeRef
获取或设置 GPS 经度是东经还是西经。
public string GPSLongitudeRef { get; set; }
属性值
GPSMapDatum
获取或设置 GPS 接收器使用的 GPS 大地测量数据。
public string GPSMapDatum { get; set; }
属性值
GPSMeasureMode
获取或设置 GPS 测量模式。
public string GPSMeasureMode { get; set; }
属性值
GPSProcessingMethod
获取或设置 GPS 字符串,记录用于定位的方法名称。
public byte[] GPSProcessingMethod { get; set; }
属性值
byte[]
GPSSatellites
获取或设置用于测量的 GPS 卫星。
public string GPSSatellites { get; set; }
属性值
GPSSpeed
获取或设置 GPS 接收器移动的速度。
public TiffRational GPSSpeed { get; set; }
属性值
GPSSpeedRef
获取或设置用于表示 GPS 接收器移动速度的单位。
public string GPSSpeedRef { get; set; }
属性值
GPSStatus
获取或设置图像记录时 GPS 接收器的状态。
public string GPSStatus { get; set; }
属性值
GPSTags
获取或设置仅属于 GPS 部分的标签。
public TiffDataType[] GPSTags { get; set; }
属性值
GPSTimestamp
获取或设置 GPS 时间,作为 UTC(协调世界时)。
public TiffRational[] GPSTimestamp { get; set; }
属性值
GPSTrack
获取或设置 GPS 接收器移动的方向。
public string GPSTrack { get; set; }
属性值
GPSTrackRef
获取或设置用于给出 GPS 接收器移动方向的引用。
public string GPSTrackRef { get; set; }
属性值
GPSVersionID
获取或设置 GPS 版本标识符。
public byte[] GPSVersionID { get; set; }
属性值
byte[]
GainControl
获取或设置整体图像增益调整的程度。
public ExifGainControl GainControl { get; set; }
属性值
Gamma
获取或设置伽马值。
public TiffRational Gamma { get; set; }
属性值
ISOSpeed
获取或设置 ISO 速度。
public uint ISOSpeed { get; set; }
属性值
ISOSpeedLatitudeYYY
获取或设置在 ISO 12232 中定义的相机或输入设备的 ISO 速度纬度 yyy 值。
public uint ISOSpeedLatitudeYYY { get; set; }
属性值
备注
此标签不得在没有 ISOSpeed 和 ISOSpeedLatitudezzz 的情况下记录。
ISOSpeedLatitudeZZZ
获取或设置在 ISO 12232 中定义的相机或输入设备的 ISO 速度纬度 zzz 值。
public uint ISOSpeedLatitudeZZZ { get; set; }
属性值
备注
此标签不得在没有 ISOSpeed 和 ISOSpeedLatitudeyyy 的情况下记录。
ImageUniqueID
获取或设置图像唯一标识符。
public string ImageUniqueID { get; set; }
属性值
IsBigEndian
获取或设置一个值,指示从中创建的流 EXIF 数据是否为大端格式。
[JsonProperty]
public bool IsBigEndian { get; set; }
属性值
LensMake
获取或设置镜头制造商。
public string LensMake { get; set; }
属性值
LensModel
获取或设置镜头型号。
public string LensModel { get; set; }
属性值
LensSerialNumber
获取或设置镜头序列号。
public string LensSerialNumber { get; set; }
属性值
LensSpecification
获取或设置镜头规格。
public TiffRational[] LensSpecification { get; set; }
属性值
LightSource
获取或设置光源。
public ExifLightSource LightSource { get; set; }
属性值
Make
获取或设置录音设备的制造商。
public string Make { get; set; }
属性值
MakerNoteData
获取制造商备注数据。
public TiffDataType[] MakerNoteData { get; }
属性值
MakerNoteRawData
获取或设置制造商备注原始数据。
public byte[] MakerNoteRawData { get; set; }
属性值
byte[]
MakerNotes
获取制造商备注。
public MakerNote[] MakerNotes { get; }
属性值
示例
访问 Jpeg 图像中的相机制造商备注。```csharp [C#]
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);
}
}
### <a id="Aspose_Imaging_Exif_ExifData_MaxApertureValue"></a> MaxApertureValue
获取或设置最大光圈值。
```csharp
public TiffRational MaxApertureValue { get; set; }
属性值
MeteringMode
获取或设置测光模式。
public ExifMeteringMode MeteringMode { get; set; }
属性值
OECF
获取或设置在 ISO 14524 中指定的光电转换函数(OECF)。
public byte[] OECF { get; set; }
属性值
byte[]
Orientation
获取或设置方向。
public ExifOrientation Orientation { get; set; }
属性值
PhotographicSensitivity
获取或设置摄影灵敏度。
public uint PhotographicSensitivity { get; set; }
属性值
PixelXDimension
获取或设置像素 x 维度。
public uint PixelXDimension { get; set; }
属性值
PixelYDimension
获取或设置像素 y 维度。
public uint PixelYDimension { get; set; }
属性值
Properties
获取或设置所有 EXIF 标签(包括常规和 GPS 标签)。
public TiffDataType[] Properties { get; set; }
属性值
RecommendedExposureIndex
获取或设置推荐的曝光指数。
public uint RecommendedExposureIndex { get; set; }
属性值
RelatedSoundFile
获取或设置相关的声音文件。
public string RelatedSoundFile { get; set; }
属性值
Saturation
获取或设置饱和度。
public ExifSaturation Saturation { get; set; }
属性值
SceneCaptureType
获取或设置场景捕捉类型。
public ExifSceneCaptureType SceneCaptureType { get; set; }
属性值
SceneType
获取或设置场景类型。
public byte SceneType { get; set; }
属性值
SensingMethod
获取或设置感应方法。
public ExifSensingMethod SensingMethod { get; set; }
属性值
SensitivityType
获取或设置灵敏度类型。
public ushort SensitivityType { get; set; }
属性值
Sharpness
获取或设置锐度。
public ushort Sharpness { get; set; }
属性值
ShutterSpeedValue
获取或设置快门速度值。
public TiffSRational ShutterSpeedValue { get; set; }
属性值
SpatialFrequencyResponse
获取或设置空间频率响应。
public byte[] SpatialFrequencyResponse { get; set; }
属性值
byte[]
SpectralSensitivity
获取或设置光谱灵敏度。
public string SpectralSensitivity { get; set; }
属性值
StandardOutputSensitivity
获取或设置标准输出灵敏度。
public uint StandardOutputSensitivity { get; set; }
属性值
SubjectArea
获取或设置主题区域。
public ushort[] SubjectArea { get; set; }
属性值
ushort[]
SubjectDistance
获取或设置主题距离。
public TiffRational SubjectDistance { get; set; }
属性值
SubjectDistanceRange
获取或设置主题距离范围。
public ExifSubjectDistanceRange SubjectDistanceRange { get; set; }
属性值
SubjectLocation
获取或设置主题位置。
public ushort[] SubjectLocation { get; set; }
属性值
ushort[]
SubsecTime
获取或设置 DateTime 标签的秒部分。
public string SubsecTime { get; set; }
属性值
SubsecTimeDigitized
获取或设置 DateTimeDigitized 标签的秒部分。
public string SubsecTimeDigitized { get; set; }
属性值
SubsecTimeOriginal
获取或设置 DateTimeOriginal 标签的秒部分。
public string SubsecTimeOriginal { get; set; }
属性值
UserComment
获取或设置用户评论。
public string UserComment { get; set; }
属性值
WhiteBalance
获取或设置白平衡。
public ExifWhiteBalance WhiteBalance { get; set; }
属性值
WhitePoint
获取或设置图像白点的色度。
public TiffRational[] WhitePoint { get; set; }
属性值
方法
GetShortOrLong(ushort)
获取短或长值。
protected uint GetShortOrLong(ushort key)
参数
key
ushort
要获取值的键。
返回
转换为整数的短或长值。
RemoveTag(ExifProperties)
从容器中删除标签。
public void RemoveTag(ExifProperties tag)
参数
tag
ExifProperties
要删除的标签。
RemoveTag(ushort)
从容器中删除标签。
public void RemoveTag(ushort tagId)
参数
tagId
ushort
要删除的标签标识符。
SetShortOrLong(ushort, uint, int)
根据值设置短或长值。
protected void SetShortOrLong(ushort key, uint value, int section)
参数
key
ushort
要设置的键。
value
uint
要设置的值。
section
int
要放入条目的部分。