From c2488cdb23308c4740bb859be6653efcd58083d7 Mon Sep 17 00:00:00 2001 From: Julius Friedman Date: Sat, 19 Oct 2024 01:13:29 -0400 Subject: [PATCH] Fix build. Add one more pixel to output test. --- Codecs/Image/Image.cs | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/Codecs/Image/Image.cs b/Codecs/Image/Image.cs index 1b3c5cbc..45ae6574 100644 --- a/Codecs/Image/Image.cs +++ b/Codecs/Image/Image.cs @@ -1385,6 +1385,9 @@ public void Test_PixAt_ValidCoordinates_ReturnsCorrectData() System.Diagnostics.Debug.Assert(pixelData != null); System.Diagnostics.Debug.Assert(imageFormat.Length == pixelData.Count); + foreach (var component in image[101, 101]) + component.Fill(byte.MaxValue); + // Save var currentPath = Path.GetDirectoryName(System.Reflection.Assembly.GetExecutingAssembly().Location); @@ -1405,13 +1408,13 @@ public void Test_PixAt_InvalidCoordinates_ThrowsException() var image = new Image(imageFormat, width, height); // Act & Assert - try { image.PixAt(-1, 100, 0); } + try { image.GetPixelDataAt(-1, 100, 0); } catch (ArgumentOutOfRangeException) { } - try { image.PixAt(100, -1, 0); } + try { image.GetPixelDataAt(100, -1, 0); } catch (ArgumentOutOfRangeException) { } - try { image.PixAt(1920, 100, 0); } + try { image.GetPixelDataAt(1920, 100, 0); } catch (ArgumentOutOfRangeException) { } - try { image.PixAt(100, 1080, 0); } + try { image.GetPixelDataAt(100, 1080, 0); } catch (ArgumentOutOfRangeException) { } } }