diff --git a/src/ImageSharp/Formats/Tiff/Compression/DeflateTiffCompression.cs b/src/ImageSharp/Formats/Tiff/Compression/DeflateTiffCompression.cs
index 074b04c6b5..73669d3cb4 100644
--- a/src/ImageSharp/Formats/Tiff/Compression/DeflateTiffCompression.cs
+++ b/src/ImageSharp/Formats/Tiff/Compression/DeflateTiffCompression.cs
@@ -2,12 +2,10 @@
// Licensed under the Apache License, Version 2.0.
using System;
-using System.IO;
using System.IO.Compression;
using SixLabors.ImageSharp.Compression.Zlib;
using SixLabors.ImageSharp.Formats.Experimental.Tiff.Constants;
-using SixLabors.ImageSharp.Formats.Experimental.Tiff.Utils;
using SixLabors.ImageSharp.Formats.Tiff.Compression;
using SixLabors.ImageSharp.IO;
using SixLabors.ImageSharp.Memory;
diff --git a/src/ImageSharp/Formats/Tiff/Compression/LzwTiffCompression.cs b/src/ImageSharp/Formats/Tiff/Compression/LzwTiffCompression.cs
index 92468a00c2..5e5cdd3791 100644
--- a/src/ImageSharp/Formats/Tiff/Compression/LzwTiffCompression.cs
+++ b/src/ImageSharp/Formats/Tiff/Compression/LzwTiffCompression.cs
@@ -2,7 +2,6 @@
// Licensed under the Apache License, Version 2.0.
using System;
-using System.IO;
using SixLabors.ImageSharp.Formats.Experimental.Tiff.Constants;
using SixLabors.ImageSharp.Formats.Experimental.Tiff.Utils;
diff --git a/src/ImageSharp/Formats/Tiff/Compression/ModifiedHuffmanTiffCompression.cs b/src/ImageSharp/Formats/Tiff/Compression/ModifiedHuffmanTiffCompression.cs
index 1d7c2eef57..e46b0621dd 100644
--- a/src/ImageSharp/Formats/Tiff/Compression/ModifiedHuffmanTiffCompression.cs
+++ b/src/ImageSharp/Formats/Tiff/Compression/ModifiedHuffmanTiffCompression.cs
@@ -2,7 +2,6 @@
// Licensed under the Apache License, Version 2.0.
using System;
-using System.IO;
using SixLabors.ImageSharp.Formats.Experimental.Tiff.Constants;
using SixLabors.ImageSharp.IO;
diff --git a/src/ImageSharp/Formats/Tiff/Compression/NoneTiffCompression.cs b/src/ImageSharp/Formats/Tiff/Compression/NoneTiffCompression.cs
index 9140a52e04..d1b0c79b31 100644
--- a/src/ImageSharp/Formats/Tiff/Compression/NoneTiffCompression.cs
+++ b/src/ImageSharp/Formats/Tiff/Compression/NoneTiffCompression.cs
@@ -2,9 +2,7 @@
// Licensed under the Apache License, Version 2.0.
using System;
-using System.IO;
-using SixLabors.ImageSharp.Formats.Experimental.Tiff.Utils;
using SixLabors.ImageSharp.IO;
using SixLabors.ImageSharp.Memory;
diff --git a/src/ImageSharp/Formats/Tiff/Compression/PackBitsTiffCompression.cs b/src/ImageSharp/Formats/Tiff/Compression/PackBitsTiffCompression.cs
index a7c8b93481..181c8e558d 100644
--- a/src/ImageSharp/Formats/Tiff/Compression/PackBitsTiffCompression.cs
+++ b/src/ImageSharp/Formats/Tiff/Compression/PackBitsTiffCompression.cs
@@ -3,9 +3,7 @@
using System;
using System.Buffers;
-using System.IO;
-using SixLabors.ImageSharp.Formats.Experimental.Tiff.Utils;
using SixLabors.ImageSharp.IO;
using SixLabors.ImageSharp.Memory;
@@ -40,7 +38,7 @@ namespace SixLabors.ImageSharp.Formats.Experimental.Tiff.Compression
{
byte headerByte = compressedData[compressedOffset];
- if (headerByte <= (byte)127)
+ if (headerByte <= 127)
{
int literalOffset = compressedOffset + 1;
int literalLength = compressedData[compressedOffset] + 1;
@@ -50,7 +48,7 @@ namespace SixLabors.ImageSharp.Formats.Experimental.Tiff.Compression
compressedOffset += literalLength + 1;
decompressedOffset += literalLength;
}
- else if (headerByte == (byte)0x80)
+ else if (headerByte == 0x80)
{
compressedOffset += 1;
}
diff --git a/src/ImageSharp/Formats/Tiff/Compression/T4BitWriter.cs b/src/ImageSharp/Formats/Tiff/Compression/T4BitWriter.cs
index 2e168de59b..4041a57c32 100644
--- a/src/ImageSharp/Formats/Tiff/Compression/T4BitWriter.cs
+++ b/src/ImageSharp/Formats/Tiff/Compression/T4BitWriter.cs
@@ -187,7 +187,7 @@ namespace SixLabors.ImageSharp.Formats.Experimental.Tiff.Compression
///
/// The modified huffman is basically the same as CCITT T4, but without EOL markers and padding at the end of the rows.
///
- private bool useModifiedHuffman;
+ private readonly bool useModifiedHuffman;
///
/// Initializes a new instance of the class.
diff --git a/src/ImageSharp/Formats/Tiff/Compression/T4TiffCompression.cs b/src/ImageSharp/Formats/Tiff/Compression/T4TiffCompression.cs
index f0c3a29bdd..8ffb2e6926 100644
--- a/src/ImageSharp/Formats/Tiff/Compression/T4TiffCompression.cs
+++ b/src/ImageSharp/Formats/Tiff/Compression/T4TiffCompression.cs
@@ -2,7 +2,6 @@
// Licensed under the Apache License, Version 2.0.
using System;
-using System.IO;
using SixLabors.ImageSharp.Formats.Experimental.Tiff.Constants;
using SixLabors.ImageSharp.IO;
diff --git a/src/ImageSharp/Formats/Tiff/Compression/TiffBaseCompression.cs b/src/ImageSharp/Formats/Tiff/Compression/TiffBaseCompression.cs
index 1937d20eca..323e777831 100644
--- a/src/ImageSharp/Formats/Tiff/Compression/TiffBaseCompression.cs
+++ b/src/ImageSharp/Formats/Tiff/Compression/TiffBaseCompression.cs
@@ -5,7 +5,6 @@ using System;
using System.IO;
using SixLabors.ImageSharp.Formats.Experimental.Tiff.Constants;
-using SixLabors.ImageSharp.Formats.Tiff.Compression;
using SixLabors.ImageSharp.IO;
using SixLabors.ImageSharp.Memory;
@@ -18,24 +17,24 @@ namespace SixLabors.ImageSharp.Formats.Experimental.Tiff.Compression
{
private readonly MemoryAllocator allocator;
- private TiffPhotometricInterpretation photometricInterpretation;
+ private readonly TiffPhotometricInterpretation photometricInterpretation;
- private int width;
+ private readonly int width;
- private int bitsPerPixel;
+ private readonly int bitsPerPixel;
- private TiffPredictor predictor;
+ private readonly TiffPredictor predictor;
- public TiffBaseCompression(MemoryAllocator allocator) => this.allocator = allocator;
+ protected TiffBaseCompression(MemoryAllocator allocator) => this.allocator = allocator;
- public TiffBaseCompression(MemoryAllocator allocator, TiffPhotometricInterpretation photometricInterpretation, int width)
+ protected TiffBaseCompression(MemoryAllocator allocator, TiffPhotometricInterpretation photometricInterpretation, int width)
: this(allocator)
{
this.photometricInterpretation = photometricInterpretation;
this.width = width;
}
- public TiffBaseCompression(MemoryAllocator allocator, int width, int bitsPerPixel, TiffPredictor predictor)
+ protected TiffBaseCompression(MemoryAllocator allocator, int width, int bitsPerPixel, TiffPredictor predictor)
: this(allocator)
{
this.width = width;
diff --git a/src/ImageSharp/Formats/Tiff/Ifd/EntryReader.cs b/src/ImageSharp/Formats/Tiff/Ifd/EntryReader.cs
index da2f96211e..b51997a7ed 100644
--- a/src/ImageSharp/Formats/Tiff/Ifd/EntryReader.cs
+++ b/src/ImageSharp/Formats/Tiff/Ifd/EntryReader.cs
@@ -29,7 +29,7 @@ namespace SixLabors.ImageSharp.Formats.Experimental.Tiff
public IExifValue ReadNext()
{
var tagId = (ExifTagValue)this.stream.ReadUInt16();
- var dataType = (ExifDataType)EnumUtils.Parse(this.stream.ReadUInt16(), ExifDataType.Unknown);
+ ExifDataType dataType = EnumUtils.Parse(this.stream.ReadUInt16(), ExifDataType.Unknown);
uint count = this.stream.ReadUInt32();
ExifDataType rawDataType = dataType;
@@ -116,9 +116,7 @@ namespace SixLabors.ImageSharp.Formats.Experimental.Tiff
private bool ReadValueOrOffset(ExifValue entry, ExifDataType rawDataType, uint count)
{
- if (entry.Tag == ExifTag.SubIFDOffset
- || entry.Tag == ExifTag.GPSIFDOffset
- /*|| entry.Tag == ExifTagValue.SubIFDs*/)
+ if (entry.Tag == ExifTag.SubIFDOffset || entry.Tag == ExifTag.GPSIFDOffset /*|| entry.Tag == ExifTagValue.SubIFDs*/)
{
// todo: ignore subIfds (exif, gps)
this.stream.Skip(4);
diff --git a/src/ImageSharp/Formats/Tiff/PhotometricInterpretation/RgbPlanarTiffColor.cs b/src/ImageSharp/Formats/Tiff/PhotometricInterpretation/RgbPlanarTiffColor.cs
index 20ce17d991..3ff8e34a06 100644
--- a/src/ImageSharp/Formats/Tiff/PhotometricInterpretation/RgbPlanarTiffColor.cs
+++ b/src/ImageSharp/Formats/Tiff/PhotometricInterpretation/RgbPlanarTiffColor.cs
@@ -33,9 +33,9 @@ namespace SixLabors.ImageSharp.Formats.Experimental.Tiff
this.bitsPerSampleG = bitsPerSample[1];
this.bitsPerSampleB = bitsPerSample[2];
- this.rFactor = (float)(1 << this.bitsPerSampleR) - 1.0f;
- this.gFactor = (float)(1 << this.bitsPerSampleG) - 1.0f;
- this.bFactor = (float)(1 << this.bitsPerSampleB) - 1.0f;
+ this.rFactor = (1 << this.bitsPerSampleR) - 1.0f;
+ this.gFactor = (1 << this.bitsPerSampleG) - 1.0f;
+ this.bFactor = (1 << this.bitsPerSampleB) - 1.0f;
}
///
@@ -59,9 +59,9 @@ namespace SixLabors.ImageSharp.Formats.Experimental.Tiff
{
for (int x = left; x < left + width; x++)
{
- float r = ((float)rBitReader.ReadBits(this.bitsPerSampleR)) / this.rFactor;
- float g = ((float)gBitReader.ReadBits(this.bitsPerSampleG)) / this.gFactor;
- float b = ((float)bBitReader.ReadBits(this.bitsPerSampleB)) / this.bFactor;
+ float r = rBitReader.ReadBits(this.bitsPerSampleR) / this.rFactor;
+ float g = gBitReader.ReadBits(this.bitsPerSampleG) / this.gFactor;
+ float b = bBitReader.ReadBits(this.bitsPerSampleB) / this.bFactor;
color.FromVector4(new Vector4(r, g, b, 1.0f));
pixels[x, y] = color;
diff --git a/src/ImageSharp/Formats/Tiff/PhotometricInterpretation/RgbTiffColor.cs b/src/ImageSharp/Formats/Tiff/PhotometricInterpretation/RgbTiffColor.cs
index 6b812ed074..712bf6f2a9 100644
--- a/src/ImageSharp/Formats/Tiff/PhotometricInterpretation/RgbTiffColor.cs
+++ b/src/ImageSharp/Formats/Tiff/PhotometricInterpretation/RgbTiffColor.cs
@@ -33,9 +33,9 @@ namespace SixLabors.ImageSharp.Formats.Experimental.Tiff
this.bitsPerSampleG = bitsPerSample[1];
this.bitsPerSampleB = bitsPerSample[2];
- this.rFactor = (float)(1 << this.bitsPerSampleR) - 1.0f;
- this.gFactor = (float)(1 << this.bitsPerSampleG) - 1.0f;
- this.bFactor = (float)(1 << this.bitsPerSampleB) - 1.0f;
+ this.rFactor = (1 << this.bitsPerSampleR) - 1.0f;
+ this.gFactor = (1 << this.bitsPerSampleG) - 1.0f;
+ this.bFactor = (1 << this.bitsPerSampleB) - 1.0f;
}
///
@@ -49,9 +49,9 @@ namespace SixLabors.ImageSharp.Formats.Experimental.Tiff
{
for (int x = left; x < left + width; x++)
{
- float r = ((float)bitReader.ReadBits(this.bitsPerSampleR)) / this.rFactor;
- float g = ((float)bitReader.ReadBits(this.bitsPerSampleG)) / this.gFactor;
- float b = ((float)bitReader.ReadBits(this.bitsPerSampleB)) / this.bFactor;
+ float r = bitReader.ReadBits(this.bitsPerSampleR) / this.rFactor;
+ float g = bitReader.ReadBits(this.bitsPerSampleG) / this.gFactor;
+ float b = bitReader.ReadBits(this.bitsPerSampleB) / this.bFactor;
color.FromVector4(new Vector4(r, g, b, 1.0f));
pixels[x, y] = color;
diff --git a/src/ImageSharp/Formats/Tiff/PhotometricInterpretation/TiffColorDecoderFactory.cs b/src/ImageSharp/Formats/Tiff/PhotometricInterpretation/TiffColorDecoderFactory.cs
index abc502deac..633edd2cbd 100644
--- a/src/ImageSharp/Formats/Tiff/PhotometricInterpretation/TiffColorDecoderFactory.cs
+++ b/src/ImageSharp/Formats/Tiff/PhotometricInterpretation/TiffColorDecoderFactory.cs
@@ -1,7 +1,6 @@
// Copyright (c) Six Labors.
// Licensed under the Apache License, Version 2.0.
-using System;
using SixLabors.ImageSharp.PixelFormats;
namespace SixLabors.ImageSharp.Formats.Experimental.Tiff
diff --git a/src/ImageSharp/Formats/Tiff/Streams/TiffBigEndianStream.cs b/src/ImageSharp/Formats/Tiff/Streams/TiffBigEndianStream.cs
index 845353acbd..021fb9d51f 100644
--- a/src/ImageSharp/Formats/Tiff/Streams/TiffBigEndianStream.cs
+++ b/src/ImageSharp/Formats/Tiff/Streams/TiffBigEndianStream.cs
@@ -4,8 +4,6 @@
using System;
using System.IO;
-using SixLabors.ImageSharp.Formats.Experimental.Tiff.Constants;
-
namespace SixLabors.ImageSharp.Formats.Experimental.Tiff.Streams
{
internal class TiffBigEndianStream : TiffStream
diff --git a/src/ImageSharp/Formats/Tiff/Streams/TiffLittleEndianStream.cs b/src/ImageSharp/Formats/Tiff/Streams/TiffLittleEndianStream.cs
index c31c2320a5..43c27b98fe 100644
--- a/src/ImageSharp/Formats/Tiff/Streams/TiffLittleEndianStream.cs
+++ b/src/ImageSharp/Formats/Tiff/Streams/TiffLittleEndianStream.cs
@@ -4,8 +4,6 @@
using System;
using System.IO;
-using SixLabors.ImageSharp.Formats.Experimental.Tiff.Constants;
-
namespace SixLabors.ImageSharp.Formats.Experimental.Tiff.Streams
{
internal class TiffLittleEndianStream : TiffStream
diff --git a/src/ImageSharp/Formats/Tiff/Streams/TiffStream.cs b/src/ImageSharp/Formats/Tiff/Streams/TiffStream.cs
index 930be0d05d..e178dd1795 100644
--- a/src/ImageSharp/Formats/Tiff/Streams/TiffStream.cs
+++ b/src/ImageSharp/Formats/Tiff/Streams/TiffStream.cs
@@ -2,7 +2,6 @@
// Licensed under the Apache License, Version 2.0.
using System.IO;
-using SixLabors.ImageSharp.Formats.Experimental.Tiff.Constants;
namespace SixLabors.ImageSharp.Formats.Experimental.Tiff.Streams
{
diff --git a/src/ImageSharp/Formats/Tiff/TiffBitsPerPixel.cs b/src/ImageSharp/Formats/Tiff/TiffBitsPerPixel.cs
index ea53fa0617..2f816463cf 100644
--- a/src/ImageSharp/Formats/Tiff/TiffBitsPerPixel.cs
+++ b/src/ImageSharp/Formats/Tiff/TiffBitsPerPixel.cs
@@ -4,7 +4,7 @@
namespace SixLabors.ImageSharp.Formats.Experimental.Tiff
{
///
- /// Enumerates the available bits per pixel the tiff encoder supports.
+ /// Enumerates the available bits per pixel for the tiff format.
///
public enum TiffBitsPerPixel
{
diff --git a/src/ImageSharp/Formats/Tiff/TiffDecoderCore.cs b/src/ImageSharp/Formats/Tiff/TiffDecoderCore.cs
index db8b59858b..e6d5f873dd 100644
--- a/src/ImageSharp/Formats/Tiff/TiffDecoderCore.cs
+++ b/src/ImageSharp/Formats/Tiff/TiffDecoderCore.cs
@@ -238,7 +238,7 @@ namespace SixLabors.ImageSharp.Formats.Experimental.Tiff
/// The size (in bytes) of the required pixel buffer.
private int CalculateStripBufferSize(int width, int height, int plane = -1)
{
- int bitsPerPixel = 0;
+ int bitsPerPixel;
if (this.PlanarConfiguration == TiffPlanarConfiguration.Chunky)
{
diff --git a/src/ImageSharp/Formats/Tiff/TiffEncoderCore.cs b/src/ImageSharp/Formats/Tiff/TiffEncoderCore.cs
index c7301049de..9a692a1609 100644
--- a/src/ImageSharp/Formats/Tiff/TiffEncoderCore.cs
+++ b/src/ImageSharp/Formats/Tiff/TiffEncoderCore.cs
@@ -141,7 +141,7 @@ namespace SixLabors.ImageSharp.Formats.Experimental.Tiff
public long WriteHeader(TiffWriter writer)
{
writer.Write(ByteOrderMarker);
- writer.Write((ushort)TiffConstants.HeaderMagicNumber);
+ writer.Write(TiffConstants.HeaderMagicNumber);
long firstIfdMarker = writer.PlaceMarker();
return firstIfdMarker;
@@ -239,7 +239,7 @@ namespace SixLabors.ImageSharp.Formats.Experimental.Tiff
if (dataBlock.Length % 2 == 1)
{
- writer.Write((byte)0);
+ writer.Write(0);
}
}
diff --git a/src/ImageSharp/Formats/Tiff/TiffEncoderEntriesCollector.cs b/src/ImageSharp/Formats/Tiff/TiffEncoderEntriesCollector.cs
index 41d833299a..5b26a8551e 100644
--- a/src/ImageSharp/Formats/Tiff/TiffEncoderEntriesCollector.cs
+++ b/src/ImageSharp/Formats/Tiff/TiffEncoderEntriesCollector.cs
@@ -3,7 +3,6 @@
using System.Collections.Generic;
-using SixLabors.ImageSharp.Common.Helpers;
using SixLabors.ImageSharp.Formats.Experimental.Tiff.Constants;
using SixLabors.ImageSharp.Metadata;
using SixLabors.ImageSharp.Metadata.Profiles.Exif;
diff --git a/src/ImageSharp/Formats/Tiff/TiffFrameMetadataExtensions.cs b/src/ImageSharp/Formats/Tiff/TiffFrameMetadataExtensions.cs
index 78e2174845..aea12dbe58 100644
--- a/src/ImageSharp/Formats/Tiff/TiffFrameMetadataExtensions.cs
+++ b/src/ImageSharp/Formats/Tiff/TiffFrameMetadataExtensions.cs
@@ -152,7 +152,7 @@ namespace SixLabors.ImageSharp.Formats.Experimental.Tiff
IExifValue obj = FindOrCreate(meta, tag);
DebugGuard.IsTrue(!obj.IsArray, "Expected non array entry");
- object val = (T)(object)value;
+ object val = value;
return obj.TrySetValue(val);
}
diff --git a/tests/ImageSharp.Tests/Formats/Tiff/PhotometricInterpretation/BlackIsZeroTiffColorTests.cs b/tests/ImageSharp.Tests/Formats/Tiff/PhotometricInterpretation/BlackIsZeroTiffColorTests.cs
index 79dd659684..d7a4bc7ed2 100644
--- a/tests/ImageSharp.Tests/Formats/Tiff/PhotometricInterpretation/BlackIsZeroTiffColorTests.cs
+++ b/tests/ImageSharp.Tests/Formats/Tiff/PhotometricInterpretation/BlackIsZeroTiffColorTests.cs
@@ -10,18 +10,19 @@ using Xunit;
namespace SixLabors.ImageSharp.Tests.Formats.Tiff.PhotometricInterpretation
{
+ [Trait("Format", "Tiff")]
public class BlackIsZeroTiffColorTests : PhotometricInterpretationTestBase
{
- private static Rgba32 gray000 = new Rgba32(0, 0, 0, 255);
- private static Rgba32 gray128 = new Rgba32(128, 128, 128, 255);
- private static Rgba32 gray255 = new Rgba32(255, 255, 255, 255);
- private static Rgba32 gray0 = new Rgba32(0, 0, 0, 255);
- private static Rgba32 gray8 = new Rgba32(136, 136, 136, 255);
- private static Rgba32 grayF = new Rgba32(255, 255, 255, 255);
- private static Rgba32 bit0 = new Rgba32(0, 0, 0, 255);
- private static Rgba32 bit1 = new Rgba32(255, 255, 255, 255);
+ private static readonly Rgba32 Gray000 = new Rgba32(0, 0, 0, 255);
+ private static readonly Rgba32 Gray128 = new Rgba32(128, 128, 128, 255);
+ private static readonly Rgba32 Gray255 = new Rgba32(255, 255, 255, 255);
+ private static readonly Rgba32 Gray0 = new Rgba32(0, 0, 0, 255);
+ private static readonly Rgba32 Gray8 = new Rgba32(136, 136, 136, 255);
+ private static readonly Rgba32 GrayF = new Rgba32(255, 255, 255, 255);
+ private static readonly Rgba32 Bit0 = new Rgba32(0, 0, 0, 255);
+ private static readonly Rgba32 Bit1 = new Rgba32(255, 255, 255, 255);
- private static readonly byte[] Bilevel_Bytes4x4 =
+ private static readonly byte[] BilevelBytes4X4 =
{
0b01010000,
0b11110000,
@@ -29,15 +30,15 @@ namespace SixLabors.ImageSharp.Tests.Formats.Tiff.PhotometricInterpretation
0b10010000
};
- private static readonly Rgba32[][] Bilevel_Result4x4 = new[]
+ private static readonly Rgba32[][] BilevelResult4X4 = new[]
{
- new[] { bit0, bit1, bit0, bit1 },
- new[] { bit1, bit1, bit1, bit1 },
- new[] { bit0, bit1, bit1, bit1 },
- new[] { bit1, bit0, bit0, bit1 }
+ new[] { Bit0, Bit1, Bit0, Bit1 },
+ new[] { Bit1, Bit1, Bit1, Bit1 },
+ new[] { Bit0, Bit1, Bit1, Bit1 },
+ new[] { Bit1, Bit0, Bit0, Bit1 }
};
- private static readonly byte[] Bilevel_Bytes12x4 =
+ private static readonly byte[] BilevelBytes12X4 =
{
0b01010101, 0b01010000,
0b11111111, 0b11111111,
@@ -45,15 +46,15 @@ namespace SixLabors.ImageSharp.Tests.Formats.Tiff.PhotometricInterpretation
0b10010000, 0b01100000
};
- private static readonly Rgba32[][] Bilevel_Result12x4 =
+ private static readonly Rgba32[][] BilevelResult12X4 =
{
- new[] { bit0, bit1, bit0, bit1, bit0, bit1, bit0, bit1, bit0, bit1, bit0, bit1 },
- new[] { bit1, bit1, bit1, bit1, bit1, bit1, bit1, bit1, bit1, bit1, bit1, bit1 },
- new[] { bit0, bit1, bit1, bit0, bit1, bit0, bit0, bit1, bit1, bit0, bit1, bit0 },
- new[] { bit1, bit0, bit0, bit1, bit0, bit0, bit0, bit0, bit0, bit1, bit1, bit0 }
+ new[] { Bit0, Bit1, Bit0, Bit1, Bit0, Bit1, Bit0, Bit1, Bit0, Bit1, Bit0, Bit1 },
+ new[] { Bit1, Bit1, Bit1, Bit1, Bit1, Bit1, Bit1, Bit1, Bit1, Bit1, Bit1, Bit1 },
+ new[] { Bit0, Bit1, Bit1, Bit0, Bit1, Bit0, Bit0, Bit1, Bit1, Bit0, Bit1, Bit0 },
+ new[] { Bit1, Bit0, Bit0, Bit1, Bit0, Bit0, Bit0, Bit0, Bit0, Bit1, Bit1, Bit0 }
};
- private static readonly byte[] Grayscale4_Bytes4x4 =
+ private static readonly byte[] Grayscale4Bytes4X4 =
{
0x8F, 0x0F,
0xFF, 0xFF,
@@ -61,15 +62,15 @@ namespace SixLabors.ImageSharp.Tests.Formats.Tiff.PhotometricInterpretation
0xF0, 0xF8
};
- private static readonly Rgba32[][] Grayscale4_Result4x4 =
+ private static readonly Rgba32[][] Grayscale4Result4X4 =
{
- new[] { gray8, grayF, gray0, grayF },
- new[] { grayF, grayF, grayF, grayF },
- new[] { gray0, gray8, gray8, grayF },
- new[] { grayF, gray0, grayF, gray8 }
+ new[] { Gray8, GrayF, Gray0, GrayF },
+ new[] { GrayF, GrayF, GrayF, GrayF },
+ new[] { Gray0, Gray8, Gray8, GrayF },
+ new[] { GrayF, Gray0, GrayF, Gray8 }
};
- private static readonly byte[] Grayscale4_Bytes3x4 =
+ private static readonly byte[] Grayscale4Bytes3X4 =
{
0x8F, 0x00,
0xFF, 0xF0,
@@ -77,15 +78,15 @@ namespace SixLabors.ImageSharp.Tests.Formats.Tiff.PhotometricInterpretation
0xF0, 0xF0
};
- private static readonly Rgba32[][] Grayscale4_Result3x4 =
+ private static readonly Rgba32[][] Grayscale4Result3X4 =
{
- new[] { gray8, grayF, gray0 },
- new[] { grayF, grayF, grayF },
- new[] { gray0, gray8, gray8 },
- new[] { grayF, gray0, grayF }
+ new[] { Gray8, GrayF, Gray0 },
+ new[] { GrayF, GrayF, GrayF },
+ new[] { Gray0, Gray8, Gray8 },
+ new[] { GrayF, Gray0, GrayF }
};
- private static readonly byte[] Grayscale8_Bytes4x4 =
+ private static readonly byte[] Grayscale8Bytes4X4 =
{
128, 255, 000, 255,
255, 255, 255, 255,
@@ -93,29 +94,29 @@ namespace SixLabors.ImageSharp.Tests.Formats.Tiff.PhotometricInterpretation
255, 000, 255, 128
};
- private static readonly Rgba32[][] Grayscale8_Result4x4 =
+ private static readonly Rgba32[][] Grayscale8Result4X4 =
{
- new[] { gray128, gray255, gray000, gray255 },
- new[] { gray255, gray255, gray255, gray255 },
- new[] { gray000, gray128, gray128, gray255 },
- new[] { gray255, gray000, gray255, gray128 }
+ new[] { Gray128, Gray255, Gray000, Gray255 },
+ new[] { Gray255, Gray255, Gray255, Gray255 },
+ new[] { Gray000, Gray128, Gray128, Gray255 },
+ new[] { Gray255, Gray000, Gray255, Gray128 }
};
- public static IEnumerable