|
|
@ -199,12 +199,14 @@ namespace SixLabors.ImageSharp.Tests.Formats.Png |
|
|
return; |
|
|
return; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
foreach (var filterMethod in PngFilterMethods) |
|
|
|
|
|
{ |
|
|
foreach (PngInterlaceMode interlaceMode in InterlaceMode) |
|
|
foreach (PngInterlaceMode interlaceMode in InterlaceMode) |
|
|
{ |
|
|
{ |
|
|
TestPngEncoderCore( |
|
|
TestPngEncoderCore( |
|
|
provider, |
|
|
provider, |
|
|
pngColorType, |
|
|
pngColorType, |
|
|
PngFilterMethod.Adaptive, |
|
|
(PngFilterMethod)filterMethod[0], |
|
|
pngBitDepth, |
|
|
pngBitDepth, |
|
|
interlaceMode, |
|
|
interlaceMode, |
|
|
appendPngColorType: true, |
|
|
appendPngColorType: true, |
|
|
@ -212,6 +214,7 @@ namespace SixLabors.ImageSharp.Tests.Formats.Png |
|
|
appendPngBitDepth: true); |
|
|
appendPngBitDepth: true); |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
[Theory] |
|
|
[Theory] |
|
|
[WithTestPatternImages(24, 24, PixelTypes.Rgba32, PngColorType.Rgb, PngBitDepth.Bit8)] |
|
|
[WithTestPatternImages(24, 24, PixelTypes.Rgba32, PngColorType.Rgb, PngBitDepth.Bit8)] |
|
|
@ -231,13 +234,15 @@ namespace SixLabors.ImageSharp.Tests.Formats.Png |
|
|
[WithTestPatternImages(24, 24, PixelTypes.Rgba64, PngColorType.GrayscaleWithAlpha, PngBitDepth.Bit16)] |
|
|
[WithTestPatternImages(24, 24, PixelTypes.Rgba64, PngColorType.GrayscaleWithAlpha, PngBitDepth.Bit16)] |
|
|
public void WorksWithAllBitDepthsAndExcludeAllFilter<TPixel>(TestImageProvider<TPixel> provider, PngColorType pngColorType, PngBitDepth pngBitDepth) |
|
|
public void WorksWithAllBitDepthsAndExcludeAllFilter<TPixel>(TestImageProvider<TPixel> provider, PngColorType pngColorType, PngBitDepth pngBitDepth) |
|
|
where TPixel : unmanaged, IPixel<TPixel> |
|
|
where TPixel : unmanaged, IPixel<TPixel> |
|
|
|
|
|
{ |
|
|
|
|
|
foreach (var filterMethod in PngFilterMethods) |
|
|
{ |
|
|
{ |
|
|
foreach (PngInterlaceMode interlaceMode in InterlaceMode) |
|
|
foreach (PngInterlaceMode interlaceMode in InterlaceMode) |
|
|
{ |
|
|
{ |
|
|
TestPngEncoderCore( |
|
|
TestPngEncoderCore( |
|
|
provider, |
|
|
provider, |
|
|
pngColorType, |
|
|
pngColorType, |
|
|
PngFilterMethod.Adaptive, |
|
|
(PngFilterMethod)filterMethod[0], |
|
|
pngBitDepth, |
|
|
pngBitDepth, |
|
|
interlaceMode, |
|
|
interlaceMode, |
|
|
appendPngColorType: true, |
|
|
appendPngColorType: true, |
|
|
@ -246,6 +251,7 @@ namespace SixLabors.ImageSharp.Tests.Formats.Png |
|
|
optimizeMethod: PngChunkFilter.ExcludeAll); |
|
|
optimizeMethod: PngChunkFilter.ExcludeAll); |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
[Theory] |
|
|
[Theory] |
|
|
[WithBlankImages(1, 1, PixelTypes.A8, PngColorType.GrayscaleWithAlpha, PngBitDepth.Bit8)] |
|
|
[WithBlankImages(1, 1, PixelTypes.A8, PngColorType.GrayscaleWithAlpha, PngBitDepth.Bit8)] |
|
|
|