mirror of https://github.com/SixLabors/ImageSharp
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.
26 lines
698 B
26 lines
698 B
// Copyright (c) Six Labors.
|
|
// Licensed under the Six Labors Split License.
|
|
|
|
using SixLabors.ImageSharp.Formats.Png;
|
|
|
|
namespace SixLabors.ImageSharp.Tests.Formats.Png;
|
|
|
|
[Trait("Format", "Png")]
|
|
public class PngDecoderCoreTests
|
|
{
|
|
[Fact]
|
|
public void CalculateScanlineLength_WithLargeGrayscaleWidth_ReturnsExpectedLength()
|
|
{
|
|
int length = PngDecoderCore.CalculateScanlineLength(536_870_913, 8, 1);
|
|
|
|
Assert.Equal(536_870_913, length);
|
|
}
|
|
|
|
[Fact]
|
|
public void CalculateScanlineLength_WithLargeRgbaWidth_ReturnsExpectedLength()
|
|
{
|
|
int length = PngDecoderCore.CalculateScanlineLength(33_554_432, 16, 8);
|
|
|
|
Assert.Equal(268_435_456, length);
|
|
}
|
|
}
|
|
|