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