|
|
|
@ -92,11 +92,11 @@ namespace SixLabors.ImageSharp.Tests.Formats.Png |
|
|
|
|
|
|
|
[Theory] |
|
|
|
[WithFile(TestImages.Png.Palette8Bpp, nameof(PngColorTypes), PixelTypes.Rgba32)] |
|
|
|
[WithTestPatternImage(nameof(PngColorTypes), 48, 24, PixelTypes.Rgba32)] |
|
|
|
[WithTestPatternImage(nameof(PngColorTypes), 47, 8, PixelTypes.Rgba32)] |
|
|
|
[WithTestPatternImage(nameof(PngColorTypes), 49, 7, PixelTypes.Rgba32)] |
|
|
|
[WithTestPatternImages(nameof(PngColorTypes), 48, 24, PixelTypes.Rgba32)] |
|
|
|
[WithTestPatternImages(nameof(PngColorTypes), 47, 8, PixelTypes.Rgba32)] |
|
|
|
[WithTestPatternImages(nameof(PngColorTypes), 49, 7, PixelTypes.Rgba32)] |
|
|
|
[WithSolidFilledImages(nameof(PngColorTypes), 1, 1, 255, 100, 50, 255, PixelTypes.Rgba32)] |
|
|
|
[WithTestPatternImage(nameof(PngColorTypes), 7, 5, PixelTypes.Rgba32)] |
|
|
|
[WithTestPatternImages(nameof(PngColorTypes), 7, 5, PixelTypes.Rgba32)] |
|
|
|
public void WorksWithDifferentSizes<TPixel>(TestImageProvider<TPixel> provider, PngColorType pngColorType) |
|
|
|
where TPixel : struct, IPixel<TPixel> |
|
|
|
{ |
|
|
|
@ -110,7 +110,7 @@ namespace SixLabors.ImageSharp.Tests.Formats.Png |
|
|
|
} |
|
|
|
|
|
|
|
[Theory] |
|
|
|
[WithTestPatternImage(nameof(PngColorTypes), 24, 24, PixelTypes.Rgba32 | PixelTypes.Bgra32 | PixelTypes.Rgb24)] |
|
|
|
[WithTestPatternImages(nameof(PngColorTypes), 24, 24, PixelTypes.Rgba32 | PixelTypes.Bgra32 | PixelTypes.Rgb24)] |
|
|
|
public void IsNotBoundToSinglePixelType<TPixel>(TestImageProvider<TPixel> provider, PngColorType pngColorType) |
|
|
|
where TPixel : struct, IPixel<TPixel> |
|
|
|
{ |
|
|
|
@ -128,7 +128,7 @@ namespace SixLabors.ImageSharp.Tests.Formats.Png |
|
|
|
} |
|
|
|
|
|
|
|
[Theory] |
|
|
|
[WithTestPatternImage(nameof(PngFilterMethods), 24, 24, PixelTypes.Rgba32)] |
|
|
|
[WithTestPatternImages(nameof(PngFilterMethods), 24, 24, PixelTypes.Rgba32)] |
|
|
|
public void WorksWithAllFilterMethods<TPixel>(TestImageProvider<TPixel> provider, PngFilterMethod pngFilterMethod) |
|
|
|
where TPixel : struct, IPixel<TPixel> |
|
|
|
{ |
|
|
|
@ -145,7 +145,7 @@ namespace SixLabors.ImageSharp.Tests.Formats.Png |
|
|
|
} |
|
|
|
|
|
|
|
[Theory] |
|
|
|
[WithTestPatternImage(nameof(CompressionLevels), 24, 24, PixelTypes.Rgba32)] |
|
|
|
[WithTestPatternImages(nameof(CompressionLevels), 24, 24, PixelTypes.Rgba32)] |
|
|
|
public void WorksWithAllCompressionLevels<TPixel>(TestImageProvider<TPixel> provider, int compressionLevel) |
|
|
|
where TPixel : struct, IPixel<TPixel> |
|
|
|
{ |
|
|
|
@ -163,21 +163,21 @@ namespace SixLabors.ImageSharp.Tests.Formats.Png |
|
|
|
} |
|
|
|
|
|
|
|
[Theory] |
|
|
|
[WithTestPatternImage(24, 24, PixelTypes.Rgba32, PngColorType.Rgb, PngBitDepth.Bit8)] |
|
|
|
[WithTestPatternImage(24, 24, PixelTypes.Rgba64, PngColorType.Rgb, PngBitDepth.Bit16)] |
|
|
|
[WithTestPatternImage(24, 24, PixelTypes.Rgba32, PngColorType.RgbWithAlpha, PngBitDepth.Bit8)] |
|
|
|
[WithTestPatternImage(24, 24, PixelTypes.Rgba64, PngColorType.RgbWithAlpha, PngBitDepth.Bit16)] |
|
|
|
[WithTestPatternImage(24, 24, PixelTypes.Rgba32, PngColorType.Palette, PngBitDepth.Bit1)] |
|
|
|
[WithTestPatternImage(24, 24, PixelTypes.Rgba32, PngColorType.Palette, PngBitDepth.Bit2)] |
|
|
|
[WithTestPatternImage(24, 24, PixelTypes.Rgba32, PngColorType.Palette, PngBitDepth.Bit4)] |
|
|
|
[WithTestPatternImage(24, 24, PixelTypes.Rgba32, PngColorType.Palette, PngBitDepth.Bit8)] |
|
|
|
[WithTestPatternImage(24, 24, PixelTypes.Rgb24, PngColorType.Grayscale, PngBitDepth.Bit1)] |
|
|
|
[WithTestPatternImage(24, 24, PixelTypes.Rgb24, PngColorType.Grayscale, PngBitDepth.Bit2)] |
|
|
|
[WithTestPatternImage(24, 24, PixelTypes.Rgb24, PngColorType.Grayscale, PngBitDepth.Bit4)] |
|
|
|
[WithTestPatternImage(24, 24, PixelTypes.Rgb24, PngColorType.Grayscale, PngBitDepth.Bit8)] |
|
|
|
[WithTestPatternImage(24, 24, PixelTypes.Rgb48, PngColorType.Grayscale, PngBitDepth.Bit16)] |
|
|
|
[WithTestPatternImage(24, 24, PixelTypes.Rgba32, PngColorType.GrayscaleWithAlpha, PngBitDepth.Bit8)] |
|
|
|
[WithTestPatternImage(24, 24, PixelTypes.Rgba64, PngColorType.GrayscaleWithAlpha, PngBitDepth.Bit16)] |
|
|
|
[WithTestPatternImages(24, 24, PixelTypes.Rgba32, PngColorType.Rgb, PngBitDepth.Bit8)] |
|
|
|
[WithTestPatternImages(24, 24, PixelTypes.Rgba64, PngColorType.Rgb, PngBitDepth.Bit16)] |
|
|
|
[WithTestPatternImages(24, 24, PixelTypes.Rgba32, PngColorType.RgbWithAlpha, PngBitDepth.Bit8)] |
|
|
|
[WithTestPatternImages(24, 24, PixelTypes.Rgba64, PngColorType.RgbWithAlpha, PngBitDepth.Bit16)] |
|
|
|
[WithTestPatternImages(24, 24, PixelTypes.Rgba32, PngColorType.Palette, PngBitDepth.Bit1)] |
|
|
|
[WithTestPatternImages(24, 24, PixelTypes.Rgba32, PngColorType.Palette, PngBitDepth.Bit2)] |
|
|
|
[WithTestPatternImages(24, 24, PixelTypes.Rgba32, PngColorType.Palette, PngBitDepth.Bit4)] |
|
|
|
[WithTestPatternImages(24, 24, PixelTypes.Rgba32, PngColorType.Palette, PngBitDepth.Bit8)] |
|
|
|
[WithTestPatternImages(24, 24, PixelTypes.Rgb24, PngColorType.Grayscale, PngBitDepth.Bit1)] |
|
|
|
[WithTestPatternImages(24, 24, PixelTypes.Rgb24, PngColorType.Grayscale, PngBitDepth.Bit2)] |
|
|
|
[WithTestPatternImages(24, 24, PixelTypes.Rgb24, PngColorType.Grayscale, PngBitDepth.Bit4)] |
|
|
|
[WithTestPatternImages(24, 24, PixelTypes.Rgb24, PngColorType.Grayscale, PngBitDepth.Bit8)] |
|
|
|
[WithTestPatternImages(24, 24, PixelTypes.Rgb48, PngColorType.Grayscale, PngBitDepth.Bit16)] |
|
|
|
[WithTestPatternImages(24, 24, PixelTypes.Rgba32, PngColorType.GrayscaleWithAlpha, PngBitDepth.Bit8)] |
|
|
|
[WithTestPatternImages(24, 24, PixelTypes.Rgba64, PngColorType.GrayscaleWithAlpha, PngBitDepth.Bit16)] |
|
|
|
public void WorksWithAllBitDepths<TPixel>(TestImageProvider<TPixel> provider, PngColorType pngColorType, PngBitDepth pngBitDepth) |
|
|
|
where TPixel : struct, IPixel<TPixel> |
|
|
|
{ |
|
|
|
|