@ -68,20 +68,20 @@ namespace ImageSharp
if ( this . IsAClutMMatrixB ( ) )
{
Guard . IsTrue ( this . CurveB . Length ! = 3 , nameof ( this . CurveB ) , $"{nameof(this.CurveB)} must have a length of three" ) ;
Guard . IsTrue ( this . CurveM . Length ! = 3 , nameof ( this . CurveM ) , $"{nameof(this.CurveM)} must have a length of three" ) ;
Guard . IsTrue ( this . CurveB . Length = = 3 , nameof ( this . CurveB ) , $"{nameof(this.CurveB)} must have a length of three" ) ;
Guard . IsTrue ( this . CurveM . Length = = 3 , nameof ( this . CurveM ) , $"{nameof(this.CurveM)} must have a length of three" ) ;
Guard . MustBeBetweenOrEqualTo ( this . CurveA . Length , 1 , 1 5 , nameof ( this . CurveA ) ) ;
this . InputChannelCount = curveA . Length ;
this . OutputChannelCount = 3 ;
Guard . IsTrue ( this . InputChannelCount ! = clutValues . InputChannelCount , nameof ( clutValues ) , "Input channel count does not match the CLUT size" ) ;
Guard . IsTrue ( this . OutputChannelCount ! = clutValues . OutputChannelCount , nameof ( clutValues ) , "Output channel count does not match the CLUT size" ) ;
Guard . IsTrue ( this . InputChannelCount = = clutValues . InputChannelCount , nameof ( clutValues ) , "Input channel count does not match the CLUT size" ) ;
Guard . IsTrue ( this . OutputChannelCount = = clutValues . OutputChannelCount , nameof ( clutValues ) , "Output channel count does not match the CLUT size" ) ;
}
else if ( this . IsMMatrixB ( ) )
{
Guard . IsTrue ( this . CurveB . Length ! = 3 , nameof ( this . CurveB ) , $"{nameof(this.CurveB)} must have a length of three" ) ;
Guard . IsTrue ( this . CurveM . Length ! = 3 , nameof ( this . CurveM ) , $"{nameof(this.CurveM)} must have a length of three" ) ;
Guard . IsTrue ( this . CurveB . Length = = 3 , nameof ( this . CurveB ) , $"{nameof(this.CurveB)} must have a length of three" ) ;
Guard . IsTrue ( this . CurveM . Length = = 3 , nameof ( this . CurveM ) , $"{nameof(this.CurveM)} must have a length of three" ) ;
this . InputChannelCount = this . OutputChannelCount = 3 ;
}
@ -93,8 +93,8 @@ namespace ImageSharp
this . InputChannelCount = curveA . Length ;
this . OutputChannelCount = curveB . Length ;
Guard . IsTrue ( this . InputChannelCount ! = clutValues . InputChannelCount , nameof ( clutValues ) , "Input channel count does not match the CLUT size" ) ;
Guard . IsTrue ( this . OutputChannelCount ! = clutValues . OutputChannelCount , nameof ( clutValues ) , "Output channel count does not match the CLUT size" ) ;
Guard . IsTrue ( this . InputChannelCount = = clutValues . InputChannelCount , nameof ( clutValues ) , "Input channel count does not match the CLUT size" ) ;
Guard . IsTrue ( this . OutputChannelCount = = clutValues . OutputChannelCount , nameof ( clutValues ) , "Output channel count does not match the CLUT size" ) ;
}
else if ( this . IsB ( ) )
{
@ -217,7 +217,7 @@ namespace ImageSharp
if ( curves ! = null )
{
bool isNotCurve = curves . Any ( t = > ! ( t is IccParametricCurveTagDataEntry ) & & ! ( t is IccCurveTagDataEntry ) ) ;
Guard . IsTru e ( isNotCurve , nameof ( name ) , $"{nameof(name)} must be of type {nameof(IccParametricCurveTagDataEntry)} or {nameof(IccCurveTagDataEntry)}" ) ;
Guard . IsFals e ( isNotCurve , nameof ( name ) , $"{nameof(name)} must be of type {nameof(IccParametricCurveTagDataEntry)} or {nameof(IccCurveTagDataEntry)}" ) ;
}
}
@ -225,13 +225,13 @@ namespace ImageSharp
{
if ( matrix3x1 ! = null )
{
Guard . IsTrue ( matrix3x1 . Length ! = 3 , nameof ( matrix3x1 ) , "Matrix must have a size of three" ) ;
Guard . IsTrue ( matrix3x1 . Length = = 3 , nameof ( matrix3x1 ) , "Matrix must have a size of three" ) ;
}
if ( matrix3x3 ! = null )
{
bool isNot 3By3 = matrix3x3 . GetLength ( 0 ) ! = 3 | | matrix3x3 . GetLength ( 1 ) ! = 3 ;
Guard . IsTrue ( isNot 3By3 , nameof ( matrix3x3 ) , "Matrix must have a size of three by three" ) ;
bool is3By3 = matrix3x3 . GetLength ( 0 ) = = 3 & & matrix3x3 . GetLength ( 1 ) = = 3 ;
Guard . IsTrue ( is3By3 , nameof ( matrix3x3 ) , "Matrix must have a size of three by three" ) ;
}
}