Class ImageMetadata
Encapsulates the metadata of an image.
Implements
Inherited Members
Namespace: SixLabors.ImageSharp.Metadata
Assembly: SixLabors.ImageSharp.dll
Syntax
public sealed class ImageMetadata : IDeepCloneable<ImageMetadata>
Constructors
| Improve this Doc View SourceImageMetadata()
Initializes a new instance of the ImageMetadata class.
Declaration
public ImageMetadata()
Fields
| Improve this Doc View SourceDefaultHorizontalResolution
The default horizontal resolution value (dots per inch) in x direction.
Declaration
public const double DefaultHorizontalResolution = 96
Field Value
Type | Description |
---|---|
Double |
DefaultPixelResolutionUnits
The default pixel resolution units.
Declaration
public const PixelResolutionUnit DefaultPixelResolutionUnits = PixelResolutionUnit.PixelsPerInch
Field Value
Type | Description |
---|---|
PixelResolutionUnit |
DefaultVerticalResolution
The default vertical resolution value (dots per inch) in y direction.
Declaration
public const double DefaultVerticalResolution = 96
Field Value
Type | Description |
---|---|
Double |
Properties
| Improve this Doc View SourceExifProfile
Gets or sets the Exif profile.
Declaration
public ExifProfile ExifProfile { get; set; }
Property Value
Type | Description |
---|---|
ExifProfile |
HorizontalResolution
Gets or sets the resolution of the image in x- direction. It is defined as the number of dots per ResolutionUnits and should be an positive value.
Declaration
public double HorizontalResolution { get; set; }
Property Value
Type | Description |
---|---|
Double | The density of the image in x- direction. |
IccProfile
Gets or sets the list of ICC profiles.
Declaration
public IccProfile IccProfile { get; set; }
Property Value
Type | Description |
---|---|
IccProfile |
IptcProfile
Gets or sets the IPTC profile.
Declaration
public IptcProfile IptcProfile { get; set; }
Property Value
Type | Description |
---|---|
IptcProfile |
ResolutionUnits
Gets or sets unit of measure used when reporting resolution.
Value | Unit |
---|---|
AspectRatio (00) | No units; width:height pixel aspect ratio = Ydensity:Xdensity |
PixelsPerInch (01) | Pixels per inch (2.54 cm) |
PixelsPerCentimeter (02) | Pixels per centimeter |
PixelsPerMeter (03) | Pixels per meter (100 cm) |
Declaration
public PixelResolutionUnit ResolutionUnits { get; set; }
Property Value
Type | Description |
---|---|
PixelResolutionUnit |
VerticalResolution
Gets or sets the resolution of the image in y- direction. It is defined as the number of dots per ResolutionUnits and should be an positive value.
Declaration
public double VerticalResolution { get; set; }
Property Value
Type | Description |
---|---|
Double | The density of the image in y- direction. |
XmpProfile
Gets or sets the XMP profile.
Declaration
public XmpProfile XmpProfile { get; set; }
Property Value
Type | Description |
---|---|
XmpProfile |
Methods
| Improve this Doc View SourceDeepClone()
Creates a new T
that is a deep copy of the current instance.
Declaration
public ImageMetadata DeepClone()
Returns
Type | Description |
---|---|
ImageMetadata | The |
GetFormatMetadata<TFormatMetadata>(IImageFormat<TFormatMetadata>)
Gets the metadata value associated with the specified key.
Declaration
public TFormatMetadata GetFormatMetadata<TFormatMetadata>(IImageFormat<TFormatMetadata> key)
where TFormatMetadata : class, IDeepCloneable
Parameters
Type | Name | Description |
---|---|---|
IImageFormat<TFormatMetadata> | key | The key of the value to get. |
Returns
Type | Description |
---|---|
TFormatMetadata | The |
Type Parameters
Name | Description |
---|---|
TFormatMetadata | The type of metadata. |