2021-11-20 13:52:28 +01:00
|
|
|
namespace zero.Media;
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Metadata for images
|
|
|
|
|
/// </summary>
|
2021-11-25 15:38:36 +01:00
|
|
|
public class MediaImageMetadata
|
2021-11-20 13:52:28 +01:00
|
|
|
{
|
2021-12-18 01:51:38 +01:00
|
|
|
/// <summary>
|
|
|
|
|
/// Alternative text which is used when the image can't be loaded
|
|
|
|
|
/// </summary>
|
|
|
|
|
public string AlternativeText { get; set; }
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Define custom thumbnails which are generated on upload
|
|
|
|
|
/// (see IZeroOptions.For<MediaOptions>().Thumbnails)
|
|
|
|
|
/// </summary>
|
|
|
|
|
public Dictionary<string, string> Thumbnails { get; set; } = new();
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Optional focal point for an image
|
|
|
|
|
/// </summary>
|
|
|
|
|
public MediaFocalPoint FocalPoint { get; set; }
|
|
|
|
|
|
2021-11-20 13:52:28 +01:00
|
|
|
/// <summary>
|
|
|
|
|
/// Width in pixels
|
|
|
|
|
/// </summary>
|
|
|
|
|
public int Width { get; set; }
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Height in pixels
|
|
|
|
|
/// </summary>
|
|
|
|
|
public int Height { get; set; }
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Resolution factor
|
|
|
|
|
/// </summary>
|
|
|
|
|
public double DPI { get; set; }
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Date the image was taken
|
|
|
|
|
/// </summary>
|
2021-11-25 15:38:36 +01:00
|
|
|
public DateTimeOffset? ImageTakenDate { get; set; }
|
2021-11-20 13:52:28 +01:00
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Original color space of the image
|
|
|
|
|
/// </summary>
|
|
|
|
|
public string ColorSpace { get; set; }
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Whether this image contains transparent pixels
|
|
|
|
|
/// </summary>
|
|
|
|
|
public bool HasTransparency { get; set; }
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// How many frames contains this image (for animation)
|
|
|
|
|
/// </summary>
|
|
|
|
|
public int Frames { get; set; } = 1;
|
|
|
|
|
}
|