Table of Contents

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

IReadOnlyList<ExifTag>

Parts

Gets or sets which parts will be written when the profile is added to an image.

public ExifParts Parts { get; set; }

Property Value

ExifParts

Values

Gets the values of this EXIF profile.

public IReadOnlyList<IExifValue> Values { get; }

Property Value

IReadOnlyList<IExifValue>

Methods

DeepClone()

public ExifProfile DeepClone()

Returns

ExifProfile

RemoveValue(ExifTag)

Removes the value with the specified tag.

public bool RemoveValue(ExifTag tag)

Parameters

tag ExifTag

The 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 TValueType

The 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 Image

The 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.