📷 A modern, cross-platform, 2D Graphics library for .NET
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

32 lines
941 B

namespace SixLabors.ImageSharp.Tests
{
using System.Collections.Generic;
using System.Linq;
using SixLabors.ImageSharp.Formats.Jpeg.Common;
using Xunit;
internal static class VerifyJpeg
{
internal static void ComponentSize(IJpegComponent component, int expectedBlocksX, int expectedBlocksY)
{
Assert.Equal(component.WidthInBlocks, expectedBlocksX);
Assert.Equal(component.HeightInBlocks, expectedBlocksY);
}
internal static void Components3(
IEnumerable<IJpegComponent> components,
int xBc0, int yBc0,
int xBc1, int yBc1,
int xBc2, int yBc2)
{
IJpegComponent[] c = components.ToArray();
Assert.Equal(3, components.Count());
ComponentSize(c[0], xBc0, yBc0);
ComponentSize(c[1], xBc1, yBc1);
ComponentSize(c[2], xBc2, yBc2);
}
}
}