Browse Source

Add gitignore for generated tiff's, add Markdown/Html exporter attributes for tiff benchmarks

pull/1570/head
Brian Popow 5 years ago
parent
commit
d4627595d3
  1. 9
      tests/ImageSharp.Benchmarks/Codecs/DecodeTiff.cs
  2. 2
      tests/ImageSharp.Benchmarks/Codecs/EncodeTiff.cs
  3. 2
      tests/Images/Input/Tiff/Benchmarks/.gitignore
  4. 4
      tests/Images/Input/Tiff/Benchmarks/gen_big.ps1
  5. 4
      tests/Images/Input/Tiff/Benchmarks/gen_medium.ps1

9
tests/ImageSharp.Benchmarks/Codecs/DecodeTiff.cs

@ -1,7 +1,9 @@
// Copyright (c) Six Labors.
// Licensed under the Apache License, Version 2.0.
//// #define BIG_TESTS
// Enable this for using larger Tiff files. Those files are very large (> 700MB) and therefor not part of the git repo.
// Use the scripts gen_big.ps1 and gen_medium.ps1 in tests\Images\Input\Tiff\Benchmarks to generate those images.
// #define BIG_TESTS
using System.IO;
@ -16,6 +18,8 @@ using SDSize = System.Drawing.Size;
namespace SixLabors.ImageSharp.Benchmarks.Codecs
{
[MarkdownExporter]
[HtmlExporter]
[Config(typeof(Config.ShortMultiFramework))]
public class DecodeTiff
{
@ -32,8 +36,7 @@ namespace SixLabors.ImageSharp.Benchmarks.Codecs
[Params(
TestImages.Tiff.Benchmark_BwFax3,
//// TestImages.Tiff.Benchmark_RgbFax4,
TestImages.Tiff.Benchmark_BwRle,
//// TestImages.Tiff.Benchmark_RgbFax4, // fax4 is not supported yet.
TestImages.Tiff.Benchmark_GrayscaleUncompressed,
TestImages.Tiff.Benchmark_PaletteUncompressed,
TestImages.Tiff.Benchmark_RgbDeflate,

2
tests/ImageSharp.Benchmarks/Codecs/EncodeTiff.cs

@ -12,6 +12,8 @@ using SixLabors.ImageSharp.Tests;
namespace SixLabors.ImageSharp.Benchmarks.Codecs
{
[MarkdownExporter]
[HtmlExporter]
[Config(typeof(Config.ShortMultiFramework))]
public class EncodeTiff
{

2
tests/Images/Input/Tiff/Benchmarks/.gitignore

@ -0,0 +1,2 @@
*.tiff
*.tif

4
tests/Images/Input/Tiff/Benchmarks/gen_big.ps1

@ -7,8 +7,8 @@ $Output_Prefix = ".\big"
& $Gm_Exe convert $Source_Image -compress RLE -type TrueColor $Output_Prefix"_rgb_packbits.tiff"
& $Gm_Exe convert $Source_Image -compress JPEG -type TrueColor $Output_Prefix"_rgb_jpeg.tiff"
& $Gm_Exe convert $Source_Image -compress Zip -type TrueColor $Output_Prefix"_rgb_deflate.tiff"
# & $Gm_Exe convert $Source_Image -compress Group4 -type Bilevel $Output_Prefix"_bw_Group4.tiff"
# & $Gm_Exe convert $Source_Image -compress Fax -type Bilevel $Output_Prefix"_bw_Fax.tiff"
& $Gm_Exe convert $Source_Image -compress Group4 -type Bilevel $Output_Prefix"_bw_Group4.tiff"
& $Gm_Exe convert $Source_Image -compress Fax -type Bilevel $Output_Prefix"_bw_Fax3.tiff"
& $Gm_Exe convert $Source_Image -compress None -type Grayscale $Output_Prefix"_grayscale_uncompressed.tiff"
& $Gm_Exe convert $Source_Image -compress None -colors 256 $Output_Prefix"_palette_uncompressed.tiff"

4
tests/Images/Input/Tiff/Benchmarks/gen_medium.ps1

@ -7,8 +7,8 @@ $Output_Prefix = ".\medium"
& $Gm_Exe convert $Source_Image -compress RLE -type TrueColor $Output_Prefix"_rgb_packbits.tiff"
& $Gm_Exe convert $Source_Image -compress JPEG -type TrueColor $Output_Prefix"_rgb_jpeg.tiff"
& $Gm_Exe convert $Source_Image -compress Zip -type TrueColor $Output_Prefix"_rgb_deflate.tiff"
# & $Gm_Exe convert $Source_Image -compress Group4 -type Bilevel $Output_Prefix"_bw_Group4.tiff"
# & $Gm_Exe convert $Source_Image -compress Fax -type Bilevel $Output_Prefix"_bw_Fax.tiff"
& $Gm_Exe convert $Source_Image -compress Group4 -type Bilevel $Output_Prefix"_bw_Group4.tiff"
& $Gm_Exe convert $Source_Image -compress Fax -type Bilevel $Output_Prefix"_bw_Fax3.tiff"
& $Gm_Exe convert $Source_Image -compress None -type Grayscale $Output_Prefix"_grayscale_uncompressed.tiff"
& $Gm_Exe convert $Source_Image -compress None -colors 256 $Output_Prefix"_palette_uncompressed.tiff"
Loading…
Cancel
Save