|
|
|
@ -10,23 +10,24 @@ using Xunit; |
|
|
|
|
|
|
|
namespace SixLabors.ImageSharp.Tests.Formats.Tiff.PhotometricInterpretation |
|
|
|
{ |
|
|
|
[Trait("Format", "Tiff")] |
|
|
|
public class RgbTiffColorTests : PhotometricInterpretationTestBase |
|
|
|
{ |
|
|
|
private static Rgba32 rgb4_000 = new Rgba32(0, 0, 0, 255); |
|
|
|
private static Rgba32 rgb4_444 = new Rgba32(68, 68, 68, 255); |
|
|
|
private static Rgba32 rgb4_888 = new Rgba32(136, 136, 136, 255); |
|
|
|
private static Rgba32 rgb4_CCC = new Rgba32(204, 204, 204, 255); |
|
|
|
private static Rgba32 rgb4_FFF = new Rgba32(255, 255, 255, 255); |
|
|
|
private static Rgba32 rgb4_F00 = new Rgba32(255, 0, 0, 255); |
|
|
|
private static Rgba32 rgb4_0F0 = new Rgba32(0, 255, 0, 255); |
|
|
|
private static Rgba32 rgb4_00F = new Rgba32(0, 0, 255, 255); |
|
|
|
private static Rgba32 rgb4_F0F = new Rgba32(255, 0, 255, 255); |
|
|
|
private static Rgba32 rgb4_400 = new Rgba32(68, 0, 0, 255); |
|
|
|
private static Rgba32 rgb4_800 = new Rgba32(136, 0, 0, 255); |
|
|
|
private static Rgba32 rgb4_C00 = new Rgba32(204, 0, 0, 255); |
|
|
|
private static Rgba32 rgb4_48C = new Rgba32(68, 136, 204, 255); |
|
|
|
|
|
|
|
private static byte[] rgb4_Bytes4x4 = |
|
|
|
private static readonly Rgba32 Rgb4_000 = new Rgba32(0, 0, 0, 255); |
|
|
|
private static readonly Rgba32 Rgb4_444 = new Rgba32(68, 68, 68, 255); |
|
|
|
private static readonly Rgba32 Rgb4_888 = new Rgba32(136, 136, 136, 255); |
|
|
|
private static readonly Rgba32 Rgb4_CCC = new Rgba32(204, 204, 204, 255); |
|
|
|
private static readonly Rgba32 Rgb4_FFF = new Rgba32(255, 255, 255, 255); |
|
|
|
private static readonly Rgba32 Rgb4_F00 = new Rgba32(255, 0, 0, 255); |
|
|
|
private static readonly Rgba32 Rgb4_0F0 = new Rgba32(0, 255, 0, 255); |
|
|
|
private static readonly Rgba32 Rgb4_00F = new Rgba32(0, 0, 255, 255); |
|
|
|
private static readonly Rgba32 Rgb4_F0F = new Rgba32(255, 0, 255, 255); |
|
|
|
private static readonly Rgba32 Rgb4_400 = new Rgba32(68, 0, 0, 255); |
|
|
|
private static readonly Rgba32 Rgb4_800 = new Rgba32(136, 0, 0, 255); |
|
|
|
private static readonly Rgba32 Rgb4_C00 = new Rgba32(204, 0, 0, 255); |
|
|
|
private static readonly Rgba32 Rgb4_48C = new Rgba32(68, 136, 204, 255); |
|
|
|
|
|
|
|
private static readonly byte[] Rgb4Bytes4X4 = |
|
|
|
{ |
|
|
|
0x00, 0x0F, 0xFF, 0x00, 0x0F, 0xFF, |
|
|
|
0xF0, 0x00, 0xF0, 0x00, 0xFF, 0x0F, |
|
|
|
@ -34,15 +35,15 @@ namespace SixLabors.ImageSharp.Tests.Formats.Tiff.PhotometricInterpretation |
|
|
|
0x00, 0x04, 0x44, 0x88, 0x8C, 0xCC |
|
|
|
}; |
|
|
|
|
|
|
|
private static Rgba32[][] rgb4_Result4x4 = |
|
|
|
private static readonly Rgba32[][] Rgb4Result4X4 = |
|
|
|
{ |
|
|
|
new[] { rgb4_000, rgb4_FFF, rgb4_000, rgb4_FFF }, |
|
|
|
new[] { rgb4_F00, rgb4_0F0, rgb4_00F, rgb4_F0F }, |
|
|
|
new[] { rgb4_400, rgb4_800, rgb4_C00, rgb4_48C }, |
|
|
|
new[] { rgb4_000, rgb4_444, rgb4_888, rgb4_CCC } |
|
|
|
new[] { Rgb4_000, Rgb4_FFF, Rgb4_000, Rgb4_FFF }, |
|
|
|
new[] { Rgb4_F00, Rgb4_0F0, Rgb4_00F, Rgb4_F0F }, |
|
|
|
new[] { Rgb4_400, Rgb4_800, Rgb4_C00, Rgb4_48C }, |
|
|
|
new[] { Rgb4_000, Rgb4_444, Rgb4_888, Rgb4_CCC } |
|
|
|
}; |
|
|
|
|
|
|
|
private static byte[] rgb4_Bytes3x4 = |
|
|
|
private static readonly byte[] Rgb4Bytes3X4 = |
|
|
|
{ |
|
|
|
0x00, 0x0F, 0xFF, 0x00, 0x00, |
|
|
|
0xF0, 0x00, 0xF0, 0x00, 0xF0, |
|
|
|
@ -50,47 +51,47 @@ namespace SixLabors.ImageSharp.Tests.Formats.Tiff.PhotometricInterpretation |
|
|
|
0x00, 0x04, 0x44, 0x88, 0x80 |
|
|
|
}; |
|
|
|
|
|
|
|
private static Rgba32[][] rgb4_Result3x4 = |
|
|
|
private static readonly Rgba32[][] Rgb4Result3X4 = |
|
|
|
{ |
|
|
|
new[] { rgb4_000, rgb4_FFF, rgb4_000 }, |
|
|
|
new[] { rgb4_F00, rgb4_0F0, rgb4_00F }, |
|
|
|
new[] { rgb4_400, rgb4_800, rgb4_C00 }, |
|
|
|
new[] { rgb4_000, rgb4_444, rgb4_888 } |
|
|
|
new[] { Rgb4_000, Rgb4_FFF, Rgb4_000 }, |
|
|
|
new[] { Rgb4_F00, Rgb4_0F0, Rgb4_00F }, |
|
|
|
new[] { Rgb4_400, Rgb4_800, Rgb4_C00 }, |
|
|
|
new[] { Rgb4_000, Rgb4_444, Rgb4_888 } |
|
|
|
}; |
|
|
|
|
|
|
|
public static IEnumerable<object[]> Rgb4_Data |
|
|
|
public static IEnumerable<object[]> Rgb4Data |
|
|
|
{ |
|
|
|
get |
|
|
|
{ |
|
|
|
yield return new object[] { rgb4_Bytes4x4, new ushort[] { 4, 4, 4 }, 0, 0, 4, 4, rgb4_Result4x4 }; |
|
|
|
yield return new object[] { rgb4_Bytes4x4, new ushort[] { 4, 4, 4 }, 0, 0, 4, 4, Offset(rgb4_Result4x4, 0, 0, 6, 6) }; |
|
|
|
yield return new object[] { rgb4_Bytes4x4, new ushort[] { 4, 4, 4 }, 1, 0, 4, 4, Offset(rgb4_Result4x4, 1, 0, 6, 6) }; |
|
|
|
yield return new object[] { rgb4_Bytes4x4, new ushort[] { 4, 4, 4 }, 0, 1, 4, 4, Offset(rgb4_Result4x4, 0, 1, 6, 6) }; |
|
|
|
yield return new object[] { rgb4_Bytes4x4, new ushort[] { 4, 4, 4 }, 1, 1, 4, 4, Offset(rgb4_Result4x4, 1, 1, 6, 6) }; |
|
|
|
|
|
|
|
yield return new object[] { rgb4_Bytes3x4, new ushort[] { 4, 4, 4 }, 0, 0, 3, 4, rgb4_Result3x4 }; |
|
|
|
yield return new object[] { rgb4_Bytes3x4, new ushort[] { 4, 4, 4 }, 0, 0, 3, 4, Offset(rgb4_Result3x4, 0, 0, 6, 6) }; |
|
|
|
yield return new object[] { rgb4_Bytes3x4, new ushort[] { 4, 4, 4 }, 1, 0, 3, 4, Offset(rgb4_Result3x4, 1, 0, 6, 6) }; |
|
|
|
yield return new object[] { rgb4_Bytes3x4, new ushort[] { 4, 4, 4 }, 0, 1, 3, 4, Offset(rgb4_Result3x4, 0, 1, 6, 6) }; |
|
|
|
yield return new object[] { rgb4_Bytes3x4, new ushort[] { 4, 4, 4 }, 1, 1, 3, 4, Offset(rgb4_Result3x4, 1, 1, 6, 6) }; |
|
|
|
yield return new object[] { Rgb4Bytes4X4, new ushort[] { 4, 4, 4 }, 0, 0, 4, 4, Rgb4Result4X4 }; |
|
|
|
yield return new object[] { Rgb4Bytes4X4, new ushort[] { 4, 4, 4 }, 0, 0, 4, 4, Offset(Rgb4Result4X4, 0, 0, 6, 6) }; |
|
|
|
yield return new object[] { Rgb4Bytes4X4, new ushort[] { 4, 4, 4 }, 1, 0, 4, 4, Offset(Rgb4Result4X4, 1, 0, 6, 6) }; |
|
|
|
yield return new object[] { Rgb4Bytes4X4, new ushort[] { 4, 4, 4 }, 0, 1, 4, 4, Offset(Rgb4Result4X4, 0, 1, 6, 6) }; |
|
|
|
yield return new object[] { Rgb4Bytes4X4, new ushort[] { 4, 4, 4 }, 1, 1, 4, 4, Offset(Rgb4Result4X4, 1, 1, 6, 6) }; |
|
|
|
|
|
|
|
yield return new object[] { Rgb4Bytes3X4, new ushort[] { 4, 4, 4 }, 0, 0, 3, 4, Rgb4Result3X4 }; |
|
|
|
yield return new object[] { Rgb4Bytes3X4, new ushort[] { 4, 4, 4 }, 0, 0, 3, 4, Offset(Rgb4Result3X4, 0, 0, 6, 6) }; |
|
|
|
yield return new object[] { Rgb4Bytes3X4, new ushort[] { 4, 4, 4 }, 1, 0, 3, 4, Offset(Rgb4Result3X4, 1, 0, 6, 6) }; |
|
|
|
yield return new object[] { Rgb4Bytes3X4, new ushort[] { 4, 4, 4 }, 0, 1, 3, 4, Offset(Rgb4Result3X4, 0, 1, 6, 6) }; |
|
|
|
yield return new object[] { Rgb4Bytes3X4, new ushort[] { 4, 4, 4 }, 1, 1, 3, 4, Offset(Rgb4Result3X4, 1, 1, 6, 6) }; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
private static Rgba32 rgb8_000 = new Rgba32(0, 0, 0, 255); |
|
|
|
private static Rgba32 rgb8_444 = new Rgba32(64, 64, 64, 255); |
|
|
|
private static Rgba32 rgb8_888 = new Rgba32(128, 128, 128, 255); |
|
|
|
private static Rgba32 rgb8_CCC = new Rgba32(192, 192, 192, 255); |
|
|
|
private static Rgba32 rgb8_FFF = new Rgba32(255, 255, 255, 255); |
|
|
|
private static Rgba32 rgb8_F00 = new Rgba32(255, 0, 0, 255); |
|
|
|
private static Rgba32 rgb8_0F0 = new Rgba32(0, 255, 0, 255); |
|
|
|
private static Rgba32 rgb8_00F = new Rgba32(0, 0, 255, 255); |
|
|
|
private static Rgba32 rgb8_F0F = new Rgba32(255, 0, 255, 255); |
|
|
|
private static Rgba32 rgb8_400 = new Rgba32(64, 0, 0, 255); |
|
|
|
private static Rgba32 rgb8_800 = new Rgba32(128, 0, 0, 255); |
|
|
|
private static Rgba32 rgb8_C00 = new Rgba32(192, 0, 0, 255); |
|
|
|
private static Rgba32 rgb8_48C = new Rgba32(64, 128, 192, 255); |
|
|
|
|
|
|
|
private static byte[] rgb8_Bytes4x4 = |
|
|
|
private static readonly Rgba32 Rgb8_000 = new Rgba32(0, 0, 0, 255); |
|
|
|
private static readonly Rgba32 Rgb8_444 = new Rgba32(64, 64, 64, 255); |
|
|
|
private static readonly Rgba32 Rgb8_888 = new Rgba32(128, 128, 128, 255); |
|
|
|
private static readonly Rgba32 Rgb8_CCC = new Rgba32(192, 192, 192, 255); |
|
|
|
private static readonly Rgba32 Rgb8_FFF = new Rgba32(255, 255, 255, 255); |
|
|
|
private static readonly Rgba32 Rgb8_F00 = new Rgba32(255, 0, 0, 255); |
|
|
|
private static readonly Rgba32 Rgb8_0F0 = new Rgba32(0, 255, 0, 255); |
|
|
|
private static readonly Rgba32 Rgb8_00F = new Rgba32(0, 0, 255, 255); |
|
|
|
private static readonly Rgba32 Rgb8_F0F = new Rgba32(255, 0, 255, 255); |
|
|
|
private static readonly Rgba32 Rgb8_400 = new Rgba32(64, 0, 0, 255); |
|
|
|
private static readonly Rgba32 Rgb8_800 = new Rgba32(128, 0, 0, 255); |
|
|
|
private static readonly Rgba32 Rgb8_C00 = new Rgba32(192, 0, 0, 255); |
|
|
|
private static readonly Rgba32 Rgb8_48C = new Rgba32(64, 128, 192, 255); |
|
|
|
|
|
|
|
private static readonly byte[] Rgb8Bytes4X4 = |
|
|
|
{ |
|
|
|
000, 000, 000, 255, 255, 255, 000, 000, 000, 255, 255, 255, |
|
|
|
255, 000, 000, 000, 255, 000, 000, 000, 255, 255, 000, 255, |
|
|
|
@ -98,41 +99,41 @@ namespace SixLabors.ImageSharp.Tests.Formats.Tiff.PhotometricInterpretation |
|
|
|
000, 000, 000, 064, 064, 064, 128, 128, 128, 192, 192, 192 |
|
|
|
}; |
|
|
|
|
|
|
|
private static Rgba32[][] rgb8_Result4x4 = |
|
|
|
private static readonly Rgba32[][] Rgb8Result4X4 = |
|
|
|
{ |
|
|
|
new[] { rgb8_000, rgb8_FFF, rgb8_000, rgb8_FFF }, |
|
|
|
new[] { rgb8_F00, rgb8_0F0, rgb8_00F, rgb8_F0F }, |
|
|
|
new[] { rgb8_400, rgb8_800, rgb8_C00, rgb8_48C }, |
|
|
|
new[] { rgb8_000, rgb8_444, rgb8_888, rgb8_CCC } |
|
|
|
new[] { Rgb8_000, Rgb8_FFF, Rgb8_000, Rgb8_FFF }, |
|
|
|
new[] { Rgb8_F00, Rgb8_0F0, Rgb8_00F, Rgb8_F0F }, |
|
|
|
new[] { Rgb8_400, Rgb8_800, Rgb8_C00, Rgb8_48C }, |
|
|
|
new[] { Rgb8_000, Rgb8_444, Rgb8_888, Rgb8_CCC } |
|
|
|
}; |
|
|
|
|
|
|
|
public static IEnumerable<object[]> Rgb8_Data |
|
|
|
public static IEnumerable<object[]> Rgb8Data |
|
|
|
{ |
|
|
|
get |
|
|
|
{ |
|
|
|
yield return new object[] { rgb8_Bytes4x4, new ushort[] { 8, 8, 8 }, 0, 0, 4, 4, rgb8_Result4x4 }; |
|
|
|
yield return new object[] { rgb8_Bytes4x4, new ushort[] { 8, 8, 8 }, 0, 0, 4, 4, Offset(rgb8_Result4x4, 0, 0, 6, 6) }; |
|
|
|
yield return new object[] { rgb8_Bytes4x4, new ushort[] { 8, 8, 8 }, 1, 0, 4, 4, Offset(rgb8_Result4x4, 1, 0, 6, 6) }; |
|
|
|
yield return new object[] { rgb8_Bytes4x4, new ushort[] { 8, 8, 8 }, 0, 1, 4, 4, Offset(rgb8_Result4x4, 0, 1, 6, 6) }; |
|
|
|
yield return new object[] { rgb8_Bytes4x4, new ushort[] { 8, 8, 8 }, 1, 1, 4, 4, Offset(rgb8_Result4x4, 1, 1, 6, 6) }; |
|
|
|
yield return new object[] { Rgb8Bytes4X4, new ushort[] { 8, 8, 8 }, 0, 0, 4, 4, Rgb8Result4X4 }; |
|
|
|
yield return new object[] { Rgb8Bytes4X4, new ushort[] { 8, 8, 8 }, 0, 0, 4, 4, Offset(Rgb8Result4X4, 0, 0, 6, 6) }; |
|
|
|
yield return new object[] { Rgb8Bytes4X4, new ushort[] { 8, 8, 8 }, 1, 0, 4, 4, Offset(Rgb8Result4X4, 1, 0, 6, 6) }; |
|
|
|
yield return new object[] { Rgb8Bytes4X4, new ushort[] { 8, 8, 8 }, 0, 1, 4, 4, Offset(Rgb8Result4X4, 0, 1, 6, 6) }; |
|
|
|
yield return new object[] { Rgb8Bytes4X4, new ushort[] { 8, 8, 8 }, 1, 1, 4, 4, Offset(Rgb8Result4X4, 1, 1, 6, 6) }; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
private static Rgba32 rgb484_000 = new Rgba32(0, 0, 0, 255); |
|
|
|
private static Rgba32 rgb484_444 = new Rgba32(68, 64, 68, 255); |
|
|
|
private static Rgba32 rgb484_888 = new Rgba32(136, 128, 136, 255); |
|
|
|
private static Rgba32 rgb484_CCC = new Rgba32(204, 192, 204, 255); |
|
|
|
private static Rgba32 rgb484_FFF = new Rgba32(255, 255, 255, 255); |
|
|
|
private static Rgba32 rgb484_F00 = new Rgba32(255, 0, 0, 255); |
|
|
|
private static Rgba32 rgb484_0F0 = new Rgba32(0, 255, 0, 255); |
|
|
|
private static Rgba32 rgb484_00F = new Rgba32(0, 0, 255, 255); |
|
|
|
private static Rgba32 rgb484_F0F = new Rgba32(255, 0, 255, 255); |
|
|
|
private static Rgba32 rgb484_400 = new Rgba32(68, 0, 0, 255); |
|
|
|
private static Rgba32 rgb484_800 = new Rgba32(136, 0, 0, 255); |
|
|
|
private static Rgba32 rgb484_C00 = new Rgba32(204, 0, 0, 255); |
|
|
|
private static Rgba32 rgb484_48C = new Rgba32(68, 128, 204, 255); |
|
|
|
|
|
|
|
private static byte[] rgb484_Bytes4x4 = |
|
|
|
private static readonly Rgba32 Rgb484_000 = new Rgba32(0, 0, 0, 255); |
|
|
|
private static readonly Rgba32 Rgb484_444 = new Rgba32(68, 64, 68, 255); |
|
|
|
private static readonly Rgba32 Rgb484_888 = new Rgba32(136, 128, 136, 255); |
|
|
|
private static readonly Rgba32 Rgb484_CCC = new Rgba32(204, 192, 204, 255); |
|
|
|
private static readonly Rgba32 Rgb484_FFF = new Rgba32(255, 255, 255, 255); |
|
|
|
private static readonly Rgba32 Rgb484_F00 = new Rgba32(255, 0, 0, 255); |
|
|
|
private static readonly Rgba32 Rgb484_0F0 = new Rgba32(0, 255, 0, 255); |
|
|
|
private static readonly Rgba32 Rgb484_00F = new Rgba32(0, 0, 255, 255); |
|
|
|
private static readonly Rgba32 Rgb484_F0F = new Rgba32(255, 0, 255, 255); |
|
|
|
private static readonly Rgba32 Rgb484_400 = new Rgba32(68, 0, 0, 255); |
|
|
|
private static readonly Rgba32 Rgb484_800 = new Rgba32(136, 0, 0, 255); |
|
|
|
private static readonly Rgba32 Rgb484_C00 = new Rgba32(204, 0, 0, 255); |
|
|
|
private static readonly Rgba32 Rgb484_48C = new Rgba32(68, 128, 204, 255); |
|
|
|
|
|
|
|
private static readonly byte[] Rgb484Bytes4X4 = |
|
|
|
{ |
|
|
|
0x00, 0x00, 0xFF, 0xFF, 0x00, 0x00, 0xFF, 0xFF, |
|
|
|
0xF0, 0x00, 0x0F, 0xF0, 0x00, 0x0F, 0xF0, 0x0F, |
|
|
|
@ -140,30 +141,30 @@ namespace SixLabors.ImageSharp.Tests.Formats.Tiff.PhotometricInterpretation |
|
|
|
0x00, 0x00, 0x44, 0x04, 0x88, 0x08, 0xCC, 0x0C |
|
|
|
}; |
|
|
|
|
|
|
|
private static Rgba32[][] rgb484_Result4x4 = |
|
|
|
private static readonly Rgba32[][] Rgb484Result4X4 = |
|
|
|
{ |
|
|
|
new[] { rgb484_000, rgb484_FFF, rgb484_000, rgb484_FFF }, |
|
|
|
new[] { rgb484_F00, rgb484_0F0, rgb484_00F, rgb484_F0F }, |
|
|
|
new[] { rgb484_400, rgb484_800, rgb484_C00, rgb484_48C }, |
|
|
|
new[] { rgb484_000, rgb484_444, rgb484_888, rgb484_CCC } |
|
|
|
new[] { Rgb484_000, Rgb484_FFF, Rgb484_000, Rgb484_FFF }, |
|
|
|
new[] { Rgb484_F00, Rgb484_0F0, Rgb484_00F, Rgb484_F0F }, |
|
|
|
new[] { Rgb484_400, Rgb484_800, Rgb484_C00, Rgb484_48C }, |
|
|
|
new[] { Rgb484_000, Rgb484_444, Rgb484_888, Rgb484_CCC } |
|
|
|
}; |
|
|
|
|
|
|
|
public static IEnumerable<object[]> Rgb484_Data |
|
|
|
public static IEnumerable<object[]> Rgb484Data |
|
|
|
{ |
|
|
|
get |
|
|
|
{ |
|
|
|
yield return new object[] { rgb484_Bytes4x4, new ushort[] { 4, 8, 4 }, 0, 0, 4, 4, rgb484_Result4x4 }; |
|
|
|
yield return new object[] { rgb484_Bytes4x4, new ushort[] { 4, 8, 4 }, 0, 0, 4, 4, Offset(rgb484_Result4x4, 0, 0, 6, 6) }; |
|
|
|
yield return new object[] { rgb484_Bytes4x4, new ushort[] { 4, 8, 4 }, 1, 0, 4, 4, Offset(rgb484_Result4x4, 1, 0, 6, 6) }; |
|
|
|
yield return new object[] { rgb484_Bytes4x4, new ushort[] { 4, 8, 4 }, 0, 1, 4, 4, Offset(rgb484_Result4x4, 0, 1, 6, 6) }; |
|
|
|
yield return new object[] { rgb484_Bytes4x4, new ushort[] { 4, 8, 4 }, 1, 1, 4, 4, Offset(rgb484_Result4x4, 1, 1, 6, 6) }; |
|
|
|
yield return new object[] { Rgb484Bytes4X4, new ushort[] { 4, 8, 4 }, 0, 0, 4, 4, Rgb484Result4X4 }; |
|
|
|
yield return new object[] { Rgb484Bytes4X4, new ushort[] { 4, 8, 4 }, 0, 0, 4, 4, Offset(Rgb484Result4X4, 0, 0, 6, 6) }; |
|
|
|
yield return new object[] { Rgb484Bytes4X4, new ushort[] { 4, 8, 4 }, 1, 0, 4, 4, Offset(Rgb484Result4X4, 1, 0, 6, 6) }; |
|
|
|
yield return new object[] { Rgb484Bytes4X4, new ushort[] { 4, 8, 4 }, 0, 1, 4, 4, Offset(Rgb484Result4X4, 0, 1, 6, 6) }; |
|
|
|
yield return new object[] { Rgb484Bytes4X4, new ushort[] { 4, 8, 4 }, 1, 1, 4, 4, Offset(Rgb484Result4X4, 1, 1, 6, 6) }; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
[Theory] |
|
|
|
[MemberData(nameof(Rgb4_Data))] |
|
|
|
[MemberData(nameof(Rgb8_Data))] |
|
|
|
[MemberData(nameof(Rgb484_Data))] |
|
|
|
[MemberData(nameof(Rgb4Data))] |
|
|
|
[MemberData(nameof(Rgb8Data))] |
|
|
|
[MemberData(nameof(Rgb484Data))] |
|
|
|
public void Decode_WritesPixelData(byte[] inputData, ushort[] bitsPerSample, int left, int top, int width, int height, Rgba32[][] expectedResult) |
|
|
|
{ |
|
|
|
AssertDecode(expectedResult, pixels => |
|
|
|
@ -173,7 +174,7 @@ namespace SixLabors.ImageSharp.Tests.Formats.Tiff.PhotometricInterpretation |
|
|
|
} |
|
|
|
|
|
|
|
[Theory] |
|
|
|
[MemberData(nameof(Rgb8_Data))] |
|
|
|
[MemberData(nameof(Rgb8Data))] |
|
|
|
public void Decode_WritesPixelData_8Bit(byte[] inputData, ushort[] bitsPerSample, int left, int top, int width, int height, Rgba32[][] expectedResult) |
|
|
|
{ |
|
|
|
AssertDecode(expectedResult, pixels => |
|
|
|
|