Browse Source

Added CICP profile to image metadata

pull/2592/head
Tammo Hinrichs 3 years ago
parent
commit
155bdbec7f
  1. 7
      src/ImageSharp/Metadata/ImageFrameMetadata.cs
  2. 7
      src/ImageSharp/Metadata/ImageMetadata.cs

7
src/ImageSharp/Metadata/ImageFrameMetadata.cs

@ -2,6 +2,7 @@
// Licensed under the Six Labors Split License.
using SixLabors.ImageSharp.Formats;
using SixLabors.ImageSharp.Metadata.Profiles.CICP;
using SixLabors.ImageSharp.Metadata.Profiles.Exif;
using SixLabors.ImageSharp.Metadata.Profiles.Icc;
using SixLabors.ImageSharp.Metadata.Profiles.Iptc;
@ -43,6 +44,7 @@ public sealed class ImageFrameMetadata : IDeepCloneable<ImageFrameMetadata>
this.IccProfile = other.IccProfile?.DeepClone();
this.IptcProfile = other.IptcProfile?.DeepClone();
this.XmpProfile = other.XmpProfile?.DeepClone();
this.CicpProfile = other.CicpProfile?.DeepClone();
}
/// <summary>
@ -65,6 +67,11 @@ public sealed class ImageFrameMetadata : IDeepCloneable<ImageFrameMetadata>
/// </summary>
public IptcProfile? IptcProfile { get; set; }
/// <summary>
/// Gets or sets the CICP profile
/// </summary>
public CicpProfile? CicpProfile { get; set; }
/// <inheritdoc/>
public ImageFrameMetadata DeepClone() => new(this);

7
src/ImageSharp/Metadata/ImageMetadata.cs

@ -2,6 +2,7 @@
// Licensed under the Six Labors Split License.
using SixLabors.ImageSharp.Formats;
using SixLabors.ImageSharp.Metadata.Profiles.CICP;
using SixLabors.ImageSharp.Metadata.Profiles.Exif;
using SixLabors.ImageSharp.Metadata.Profiles.Icc;
using SixLabors.ImageSharp.Metadata.Profiles.Iptc;
@ -68,6 +69,7 @@ public sealed class ImageMetadata : IDeepCloneable<ImageMetadata>
this.IccProfile = other.IccProfile?.DeepClone();
this.IptcProfile = other.IptcProfile?.DeepClone();
this.XmpProfile = other.XmpProfile?.DeepClone();
this.CicpProfile = other.CicpProfile?.DeepClone();
// NOTE: This clone is actually shallow but we share the same format
// instances for all images in the configuration.
@ -157,6 +159,11 @@ public sealed class ImageMetadata : IDeepCloneable<ImageMetadata>
/// </summary>
public IptcProfile? IptcProfile { get; set; }
/// <summary>
/// Gets or sets the CICP profile.
/// </summary>
public CicpProfile? CicpProfile { get; set; }
/// <summary>
/// Gets the original format, if any, the image was decode from.
/// </summary>

Loading…
Cancel
Save