Browse Source
Merge branch 'master' into af/loadresizesave-stress
pull/1687/head
Anton Firszov
5 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
13 changed files with
14 additions and
2 deletions
-
src/ImageSharp/Formats/Jpeg/Components/Encoder/YCbCrForwardConverter{TPixel}.cs
-
tests/ImageSharp.Tests/Formats/Bmp/BmpDecoderTests.cs
-
tests/ImageSharp.Tests/Formats/Bmp/BmpEncoderTests.cs
-
tests/ImageSharp.Tests/Formats/Gif/GifDecoderTests.cs
-
tests/ImageSharp.Tests/Formats/Gif/GifEncoderTests.cs
-
tests/ImageSharp.Tests/Formats/Jpg/JpegDecoderTests.cs
-
tests/ImageSharp.Tests/Formats/Jpg/JpegEncoderTests.cs
-
tests/ImageSharp.Tests/Formats/Png/PngDecoderTests.cs
-
tests/ImageSharp.Tests/Formats/Png/PngEncoderTests.cs
-
tests/ImageSharp.Tests/Formats/Tga/TgaDecoderTests.cs
-
tests/ImageSharp.Tests/Formats/Tga/TgaEncoderTests.cs
-
tests/ImageSharp.Tests/Formats/Tiff/TiffDecoderTests.cs
-
tests/ImageSharp.Tests/Formats/Tiff/TiffEncoderTests.cs
|
|
|
@ -13,8 +13,8 @@ namespace SixLabors.ImageSharp.Formats.Jpeg.Components.Encoder |
|
|
|
{ |
|
|
|
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)); |
|
|
|
|
|
|
|
int width = Math.Min(sampleSize.Width, totalSize.Width - start.X); |
|
|
|
int height = Math.Min(sampleSize.Height, totalSize.Height - start.Y); |
|
|
|
|
|
|
|
@ -20,6 +20,7 @@ using static SixLabors.ImageSharp.Tests.TestImages.Bmp; |
|
|
|
// ReSharper disable InconsistentNaming
|
|
|
|
namespace SixLabors.ImageSharp.Tests.Formats.Bmp |
|
|
|
{ |
|
|
|
[Collection("RunSerial")] |
|
|
|
[Trait("Format", "Bmp")] |
|
|
|
public class BmpDecoderTests |
|
|
|
{ |
|
|
|
|
|
|
|
@ -19,6 +19,7 @@ using static SixLabors.ImageSharp.Tests.TestImages.Bmp; |
|
|
|
// ReSharper disable InconsistentNaming
|
|
|
|
namespace SixLabors.ImageSharp.Tests.Formats.Bmp |
|
|
|
{ |
|
|
|
[Collection("RunSerial")] |
|
|
|
[Trait("Format", "Bmp")] |
|
|
|
public class BmpEncoderTests |
|
|
|
{ |
|
|
|
|
|
|
|
@ -17,6 +17,7 @@ using Xunit; |
|
|
|
// ReSharper disable InconsistentNaming
|
|
|
|
namespace SixLabors.ImageSharp.Tests.Formats.Gif |
|
|
|
{ |
|
|
|
[Collection("RunSerial")] |
|
|
|
[Trait("Format", "Gif")] |
|
|
|
public class GifDecoderTests |
|
|
|
{ |
|
|
|
|
|
|
|
@ -14,6 +14,7 @@ using Xunit; |
|
|
|
// ReSharper disable InconsistentNaming
|
|
|
|
namespace SixLabors.ImageSharp.Tests.Formats.Gif |
|
|
|
{ |
|
|
|
[Collection("RunSerial")] |
|
|
|
[Trait("Format", "Gif")] |
|
|
|
public class GifEncoderTests |
|
|
|
{ |
|
|
|
|
|
|
|
@ -22,6 +22,7 @@ using Xunit.Abstractions; |
|
|
|
namespace SixLabors.ImageSharp.Tests.Formats.Jpg |
|
|
|
{ |
|
|
|
// TODO: Scatter test cases into multiple test classes
|
|
|
|
[Collection("RunSerial")] |
|
|
|
[Trait("Format", "Jpg")] |
|
|
|
public partial class JpegDecoderTests |
|
|
|
{ |
|
|
|
|
|
|
|
@ -20,6 +20,7 @@ using Xunit; |
|
|
|
|
|
|
|
namespace SixLabors.ImageSharp.Tests.Formats.Jpg |
|
|
|
{ |
|
|
|
[Collection("RunSerial")] |
|
|
|
[Trait("Format", "Jpg")] |
|
|
|
public class JpegEncoderTests |
|
|
|
{ |
|
|
|
|
|
|
|
@ -16,6 +16,7 @@ using Xunit; |
|
|
|
// ReSharper disable InconsistentNaming
|
|
|
|
namespace SixLabors.ImageSharp.Tests.Formats.Png |
|
|
|
{ |
|
|
|
[Collection("RunSerial")] |
|
|
|
[Trait("Format", "Png")] |
|
|
|
public partial class PngDecoderTests |
|
|
|
{ |
|
|
|
|
|
|
|
@ -15,6 +15,7 @@ using Xunit; |
|
|
|
|
|
|
|
namespace SixLabors.ImageSharp.Tests.Formats.Png |
|
|
|
{ |
|
|
|
[Collection("RunSerial")] |
|
|
|
[Trait("Format", "Png")] |
|
|
|
public partial class PngEncoderTests |
|
|
|
{ |
|
|
|
|
|
|
|
@ -16,6 +16,7 @@ using static SixLabors.ImageSharp.Tests.TestImages.Tga; |
|
|
|
// ReSharper disable InconsistentNaming
|
|
|
|
namespace SixLabors.ImageSharp.Tests.Formats.Tga |
|
|
|
{ |
|
|
|
[Collection("RunSerial")] |
|
|
|
[Trait("Format", "Tga")] |
|
|
|
public class TgaDecoderTests |
|
|
|
{ |
|
|
|
|
|
|
|
@ -13,6 +13,7 @@ using static SixLabors.ImageSharp.Tests.TestImages.Tga; |
|
|
|
// ReSharper disable InconsistentNaming
|
|
|
|
namespace SixLabors.ImageSharp.Tests.Formats.Tga |
|
|
|
{ |
|
|
|
[Collection("RunSerial")] |
|
|
|
[Trait("Format", "Tga")] |
|
|
|
public class TgaEncoderTests |
|
|
|
{ |
|
|
|
|
|
|
|
@ -17,6 +17,7 @@ using static SixLabors.ImageSharp.Tests.TestImages.Tiff; |
|
|
|
|
|
|
|
namespace SixLabors.ImageSharp.Tests.Formats.Tiff |
|
|
|
{ |
|
|
|
[Collection("RunSerial")] |
|
|
|
[Trait("Format", "Tiff")] |
|
|
|
public class TiffDecoderTests |
|
|
|
{ |
|
|
|
|
|
|
|
@ -17,6 +17,7 @@ using static SixLabors.ImageSharp.Tests.TestImages.Tiff; |
|
|
|
|
|
|
|
namespace SixLabors.ImageSharp.Tests.Formats.Tiff |
|
|
|
{ |
|
|
|
[Collection("RunSerial")] |
|
|
|
[Trait("Format", "Tiff")] |
|
|
|
public class TiffEncoderTests |
|
|
|
{ |
|
|
|
|