diff --git a/NAPS2.Lib.Tests/Scan/AutoSaverTests.cs b/NAPS2.Lib.Tests/Scan/AutoSaverTests.cs index e00e717712..951b4d635c 100644 --- a/NAPS2.Lib.Tests/Scan/AutoSaverTests.cs +++ b/NAPS2.Lib.Tests/Scan/AutoSaverTests.cs @@ -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] diff --git a/NAPS2.Sdk.Tests/Images/LoadSaveTests.cs b/NAPS2.Sdk.Tests/Images/LoadSaveTests.cs index c543641410..2bdaf500a8 100644 --- a/NAPS2.Sdk.Tests/Images/LoadSaveTests.cs +++ b/NAPS2.Sdk.Tests/Images/LoadSaveTests.cs @@ -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[] { @@ -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 ]; diff --git a/NAPS2.Sdk.Tests/Images/TiffWriterTests.cs b/NAPS2.Sdk.Tests/Images/TiffWriterTests.cs index 746148ee9c..9d5d8007a7 100644 --- a/NAPS2.Sdk.Tests/Images/TiffWriterTests.cs +++ b/NAPS2.Sdk.Tests/Images/TiffWriterTests.cs @@ -104,7 +104,7 @@ private static void DoAssertTiff(List 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); } } } \ No newline at end of file