Browse Source

Merge branch 'main' into icc-color-conversion

pull/1567/head
James Jackson-South 3 years ago
parent
commit
b7833a4a56
  1. 1
      src/ImageSharp/Color/Color.Conversions.cs
  2. 3
      src/ImageSharp/ColorSpaces/CieLab.cs
  3. 3
      src/ImageSharp/ColorSpaces/CieLch.cs
  4. 3
      src/ImageSharp/ColorSpaces/CieLchuv.cs
  5. 3
      src/ImageSharp/ColorSpaces/CieLuv.cs
  6. 3
      src/ImageSharp/ColorSpaces/CieXyy.cs
  7. 3
      src/ImageSharp/ColorSpaces/CieXyz.cs
  8. 3
      src/ImageSharp/ColorSpaces/Cmyk.cs
  9. 3
      src/ImageSharp/ColorSpaces/Conversion/Implementation/CieXyChromaticityCoordinates.cs
  10. 3
      src/ImageSharp/ColorSpaces/Conversion/Implementation/RGBPrimariesChromaticityCoordinates.cs
  11. 2
      src/ImageSharp/ColorSpaces/Conversion/Implementation/WorkingSpaces/GammaWorkingSpace.cs
  12. 3
      src/ImageSharp/ColorSpaces/Conversion/Implementation/WorkingSpaces/RgbWorkingSpace.cs
  13. 3
      src/ImageSharp/ColorSpaces/Hsl.cs
  14. 3
      src/ImageSharp/ColorSpaces/Hsv.cs
  15. 3
      src/ImageSharp/ColorSpaces/HunterLab.cs
  16. 3
      src/ImageSharp/ColorSpaces/LinearRgb.cs
  17. 3
      src/ImageSharp/ColorSpaces/Lms.cs
  18. 3
      src/ImageSharp/ColorSpaces/Rgb.cs
  19. 3
      src/ImageSharp/ColorSpaces/YCbCr.cs
  20. 3
      src/ImageSharp/Formats/Gif/Sections/GifGraphicControlExtension.cs
  21. 3
      src/ImageSharp/Formats/Jpeg/Components/Block8x8F.cs
  22. 3
      src/ImageSharp/Formats/Jpeg/Components/Decoder/AdobeMarker.cs
  23. 3
      src/ImageSharp/Formats/Jpeg/Components/Decoder/JFifMarker.cs
  24. 3
      src/ImageSharp/Formats/Png/PngTextData.cs
  25. 3
      src/ImageSharp/Formats/Tiff/TiffBitsPerSample.cs
  26. 3
      src/ImageSharp/Memory/RowInterval.cs
  27. 5
      src/ImageSharp/Metadata/Profiles/Exif/Tags/ExifTag.cs
  28. 3
      src/ImageSharp/Metadata/Profiles/Exif/Values/EncodedString.cs
  29. 5
      src/ImageSharp/Metadata/Profiles/ICC/Curves/IccCurveSegment.cs
  30. 7
      src/ImageSharp/Metadata/Profiles/ICC/Curves/IccFormulaCurveElement.cs
  31. 5
      src/ImageSharp/Metadata/Profiles/ICC/Curves/IccOneDimensionalCurve.cs
  32. 5
      src/ImageSharp/Metadata/Profiles/ICC/Curves/IccParametricCurve.cs
  33. 5
      src/ImageSharp/Metadata/Profiles/ICC/Curves/IccResponseCurve.cs
  34. 9
      src/ImageSharp/Metadata/Profiles/ICC/Curves/IccSampledCurveElement.cs
  35. 5
      src/ImageSharp/Metadata/Profiles/ICC/IccTagDataEntry.cs
  36. 5
      src/ImageSharp/Metadata/Profiles/ICC/MultiProcessElements/IccBAcsProcessElement.cs
  37. 7
      src/ImageSharp/Metadata/Profiles/ICC/MultiProcessElements/IccClutProcessElement.cs
  38. 7
      src/ImageSharp/Metadata/Profiles/ICC/MultiProcessElements/IccCurveSetProcessElement.cs
  39. 5
      src/ImageSharp/Metadata/Profiles/ICC/MultiProcessElements/IccEAcsProcessElement.cs
  40. 9
      src/ImageSharp/Metadata/Profiles/ICC/MultiProcessElements/IccMatrixProcessElement.cs
  41. 5
      src/ImageSharp/Metadata/Profiles/ICC/MultiProcessElements/IccMultiProcessElement.cs
  42. 7
      src/ImageSharp/Metadata/Profiles/ICC/TagDataEntries/IccChromaticityTagDataEntry.cs
  43. 7
      src/ImageSharp/Metadata/Profiles/ICC/TagDataEntries/IccColorantOrderTagDataEntry.cs
  44. 7
      src/ImageSharp/Metadata/Profiles/ICC/TagDataEntries/IccColorantTableTagDataEntry.cs
  45. 7
      src/ImageSharp/Metadata/Profiles/ICC/TagDataEntries/IccCrdInfoTagDataEntry.cs
  46. 7
      src/ImageSharp/Metadata/Profiles/ICC/TagDataEntries/IccCurveTagDataEntry.cs
  47. 9
      src/ImageSharp/Metadata/Profiles/ICC/TagDataEntries/IccDataTagDataEntry.cs
  48. 7
      src/ImageSharp/Metadata/Profiles/ICC/TagDataEntries/IccDateTimeTagDataEntry.cs
  49. 7
      src/ImageSharp/Metadata/Profiles/ICC/TagDataEntries/IccFix16ArrayTagDataEntry.cs
  50. 7
      src/ImageSharp/Metadata/Profiles/ICC/TagDataEntries/IccLut16TagDataEntry.cs
  51. 7
      src/ImageSharp/Metadata/Profiles/ICC/TagDataEntries/IccLut8TagDataEntry.cs
  52. 7
      src/ImageSharp/Metadata/Profiles/ICC/TagDataEntries/IccMeasurementTagDataEntry.cs
  53. 7
      src/ImageSharp/Metadata/Profiles/ICC/TagDataEntries/IccMultiLocalizedUnicodeTagDataEntry.cs
  54. 7
      src/ImageSharp/Metadata/Profiles/ICC/TagDataEntries/IccMultiProcessElementsTagDataEntry.cs
  55. 13
      src/ImageSharp/Metadata/Profiles/ICC/TagDataEntries/IccNamedColor2TagDataEntry.cs
  56. 7
      src/ImageSharp/Metadata/Profiles/ICC/TagDataEntries/IccParametricCurveTagDataEntry.cs
  57. 7
      src/ImageSharp/Metadata/Profiles/ICC/TagDataEntries/IccProfileSequenceDescTagDataEntry.cs
  58. 7
      src/ImageSharp/Metadata/Profiles/ICC/TagDataEntries/IccProfileSequenceIdentifierTagDataEntry.cs
  59. 7
      src/ImageSharp/Metadata/Profiles/ICC/TagDataEntries/IccResponseCurveSet16TagDataEntry.cs
  60. 7
      src/ImageSharp/Metadata/Profiles/ICC/TagDataEntries/IccScreeningTagDataEntry.cs
  61. 7
      src/ImageSharp/Metadata/Profiles/ICC/TagDataEntries/IccSignatureTagDataEntry.cs
  62. 7
      src/ImageSharp/Metadata/Profiles/ICC/TagDataEntries/IccTextTagDataEntry.cs
  63. 7
      src/ImageSharp/Metadata/Profiles/ICC/TagDataEntries/IccUFix16ArrayTagDataEntry.cs
  64. 7
      src/ImageSharp/Metadata/Profiles/ICC/TagDataEntries/IccUInt16ArrayTagDataEntry.cs
  65. 7
      src/ImageSharp/Metadata/Profiles/ICC/TagDataEntries/IccUInt32ArrayTagDataEntry.cs
  66. 7
      src/ImageSharp/Metadata/Profiles/ICC/TagDataEntries/IccUInt64ArrayTagDataEntry.cs
  67. 7
      src/ImageSharp/Metadata/Profiles/ICC/TagDataEntries/IccUInt8ArrayTagDataEntry.cs
  68. 7
      src/ImageSharp/Metadata/Profiles/ICC/TagDataEntries/IccUcrBgTagDataEntry.cs
  69. 7
      src/ImageSharp/Metadata/Profiles/ICC/TagDataEntries/IccUnknownTagDataEntry.cs
  70. 7
      src/ImageSharp/Metadata/Profiles/ICC/TagDataEntries/IccViewingConditionsTagDataEntry.cs
  71. 9
      src/ImageSharp/Metadata/Profiles/ICC/TagDataEntries/IccXyzTagDataEntry.cs
  72. 5
      src/ImageSharp/Metadata/Profiles/ICC/Various/IccClut.cs
  73. 3
      src/ImageSharp/Metadata/Profiles/ICC/Various/IccColorantTableEntry.cs
  74. 3
      src/ImageSharp/Metadata/Profiles/ICC/Various/IccLocalizedString.cs
  75. 3
      src/ImageSharp/Metadata/Profiles/ICC/Various/IccLut.cs
  76. 3
      src/ImageSharp/Metadata/Profiles/ICC/Various/IccNamedColor.cs
  77. 3
      src/ImageSharp/Metadata/Profiles/ICC/Various/IccPositionNumber.cs
  78. 3
      src/ImageSharp/Metadata/Profiles/ICC/Various/IccProfileDescription.cs
  79. 3
      src/ImageSharp/Metadata/Profiles/ICC/Various/IccProfileId.cs
  80. 3
      src/ImageSharp/Metadata/Profiles/ICC/Various/IccProfileSequenceIdentifier.cs
  81. 3
      src/ImageSharp/Metadata/Profiles/ICC/Various/IccResponseNumber.cs
  82. 3
      src/ImageSharp/Metadata/Profiles/ICC/Various/IccScreeningChannel.cs
  83. 3
      src/ImageSharp/Metadata/Profiles/ICC/Various/IccTagTableEntry.cs
  84. 3
      src/ImageSharp/Metadata/Profiles/ICC/Various/IccVersion.cs
  85. 3
      src/ImageSharp/PixelFormats/PixelImplementations/Bgra5551.cs
  86. 3
      src/ImageSharp/Primitives/ColorMatrix.cs
  87. 3
      src/ImageSharp/Primitives/Complex64.cs
  88. 3
      src/ImageSharp/Primitives/ComplexVector4.cs
  89. 3
      src/ImageSharp/Primitives/DenseMatrix{T}.cs
  90. 3
      src/ImageSharp/Primitives/LongRational.cs
  91. 3
      src/ImageSharp/Primitives/Number.cs
  92. 3
      src/ImageSharp/Primitives/Point.cs
  93. 3
      src/ImageSharp/Primitives/PointF.cs
  94. 3
      src/ImageSharp/Primitives/Rational.cs
  95. 3
      src/ImageSharp/Primitives/Rectangle.cs
  96. 3
      src/ImageSharp/Primitives/RectangleF.cs
  97. 3
      src/ImageSharp/Primitives/SignedRational.cs
  98. 3
      src/ImageSharp/Primitives/Size.cs
  99. 3
      src/ImageSharp/Primitives/SizeF.cs
  100. 3
      src/ImageSharp/Primitives/ValueSize.cs

1
src/ImageSharp/Color/Color.Conversions.cs

@ -1,6 +1,5 @@
// Copyright (c) Six Labors.
// Licensed under the Six Labors Split License.
#nullable disable
using System.Numerics;
using System.Runtime.CompilerServices;

3
src/ImageSharp/ColorSpaces/CieLab.cs

@ -1,6 +1,5 @@
// Copyright (c) Six Labors.
// Licensed under the Six Labors Split License.
#nullable disable
using System.Numerics;
using System.Runtime.CompilerServices;
@ -124,7 +123,7 @@ public readonly struct CieLab : IEquatable<CieLab>
public override string ToString() => FormattableString.Invariant($"CieLab({this.L:#0.##}, {this.A:#0.##}, {this.B:#0.##})");
/// <inheritdoc/>
public override bool Equals(object obj) => obj is CieLab other && this.Equals(other);
public override bool Equals(object? obj) => obj is CieLab other && this.Equals(other);
/// <inheritdoc/>
[MethodImpl(InliningOptions.ShortMethod)]

3
src/ImageSharp/ColorSpaces/CieLch.cs

@ -1,6 +1,5 @@
// Copyright (c) Six Labors.
// Licensed under the Six Labors Split License.
#nullable disable
using System.Numerics;
using System.Runtime.CompilerServices;
@ -128,7 +127,7 @@ public readonly struct CieLch : IEquatable<CieLch>
/// <inheritdoc/>
[MethodImpl(InliningOptions.ShortMethod)]
public override bool Equals(object obj) => obj is CieLch other && this.Equals(other);
public override bool Equals(object? obj) => obj is CieLch other && this.Equals(other);
/// <inheritdoc/>
[MethodImpl(InliningOptions.ShortMethod)]

3
src/ImageSharp/ColorSpaces/CieLchuv.cs

@ -1,6 +1,5 @@
// Copyright (c) Six Labors.
// Licensed under the Six Labors Split License.
#nullable disable
using System.Numerics;
using System.Runtime.CompilerServices;
@ -125,7 +124,7 @@ public readonly struct CieLchuv : IEquatable<CieLchuv>
public override string ToString() => FormattableString.Invariant($"CieLchuv({this.L:#0.##}, {this.C:#0.##}, {this.H:#0.##})");
/// <inheritdoc/>
public override bool Equals(object obj) => obj is CieLchuv other && this.Equals(other);
public override bool Equals(object? obj) => obj is CieLchuv other && this.Equals(other);
/// <inheritdoc/>
[MethodImpl(InliningOptions.ShortMethod)]

3
src/ImageSharp/ColorSpaces/CieLuv.cs

@ -1,6 +1,5 @@
// Copyright (c) Six Labors.
// Licensed under the Six Labors Split License.
#nullable disable
using System.Numerics;
using System.Runtime.CompilerServices;
@ -125,7 +124,7 @@ public readonly struct CieLuv : IEquatable<CieLuv>
public override string ToString() => FormattableString.Invariant($"CieLuv({this.L:#0.##}, {this.U:#0.##}, {this.V:#0.##})");
/// <inheritdoc/>
public override bool Equals(object obj) => obj is CieLuv other && this.Equals(other);
public override bool Equals(object? obj) => obj is CieLuv other && this.Equals(other);
/// <inheritdoc/>
[MethodImpl(InliningOptions.ShortMethod)]

3
src/ImageSharp/ColorSpaces/CieXyy.cs

@ -1,6 +1,5 @@
// Copyright (c) Six Labors.
// Licensed under the Six Labors Split License.
#nullable disable
using System.Numerics;
using System.Runtime.CompilerServices;
@ -89,7 +88,7 @@ public readonly struct CieXyy : IEquatable<CieXyy>
public override string ToString() => FormattableString.Invariant($"CieXyy({this.X:#0.##}, {this.Y:#0.##}, {this.Yl:#0.##})");
/// <inheritdoc/>
public override bool Equals(object obj) => obj is CieXyy other && this.Equals(other);
public override bool Equals(object? obj) => obj is CieXyy other && this.Equals(other);
/// <inheritdoc/>
[MethodImpl(InliningOptions.ShortMethod)]

3
src/ImageSharp/ColorSpaces/CieXyz.cs

@ -1,6 +1,5 @@
// Copyright (c) Six Labors.
// Licensed under the Six Labors Split License.
#nullable disable
using System.Numerics;
using System.Runtime.CompilerServices;
@ -92,7 +91,7 @@ public readonly struct CieXyz : IEquatable<CieXyz>
public override string ToString() => FormattableString.Invariant($"CieXyz({this.X:#0.##}, {this.Y:#0.##}, {this.Z:#0.##})");
/// <inheritdoc/>
public override bool Equals(object obj) => obj is CieXyz other && this.Equals(other);
public override bool Equals(object? obj) => obj is CieXyz other && this.Equals(other);
/// <inheritdoc/>
[MethodImpl(InliningOptions.ShortMethod)]

3
src/ImageSharp/ColorSpaces/Cmyk.cs

@ -1,6 +1,5 @@
// Copyright (c) Six Labors.
// Licensed under the Six Labors Split License.
#nullable disable
using System.Numerics;
using System.Runtime.CompilerServices;
@ -96,7 +95,7 @@ public readonly struct Cmyk : IEquatable<Cmyk>
public override string ToString() => FormattableString.Invariant($"Cmyk({this.C:#0.##}, {this.M:#0.##}, {this.Y:#0.##}, {this.K:#0.##})");
/// <inheritdoc/>
public override bool Equals(object obj) => obj is Cmyk other && this.Equals(other);
public override bool Equals(object? obj) => obj is Cmyk other && this.Equals(other);
/// <inheritdoc/>
[MethodImpl(InliningOptions.ShortMethod)]

3
src/ImageSharp/ColorSpaces/Conversion/Implementation/CieXyChromaticityCoordinates.cs

@ -1,6 +1,5 @@
// Copyright (c) Six Labors.
// Licensed under the Six Labors Split License.
#nullable disable
using System.Runtime.CompilerServices;
@ -74,7 +73,7 @@ public readonly struct CieXyChromaticityCoordinates : IEquatable<CieXyChromatici
=> FormattableString.Invariant($"CieXyChromaticityCoordinates({this.X:#0.##}, {this.Y:#0.##})");
/// <inheritdoc/>
public override bool Equals(object obj)
public override bool Equals(object? obj)
=> obj is CieXyChromaticityCoordinates other && this.Equals(other);
/// <inheritdoc/>

3
src/ImageSharp/ColorSpaces/Conversion/Implementation/RGBPrimariesChromaticityCoordinates.cs

@ -1,6 +1,5 @@
// Copyright (c) Six Labors.
// Licensed under the Six Labors Split License.
#nullable disable
namespace SixLabors.ImageSharp.ColorSpaces.Conversion;
@ -73,7 +72,7 @@ public readonly struct RgbPrimariesChromaticityCoordinates : IEquatable<RgbPrima
}
/// <inheritdoc/>
public override bool Equals(object obj)
public override bool Equals(object? obj)
{
return obj is RgbPrimariesChromaticityCoordinates other && this.Equals(other);
}

2
src/ImageSharp/ColorSpaces/Conversion/Implementation/WorkingSpaces/GammaWorkingSpace.cs

@ -34,7 +34,7 @@ public sealed class GammaWorkingSpace : RgbWorkingSpace
public override float Expand(float channel) => GammaCompanding.Expand(channel, this.Gamma);
/// <inheritdoc/>
public override bool Equals(object obj)
public override bool Equals(object? obj)
{
if (obj is null)
{

3
src/ImageSharp/ColorSpaces/Conversion/Implementation/WorkingSpaces/RgbWorkingSpace.cs

@ -1,6 +1,5 @@
// Copyright (c) Six Labors.
// Licensed under the Six Labors Split License.
#nullable disable
namespace SixLabors.ImageSharp.ColorSpaces.Conversion;
@ -53,7 +52,7 @@ public abstract class RgbWorkingSpace
public abstract float Compress(float channel);
/// <inheritdoc/>
public override bool Equals(object obj)
public override bool Equals(object? obj)
{
if (obj is null)
{

3
src/ImageSharp/ColorSpaces/Hsl.cs

@ -1,6 +1,5 @@
// Copyright (c) Six Labors.
// Licensed under the Six Labors Split License.
#nullable disable
using System.Numerics;
using System.Runtime.CompilerServices;
@ -90,7 +89,7 @@ public readonly struct Hsl : IEquatable<Hsl>
public override string ToString() => FormattableString.Invariant($"Hsl({this.H:#0.##}, {this.S:#0.##}, {this.L:#0.##})");
/// <inheritdoc/>
public override bool Equals(object obj) => obj is Hsl other && this.Equals(other);
public override bool Equals(object? obj) => obj is Hsl other && this.Equals(other);
/// <inheritdoc/>
[MethodImpl(InliningOptions.ShortMethod)]

3
src/ImageSharp/ColorSpaces/Hsv.cs

@ -1,6 +1,5 @@
// Copyright (c) Six Labors.
// Licensed under the Six Labors Split License.
#nullable disable
using System.Numerics;
using System.Runtime.CompilerServices;
@ -88,7 +87,7 @@ public readonly struct Hsv : IEquatable<Hsv>
public override string ToString() => FormattableString.Invariant($"Hsv({this.H:#0.##}, {this.S:#0.##}, {this.V:#0.##})");
/// <inheritdoc/>
public override bool Equals(object obj) => obj is Hsv other && this.Equals(other);
public override bool Equals(object? obj) => obj is Hsv other && this.Equals(other);
/// <inheritdoc/>
[MethodImpl(InliningOptions.ShortMethod)]

3
src/ImageSharp/ColorSpaces/HunterLab.cs

@ -1,6 +1,5 @@
// Copyright (c) Six Labors.
// Licensed under the Six Labors Split License.
#nullable disable
using System.Numerics;
using System.Runtime.CompilerServices;
@ -123,7 +122,7 @@ public readonly struct HunterLab : IEquatable<HunterLab>
public override string ToString() => FormattableString.Invariant($"HunterLab({this.L:#0.##}, {this.A:#0.##}, {this.B:#0.##})");
/// <inheritdoc/>
public override bool Equals(object obj) => obj is HunterLab other && this.Equals(other);
public override bool Equals(object? obj) => obj is HunterLab other && this.Equals(other);
/// <inheritdoc/>
[MethodImpl(InliningOptions.ShortMethod)]

3
src/ImageSharp/ColorSpaces/LinearRgb.cs

@ -1,6 +1,5 @@
// Copyright (c) Six Labors.
// Licensed under the Six Labors Split License.
#nullable disable
using System.Numerics;
using System.Runtime.CompilerServices;
@ -132,7 +131,7 @@ public readonly struct LinearRgb : IEquatable<LinearRgb>
public override string ToString() => FormattableString.Invariant($"LinearRgb({this.R:#0.##}, {this.G:#0.##}, {this.B:#0.##})");
/// <inheritdoc/>
public override bool Equals(object obj) => obj is LinearRgb other && this.Equals(other);
public override bool Equals(object? obj) => obj is LinearRgb other && this.Equals(other);
/// <inheritdoc/>
[MethodImpl(InliningOptions.ShortMethod)]

3
src/ImageSharp/ColorSpaces/Lms.cs

@ -1,6 +1,5 @@
// Copyright (c) Six Labors.
// Licensed under the Six Labors Split License.
#nullable disable
using System.Numerics;
using System.Runtime.CompilerServices;
@ -93,7 +92,7 @@ public readonly struct Lms : IEquatable<Lms>
public override string ToString() => FormattableString.Invariant($"Lms({this.L:#0.##}, {this.M:#0.##}, {this.S:#0.##})");
/// <inheritdoc/>
public override bool Equals(object obj) => obj is Lms other && this.Equals(other);
public override bool Equals(object? obj) => obj is Lms other && this.Equals(other);
/// <inheritdoc/>
[MethodImpl(InliningOptions.ShortMethod)]

3
src/ImageSharp/ColorSpaces/Rgb.cs

@ -1,6 +1,5 @@
// Copyright (c) Six Labors.
// Licensed under the Six Labors Split License.
#nullable disable
using System.Numerics;
using System.Runtime.CompilerServices;
@ -153,7 +152,7 @@ public readonly struct Rgb : IEquatable<Rgb>
public override string ToString() => FormattableString.Invariant($"Rgb({this.R:#0.##}, {this.G:#0.##}, {this.B:#0.##})");
/// <inheritdoc/>
public override bool Equals(object obj) => obj is Rgb other && this.Equals(other);
public override bool Equals(object? obj) => obj is Rgb other && this.Equals(other);
/// <inheritdoc/>
[MethodImpl(InliningOptions.ShortMethod)]

3
src/ImageSharp/ColorSpaces/YCbCr.cs

@ -1,6 +1,5 @@
// Copyright (c) Six Labors.
// Licensed under the Six Labors Split License.
#nullable disable
using System.Numerics;
using System.Runtime.CompilerServices;
@ -89,7 +88,7 @@ public readonly struct YCbCr : IEquatable<YCbCr>
public override string ToString() => FormattableString.Invariant($"YCbCr({this.Y}, {this.Cb}, {this.Cr})");
/// <inheritdoc/>
public override bool Equals(object obj) => obj is YCbCr other && this.Equals(other);
public override bool Equals(object? obj) => obj is YCbCr other && this.Equals(other);
/// <inheritdoc/>
[MethodImpl(InliningOptions.ShortMethod)]

3
src/ImageSharp/Formats/Gif/Sections/GifGraphicControlExtension.cs

@ -1,6 +1,5 @@
// Copyright (c) Six Labors.
// Licensed under the Six Labors Split License.
#nullable disable
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
@ -107,7 +106,7 @@ internal readonly struct GifGraphicControlExtension : IGifExtension, IEquatable<
return value;
}
public override bool Equals(object obj) => obj is GifGraphicControlExtension extension && this.Equals(extension);
public override bool Equals(object? obj) => obj is GifGraphicControlExtension extension && this.Equals(extension);
public bool Equals(GifGraphicControlExtension other)
=> this.BlockSize == other.BlockSize

3
src/ImageSharp/Formats/Jpeg/Components/Block8x8F.cs

@ -1,6 +1,5 @@
// Copyright (c) Six Labors.
// Licensed under the Six Labors Split License.
#nullable disable
using System.Numerics;
using System.Runtime.CompilerServices;
@ -471,7 +470,7 @@ internal partial struct Block8x8F : IEquatable<Block8x8F>
&& this.V7R == other.V7R;
/// <inheritdoc />
public override bool Equals(object obj) => this.Equals((Block8x8F)obj);
public override bool Equals(object? obj) => this.Equals((Block8x8F?)obj);
/// <inheritdoc />
public override int GetHashCode()

3
src/ImageSharp/Formats/Jpeg/Components/Decoder/AdobeMarker.cs

@ -1,6 +1,5 @@
// Copyright (c) Six Labors.
// Licensed under the Six Labors Split License.
#nullable disable
namespace SixLabors.ImageSharp.Formats.Jpeg.Components.Decoder;
@ -90,7 +89,7 @@ internal readonly struct AdobeMarker : IEquatable<AdobeMarker>
}
/// <inheritdoc/>
public override bool Equals(object obj)
public override bool Equals(object? obj)
{
return obj is AdobeMarker other && this.Equals(other);
}

3
src/ImageSharp/Formats/Jpeg/Components/Decoder/JFifMarker.cs

@ -1,6 +1,5 @@
// Copyright (c) Six Labors.
// Licensed under the Six Labors Split License.
#nullable disable
using SixLabors.ImageSharp.Metadata;
@ -110,7 +109,7 @@ internal readonly struct JFifMarker : IEquatable<JFifMarker>
&& this.YDensity == other.YDensity;
/// <inheritdoc/>
public override bool Equals(object obj) => obj is JFifMarker other && this.Equals(other);
public override bool Equals(object? obj) => obj is JFifMarker other && this.Equals(other);
/// <inheritdoc/>
public override int GetHashCode()

3
src/ImageSharp/Formats/Png/PngTextData.cs

@ -1,6 +1,5 @@
// Copyright (c) Six Labors.
// Licensed under the Six Labors Split License.
#nullable disable
namespace SixLabors.ImageSharp.Formats.Png;
@ -99,7 +98,7 @@ public readonly struct PngTextData : IEquatable<PngTextData>
/// true if <paramref name="obj"/> and this instance are the same type and represent the
/// same value; otherwise, false.
/// </returns>
public override bool Equals(object obj)
public override bool Equals(object? obj)
=> obj is PngTextData other && this.Equals(other);
/// <summary>

3
src/ImageSharp/Formats/Tiff/TiffBitsPerSample.cs

@ -1,6 +1,5 @@
// Copyright (c) Six Labors.
// Licensed under the Six Labors Split License.
#nullable disable
namespace SixLabors.ImageSharp.Formats.Tiff;
@ -126,7 +125,7 @@ public readonly struct TiffBitsPerSample : IEquatable<TiffBitsPerSample>
}
/// <inheritdoc/>
public override bool Equals(object obj)
public override bool Equals(object? obj)
=> obj is TiffBitsPerSample sample && this.Equals(sample);
/// <inheritdoc/>

3
src/ImageSharp/Memory/RowInterval.cs

@ -1,6 +1,5 @@
// Copyright (c) Six Labors.
// Licensed under the Six Labors Split License.
#nullable disable
namespace SixLabors.ImageSharp.Memory;
@ -69,7 +68,7 @@ public readonly struct RowInterval : IEquatable<RowInterval>
}
/// <inheritdoc />
public override bool Equals(object obj)
public override bool Equals(object? obj)
{
return !ReferenceEquals(null, obj) && obj is RowInterval other && this.Equals(other);
}

5
src/ImageSharp/Metadata/Profiles/Exif/Tags/ExifTag.cs

@ -1,6 +1,5 @@
// Copyright (c) Six Labors.
// Licensed under the Six Labors Split License.
#nullable disable
namespace SixLabors.ImageSharp.Metadata.Profiles.Exif;
@ -34,7 +33,7 @@ public abstract partial class ExifTag : IEquatable<ExifTag>
public static bool operator !=(ExifTag left, ExifTag right) => !Equals(left, right);
/// <inheritdoc/>
public override bool Equals(object obj)
public override bool Equals(object? obj)
{
if (obj is ExifTag value)
{
@ -45,7 +44,7 @@ public abstract partial class ExifTag : IEquatable<ExifTag>
}
/// <inheritdoc/>
public bool Equals(ExifTag other)
public bool Equals(ExifTag? other)
{
if (other is null)
{

3
src/ImageSharp/Metadata/Profiles/Exif/Values/EncodedString.cs

@ -1,6 +1,5 @@
// Copyright (c) Six Labors.
// Licensed under the Six Labors Split License.
#nullable disable
namespace SixLabors.ImageSharp.Metadata.Profiles.Exif;
@ -101,7 +100,7 @@ public readonly struct EncodedString : IEquatable<EncodedString>
public static bool operator !=(EncodedString left, EncodedString right) => !(left == right);
/// <inheritdoc/>
public override bool Equals(object obj) => obj is EncodedString other && this.Equals(other);
public override bool Equals(object? obj) => obj is EncodedString other && this.Equals(other);
/// <inheritdoc/>
public bool Equals(EncodedString other) => this.Text == other.Text && this.Code == other.Code;

5
src/ImageSharp/Metadata/Profiles/ICC/Curves/IccCurveSegment.cs

@ -1,6 +1,5 @@
// Copyright (c) Six Labors.
// Licensed under the Six Labors Split License.
#nullable disable
namespace SixLabors.ImageSharp.Metadata.Profiles.Icc;
@ -22,7 +21,7 @@ internal abstract class IccCurveSegment : IEquatable<IccCurveSegment>
public IccCurveSegmentSignature Signature { get; }
/// <inheritdoc/>
public virtual bool Equals(IccCurveSegment other)
public virtual bool Equals(IccCurveSegment? other)
{
if (other is null)
{
@ -38,7 +37,7 @@ internal abstract class IccCurveSegment : IEquatable<IccCurveSegment>
}
/// <inheritdoc/>
public override bool Equals(object obj) => this.Equals(obj as IccCurveSegment);
public override bool Equals(object? obj) => this.Equals(obj as IccCurveSegment);
/// <inheritdoc/>
public override int GetHashCode() => this.Signature.GetHashCode();

7
src/ImageSharp/Metadata/Profiles/ICC/Curves/IccFormulaCurveElement.cs

@ -1,6 +1,5 @@
// Copyright (c) Six Labors.
// Licensed under the Six Labors Split License.
#nullable disable
namespace SixLabors.ImageSharp.Metadata.Profiles.Icc;
@ -67,7 +66,7 @@ internal sealed class IccFormulaCurveElement : IccCurveSegment, IEquatable<IccFo
public float E { get; }
/// <inheritdoc />
public override bool Equals(IccCurveSegment other)
public override bool Equals(IccCurveSegment? other)
{
if (base.Equals(other) && other is IccFormulaCurveElement segment)
{
@ -84,10 +83,10 @@ internal sealed class IccFormulaCurveElement : IccCurveSegment, IEquatable<IccFo
}
/// <inheritdoc />
public bool Equals(IccFormulaCurveElement other) => this.Equals((IccCurveSegment)other);
public bool Equals(IccFormulaCurveElement? other) => this.Equals((IccCurveSegment?)other);
/// <inheritdoc />
public override bool Equals(object obj) => this.Equals(obj as IccFormulaCurveElement);
public override bool Equals(object? obj) => this.Equals(obj as IccFormulaCurveElement);
/// <inheritdoc />
public override int GetHashCode()

5
src/ImageSharp/Metadata/Profiles/ICC/Curves/IccOneDimensionalCurve.cs

@ -1,6 +1,5 @@
// Copyright (c) Six Labors.
// Licensed under the Six Labors Split License.
#nullable disable
namespace SixLabors.ImageSharp.Metadata.Profiles.Icc;
@ -37,7 +36,7 @@ internal sealed class IccOneDimensionalCurve : IEquatable<IccOneDimensionalCurve
public IccCurveSegment[] Segments { get; }
/// <inheritdoc />
public bool Equals(IccOneDimensionalCurve other)
public bool Equals(IccOneDimensionalCurve? other)
{
if (other is null)
{
@ -54,7 +53,7 @@ internal sealed class IccOneDimensionalCurve : IEquatable<IccOneDimensionalCurve
}
/// <inheritdoc />
public override bool Equals(object obj)
public override bool Equals(object? obj)
=> this.Equals(obj as IccOneDimensionalCurve);
/// <inheritdoc />

5
src/ImageSharp/Metadata/Profiles/ICC/Curves/IccParametricCurve.cs

@ -1,6 +1,5 @@
// Copyright (c) Six Labors.
// Licensed under the Six Labors Split License.
#nullable disable
namespace SixLabors.ImageSharp.Metadata.Profiles.Icc;
@ -122,7 +121,7 @@ internal sealed class IccParametricCurve : IEquatable<IccParametricCurve>
public float F { get; }
/// <inheritdoc/>
public bool Equals(IccParametricCurve other)
public bool Equals(IccParametricCurve? other)
{
if (other is null)
{
@ -145,7 +144,7 @@ internal sealed class IccParametricCurve : IEquatable<IccParametricCurve>
}
/// <inheritdoc/>
public override bool Equals(object obj)
public override bool Equals(object? obj)
{
return obj is IccParametricCurve other && this.Equals(other);
}

5
src/ImageSharp/Metadata/Profiles/ICC/Curves/IccResponseCurve.cs

@ -1,6 +1,5 @@
// Copyright (c) Six Labors.
// Licensed under the Six Labors Split License.
#nullable disable
using System.Numerics;
@ -46,7 +45,7 @@ internal sealed class IccResponseCurve : IEquatable<IccResponseCurve>
public IccResponseNumber[][] ResponseArrays { get; }
/// <inheritdoc/>
public bool Equals(IccResponseCurve other)
public bool Equals(IccResponseCurve? other)
{
if (other is null)
{
@ -64,7 +63,7 @@ internal sealed class IccResponseCurve : IEquatable<IccResponseCurve>
}
/// <inheritdoc />
public override bool Equals(object obj) => obj is IccResponseCurve other && this.Equals(other);
public override bool Equals(object? obj) => obj is IccResponseCurve other && this.Equals(other);
/// <inheritdoc />
public override int GetHashCode()

9
src/ImageSharp/Metadata/Profiles/ICC/Curves/IccSampledCurveElement.cs

@ -1,6 +1,5 @@
// Copyright (c) Six Labors.
// Licensed under the Six Labors Split License.
#nullable disable
namespace SixLabors.ImageSharp.Metadata.Profiles.Icc;
@ -28,7 +27,7 @@ internal sealed class IccSampledCurveElement : IccCurveSegment, IEquatable<IccSa
public float[] CurveEntries { get; }
/// <inheritdoc />
public override bool Equals(IccCurveSegment other)
public override bool Equals(IccCurveSegment? other)
{
if (base.Equals(other) && other is IccSampledCurveElement segment)
{
@ -39,11 +38,11 @@ internal sealed class IccSampledCurveElement : IccCurveSegment, IEquatable<IccSa
}
/// <inheritdoc />
public bool Equals(IccSampledCurveElement other)
=> this.Equals((IccCurveSegment)other);
public bool Equals(IccSampledCurveElement? other)
=> this.Equals((IccCurveSegment?)other);
/// <inheritdoc />
public override bool Equals(object obj)
public override bool Equals(object? obj)
=> this.Equals(obj as IccSampledCurveElement);
/// <inheritdoc />

5
src/ImageSharp/Metadata/Profiles/ICC/IccTagDataEntry.cs

@ -1,6 +1,5 @@
// Copyright (c) Six Labors.
// Licensed under the Six Labors Split License.
#nullable disable
namespace SixLabors.ImageSharp.Metadata.Profiles.Icc;
@ -41,11 +40,11 @@ public abstract class IccTagDataEntry : IEquatable<IccTagDataEntry>
public IccProfileTag TagSignature { get; set; }
/// <inheritdoc/>
public override bool Equals(object obj)
public override bool Equals(object? obj)
=> obj is IccTagDataEntry entry && this.Equals(entry);
/// <inheritdoc/>
public virtual bool Equals(IccTagDataEntry other)
public virtual bool Equals(IccTagDataEntry? other)
{
if (other is null)
{

5
src/ImageSharp/Metadata/Profiles/ICC/MultiProcessElements/IccBAcsProcessElement.cs

@ -1,6 +1,5 @@
// Copyright (c) Six Labors.
// Licensed under the Six Labors Split License.
#nullable disable
namespace SixLabors.ImageSharp.Metadata.Profiles.Icc;
@ -20,10 +19,10 @@ internal sealed class IccBAcsProcessElement : IccMultiProcessElement, IEquatable
}
/// <inheritdoc />
public bool Equals(IccBAcsProcessElement other) => base.Equals(other);
public bool Equals(IccBAcsProcessElement? other) => base.Equals(other);
/// <inheritdoc />
public override bool Equals(object obj) => this.Equals(obj as IccBAcsProcessElement);
public override bool Equals(object? obj) => this.Equals(obj as IccBAcsProcessElement);
/// <inheritdoc />
public override int GetHashCode() => base.GetHashCode();

7
src/ImageSharp/Metadata/Profiles/ICC/MultiProcessElements/IccClutProcessElement.cs

@ -1,6 +1,5 @@
// Copyright (c) Six Labors.
// Licensed under the Six Labors Split License.
#nullable disable
namespace SixLabors.ImageSharp.Metadata.Profiles.Icc;
@ -23,7 +22,7 @@ internal sealed class IccClutProcessElement : IccMultiProcessElement, IEquatable
public IccClut ClutValue { get; }
/// <inheritdoc />
public override bool Equals(IccMultiProcessElement other)
public override bool Equals(IccMultiProcessElement? other)
{
if (base.Equals(other) && other is IccClutProcessElement element)
{
@ -34,10 +33,10 @@ internal sealed class IccClutProcessElement : IccMultiProcessElement, IEquatable
}
/// <inheritdoc />
public bool Equals(IccClutProcessElement other) => this.Equals((IccMultiProcessElement)other);
public bool Equals(IccClutProcessElement? other) => this.Equals((IccMultiProcessElement?)other);
/// <inheritdoc />
public override bool Equals(object obj) => this.Equals(obj as IccClutProcessElement);
public override bool Equals(object? obj) => this.Equals(obj as IccClutProcessElement);
/// <inheritdoc />
public override int GetHashCode() => base.GetHashCode();

7
src/ImageSharp/Metadata/Profiles/ICC/MultiProcessElements/IccCurveSetProcessElement.cs

@ -1,6 +1,5 @@
// Copyright (c) Six Labors.
// Licensed under the Six Labors Split License.
#nullable disable
namespace SixLabors.ImageSharp.Metadata.Profiles.Icc;
@ -23,7 +22,7 @@ internal sealed class IccCurveSetProcessElement : IccMultiProcessElement, IEquat
public IccOneDimensionalCurve[] Curves { get; }
/// <inheritdoc />
public override bool Equals(IccMultiProcessElement other)
public override bool Equals(IccMultiProcessElement? other)
{
if (base.Equals(other) && other is IccCurveSetProcessElement element)
{
@ -34,10 +33,10 @@ internal sealed class IccCurveSetProcessElement : IccMultiProcessElement, IEquat
}
/// <inheritdoc />
public bool Equals(IccCurveSetProcessElement other) => this.Equals((IccMultiProcessElement)other);
public bool Equals(IccCurveSetProcessElement? other) => this.Equals((IccMultiProcessElement?)other);
/// <inheritdoc />
public override bool Equals(object obj) => this.Equals(obj as IccCurveSetProcessElement);
public override bool Equals(object? obj) => this.Equals(obj as IccCurveSetProcessElement);
/// <inheritdoc />
public override int GetHashCode() => base.GetHashCode();

5
src/ImageSharp/Metadata/Profiles/ICC/MultiProcessElements/IccEAcsProcessElement.cs

@ -1,6 +1,5 @@
// Copyright (c) Six Labors.
// Licensed under the Six Labors Split License.
#nullable disable
namespace SixLabors.ImageSharp.Metadata.Profiles.Icc;
@ -20,9 +19,9 @@ internal sealed class IccEAcsProcessElement : IccMultiProcessElement, IEquatable
}
/// <inheritdoc />
public bool Equals(IccEAcsProcessElement other) => base.Equals(other);
public bool Equals(IccEAcsProcessElement? other) => base.Equals(other);
public override bool Equals(object obj) => this.Equals(obj as IccEAcsProcessElement);
public override bool Equals(object? obj) => this.Equals(obj as IccEAcsProcessElement);
/// <inheritdoc />
public override int GetHashCode() => base.GetHashCode();

9
src/ImageSharp/Metadata/Profiles/ICC/MultiProcessElements/IccMatrixProcessElement.cs

@ -1,6 +1,5 @@
// Copyright (c) Six Labors.
// Licensed under the Six Labors Split License.
#nullable disable
namespace SixLabors.ImageSharp.Metadata.Profiles.Icc;
@ -38,7 +37,7 @@ internal sealed class IccMatrixProcessElement : IccMultiProcessElement, IEquatab
public float[] MatrixOx1 { get; }
/// <inheritdoc />
public override bool Equals(IccMultiProcessElement other)
public override bool Equals(IccMultiProcessElement? other)
{
if (base.Equals(other) && other is IccMatrixProcessElement element)
{
@ -50,11 +49,11 @@ internal sealed class IccMatrixProcessElement : IccMultiProcessElement, IEquatab
}
/// <inheritdoc />
public bool Equals(IccMatrixProcessElement other)
=> this.Equals((IccMultiProcessElement)other);
public bool Equals(IccMatrixProcessElement? other)
=> this.Equals((IccMultiProcessElement?)other);
/// <inheritdoc />
public override bool Equals(object obj)
public override bool Equals(object? obj)
=> this.Equals(obj as IccMatrixProcessElement);
/// <inheritdoc />

5
src/ImageSharp/Metadata/Profiles/ICC/MultiProcessElements/IccMultiProcessElement.cs

@ -1,6 +1,5 @@
// Copyright (c) Six Labors.
// Licensed under the Six Labors Split License.
#nullable disable
namespace SixLabors.ImageSharp.Metadata.Profiles.Icc;
@ -41,7 +40,7 @@ internal abstract class IccMultiProcessElement : IEquatable<IccMultiProcessEleme
public int OutputChannelCount { get; }
/// <inheritdoc/>
public virtual bool Equals(IccMultiProcessElement other)
public virtual bool Equals(IccMultiProcessElement? other)
{
if (other is null)
{
@ -58,7 +57,7 @@ internal abstract class IccMultiProcessElement : IEquatable<IccMultiProcessEleme
&& this.OutputChannelCount == other.OutputChannelCount;
}
public override bool Equals(object obj) => this.Equals(obj as IccMultiProcessElement);
public override bool Equals(object? obj) => this.Equals(obj as IccMultiProcessElement);
/// <inheritdoc />
public override int GetHashCode()

7
src/ImageSharp/Metadata/Profiles/ICC/TagDataEntries/IccChromaticityTagDataEntry.cs

@ -1,6 +1,5 @@
// Copyright (c) Six Labors.
// Licensed under the Six Labors Split License.
#nullable disable
namespace SixLabors.ImageSharp.Metadata.Profiles.Icc;
@ -78,10 +77,10 @@ internal sealed class IccChromaticityTagDataEntry : IccTagDataEntry, IEquatable<
public double[][] ChannelValues { get; }
/// <inheritdoc/>
public override bool Equals(IccTagDataEntry other) => other is IccChromaticityTagDataEntry entry && this.Equals(entry);
public override bool Equals(IccTagDataEntry? other) => other is IccChromaticityTagDataEntry entry && this.Equals(entry);
/// <inheritdoc/>
public bool Equals(IccChromaticityTagDataEntry other)
public bool Equals(IccChromaticityTagDataEntry? other)
{
if (other is null)
{
@ -97,7 +96,7 @@ internal sealed class IccChromaticityTagDataEntry : IccTagDataEntry, IEquatable<
}
/// <inheritdoc/>
public override bool Equals(object obj) => obj is IccChromaticityTagDataEntry other && this.Equals(other);
public override bool Equals(object? obj) => obj is IccChromaticityTagDataEntry other && this.Equals(other);
/// <inheritdoc/>
public override int GetHashCode()

7
src/ImageSharp/Metadata/Profiles/ICC/TagDataEntries/IccColorantOrderTagDataEntry.cs

@ -1,6 +1,5 @@
// Copyright (c) Six Labors.
// Licensed under the Six Labors Split License.
#nullable disable
namespace SixLabors.ImageSharp.Metadata.Profiles.Icc;
@ -39,13 +38,13 @@ internal sealed class IccColorantOrderTagDataEntry : IccTagDataEntry, IEquatable
public byte[] ColorantNumber { get; }
/// <inheritdoc/>
public override bool Equals(IccTagDataEntry other)
public override bool Equals(IccTagDataEntry? other)
{
return other is IccColorantOrderTagDataEntry entry && this.Equals(entry);
}
/// <inheritdoc/>
public bool Equals(IccColorantOrderTagDataEntry other)
public bool Equals(IccColorantOrderTagDataEntry? other)
{
if (other is null)
{
@ -61,7 +60,7 @@ internal sealed class IccColorantOrderTagDataEntry : IccTagDataEntry, IEquatable
}
/// <inheritdoc/>
public override bool Equals(object obj)
public override bool Equals(object? obj)
{
return obj is IccColorantOrderTagDataEntry other && this.Equals(other);
}

7
src/ImageSharp/Metadata/Profiles/ICC/TagDataEntries/IccColorantTableTagDataEntry.cs

@ -1,6 +1,5 @@
// Copyright (c) Six Labors.
// Licensed under the Six Labors Split License.
#nullable disable
namespace SixLabors.ImageSharp.Metadata.Profiles.Icc;
@ -40,10 +39,10 @@ internal sealed class IccColorantTableTagDataEntry : IccTagDataEntry, IEquatable
public IccColorantTableEntry[] ColorantData { get; }
/// <inheritdoc/>
public override bool Equals(IccTagDataEntry other) => other is IccColorantTableTagDataEntry entry && this.Equals(entry);
public override bool Equals(IccTagDataEntry? other) => other is IccColorantTableTagDataEntry entry && this.Equals(entry);
/// <inheritdoc/>
public bool Equals(IccColorantTableTagDataEntry other)
public bool Equals(IccColorantTableTagDataEntry? other)
{
if (other is null)
{
@ -59,7 +58,7 @@ internal sealed class IccColorantTableTagDataEntry : IccTagDataEntry, IEquatable
}
/// <inheritdoc/>
public override bool Equals(object obj) => obj is IccColorantTableTagDataEntry other && this.Equals(other);
public override bool Equals(object? obj) => obj is IccColorantTableTagDataEntry other && this.Equals(other);
/// <inheritdoc/>
public override int GetHashCode() => HashCode.Combine(this.Signature, this.ColorantData);

7
src/ImageSharp/Metadata/Profiles/ICC/TagDataEntries/IccCrdInfoTagDataEntry.cs

@ -1,6 +1,5 @@
// Copyright (c) Six Labors.
// Licensed under the Six Labors Split License.
#nullable disable
namespace SixLabors.ImageSharp.Metadata.Profiles.Icc;
@ -85,11 +84,11 @@ internal sealed class IccCrdInfoTagDataEntry : IccTagDataEntry, IEquatable<IccCr
public string RenderingIntent3Crd { get; }
/// <inheritdoc/>
public override bool Equals(IccTagDataEntry other)
public override bool Equals(IccTagDataEntry? other)
=> other is IccCrdInfoTagDataEntry entry && this.Equals(entry);
/// <inheritdoc/>
public bool Equals(IccCrdInfoTagDataEntry other)
public bool Equals(IccCrdInfoTagDataEntry? other)
{
if (other is null)
{
@ -110,7 +109,7 @@ internal sealed class IccCrdInfoTagDataEntry : IccTagDataEntry, IEquatable<IccCr
}
/// <inheritdoc/>
public override bool Equals(object obj)
public override bool Equals(object? obj)
=> obj is IccCrdInfoTagDataEntry other && this.Equals(other);
/// <inheritdoc/>

7
src/ImageSharp/Metadata/Profiles/ICC/TagDataEntries/IccCurveTagDataEntry.cs

@ -1,6 +1,5 @@
// Copyright (c) Six Labors.
// Licensed under the Six Labors Split License.
#nullable disable
namespace SixLabors.ImageSharp.Metadata.Profiles.Icc;
@ -87,13 +86,13 @@ internal sealed class IccCurveTagDataEntry : IccTagDataEntry, IEquatable<IccCurv
public bool IsGamma => this.CurveData.Length == 1;
/// <inheritdoc/>
public override bool Equals(IccTagDataEntry other)
public override bool Equals(IccTagDataEntry? other)
{
return other is IccCurveTagDataEntry entry && this.Equals(entry);
}
/// <inheritdoc/>
public bool Equals(IccCurveTagDataEntry other)
public bool Equals(IccCurveTagDataEntry? other)
{
if (other is null)
{
@ -109,7 +108,7 @@ internal sealed class IccCurveTagDataEntry : IccTagDataEntry, IEquatable<IccCurv
}
/// <inheritdoc/>
public override bool Equals(object obj)
public override bool Equals(object? obj)
{
return obj is IccCurveTagDataEntry other && this.Equals(other);
}

9
src/ImageSharp/Metadata/Profiles/ICC/TagDataEntries/IccDataTagDataEntry.cs

@ -1,6 +1,5 @@
// Copyright (c) Six Labors.
// Licensed under the Six Labors Split License.
#nullable disable
using System.Text;
@ -58,14 +57,14 @@ internal sealed class IccDataTagDataEntry : IccTagDataEntry, IEquatable<IccDataT
/// Gets the <see cref="Data"/> decoded as 7bit ASCII.
/// If <see cref="IsAscii"/> is false, returns null
/// </summary>
public string AsciiString => this.IsAscii ? Encoding.ASCII.GetString(this.Data, 0, this.Data.Length) : null;
public string? AsciiString => this.IsAscii ? Encoding.ASCII.GetString(this.Data, 0, this.Data.Length) : null;
/// <inheritdoc/>
public override bool Equals(IccTagDataEntry other)
public override bool Equals(IccTagDataEntry? other)
=> other is IccDataTagDataEntry entry && this.Equals(entry);
/// <inheritdoc/>
public bool Equals(IccDataTagDataEntry other)
public bool Equals(IccDataTagDataEntry? other)
{
if (other is null)
{
@ -81,7 +80,7 @@ internal sealed class IccDataTagDataEntry : IccTagDataEntry, IEquatable<IccDataT
}
/// <inheritdoc/>
public override bool Equals(object obj)
public override bool Equals(object? obj)
=> obj is IccDataTagDataEntry other && this.Equals(other);
/// <inheritdoc/>

7
src/ImageSharp/Metadata/Profiles/ICC/TagDataEntries/IccDateTimeTagDataEntry.cs

@ -1,6 +1,5 @@
// Copyright (c) Six Labors.
// Licensed under the Six Labors Split License.
#nullable disable
namespace SixLabors.ImageSharp.Metadata.Profiles.Icc;
@ -35,13 +34,13 @@ internal sealed class IccDateTimeTagDataEntry : IccTagDataEntry, IEquatable<IccD
public DateTime Value { get; }
/// <inheritdoc/>
public override bool Equals(IccTagDataEntry other)
public override bool Equals(IccTagDataEntry? other)
{
return other is IccDateTimeTagDataEntry entry && this.Equals(entry);
}
/// <inheritdoc/>
public bool Equals(IccDateTimeTagDataEntry other)
public bool Equals(IccDateTimeTagDataEntry? other)
{
if (other is null)
{
@ -57,7 +56,7 @@ internal sealed class IccDateTimeTagDataEntry : IccTagDataEntry, IEquatable<IccD
}
/// <inheritdoc/>
public override bool Equals(object obj)
public override bool Equals(object? obj)
{
return obj is IccDateTimeTagDataEntry other && this.Equals(other);
}

7
src/ImageSharp/Metadata/Profiles/ICC/TagDataEntries/IccFix16ArrayTagDataEntry.cs

@ -1,6 +1,5 @@
// Copyright (c) Six Labors.
// Licensed under the Six Labors Split License.
#nullable disable
namespace SixLabors.ImageSharp.Metadata.Profiles.Icc;
@ -35,13 +34,13 @@ internal sealed class IccFix16ArrayTagDataEntry : IccTagDataEntry, IEquatable<Ic
public float[] Data { get; }
/// <inheritdoc/>
public override bool Equals(IccTagDataEntry other)
public override bool Equals(IccTagDataEntry? other)
{
return other is IccFix16ArrayTagDataEntry entry && this.Equals(entry);
}
/// <inheritdoc/>
public bool Equals(IccFix16ArrayTagDataEntry other)
public bool Equals(IccFix16ArrayTagDataEntry? other)
{
if (other is null)
{
@ -57,7 +56,7 @@ internal sealed class IccFix16ArrayTagDataEntry : IccTagDataEntry, IEquatable<Ic
}
/// <inheritdoc/>
public override bool Equals(object obj)
public override bool Equals(object? obj)
{
return obj is IccFix16ArrayTagDataEntry other && this.Equals(other);
}

7
src/ImageSharp/Metadata/Profiles/ICC/TagDataEntries/IccLut16TagDataEntry.cs

@ -1,6 +1,5 @@
// Copyright (c) Six Labors.
// Licensed under the Six Labors Split License.
#nullable disable
using System.Numerics;
@ -110,10 +109,10 @@ internal sealed class IccLut16TagDataEntry : IccTagDataEntry, IEquatable<IccLut1
public IccLut[] OutputValues { get; }
/// <inheritdoc/>
public override bool Equals(IccTagDataEntry other) => other is IccLut16TagDataEntry entry && this.Equals(entry);
public override bool Equals(IccTagDataEntry? other) => other is IccLut16TagDataEntry entry && this.Equals(entry);
/// <inheritdoc/>
public bool Equals(IccLut16TagDataEntry other)
public bool Equals(IccLut16TagDataEntry? other)
{
if (other is null)
{
@ -133,7 +132,7 @@ internal sealed class IccLut16TagDataEntry : IccTagDataEntry, IEquatable<IccLut1
}
/// <inheritdoc/>
public override bool Equals(object obj) => obj is IccLut16TagDataEntry other && this.Equals(other);
public override bool Equals(object? obj) => obj is IccLut16TagDataEntry other && this.Equals(other);
/// <inheritdoc/>
public override int GetHashCode()

7
src/ImageSharp/Metadata/Profiles/ICC/TagDataEntries/IccLut8TagDataEntry.cs

@ -1,6 +1,5 @@
// Copyright (c) Six Labors.
// Licensed under the Six Labors Split License.
#nullable disable
using System.Numerics;
@ -113,10 +112,10 @@ internal sealed class IccLut8TagDataEntry : IccTagDataEntry, IEquatable<IccLut8T
public IccLut[] OutputValues { get; }
/// <inheritdoc/>
public override bool Equals(IccTagDataEntry other) => other is IccLut8TagDataEntry entry && this.Equals(entry);
public override bool Equals(IccTagDataEntry? other) => other is IccLut8TagDataEntry entry && this.Equals(entry);
/// <inheritdoc/>
public bool Equals(IccLut8TagDataEntry other)
public bool Equals(IccLut8TagDataEntry? other)
{
if (other is null)
{
@ -136,7 +135,7 @@ internal sealed class IccLut8TagDataEntry : IccTagDataEntry, IEquatable<IccLut8T
}
/// <inheritdoc/>
public override bool Equals(object obj) => obj is IccLut8TagDataEntry other && this.Equals(other);
public override bool Equals(object? obj) => obj is IccLut8TagDataEntry other && this.Equals(other);
/// <inheritdoc/>
public override int GetHashCode()

7
src/ImageSharp/Metadata/Profiles/ICC/TagDataEntries/IccMeasurementTagDataEntry.cs

@ -1,6 +1,5 @@
// Copyright (c) Six Labors.
// Licensed under the Six Labors Split License.
#nullable disable
using System.Numerics;
@ -71,13 +70,13 @@ internal sealed class IccMeasurementTagDataEntry : IccTagDataEntry, IEquatable<I
public IccStandardIlluminant Illuminant { get; }
/// <inheritdoc/>
public override bool Equals(IccTagDataEntry other)
public override bool Equals(IccTagDataEntry? other)
{
return other is IccMeasurementTagDataEntry entry && this.Equals(entry);
}
/// <inheritdoc/>
public bool Equals(IccMeasurementTagDataEntry other)
public bool Equals(IccMeasurementTagDataEntry? other)
{
if (other is null)
{
@ -98,7 +97,7 @@ internal sealed class IccMeasurementTagDataEntry : IccTagDataEntry, IEquatable<I
}
/// <inheritdoc/>
public override bool Equals(object obj)
public override bool Equals(object? obj)
{
return obj is IccMeasurementTagDataEntry other && this.Equals(other);
}

7
src/ImageSharp/Metadata/Profiles/ICC/TagDataEntries/IccMultiLocalizedUnicodeTagDataEntry.cs

@ -1,6 +1,5 @@
// Copyright (c) Six Labors.
// Licensed under the Six Labors Split License.
#nullable disable
namespace SixLabors.ImageSharp.Metadata.Profiles.Icc;
@ -36,13 +35,13 @@ internal sealed class IccMultiLocalizedUnicodeTagDataEntry : IccTagDataEntry, IE
public IccLocalizedString[] Texts { get; }
/// <inheritdoc/>
public override bool Equals(IccTagDataEntry other)
public override bool Equals(IccTagDataEntry? other)
{
return other is IccMultiLocalizedUnicodeTagDataEntry entry && this.Equals(entry);
}
/// <inheritdoc/>
public bool Equals(IccMultiLocalizedUnicodeTagDataEntry other)
public bool Equals(IccMultiLocalizedUnicodeTagDataEntry? other)
{
if (other is null)
{
@ -58,7 +57,7 @@ internal sealed class IccMultiLocalizedUnicodeTagDataEntry : IccTagDataEntry, IE
}
/// <inheritdoc/>
public override bool Equals(object obj)
public override bool Equals(object? obj)
{
return obj is IccMultiLocalizedUnicodeTagDataEntry other && this.Equals(other);
}

7
src/ImageSharp/Metadata/Profiles/ICC/TagDataEntries/IccMultiProcessElementsTagDataEntry.cs

@ -1,6 +1,5 @@
// Copyright (c) Six Labors.
// Licensed under the Six Labors Split License.
#nullable disable
namespace SixLabors.ImageSharp.Metadata.Profiles.Icc;
@ -54,11 +53,11 @@ internal sealed class IccMultiProcessElementsTagDataEntry : IccTagDataEntry, IEq
public IccMultiProcessElement[] Data { get; }
/// <inheritdoc/>
public override bool Equals(IccTagDataEntry other)
public override bool Equals(IccTagDataEntry? other)
=> other is IccMultiProcessElementsTagDataEntry entry && this.Equals(entry);
/// <inheritdoc/>
public bool Equals(IccMultiProcessElementsTagDataEntry other)
public bool Equals(IccMultiProcessElementsTagDataEntry? other)
{
if (other is null)
{
@ -77,7 +76,7 @@ internal sealed class IccMultiProcessElementsTagDataEntry : IccTagDataEntry, IEq
}
/// <inheritdoc/>
public override bool Equals(object obj) => obj is IccMultiProcessElementsTagDataEntry other && this.Equals(other);
public override bool Equals(object? obj) => obj is IccMultiProcessElementsTagDataEntry other && this.Equals(other);
/// <inheritdoc/>
public override int GetHashCode()

13
src/ImageSharp/Metadata/Profiles/ICC/TagDataEntries/IccNamedColor2TagDataEntry.cs

@ -1,6 +1,5 @@
// Copyright (c) Six Labors.
// Licensed under the Six Labors Split License.
#nullable disable
namespace SixLabors.ImageSharp.Metadata.Profiles.Icc;
@ -72,7 +71,7 @@ internal sealed class IccNamedColor2TagDataEntry : IccTagDataEntry, IEquatable<I
/// <param name="suffix">Suffix</param>
/// <param name="colors">The named colors</param>
/// <param name="tagSignature">Tag Signature</param>
public IccNamedColor2TagDataEntry(int vendorFlags, string prefix, string suffix, IccNamedColor[] colors, IccProfileTag tagSignature)
public IccNamedColor2TagDataEntry(int vendorFlags, string? prefix, string? suffix, IccNamedColor[] colors, IccProfileTag tagSignature)
: base(IccTypeSignature.NamedColor2, tagSignature)
{
Guard.NotNull(colors, nameof(colors));
@ -100,12 +99,12 @@ internal sealed class IccNamedColor2TagDataEntry : IccTagDataEntry, IEquatable<I
/// <summary>
/// Gets the prefix
/// </summary>
public string Prefix { get; }
public string? Prefix { get; }
/// <summary>
/// Gets the suffix
/// </summary>
public string Suffix { get; }
public string? Suffix { get; }
/// <summary>
/// Gets the vendor specific flags
@ -118,11 +117,11 @@ internal sealed class IccNamedColor2TagDataEntry : IccTagDataEntry, IEquatable<I
public IccNamedColor[] Colors { get; }
/// <inheritdoc/>
public override bool Equals(IccTagDataEntry other)
public override bool Equals(IccTagDataEntry? other)
=> other is IccNamedColor2TagDataEntry entry && this.Equals(entry);
/// <inheritdoc/>
public bool Equals(IccNamedColor2TagDataEntry other)
public bool Equals(IccNamedColor2TagDataEntry? other)
{
if (other is null)
{
@ -143,7 +142,7 @@ internal sealed class IccNamedColor2TagDataEntry : IccTagDataEntry, IEquatable<I
}
/// <inheritdoc/>
public override bool Equals(object obj)
public override bool Equals(object? obj)
=> obj is IccNamedColor2TagDataEntry other && this.Equals(other);
/// <inheritdoc/>

7
src/ImageSharp/Metadata/Profiles/ICC/TagDataEntries/IccParametricCurveTagDataEntry.cs

@ -1,6 +1,5 @@
// Copyright (c) Six Labors.
// Licensed under the Six Labors Split License.
#nullable disable
namespace SixLabors.ImageSharp.Metadata.Profiles.Icc;
@ -36,13 +35,13 @@ internal sealed class IccParametricCurveTagDataEntry : IccTagDataEntry, IEquatab
public IccParametricCurve Curve { get; }
/// <inheritdoc/>
public override bool Equals(IccTagDataEntry other)
public override bool Equals(IccTagDataEntry? other)
{
return other is IccParametricCurveTagDataEntry entry && this.Equals(entry);
}
/// <inheritdoc/>
public bool Equals(IccParametricCurveTagDataEntry other)
public bool Equals(IccParametricCurveTagDataEntry? other)
{
if (other is null)
{
@ -58,7 +57,7 @@ internal sealed class IccParametricCurveTagDataEntry : IccTagDataEntry, IEquatab
}
/// <inheritdoc/>
public override bool Equals(object obj)
public override bool Equals(object? obj)
{
return obj is IccParametricCurveTagDataEntry other && this.Equals(other);
}

7
src/ImageSharp/Metadata/Profiles/ICC/TagDataEntries/IccProfileSequenceDescTagDataEntry.cs

@ -1,6 +1,5 @@
// Copyright (c) Six Labors.
// Licensed under the Six Labors Split License.
#nullable disable
namespace SixLabors.ImageSharp.Metadata.Profiles.Icc;
@ -35,11 +34,11 @@ internal sealed class IccProfileSequenceDescTagDataEntry : IccTagDataEntry, IEqu
public IccProfileDescription[] Descriptions { get; }
/// <inheritdoc/>
public override bool Equals(IccTagDataEntry other)
public override bool Equals(IccTagDataEntry? other)
=> other is IccProfileSequenceDescTagDataEntry entry && this.Equals(entry);
/// <inheritdoc />
public bool Equals(IccProfileSequenceDescTagDataEntry other)
public bool Equals(IccProfileSequenceDescTagDataEntry? other)
{
if (other is null)
{
@ -55,7 +54,7 @@ internal sealed class IccProfileSequenceDescTagDataEntry : IccTagDataEntry, IEqu
}
/// <inheritdoc/>
public override bool Equals(object obj)
public override bool Equals(object? obj)
=> obj is IccProfileSequenceDescTagDataEntry other && this.Equals(other);
/// <inheritdoc />

7
src/ImageSharp/Metadata/Profiles/ICC/TagDataEntries/IccProfileSequenceIdentifierTagDataEntry.cs

@ -1,6 +1,5 @@
// Copyright (c) Six Labors.
// Licensed under the Six Labors Split License.
#nullable disable
namespace SixLabors.ImageSharp.Metadata.Profiles.Icc;
@ -36,13 +35,13 @@ internal sealed class IccProfileSequenceIdentifierTagDataEntry : IccTagDataEntry
public IccProfileSequenceIdentifier[] Data { get; }
/// <inheritdoc/>
public override bool Equals(IccTagDataEntry other)
public override bool Equals(IccTagDataEntry? other)
{
return other is IccProfileSequenceIdentifierTagDataEntry entry && this.Equals(entry);
}
/// <inheritdoc />
public bool Equals(IccProfileSequenceIdentifierTagDataEntry other)
public bool Equals(IccProfileSequenceIdentifierTagDataEntry? other)
{
if (other is null)
{
@ -58,7 +57,7 @@ internal sealed class IccProfileSequenceIdentifierTagDataEntry : IccTagDataEntry
}
/// <inheritdoc />
public override bool Equals(object obj)
public override bool Equals(object? obj)
{
return obj is IccProfileSequenceIdentifierTagDataEntry other && this.Equals(other);
}

7
src/ImageSharp/Metadata/Profiles/ICC/TagDataEntries/IccResponseCurveSet16TagDataEntry.cs

@ -1,6 +1,5 @@
// Copyright (c) Six Labors.
// Licensed under the Six Labors Split License.
#nullable disable
namespace SixLabors.ImageSharp.Metadata.Profiles.Icc;
@ -49,10 +48,10 @@ internal sealed class IccResponseCurveSet16TagDataEntry : IccTagDataEntry, IEqua
public IccResponseCurve[] Curves { get; }
/// <inheritdoc/>
public override bool Equals(IccTagDataEntry other) => other is IccResponseCurveSet16TagDataEntry entry && this.Equals(entry);
public override bool Equals(IccTagDataEntry? other) => other is IccResponseCurveSet16TagDataEntry entry && this.Equals(entry);
/// <inheritdoc />
public bool Equals(IccResponseCurveSet16TagDataEntry other)
public bool Equals(IccResponseCurveSet16TagDataEntry? other)
{
if (other is null)
{
@ -70,7 +69,7 @@ internal sealed class IccResponseCurveSet16TagDataEntry : IccTagDataEntry, IEqua
}
/// <inheritdoc />
public override bool Equals(object obj) => obj is IccResponseCurveSet16TagDataEntry other && this.Equals(other);
public override bool Equals(object? obj) => obj is IccResponseCurveSet16TagDataEntry other && this.Equals(other);
/// <inheritdoc />
public override int GetHashCode()

7
src/ImageSharp/Metadata/Profiles/ICC/TagDataEntries/IccScreeningTagDataEntry.cs

@ -1,6 +1,5 @@
// Copyright (c) Six Labors.
// Licensed under the Six Labors Split License.
#nullable disable
namespace SixLabors.ImageSharp.Metadata.Profiles.Icc;
@ -44,13 +43,13 @@ internal sealed class IccScreeningTagDataEntry : IccTagDataEntry, IEquatable<Icc
public IccScreeningChannel[] Channels { get; }
/// <inheritdoc/>
public override bool Equals(IccTagDataEntry other)
public override bool Equals(IccTagDataEntry? other)
{
return other is IccScreeningTagDataEntry entry && this.Equals(entry);
}
/// <inheritdoc />
public bool Equals(IccScreeningTagDataEntry other)
public bool Equals(IccScreeningTagDataEntry? other)
{
if (other is null)
{
@ -68,7 +67,7 @@ internal sealed class IccScreeningTagDataEntry : IccTagDataEntry, IEquatable<Icc
}
/// <inheritdoc />
public override bool Equals(object obj)
public override bool Equals(object? obj)
{
return obj is IccScreeningTagDataEntry other && this.Equals(other);
}

7
src/ImageSharp/Metadata/Profiles/ICC/TagDataEntries/IccSignatureTagDataEntry.cs

@ -1,6 +1,5 @@
// Copyright (c) Six Labors.
// Licensed under the Six Labors Split License.
#nullable disable
namespace SixLabors.ImageSharp.Metadata.Profiles.Icc;
@ -34,11 +33,11 @@ internal sealed class IccSignatureTagDataEntry : IccTagDataEntry, IEquatable<Icc
public string SignatureData { get; }
/// <inheritdoc/>
public override bool Equals(IccTagDataEntry other)
public override bool Equals(IccTagDataEntry? other)
=> other is IccSignatureTagDataEntry entry && this.Equals(entry);
/// <inheritdoc />
public bool Equals(IccSignatureTagDataEntry other)
public bool Equals(IccSignatureTagDataEntry? other)
{
if (other is null)
{
@ -55,7 +54,7 @@ internal sealed class IccSignatureTagDataEntry : IccTagDataEntry, IEquatable<Icc
}
/// <inheritdoc />
public override bool Equals(object obj)
public override bool Equals(object? obj)
=> obj is IccSignatureTagDataEntry other && this.Equals(other);
/// <inheritdoc />

7
src/ImageSharp/Metadata/Profiles/ICC/TagDataEntries/IccTextTagDataEntry.cs

@ -1,6 +1,5 @@
// Copyright (c) Six Labors.
// Licensed under the Six Labors Split License.
#nullable disable
namespace SixLabors.ImageSharp.Metadata.Profiles.Icc;
@ -33,11 +32,11 @@ internal sealed class IccTextTagDataEntry : IccTagDataEntry, IEquatable<IccTextT
public string Text { get; }
/// <inheritdoc/>
public override bool Equals(IccTagDataEntry other)
public override bool Equals(IccTagDataEntry? other)
=> other is IccTextTagDataEntry entry && this.Equals(entry);
/// <inheritdoc />
public bool Equals(IccTextTagDataEntry other)
public bool Equals(IccTextTagDataEntry? other)
{
if (other is null)
{
@ -53,7 +52,7 @@ internal sealed class IccTextTagDataEntry : IccTagDataEntry, IEquatable<IccTextT
}
/// <inheritdoc />
public override bool Equals(object obj)
public override bool Equals(object? obj)
=> obj is IccTextTagDataEntry other && this.Equals(other);
/// <inheritdoc />

7
src/ImageSharp/Metadata/Profiles/ICC/TagDataEntries/IccUFix16ArrayTagDataEntry.cs

@ -1,6 +1,5 @@
// Copyright (c) Six Labors.
// Licensed under the Six Labors Split License.
#nullable disable
namespace SixLabors.ImageSharp.Metadata.Profiles.Icc;
@ -35,13 +34,13 @@ internal sealed class IccUFix16ArrayTagDataEntry : IccTagDataEntry, IEquatable<I
public float[] Data { get; }
/// <inheritdoc/>
public override bool Equals(IccTagDataEntry other)
public override bool Equals(IccTagDataEntry? other)
{
return other is IccUFix16ArrayTagDataEntry entry && this.Equals(entry);
}
/// <inheritdoc/>
public bool Equals(IccUFix16ArrayTagDataEntry other)
public bool Equals(IccUFix16ArrayTagDataEntry? other)
{
if (other is null)
{
@ -57,7 +56,7 @@ internal sealed class IccUFix16ArrayTagDataEntry : IccTagDataEntry, IEquatable<I
}
/// <inheritdoc/>
public override bool Equals(object obj)
public override bool Equals(object? obj)
{
return obj is IccUFix16ArrayTagDataEntry other && this.Equals(other);
}

7
src/ImageSharp/Metadata/Profiles/ICC/TagDataEntries/IccUInt16ArrayTagDataEntry.cs

@ -1,6 +1,5 @@
// Copyright (c) Six Labors.
// Licensed under the Six Labors Split License.
#nullable disable
namespace SixLabors.ImageSharp.Metadata.Profiles.Icc;
@ -35,13 +34,13 @@ internal sealed class IccUInt16ArrayTagDataEntry : IccTagDataEntry, IEquatable<I
public ushort[] Data { get; }
/// <inheritdoc/>
public override bool Equals(IccTagDataEntry other)
public override bool Equals(IccTagDataEntry? other)
{
return other is IccUInt16ArrayTagDataEntry entry && this.Equals(entry);
}
/// <inheritdoc/>
public bool Equals(IccUInt16ArrayTagDataEntry other)
public bool Equals(IccUInt16ArrayTagDataEntry? other)
{
if (other is null)
{
@ -57,7 +56,7 @@ internal sealed class IccUInt16ArrayTagDataEntry : IccTagDataEntry, IEquatable<I
}
/// <inheritdoc/>
public override bool Equals(object obj)
public override bool Equals(object? obj)
{
return obj is IccUInt16ArrayTagDataEntry other && this.Equals(other);
}

7
src/ImageSharp/Metadata/Profiles/ICC/TagDataEntries/IccUInt32ArrayTagDataEntry.cs

@ -1,6 +1,5 @@
// Copyright (c) Six Labors.
// Licensed under the Six Labors Split License.
#nullable disable
namespace SixLabors.ImageSharp.Metadata.Profiles.Icc;
@ -35,13 +34,13 @@ internal sealed class IccUInt32ArrayTagDataEntry : IccTagDataEntry, IEquatable<I
public uint[] Data { get; }
/// <inheritdoc/>
public override bool Equals(IccTagDataEntry other)
public override bool Equals(IccTagDataEntry? other)
{
return other is IccUInt32ArrayTagDataEntry entry && this.Equals(entry);
}
/// <inheritdoc/>
public bool Equals(IccUInt32ArrayTagDataEntry other)
public bool Equals(IccUInt32ArrayTagDataEntry? other)
{
if (other is null)
{
@ -57,7 +56,7 @@ internal sealed class IccUInt32ArrayTagDataEntry : IccTagDataEntry, IEquatable<I
}
/// <inheritdoc/>
public override bool Equals(object obj)
public override bool Equals(object? obj)
{
return obj is IccUInt32ArrayTagDataEntry other && this.Equals(other);
}

7
src/ImageSharp/Metadata/Profiles/ICC/TagDataEntries/IccUInt64ArrayTagDataEntry.cs

@ -1,6 +1,5 @@
// Copyright (c) Six Labors.
// Licensed under the Six Labors Split License.
#nullable disable
namespace SixLabors.ImageSharp.Metadata.Profiles.Icc;
@ -32,10 +31,10 @@ internal sealed class IccUInt64ArrayTagDataEntry : IccTagDataEntry, IEquatable<I
public ulong[] Data { get; }
/// <inheritdoc/>
public override bool Equals(IccTagDataEntry other) => other is IccUInt64ArrayTagDataEntry entry && this.Equals(entry);
public override bool Equals(IccTagDataEntry? other) => other is IccUInt64ArrayTagDataEntry entry && this.Equals(entry);
/// <inheritdoc/>
public bool Equals(IccUInt64ArrayTagDataEntry other)
public bool Equals(IccUInt64ArrayTagDataEntry? other)
{
if (other is null)
{
@ -51,7 +50,7 @@ internal sealed class IccUInt64ArrayTagDataEntry : IccTagDataEntry, IEquatable<I
}
/// <inheritdoc/>
public override bool Equals(object obj) => obj is IccUInt64ArrayTagDataEntry other && this.Equals(other);
public override bool Equals(object? obj) => obj is IccUInt64ArrayTagDataEntry other && this.Equals(other);
/// <inheritdoc/>
public override int GetHashCode() => HashCode.Combine(this.Signature, this.Data);

7
src/ImageSharp/Metadata/Profiles/ICC/TagDataEntries/IccUInt8ArrayTagDataEntry.cs

@ -1,6 +1,5 @@
// Copyright (c) Six Labors.
// Licensed under the Six Labors Split License.
#nullable disable
namespace SixLabors.ImageSharp.Metadata.Profiles.Icc;
@ -35,13 +34,13 @@ internal sealed class IccUInt8ArrayTagDataEntry : IccTagDataEntry, IEquatable<Ic
public byte[] Data { get; }
/// <inheritdoc/>
public override bool Equals(IccTagDataEntry other)
public override bool Equals(IccTagDataEntry? other)
{
return other is IccUInt8ArrayTagDataEntry entry && this.Equals(entry);
}
/// <inheritdoc/>
public bool Equals(IccUInt8ArrayTagDataEntry other)
public bool Equals(IccUInt8ArrayTagDataEntry? other)
{
if (other is null)
{
@ -57,7 +56,7 @@ internal sealed class IccUInt8ArrayTagDataEntry : IccTagDataEntry, IEquatable<Ic
}
/// <inheritdoc/>
public override bool Equals(object obj)
public override bool Equals(object? obj)
{
return obj is IccUInt8ArrayTagDataEntry other && this.Equals(other);
}

7
src/ImageSharp/Metadata/Profiles/ICC/TagDataEntries/IccUcrBgTagDataEntry.cs

@ -1,6 +1,5 @@
// Copyright (c) Six Labors.
// Licensed under the Six Labors Split License.
#nullable disable
namespace SixLabors.ImageSharp.Metadata.Profiles.Icc;
@ -52,11 +51,11 @@ internal sealed class IccUcrBgTagDataEntry : IccTagDataEntry, IEquatable<IccUcrB
public string Description { get; }
/// <inheritdoc/>
public override bool Equals(IccTagDataEntry other)
public override bool Equals(IccTagDataEntry? other)
=> other is IccUcrBgTagDataEntry entry && this.Equals(entry);
/// <inheritdoc/>
public bool Equals(IccUcrBgTagDataEntry other)
public bool Equals(IccUcrBgTagDataEntry? other)
{
if (other is null)
{
@ -75,7 +74,7 @@ internal sealed class IccUcrBgTagDataEntry : IccTagDataEntry, IEquatable<IccUcrB
}
/// <inheritdoc/>
public override bool Equals(object obj)
public override bool Equals(object? obj)
=> obj is IccUcrBgTagDataEntry other && this.Equals(other);
/// <inheritdoc/>

7
src/ImageSharp/Metadata/Profiles/ICC/TagDataEntries/IccUnknownTagDataEntry.cs

@ -1,6 +1,5 @@
// Copyright (c) Six Labors.
// Licensed under the Six Labors Split License.
#nullable disable
namespace SixLabors.ImageSharp.Metadata.Profiles.Icc;
@ -35,13 +34,13 @@ internal sealed class IccUnknownTagDataEntry : IccTagDataEntry, IEquatable<IccUn
public byte[] Data { get; }
/// <inheritdoc/>
public override bool Equals(IccTagDataEntry other)
public override bool Equals(IccTagDataEntry? other)
{
return other is IccUnknownTagDataEntry entry && this.Equals(entry);
}
/// <inheritdoc/>
public bool Equals(IccUnknownTagDataEntry other)
public bool Equals(IccUnknownTagDataEntry? other)
{
if (other is null)
{
@ -57,7 +56,7 @@ internal sealed class IccUnknownTagDataEntry : IccTagDataEntry, IEquatable<IccUn
}
/// <inheritdoc/>
public override bool Equals(object obj)
public override bool Equals(object? obj)
{
return obj is IccUnknownTagDataEntry other && this.Equals(other);
}

7
src/ImageSharp/Metadata/Profiles/ICC/TagDataEntries/IccViewingConditionsTagDataEntry.cs

@ -1,6 +1,5 @@
// Copyright (c) Six Labors.
// Licensed under the Six Labors Split License.
#nullable disable
using System.Numerics;
@ -53,13 +52,13 @@ internal sealed class IccViewingConditionsTagDataEntry : IccTagDataEntry, IEquat
public IccStandardIlluminant Illuminant { get; }
/// <inheritdoc/>
public override bool Equals(IccTagDataEntry other)
public override bool Equals(IccTagDataEntry? other)
{
return other is IccViewingConditionsTagDataEntry entry && this.Equals(entry);
}
/// <inheritdoc/>
public bool Equals(IccViewingConditionsTagDataEntry other)
public bool Equals(IccViewingConditionsTagDataEntry? other)
{
if (other is null)
{
@ -78,7 +77,7 @@ internal sealed class IccViewingConditionsTagDataEntry : IccTagDataEntry, IEquat
}
/// <inheritdoc/>
public override bool Equals(object obj)
public override bool Equals(object? obj)
{
return obj is IccViewingConditionsTagDataEntry other && this.Equals(other);
}

9
src/ImageSharp/Metadata/Profiles/ICC/TagDataEntries/IccXyzTagDataEntry.cs

@ -1,6 +1,5 @@
// Copyright (c) Six Labors.
// Licensed under the Six Labors Split License.
#nullable disable
using System.Numerics;
@ -35,7 +34,7 @@ internal sealed class IccXyzTagDataEntry : IccTagDataEntry, IEquatable<IccXyzTag
public Vector3[] Data { get; }
/// <inheritdoc />
public override bool Equals(IccTagDataEntry other)
public override bool Equals(IccTagDataEntry? other)
{
if (base.Equals(other) && other is IccXyzTagDataEntry entry)
{
@ -46,11 +45,11 @@ internal sealed class IccXyzTagDataEntry : IccTagDataEntry, IEquatable<IccXyzTag
}
/// <inheritdoc />
public bool Equals(IccXyzTagDataEntry other)
=> this.Equals((IccTagDataEntry)other);
public bool Equals(IccXyzTagDataEntry? other)
=> this.Equals((IccTagDataEntry?)other);
/// <inheritdoc />
public override bool Equals(object obj)
public override bool Equals(object? obj)
=> this.Equals(obj as IccXyzTagDataEntry);
public override int GetHashCode()

5
src/ImageSharp/Metadata/Profiles/ICC/Various/IccClut.cs

@ -1,6 +1,5 @@
// Copyright (c) Six Labors.
// Licensed under the Six Labors Split License.
#nullable disable
namespace SixLabors.ImageSharp.Metadata.Profiles.Icc;
@ -112,7 +111,7 @@ internal sealed class IccClut : IEquatable<IccClut>
public byte[] GridPointCount { get; }
/// <inheritdoc/>
public bool Equals(IccClut other)
public bool Equals(IccClut? other)
{
if (other is null)
{
@ -132,7 +131,7 @@ internal sealed class IccClut : IEquatable<IccClut>
}
/// <inheritdoc/>
public override bool Equals(object obj) => obj is IccClut other && this.Equals(other);
public override bool Equals(object? obj) => obj is IccClut other && this.Equals(other);
/// <inheritdoc/>
public override int GetHashCode()

3
src/ImageSharp/Metadata/Profiles/ICC/Various/IccColorantTableEntry.cs

@ -1,6 +1,5 @@
// Copyright (c) Six Labors.
// Licensed under the Six Labors Split License.
#nullable disable
namespace SixLabors.ImageSharp.Metadata.Profiles.Icc;
@ -84,7 +83,7 @@ internal readonly struct IccColorantTableEntry : IEquatable<IccColorantTableEntr
}
/// <inheritdoc/>
public override bool Equals(object obj)
public override bool Equals(object? obj)
{
return obj is IccColorantTableEntry other && this.Equals(other);
}

3
src/ImageSharp/Metadata/Profiles/ICC/Various/IccLocalizedString.cs

@ -1,6 +1,5 @@
// Copyright (c) Six Labors.
// Licensed under the Six Labors Split License.
#nullable disable
using System.Globalization;
@ -51,7 +50,7 @@ internal readonly struct IccLocalizedString : IEquatable<IccLocalizedString>
/// <inheritdoc />
public override string ToString() => $"{this.Culture.Name}: {this.Text}";
public override bool Equals(object obj)
public override bool Equals(object? obj)
=> obj is IccLocalizedString iccLocalizedString && this.Equals(iccLocalizedString);
public override int GetHashCode()

3
src/ImageSharp/Metadata/Profiles/ICC/Various/IccLut.cs

@ -1,6 +1,5 @@
// Copyright (c) Six Labors.
// Licensed under the Six Labors Split License.
#nullable disable
namespace SixLabors.ImageSharp.Metadata.Profiles.Icc;
@ -67,7 +66,7 @@ internal readonly struct IccLut : IEquatable<IccLut>
}
/// <inheritdoc/>
public override bool Equals(object obj)
public override bool Equals(object? obj)
=> obj is IccLut iccLut && this.Equals(iccLut);
/// <inheritdoc/>

3
src/ImageSharp/Metadata/Profiles/ICC/Various/IccNamedColor.cs

@ -1,6 +1,5 @@
// Copyright (c) Six Labors.
// Licensed under the Six Labors Split License.
#nullable disable
namespace SixLabors.ImageSharp.Metadata.Profiles.Icc;
@ -66,7 +65,7 @@ internal readonly struct IccNamedColor : IEquatable<IccNamedColor>
public static bool operator !=(IccNamedColor left, IccNamedColor right) => !left.Equals(right);
/// <inheritdoc/>
public override bool Equals(object obj) => obj is IccNamedColor other && this.Equals(other);
public override bool Equals(object? obj) => obj is IccNamedColor other && this.Equals(other);
/// <inheritdoc/>
public bool Equals(IccNamedColor other)

3
src/ImageSharp/Metadata/Profiles/ICC/Various/IccPositionNumber.cs

@ -1,6 +1,5 @@
// Copyright (c) Six Labors.
// Licensed under the Six Labors Split License.
#nullable disable
namespace SixLabors.ImageSharp.Metadata.Profiles.Icc;
@ -61,7 +60,7 @@ internal readonly struct IccPositionNumber : IEquatable<IccPositionNumber>
}
/// <inheritdoc/>
public override bool Equals(object obj)
public override bool Equals(object? obj)
{
return obj is IccPositionNumber other && this.Equals(other);
}

3
src/ImageSharp/Metadata/Profiles/ICC/Various/IccProfileDescription.cs

@ -1,6 +1,5 @@
// Copyright (c) Six Labors.
// Licensed under the Six Labors Split License.
#nullable disable
namespace SixLabors.ImageSharp.Metadata.Profiles.Icc;
@ -74,7 +73,7 @@ internal readonly struct IccProfileDescription : IEquatable<IccProfileDescriptio
&& this.DeviceModelInfo.AsSpan().SequenceEqual(other.DeviceModelInfo);
/// <inheritdoc />
public override bool Equals(object obj) => obj is IccProfileDescription other && this.Equals(other);
public override bool Equals(object? obj) => obj is IccProfileDescription other && this.Equals(other);
/// <inheritdoc />
public override int GetHashCode()

3
src/ImageSharp/Metadata/Profiles/ICC/Various/IccProfileId.cs

@ -1,6 +1,5 @@
// Copyright (c) Six Labors.
// Licensed under the Six Labors Split License.
#nullable disable
using System.Globalization;
@ -81,7 +80,7 @@ public readonly struct IccProfileId : IEquatable<IccProfileId>
public static bool operator !=(IccProfileId left, IccProfileId right) => !left.Equals(right);
/// <inheritdoc/>
public override bool Equals(object obj) => obj is IccProfileId other && this.Equals(other);
public override bool Equals(object? obj) => obj is IccProfileId other && this.Equals(other);
/// <inheritdoc/>
public bool Equals(IccProfileId other) =>

3
src/ImageSharp/Metadata/Profiles/ICC/Various/IccProfileSequenceIdentifier.cs

@ -1,6 +1,5 @@
// Copyright (c) Six Labors.
// Licensed under the Six Labors Split License.
#nullable disable
namespace SixLabors.ImageSharp.Metadata.Profiles.Icc;
@ -36,7 +35,7 @@ internal readonly struct IccProfileSequenceIdentifier : IEquatable<IccProfileSeq
&& this.Description.AsSpan().SequenceEqual(other.Description);
/// <inheritdoc />
public override bool Equals(object obj) => obj is IccProfileSequenceIdentifier other && this.Equals(other);
public override bool Equals(object? obj) => obj is IccProfileSequenceIdentifier other && this.Equals(other);
/// <inheritdoc />
public override int GetHashCode() => HashCode.Combine(this.Id, this.Description);

3
src/ImageSharp/Metadata/Profiles/ICC/Various/IccResponseNumber.cs

@ -1,6 +1,5 @@
// Copyright (c) Six Labors.
// Licensed under the Six Labors Split License.
#nullable disable
namespace SixLabors.ImageSharp.Metadata.Profiles.Icc;
@ -61,7 +60,7 @@ internal readonly struct IccResponseNumber : IEquatable<IccResponseNumber>
}
/// <inheritdoc/>
public override bool Equals(object obj)
public override bool Equals(object? obj)
{
return obj is IccResponseNumber other && this.Equals(other);
}

3
src/ImageSharp/Metadata/Profiles/ICC/Various/IccScreeningChannel.cs

@ -1,6 +1,5 @@
// Copyright (c) Six Labors.
// Licensed under the Six Labors Split License.
#nullable disable
using System.Runtime.InteropServices;
@ -77,7 +76,7 @@ internal readonly struct IccScreeningChannel : IEquatable<IccScreeningChannel>
this.SpotShape == other.SpotShape;
/// <inheritdoc/>
public override bool Equals(object obj)
public override bool Equals(object? obj)
{
return obj is IccScreeningChannel other && this.Equals(other);
}

3
src/ImageSharp/Metadata/Profiles/ICC/Various/IccTagTableEntry.cs

@ -1,6 +1,5 @@
// Copyright (c) Six Labors.
// Licensed under the Six Labors Split License.
#nullable disable
namespace SixLabors.ImageSharp.Metadata.Profiles.Icc;
@ -64,7 +63,7 @@ internal readonly struct IccTagTableEntry : IEquatable<IccTagTableEntry>
=> !left.Equals(right);
/// <inheritdoc/>
public override bool Equals(object obj) => obj is IccTagTableEntry other && this.Equals(other);
public override bool Equals(object? obj) => obj is IccTagTableEntry other && this.Equals(other);
/// <inheritdoc/>
public bool Equals(IccTagTableEntry other) =>

3
src/ImageSharp/Metadata/Profiles/ICC/Various/IccVersion.cs

@ -1,6 +1,5 @@
// Copyright (c) Six Labors.
// Licensed under the Six Labors Split License.
#nullable disable
namespace SixLabors.ImageSharp.Metadata.Profiles.Icc;
@ -56,7 +55,7 @@ public readonly struct IccVersion : IEquatable<IccVersion>
=> !(left == right);
/// <inheritdoc/>
public override bool Equals(object obj)
public override bool Equals(object? obj)
=> obj is IccVersion iccVersion && this.Equals(iccVersion);
/// <inheritdoc/>

3
src/ImageSharp/PixelFormats/PixelImplementations/Bgra5551.cs

@ -1,6 +1,5 @@
// Copyright (c) Six Labors.
// Licensed under the Six Labors Split License.
#nullable disable
using System.Numerics;
using System.Runtime.CompilerServices;
@ -141,7 +140,7 @@ public partial struct Bgra5551 : IPixel<Bgra5551>, IPackedVector<ushort>
public void FromRgba64(Rgba64 source) => this.FromScaledVector4(source.ToScaledVector4());
/// <inheritdoc />
public override bool Equals(object obj) => obj is Bgra5551 other && this.Equals(other);
public override bool Equals(object? obj) => obj is Bgra5551 other && this.Equals(other);
/// <inheritdoc />
[MethodImpl(InliningOptions.ShortMethod)]

3
src/ImageSharp/Primitives/ColorMatrix.cs

@ -1,6 +1,5 @@
// Copyright (c) Six Labors.
// Licensed under the Six Labors Split License.
#nullable disable
#pragma warning disable SA1117 // Parameters should be on same line or separate lines
using System.Globalization;
@ -391,7 +390,7 @@ public struct ColorMatrix : IEquatable<ColorMatrix>
public static bool operator !=(ColorMatrix value1, ColorMatrix value2) => !value1.Equals(value2);
/// <inheritdoc/>
public override bool Equals(object obj) => obj is ColorMatrix matrix && this.Equals(matrix);
public override bool Equals(object? obj) => obj is ColorMatrix matrix && this.Equals(matrix);
/// <inheritdoc/>
public bool Equals(ColorMatrix other) =>

3
src/ImageSharp/Primitives/Complex64.cs

@ -1,6 +1,5 @@
// Copyright (c) Six Labors.
// Licensed under the Six Labors Split License.
#nullable disable
using System.Numerics;
using System.Runtime.CompilerServices;
@ -78,7 +77,7 @@ internal readonly struct Complex64 : IEquatable<Complex64>
}
/// <inheritdoc/>
public override bool Equals(object obj) => obj is Complex64 other && this.Equals(other);
public override bool Equals(object? obj) => obj is Complex64 other && this.Equals(other);
/// <inheritdoc/>
public override int GetHashCode()

3
src/ImageSharp/Primitives/ComplexVector4.cs

@ -1,6 +1,5 @@
// Copyright (c) Six Labors.
// Licensed under the Six Labors Split License.
#nullable disable
using System.Numerics;
using System.Runtime.CompilerServices;
@ -49,7 +48,7 @@ internal struct ComplexVector4 : IEquatable<ComplexVector4>
}
/// <inheritdoc/>
public override bool Equals(object obj) => obj is ComplexVector4 other && this.Equals(other);
public override bool Equals(object? obj) => obj is ComplexVector4 other && this.Equals(other);
/// <inheritdoc/>
public override int GetHashCode()

3
src/ImageSharp/Primitives/DenseMatrix{T}.cs

@ -1,6 +1,5 @@
// Copyright (c) Six Labors.
// Licensed under the Six Labors Split License.
#nullable disable
using System.Diagnostics;
using System.Runtime.CompilerServices;
@ -249,7 +248,7 @@ public readonly struct DenseMatrix<T> : IEquatable<DenseMatrix<T>>
}
/// <inheritdoc/>
public override bool Equals(object obj)
public override bool Equals(object? obj)
=> obj is DenseMatrix<T> other && this.Equals(other);
/// <inheritdoc/>

3
src/ImageSharp/Primitives/LongRational.cs

@ -1,6 +1,5 @@
// Copyright (c) Six Labors.
// Licensed under the Six Labors Split License.
#nullable disable
using System.Globalization;
using System.Text;
@ -67,7 +66,7 @@ internal readonly struct LongRational : IEquatable<LongRational>
public bool IsZero => this.Denominator == 1 && this.Numerator == 0;
/// <inheritdoc/>
public override bool Equals(object obj)
public override bool Equals(object? obj)
=> obj is LongRational longRational && this.Equals(longRational);
/// <inheritdoc/>

3
src/ImageSharp/Primitives/Number.cs

@ -1,6 +1,5 @@
// Copyright (c) Six Labors.
// Licensed under the Six Labors Split License.
#nullable disable
using System.Globalization;
using System.Runtime.InteropServices;
@ -146,7 +145,7 @@ public struct Number : IEquatable<Number>, IComparable<Number>
}
/// <inheritdoc/>
public override bool Equals(object obj) => obj is Number other && this.Equals(other);
public override bool Equals(object? obj) => obj is Number other && this.Equals(other);
/// <inheritdoc/>
public bool Equals(Number other)

3
src/ImageSharp/Primitives/Point.cs

@ -1,6 +1,5 @@
// Copyright (c) Six Labors.
// Licensed under the Six Labors Split License.
#nullable disable
using System.ComponentModel;
using System.Numerics;
@ -275,7 +274,7 @@ public struct Point : IEquatable<Point>
public override string ToString() => $"Point [ X={this.X}, Y={this.Y} ]";
/// <inheritdoc/>
public override bool Equals(object obj) => obj is Point other && this.Equals(other);
public override bool Equals(object? obj) => obj is Point other && this.Equals(other);
/// <inheritdoc/>
[MethodImpl(MethodImplOptions.AggressiveInlining)]

3
src/ImageSharp/Primitives/PointF.cs

@ -1,6 +1,5 @@
// Copyright (c) Six Labors.
// Licensed under the Six Labors Split License.
#nullable disable
using System.ComponentModel;
using System.Numerics;
@ -284,7 +283,7 @@ public struct PointF : IEquatable<PointF>
public override string ToString() => $"PointF [ X={this.X}, Y={this.Y} ]";
/// <inheritdoc/>
public override bool Equals(object obj) => obj is PointF pointF && this.Equals(pointF);
public override bool Equals(object? obj) => obj is PointF pointF && this.Equals(pointF);
/// <inheritdoc/>
[MethodImpl(MethodImplOptions.AggressiveInlining)]

3
src/ImageSharp/Primitives/Rational.cs

@ -1,6 +1,5 @@
// Copyright (c) Six Labors.
// Licensed under the Six Labors Split License.
#nullable disable
using System.Globalization;
@ -123,7 +122,7 @@ public readonly struct Rational : IEquatable<Rational>
public static Rational FromDouble(double value, bool bestPrecision) => new Rational(value, bestPrecision);
/// <inheritdoc/>
public override bool Equals(object obj) => obj is Rational other && this.Equals(other);
public override bool Equals(object? obj) => obj is Rational other && this.Equals(other);
/// <inheritdoc/>
public bool Equals(Rational other)

3
src/ImageSharp/Primitives/Rectangle.cs

@ -1,6 +1,5 @@
// Copyright (c) Six Labors.
// Licensed under the Six Labors Split License.
#nullable disable
using System.ComponentModel;
using System.Numerics;
@ -444,7 +443,7 @@ public struct Rectangle : IEquatable<Rectangle>
public override string ToString() => $"Rectangle [ X={this.X}, Y={this.Y}, Width={this.Width}, Height={this.Height} ]";
/// <inheritdoc/>
public override bool Equals(object obj) => obj is Rectangle other && this.Equals(other);
public override bool Equals(object? obj) => obj is Rectangle other && this.Equals(other);
/// <inheritdoc/>
[MethodImpl(MethodImplOptions.AggressiveInlining)]

3
src/ImageSharp/Primitives/RectangleF.cs

@ -1,6 +1,5 @@
// Copyright (c) Six Labors.
// Licensed under the Six Labors Split License.
#nullable disable
using System.ComponentModel;
using System.Numerics;
@ -379,7 +378,7 @@ public struct RectangleF : IEquatable<RectangleF>
=> $"RectangleF [ X={this.X}, Y={this.Y}, Width={this.Width}, Height={this.Height} ]";
/// <inheritdoc/>
public override bool Equals(object obj) => obj is RectangleF other && this.Equals(other);
public override bool Equals(object? obj) => obj is RectangleF other && this.Equals(other);
/// <inheritdoc/>
[MethodImpl(MethodImplOptions.AggressiveInlining)]

3
src/ImageSharp/Primitives/SignedRational.cs

@ -1,6 +1,5 @@
// Copyright (c) Six Labors.
// Licensed under the Six Labors Split License.
#nullable disable
using System.Globalization;
@ -135,7 +134,7 @@ public readonly struct SignedRational : IEquatable<SignedRational>
}
/// <inheritdoc/>
public override bool Equals(object obj)
public override bool Equals(object? obj)
{
return obj is SignedRational other && this.Equals(other);
}

3
src/ImageSharp/Primitives/Size.cs

@ -1,6 +1,5 @@
// Copyright (c) Six Labors.
// Licensed under the Six Labors Split License.
#nullable disable
using System.ComponentModel;
using System.Numerics;
@ -269,7 +268,7 @@ public struct Size : IEquatable<Size>
public override string ToString() => $"Size [ Width={this.Width}, Height={this.Height} ]";
/// <inheritdoc/>
public override bool Equals(object obj) => obj is Size other && this.Equals(other);
public override bool Equals(object? obj) => obj is Size other && this.Equals(other);
/// <inheritdoc/>
[MethodImpl(MethodImplOptions.AggressiveInlining)]

3
src/ImageSharp/Primitives/SizeF.cs

@ -1,6 +1,5 @@
// Copyright (c) Six Labors.
// Licensed under the Six Labors Split License.
#nullable disable
using System.ComponentModel;
using System.Numerics;
@ -215,7 +214,7 @@ public struct SizeF : IEquatable<SizeF>
public override string ToString() => $"SizeF [ Width={this.Width}, Height={this.Height} ]";
/// <inheritdoc/>
public override bool Equals(object obj) => obj is SizeF && this.Equals((SizeF)obj);
public override bool Equals(object? obj) => obj is SizeF && this.Equals((SizeF)obj);
/// <inheritdoc/>
[MethodImpl(MethodImplOptions.AggressiveInlining)]

3
src/ImageSharp/Primitives/ValueSize.cs

@ -1,6 +1,5 @@
// Copyright (c) Six Labors.
// Licensed under the Six Labors Split License.
#nullable disable
namespace SixLabors.ImageSharp;
@ -115,7 +114,7 @@ internal readonly struct ValueSize : IEquatable<ValueSize>
public override string ToString() => $"{this.Value} - {this.Type}";
/// <inheritdoc/>
public override bool Equals(object obj)
public override bool Equals(object? obj)
{
return obj is ValueSize size && this.Equals(size);
}

Loading…
Cancel
Save