Browse Source

used wrong comparison

af/merge-core
Johannes Bildstein 9 years ago
parent
commit
58ed1cd36e
  1. 4
      src/ImageSharp/MetaData/Profiles/ICC/Various/IccClut.cs

4
src/ImageSharp/MetaData/Profiles/ICC/Various/IccClut.cs

@ -159,7 +159,7 @@ namespace ImageSharp
Guard.MustBeBetweenOrEqualTo(this.OutputChannelCount, 1, 15, nameof(this.OutputChannelCount));
bool isLengthDifferent = this.Values.Any(t => t.Length != this.OutputChannelCount);
Guard.IsTrue(isLengthDifferent, nameof(this.Values), "The number of output values varies");
Guard.IsFalse(isLengthDifferent, nameof(this.Values), "The number of output values varies");
int length = 0;
for (int i = 0; i < this.InputChannelCount; i++)
@ -169,7 +169,7 @@ namespace ImageSharp
length /= this.InputChannelCount;
Guard.IsTrue(this.Values.Length != length, nameof(this.Values), "Length of values array does not match the grid points");
Guard.IsTrue(this.Values.Length == length, nameof(this.Values), "Length of values array does not match the grid points");
}
}
}

Loading…
Cancel
Save