|
|
|
@ -90,7 +90,7 @@ namespace ImageSharp |
|
|
|
if (base.Equals(other) && other is IccChromaticityTagDataEntry entry) |
|
|
|
{ |
|
|
|
return this.ColorantType == entry.ColorantType |
|
|
|
&& this.ChannelValues.SequenceEqual(entry.ChannelValues); |
|
|
|
&& this.EqualsChannelValues(entry); |
|
|
|
} |
|
|
|
|
|
|
|
return false; |
|
|
|
@ -138,5 +138,23 @@ namespace ImageSharp |
|
|
|
throw new ArgumentException("Unrecognized colorant encoding"); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
private bool EqualsChannelValues(IccChromaticityTagDataEntry entry) |
|
|
|
{ |
|
|
|
if (this.ChannelValues.Length != entry.ChannelValues.Length) |
|
|
|
{ |
|
|
|
return false; |
|
|
|
} |
|
|
|
|
|
|
|
for (int i = 0; i < this.ChannelValues.Length; i++) |
|
|
|
{ |
|
|
|
if (!this.ChannelValues[i].SequenceEqual(entry.ChannelValues[i])) |
|
|
|
{ |
|
|
|
return false; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
return true; |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|