Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ internal static class YCbCrForwardConverter<TPixel>
{
public static void LoadAndStretchEdges(RowOctet<TPixel> source, Span<TPixel> dest, Point start, Size sampleSize, Size totalSize)
{
DebugGuard.MustBeBetweenOrEqualTo(start.X, 1, totalSize.Width - 1, nameof(start.X));
DebugGuard.MustBeBetweenOrEqualTo(start.Y, 1, totalSize.Height - 1, nameof(start.Y));
DebugGuard.MustBeBetweenOrEqualTo(start.X, 0, totalSize.Width - 1, nameof(start.X));
DebugGuard.MustBeBetweenOrEqualTo(start.Y, 0, totalSize.Height - 1, nameof(start.Y));
Comment on lines -16 to +17
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice fix! Have no idea why I put 1 as lower border.


int width = Math.Min(sampleSize.Width, totalSize.Width - start.X);
int height = Math.Min(sampleSize.Height, totalSize.Height - start.Y);
Expand Down
1 change: 1 addition & 0 deletions tests/ImageSharp.Tests/Formats/Bmp/BmpDecoderTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
// ReSharper disable InconsistentNaming
namespace SixLabors.ImageSharp.Tests.Formats.Bmp
{
[Collection("RunSerial")]
[Trait("Format", "Bmp")]
public class BmpDecoderTests
{
Expand Down
1 change: 1 addition & 0 deletions tests/ImageSharp.Tests/Formats/Bmp/BmpEncoderTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
// ReSharper disable InconsistentNaming
namespace SixLabors.ImageSharp.Tests.Formats.Bmp
{
[Collection("RunSerial")]
[Trait("Format", "Bmp")]
public class BmpEncoderTests
{
Expand Down
1 change: 1 addition & 0 deletions tests/ImageSharp.Tests/Formats/Gif/GifDecoderTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
// ReSharper disable InconsistentNaming
namespace SixLabors.ImageSharp.Tests.Formats.Gif
{
[Collection("RunSerial")]
[Trait("Format", "Gif")]
public class GifDecoderTests
{
Expand Down
1 change: 1 addition & 0 deletions tests/ImageSharp.Tests/Formats/Gif/GifEncoderTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
// ReSharper disable InconsistentNaming
namespace SixLabors.ImageSharp.Tests.Formats.Gif
{
[Collection("RunSerial")]
[Trait("Format", "Gif")]
public class GifEncoderTests
{
Expand Down
1 change: 1 addition & 0 deletions tests/ImageSharp.Tests/Formats/Jpg/JpegDecoderTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
namespace SixLabors.ImageSharp.Tests.Formats.Jpg
{
// TODO: Scatter test cases into multiple test classes
[Collection("RunSerial")]
[Trait("Format", "Jpg")]
public partial class JpegDecoderTests
{
Expand Down
1 change: 1 addition & 0 deletions tests/ImageSharp.Tests/Formats/Jpg/JpegEncoderTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@

namespace SixLabors.ImageSharp.Tests.Formats.Jpg
{
[Collection("RunSerial")]
[Trait("Format", "Jpg")]
public class JpegEncoderTests
{
Expand Down
1 change: 1 addition & 0 deletions tests/ImageSharp.Tests/Formats/Png/PngDecoderTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
// ReSharper disable InconsistentNaming
namespace SixLabors.ImageSharp.Tests.Formats.Png
{
[Collection("RunSerial")]
[Trait("Format", "Png")]
public partial class PngDecoderTests
{
Expand Down
1 change: 1 addition & 0 deletions tests/ImageSharp.Tests/Formats/Png/PngEncoderTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@

namespace SixLabors.ImageSharp.Tests.Formats.Png
{
[Collection("RunSerial")]
[Trait("Format", "Png")]
public partial class PngEncoderTests
{
Expand Down
1 change: 1 addition & 0 deletions tests/ImageSharp.Tests/Formats/Tga/TgaDecoderTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
// ReSharper disable InconsistentNaming
namespace SixLabors.ImageSharp.Tests.Formats.Tga
{
[Collection("RunSerial")]
[Trait("Format", "Tga")]
public class TgaDecoderTests
{
Expand Down
1 change: 1 addition & 0 deletions tests/ImageSharp.Tests/Formats/Tga/TgaEncoderTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
// ReSharper disable InconsistentNaming
namespace SixLabors.ImageSharp.Tests.Formats.Tga
{
[Collection("RunSerial")]
[Trait("Format", "Tga")]
public class TgaEncoderTests
{
Expand Down
1 change: 1 addition & 0 deletions tests/ImageSharp.Tests/Formats/Tiff/TiffDecoderTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@

namespace SixLabors.ImageSharp.Tests.Formats.Tiff
{
[Collection("RunSerial")]
[Trait("Format", "Tiff")]
public class TiffDecoderTests
{
Expand Down
1 change: 1 addition & 0 deletions tests/ImageSharp.Tests/Formats/Tiff/TiffEncoderTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@

namespace SixLabors.ImageSharp.Tests.Formats.Tiff
{
[Collection("RunSerial")]
[Trait("Format", "Tiff")]
public class TiffEncoderTests
{
Expand Down