Browse Source

Merge pull request #2787 from lassevk/lvk/metadata-debuggerdisplay

Add tagname to debugger visualization for Exif- and Iptc-values, to facilitate easier debugging and discovery
pull/2818/head
James Jackson-South 2 years ago
committed by GitHub
parent
commit
63f5351955
No known key found for this signature in database GPG Key ID: B5690EEEBB952194
  1. 2
      src/ImageSharp/Metadata/Profiles/Exif/Values/ExifValue.cs
  2. 2
      src/ImageSharp/Metadata/Profiles/IPTC/IptcValue.cs

2
src/ImageSharp/Metadata/Profiles/Exif/Values/ExifValue.cs

@ -1,10 +1,12 @@
// Copyright (c) Six Labors.
// Licensed under the Six Labors Split License.
using System.Diagnostics;
using System.Runtime.CompilerServices;
namespace SixLabors.ImageSharp.Metadata.Profiles.Exif;
[DebuggerDisplay("{Tag} = {IsArray?\"[..]\":ToString(),nq} ({GetType().Name,nq})")]
internal abstract class ExifValue : IExifValue, IEquatable<ExifTag>
{
protected ExifValue(ExifTag tag) => this.Tag = tag;

2
src/ImageSharp/Metadata/Profiles/IPTC/IptcValue.cs

@ -1,6 +1,7 @@
// Copyright (c) Six Labors.
// Licensed under the Six Labors Split License.
using System.Diagnostics;
using System.Text;
namespace SixLabors.ImageSharp.Metadata.Profiles.Iptc;
@ -8,6 +9,7 @@ namespace SixLabors.ImageSharp.Metadata.Profiles.Iptc;
/// <summary>
/// Represents a single value of the IPTC profile.
/// </summary>
[DebuggerDisplay("{Tag} = {ToString(),nq} ({GetType().Name,nq})")]
public sealed class IptcValue : IDeepCloneable<IptcValue>
{
private byte[] data = Array.Empty<byte>();

Loading…
Cancel
Save