Skip to content

Commit

Permalink
Disable resolution checks for tiff tests
Browse files Browse the repository at this point in the history
Not sure the difference but these are broken on Debian 12.6 (working on Ubuntu)
  • Loading branch information
cyanfish committed Aug 5, 2024
1 parent 10e5825 commit 869a09a
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
4 changes: 2 additions & 2 deletions NAPS2.Lib.Tests/Scan/AutoSaverTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -152,8 +152,8 @@ public async Task TiffFilePerScan()
Assert.Single(Folder.GetFiles());
var frames = await ImageContext.LoadFrames(Path.Combine(FolderPath, "test1.tiff")).ToListAsync();
Assert.Equal(2, frames.Count);
ImageAsserts.Similar(ImageResources.dog, frames[0]);
ImageAsserts.Similar(ImageResources.dog_gray, frames[1]);
ImageAsserts.Similar(ImageResources.dog, frames[0], ignoreResolution: true);
ImageAsserts.Similar(ImageResources.dog_gray, frames[1], ignoreResolution: true);
}

[Fact]
Expand Down
10 changes: 5 additions & 5 deletions NAPS2.Sdk.Tests/Images/LoadSaveTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -359,7 +359,7 @@ private static byte[] GetResource(string resource) =>
new object[]
{
ImageFileFormat.Tiff, ".tiff", "dog_tiff",
new[] { "dog" }, new[] { ImagePixelFormat.RGB24 }, false
new[] { "dog" }, new[] { ImagePixelFormat.RGB24 }, true
},
new object[]
{
Expand All @@ -371,26 +371,26 @@ private static byte[] GetResource(string resource) =>
new object[]
{
ImageFileFormat.Tiff, ".tiff", "dog_gray_24bit_tiff",
new[] { "dog_gray" }, new[] { ImagePixelFormat.Gray8 }, false
new[] { "dog_gray" }, new[] { ImagePixelFormat.Gray8 }, true
},
#endif
new object[]
{
ImageFileFormat.Tiff, ".tiff", "dog_bw_tiff",
new[] { "dog_bw" }, new[] { ImagePixelFormat.BW1 }, false
new[] { "dog_bw" }, new[] { ImagePixelFormat.BW1 }, true
},
// TODO: Any way to improve these cases for ImageSharp?
#if MAC || LINUX || !NET6_0_OR_GREATER
new object[]
{
ImageFileFormat.Tiff, ".tiff", "dog_alpha_tiff",
new[] { "dog_alpha" }, new[] { ImagePixelFormat.ARGB32 }, false
new[] { "dog_alpha" }, new[] { ImagePixelFormat.ARGB32 }, true
},
new object[]
{
ImageFileFormat.Tiff, ".tiff", "animals_tiff",
new[] { "dog", "dog_h_p300", "stock_cat" },
new[] { ImagePixelFormat.RGB24, ImagePixelFormat.RGB24, ImagePixelFormat.RGB24 }, false
new[] { ImagePixelFormat.RGB24, ImagePixelFormat.RGB24, ImagePixelFormat.RGB24 }, true
},
#endif
];
Expand Down
2 changes: 1 addition & 1 deletion NAPS2.Sdk.Tests/Images/TiffWriterTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ private static void DoAssertTiff(List<IMemoryImage> actual, byte[][] expectedIma
for (int i = 0; i < expectedImages.Length; i++)
{
Assert.Equal(ImageFileFormat.Tiff, actual[i].OriginalFileFormat);
ImageAsserts.Similar(expectedImages[i], actual[i]);
ImageAsserts.Similar(expectedImages[i], actual[i], ignoreResolution: true);
}
}
}

0 comments on commit 869a09a

Please sign in to comment.