Class ExifProfile
- Namespace
- SixLabors.ImageSharp.Metadata.Profiles.Exif
- Assembly
- SixLabors.ImageSharp.dll
Represents an EXIF profile providing access to the collection of values.
public sealed class ExifProfile : IDeepCloneable<ExifProfile>
- Inheritance
-
ExifProfile
- Implements
- Inherited Members
Constructors
ExifProfile()
Initializes a new instance of the ExifProfile class.
public ExifProfile()
ExifProfile(byte[]?)
Initializes a new instance of the ExifProfile class.
public ExifProfile(byte[]? data)
Parameters
data
byte[]The byte array to read the EXIF profile from.
Properties
InvalidTags
Gets the tags that where found but contained an invalid value.
public IReadOnlyList<ExifTag> InvalidTags { get; }
Property Value
Parts
Gets or sets which parts will be written when the profile is added to an image.
public ExifParts Parts { get; set; }
Property Value
Values
Gets the values of this EXIF profile.
public IReadOnlyList<IExifValue> Values { get; }
Property Value
Methods
DeepClone()
public ExifProfile DeepClone()
Returns
RemoveValue(ExifTag)
Removes the value with the specified tag.
public bool RemoveValue(ExifTag tag)
Parameters
tag
ExifTagThe tag of the EXIF value.
Returns
- bool
True, if the value was removed, otherwise false.
SetValue<TValueType>(ExifTag<TValueType>, TValueType)
Sets the value of the specified tag.
public void SetValue<TValueType>(ExifTag<TValueType> tag, TValueType value)
Parameters
tag
ExifTag<TValueType>The tag of the exif value.
value
TValueTypeThe value.
Type Parameters
TValueType
The data type of the tag.
ToByteArray()
Converts this instance to a byte array.
public byte[]? ToByteArray()
Returns
- byte[]
The byte[]
TryCreateThumbnail(out Image?)
Returns the thumbnail in the EXIF profile when available.
public bool TryCreateThumbnail(out Image? image)
Parameters
image
ImageThe thumbnail
Returns
- bool
True, if there is a thumbnail otherwise false.
TryCreateThumbnail<TPixel>(out Image<TPixel>?)
Returns the thumbnail in the EXIF profile when available.
public bool TryCreateThumbnail<TPixel>(out Image<TPixel>? image) where TPixel : unmanaged, IPixel<TPixel>
Parameters
image
Image<TPixel>The thumbnail.
Returns
- bool
True, if there is a thumbnail otherwise false.
Type Parameters
TPixel
The pixel format.
TryGetValue<TValueType>(ExifTag<TValueType>, out IExifValue<TValueType>?)
Returns the value with the specified tag.
public bool TryGetValue<TValueType>(ExifTag<TValueType> tag, out IExifValue<TValueType>? exifValue)
Parameters
tag
ExifTag<TValueType>The tag of the exif value.
exifValue
IExifValue<TValueType>The value with the specified tag.
Returns
- bool
True when found, otherwise false
Type Parameters
TValueType
The data type of the tag.