Browse Source

Merge pull request #1777 from SixLabors/js/v2-builds

Update Infrastructure Files and Base Build Number for V2
pull/1779/head
James Jackson-South 5 years ago
committed by GitHub
parent
commit
424d4f9435
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 4
      .gitignore
  2. 2
      shared-infrastructure
  3. 1
      src/ImageSharp/Advanced/ParallelExecutionSettings.cs
  4. 1
      src/ImageSharp/Color/Color.Conversions.cs
  5. 1
      src/ImageSharp/Color/Color.cs
  6. 2
      src/ImageSharp/ColorSpaces/Conversion/ColorSpaceConverter.HunterLab.cs
  7. 2
      src/ImageSharp/Common/Helpers/SimdUtils.Pack.cs
  8. 2
      src/ImageSharp/Compression/Zlib/Adler32.cs
  9. 2
      src/ImageSharp/Compression/Zlib/Crc32.cs
  10. 1
      src/ImageSharp/Formats/Gif/GifDecoderCore.cs
  11. 1
      src/ImageSharp/Formats/Gif/LzwEncoder.cs
  12. 1
      src/ImageSharp/Formats/Jpeg/Components/Decoder/JpegComponent.cs
  13. 1
      src/ImageSharp/Formats/Tiff/Compression/Decompressors/DeflateTiffCompression.cs
  14. 1
      src/ImageSharp/Formats/Tiff/Compression/Decompressors/ModifiedHuffmanTiffCompression.cs
  15. 1
      src/ImageSharp/Formats/Tiff/Compression/Decompressors/NoneTiffCompression.cs
  16. 1
      src/ImageSharp/Formats/Tiff/Compression/Decompressors/PackBitsTiffCompression.cs
  17. 1
      src/ImageSharp/Formats/Tiff/Compression/Decompressors/T4TiffCompression.cs
  18. 1
      src/ImageSharp/Formats/Tiff/Compression/Decompressors/T6BitReader.cs
  19. 1
      src/ImageSharp/Formats/Tiff/Compression/TiffBaseDecompressor.cs
  20. 1
      src/ImageSharp/Formats/Tiff/Ifd/EntryReader.cs
  21. 1
      src/ImageSharp/Formats/Tiff/PhotometricInterpretation/BlackIsZero1TiffColor{TPixel}.cs
  22. 1
      src/ImageSharp/Formats/Tiff/PhotometricInterpretation/BlackIsZero4TiffColor{TPixel}.cs
  23. 1
      src/ImageSharp/Formats/Tiff/PhotometricInterpretation/Rgb444TiffColor{TPixel}.cs
  24. 1
      src/ImageSharp/Formats/Tiff/PhotometricInterpretation/WhiteIsZero1TiffColor{TPixel}.cs
  25. 1
      src/ImageSharp/Formats/Tiff/PhotometricInterpretation/WhiteIsZero4TiffColor{TPixel}.cs
  26. 1
      src/ImageSharp/Formats/Tiff/TiffEncoder.cs
  27. 1
      src/ImageSharp/Formats/Tiff/TiffEncoderCore.cs
  28. 1
      src/ImageSharp/Formats/Tiff/TiffFormat.cs
  29. 1
      src/ImageSharp/Formats/Tiff/Writers/TiffBiColorWriter{TPixel}.cs
  30. 1
      src/ImageSharp/Formats/Tiff/Writers/TiffPaletteWriter{TPixel}.cs
  31. 2
      src/ImageSharp/Image.Decode.cs
  32. 8
      src/ImageSharp/Image.FromStream.cs
  33. 1
      src/ImageSharp/Image.WrapMemory.cs
  34. 1
      src/ImageSharp/ImageFrameCollection{TPixel}.cs
  35. 5
      src/ImageSharp/ImageSharp.csproj
  36. 4
      src/ImageSharp/Memory/TransformItemsDelegate{TSource, TTarget}.cs
  37. 1
      src/ImageSharp/Metadata/Profiles/Exif/ExifProfile.cs
  38. 1
      src/ImageSharp/PixelFormats/PixelConversionModifiers.cs
  39. 1
      src/ImageSharp/PixelFormats/Utils/Vector4Converters.cs
  40. 1
      src/ImageSharp/Processing/Extensions/ProcessingExtensions.cs
  41. 1
      src/ImageSharp/Processing/Extensions/Transforms/TransformExtensions.cs
  42. 1
      src/ImageSharp/Processing/Processors/Binarization/AdaptiveThresholdProcessor{TPixel}.cs
  43. 24
      src/ImageSharp/Processing/Processors/Normalization/AdaptiveHistogramEqualizationProcessor{TPixel}.cs
  44. 1
      src/ImageSharp/Processing/Processors/Normalization/AdaptiveHistogramEqualizationSlidingWindowProcessor{TPixel}.cs
  45. 1
      src/ImageSharp/Processing/Processors/Normalization/HistogramEqualizationProcessor{TPixel}.cs
  46. 1
      src/ImageSharp/Processing/Processors/Transforms/Linear/AutoOrientProcessor{TPixel}.cs
  47. 14
      src/ImageSharp/Processing/Processors/Transforms/Resize/ResizeHelper.cs
  48. 2
      tests/ImageSharp.Benchmarks/Codecs/DecodeTiff.cs
  49. 1
      tests/ImageSharp.Benchmarks/Codecs/EncodeTiff.cs
  50. 5
      tests/ImageSharp.Benchmarks/Codecs/Jpeg/BlockOperations/Block8x8F_CopyTo1x1.cs
  51. 1
      tests/ImageSharp.Benchmarks/Codecs/Jpeg/BlockOperations/Block8x8F_CopyTo2x2.cs
  52. 1
      tests/ImageSharp.Benchmarks/Codecs/Jpeg/BlockOperations/Block8x8F_DivideRound.cs
  53. 1
      tests/ImageSharp.Benchmarks/Codecs/Jpeg/BlockOperations/Block8x8F_LoadFromInt16.cs
  54. 2
      tests/ImageSharp.Benchmarks/Codecs/Jpeg/BlockOperations/Block8x8F_Round.cs
  55. 2
      tests/ImageSharp.Benchmarks/Color/Bulk/FromVector4.cs
  56. 1
      tests/ImageSharp.Benchmarks/Color/Bulk/ToVector4_Rgba32.cs
  57. 1
      tests/ImageSharp.Benchmarks/Color/RgbToYCbCr.cs
  58. 1
      tests/ImageSharp.Benchmarks/General/Array2D.cs
  59. 1
      tests/ImageSharp.Benchmarks/General/ArrayReverse.cs
  60. 1
      tests/ImageSharp.Benchmarks/General/BasicMath/Abs.cs
  61. 1
      tests/ImageSharp.Benchmarks/General/BasicMath/ClampFloat.cs
  62. 1
      tests/ImageSharp.Benchmarks/General/BasicMath/ClampInt32IntoByte.cs
  63. 1
      tests/ImageSharp.Benchmarks/General/BasicMath/ClampVector4.cs
  64. 1
      tests/ImageSharp.Benchmarks/General/BasicMath/Pow.cs
  65. 1
      tests/ImageSharp.Benchmarks/General/CopyBuffers.cs
  66. 1
      tests/ImageSharp.Benchmarks/General/PixelConversion/ITestPixel.cs
  67. 1
      tests/ImageSharp.Benchmarks/General/PixelConversion/PixelConversion_ConvertFromRgba32.cs
  68. 1
      tests/ImageSharp.Benchmarks/General/PixelConversion/PixelConversion_ConvertFromVector4.cs
  69. 1
      tests/ImageSharp.Benchmarks/General/PixelConversion/PixelConversion_ConvertToRgba32.cs
  70. 1
      tests/ImageSharp.Benchmarks/General/PixelConversion/PixelConversion_ConvertToRgba32_AsPartOfCompositeOperation.cs
  71. 1
      tests/ImageSharp.Benchmarks/General/PixelConversion/PixelConversion_ConvertToVector4.cs
  72. 1
      tests/ImageSharp.Benchmarks/General/PixelConversion/PixelConversion_ConvertToVector4_AsPartOfCompositeOperation.cs
  73. 6
      tests/ImageSharp.Benchmarks/General/PixelConversion/PixelConversion_PackFromRgbPlanes.cs
  74. 1
      tests/ImageSharp.Benchmarks/General/PixelConversion/PixelConversion_Rgba32_To_Argb32.cs
  75. 1
      tests/ImageSharp.Benchmarks/General/PixelConversion/PixelConversion_Rgba32_To_Bgra32.cs
  76. 1
      tests/ImageSharp.Benchmarks/General/PixelConversion/TestArgb.cs
  77. 1
      tests/ImageSharp.Benchmarks/General/PixelConversion/TestRgba.cs
  78. 1
      tests/ImageSharp.Benchmarks/General/Vector4Constants.cs
  79. 1
      tests/ImageSharp.Benchmarks/General/Vectorization/BitwiseOrUint32.cs
  80. 1
      tests/ImageSharp.Benchmarks/General/Vectorization/DivFloat.cs
  81. 1
      tests/ImageSharp.Benchmarks/General/Vectorization/DivUInt32.cs
  82. 1
      tests/ImageSharp.Benchmarks/General/Vectorization/Divide.cs
  83. 1
      tests/ImageSharp.Benchmarks/General/Vectorization/MulFloat.cs
  84. 1
      tests/ImageSharp.Benchmarks/General/Vectorization/MulUInt32.cs
  85. 1
      tests/ImageSharp.Benchmarks/General/Vectorization/ReinterpretUInt32AsFloat.cs
  86. 1
      tests/ImageSharp.Benchmarks/General/Vectorization/SIMDBenchmarkBase.cs
  87. 1
      tests/ImageSharp.Benchmarks/General/Vectorization/UInt32ToSingle.cs
  88. 1
      tests/ImageSharp.Benchmarks/General/Vectorization/WidenBytesToUInt32.cs
  89. 28
      tests/ImageSharp.Benchmarks/LoadResizeSave/LoadResizeSaveStressRunner.cs
  90. 4
      tests/ImageSharp.Tests.ProfilingSandbox/LoadResizeSaveParallelMemoryStress.cs
  91. 3
      tests/ImageSharp.Tests.ProfilingSandbox/Program.cs
  92. 1
      tests/ImageSharp.Tests/Formats/Bmp/BmpDecoderTests.cs
  93. 2
      tests/ImageSharp.Tests/Formats/Bmp/BmpEncoderTests.cs
  94. 2
      tests/ImageSharp.Tests/Formats/Bmp/BmpMetadataTests.cs
  95. 1
      tests/ImageSharp.Tests/Formats/Gif/GifEncoderTests.cs
  96. 1
      tests/ImageSharp.Tests/Formats/Gif/GifMetadataTests.cs
  97. 1
      tests/ImageSharp.Tests/Formats/Jpg/Block8x8FTests.cs
  98. 1
      tests/ImageSharp.Tests/Formats/Jpg/GenericBlock8x8Tests.cs
  99. 1
      tests/ImageSharp.Tests/Formats/Jpg/JpegColorConverterTests.cs
  100. 1
      tests/ImageSharp.Tests/Formats/Jpg/JpegDecoderTests.Metadata.cs

4
.gitignore

@ -223,3 +223,7 @@ artifacts/
**/Images/ReferenceOutput **/Images/ReferenceOutput
**/Images/Input/MemoryStress **/Images/Input/MemoryStress
.DS_Store .DS_Store
#lfs
hooks/**
lfs/**

2
shared-infrastructure

@ -1 +1 @@
Subproject commit f48ab829167c42c69242ed0d303683232fbfccd1 Subproject commit a042aba176cdb840d800c6ed4cfe41a54fb7b1e3

1
src/ImageSharp/Advanced/ParallelExecutionSettings.cs

@ -3,7 +3,6 @@
using System; using System;
using System.Threading.Tasks; using System.Threading.Tasks;
using SixLabors.ImageSharp.Memory; using SixLabors.ImageSharp.Memory;
namespace SixLabors.ImageSharp.Advanced namespace SixLabors.ImageSharp.Advanced

1
src/ImageSharp/Color/Color.Conversions.cs

@ -3,7 +3,6 @@
using System.Numerics; using System.Numerics;
using System.Runtime.CompilerServices; using System.Runtime.CompilerServices;
using SixLabors.ImageSharp.PixelFormats; using SixLabors.ImageSharp.PixelFormats;
namespace SixLabors.ImageSharp namespace SixLabors.ImageSharp

1
src/ImageSharp/Color/Color.cs

@ -5,7 +5,6 @@ using System;
using System.Numerics; using System.Numerics;
using System.Runtime.CompilerServices; using System.Runtime.CompilerServices;
using System.Runtime.InteropServices; using System.Runtime.InteropServices;
using SixLabors.ImageSharp.PixelFormats; using SixLabors.ImageSharp.PixelFormats;
namespace SixLabors.ImageSharp namespace SixLabors.ImageSharp

2
src/ImageSharp/ColorSpaces/Conversion/ColorSpaceConverter.HunterLab.cs

@ -1,4 +1,4 @@
// Copyright (c) Six Labors. // Copyright (c) Six Labors.
// Licensed under the Apache License, Version 2.0. // Licensed under the Apache License, Version 2.0.
using System; using System;

2
src/ImageSharp/Common/Helpers/SimdUtils.Pack.cs

@ -5,9 +5,7 @@ using System;
using System.Runtime.CompilerServices; using System.Runtime.CompilerServices;
using System.Runtime.InteropServices; using System.Runtime.InteropServices;
using SixLabors.ImageSharp.PixelFormats; using SixLabors.ImageSharp.PixelFormats;
#if SUPPORTS_RUNTIME_INTRINSICS #if SUPPORTS_RUNTIME_INTRINSICS
using System.Runtime.Intrinsics;
using System.Runtime.Intrinsics.X86; using System.Runtime.Intrinsics.X86;
#endif #endif

2
src/ImageSharp/Compression/Zlib/Adler32.cs

@ -91,6 +91,7 @@ namespace SixLabors.ImageSharp.Compression.Zlib
int index = 0; int index = 0;
fixed (byte* bufferPtr = buffer) fixed (byte* bufferPtr = buffer)
{
fixed (byte* tapPtr = Tap1Tap2) fixed (byte* tapPtr = Tap1Tap2)
{ {
index += (int)blocks * BLOCK_SIZE; index += (int)blocks * BLOCK_SIZE;
@ -202,6 +203,7 @@ namespace SixLabors.ImageSharp.Compression.Zlib
return s1 | (s2 << 16); return s1 | (s2 << 16);
} }
} }
}
#endif #endif
[MethodImpl(InliningOptions.HotPath | InliningOptions.ShortMethod)] [MethodImpl(InliningOptions.HotPath | InliningOptions.ShortMethod)]

2
src/ImageSharp/Compression/Zlib/Crc32.cs

@ -83,6 +83,7 @@ namespace SixLabors.ImageSharp.Compression.Zlib
int length = chunksize; int length = chunksize;
fixed (byte* bufferPtr = buffer) fixed (byte* bufferPtr = buffer)
{
fixed (ulong* k05PolyPtr = K05Poly) fixed (ulong* k05PolyPtr = K05Poly)
{ {
byte* localBufferPtr = bufferPtr; byte* localBufferPtr = bufferPtr;
@ -196,6 +197,7 @@ namespace SixLabors.ImageSharp.Compression.Zlib
return buffer.Length - chunksize == 0 ? crc : CalculateScalar(crc, buffer.Slice(chunksize)); return buffer.Length - chunksize == 0 ? crc : CalculateScalar(crc, buffer.Slice(chunksize));
} }
} }
}
#endif #endif
[MethodImpl(InliningOptions.HotPath | InliningOptions.ShortMethod)] [MethodImpl(InliningOptions.HotPath | InliningOptions.ShortMethod)]

1
src/ImageSharp/Formats/Gif/GifDecoderCore.cs

@ -8,7 +8,6 @@ using System.Runtime.CompilerServices;
using System.Runtime.InteropServices; using System.Runtime.InteropServices;
using System.Text; using System.Text;
using System.Threading; using System.Threading;
using SixLabors.ImageSharp.IO; using SixLabors.ImageSharp.IO;
using SixLabors.ImageSharp.Memory; using SixLabors.ImageSharp.Memory;
using SixLabors.ImageSharp.Metadata; using SixLabors.ImageSharp.Metadata;

1
src/ImageSharp/Formats/Gif/LzwEncoder.cs

@ -6,7 +6,6 @@ using System.Buffers;
using System.IO; using System.IO;
using System.Runtime.CompilerServices; using System.Runtime.CompilerServices;
using System.Runtime.InteropServices; using System.Runtime.InteropServices;
using SixLabors.ImageSharp.Memory; using SixLabors.ImageSharp.Memory;
namespace SixLabors.ImageSharp.Formats.Gif namespace SixLabors.ImageSharp.Formats.Gif

1
src/ImageSharp/Formats/Jpeg/Components/Decoder/JpegComponent.cs

@ -2,7 +2,6 @@
// Licensed under the Apache License, Version 2.0. // Licensed under the Apache License, Version 2.0.
using System; using System;
using SixLabors.ImageSharp.Memory; using SixLabors.ImageSharp.Memory;
namespace SixLabors.ImageSharp.Formats.Jpeg.Components.Decoder namespace SixLabors.ImageSharp.Formats.Jpeg.Components.Decoder

1
src/ImageSharp/Formats/Tiff/Compression/Decompressors/DeflateTiffCompression.cs

@ -3,7 +3,6 @@
using System; using System;
using System.IO.Compression; using System.IO.Compression;
using SixLabors.ImageSharp.Compression.Zlib; using SixLabors.ImageSharp.Compression.Zlib;
using SixLabors.ImageSharp.Formats.Tiff.Constants; using SixLabors.ImageSharp.Formats.Tiff.Constants;
using SixLabors.ImageSharp.Formats.Tiff.PhotometricInterpretation; using SixLabors.ImageSharp.Formats.Tiff.PhotometricInterpretation;

1
src/ImageSharp/Formats/Tiff/Compression/Decompressors/ModifiedHuffmanTiffCompression.cs

@ -2,7 +2,6 @@
// Licensed under the Apache License, Version 2.0. // Licensed under the Apache License, Version 2.0.
using System; using System;
using SixLabors.ImageSharp.Formats.Tiff.Constants; using SixLabors.ImageSharp.Formats.Tiff.Constants;
using SixLabors.ImageSharp.IO; using SixLabors.ImageSharp.IO;
using SixLabors.ImageSharp.Memory; using SixLabors.ImageSharp.Memory;

1
src/ImageSharp/Formats/Tiff/Compression/Decompressors/NoneTiffCompression.cs

@ -2,7 +2,6 @@
// Licensed under the Apache License, Version 2.0. // Licensed under the Apache License, Version 2.0.
using System; using System;
using SixLabors.ImageSharp.IO; using SixLabors.ImageSharp.IO;
using SixLabors.ImageSharp.Memory; using SixLabors.ImageSharp.Memory;

1
src/ImageSharp/Formats/Tiff/Compression/Decompressors/PackBitsTiffCompression.cs

@ -3,7 +3,6 @@
using System; using System;
using System.Buffers; using System.Buffers;
using SixLabors.ImageSharp.IO; using SixLabors.ImageSharp.IO;
using SixLabors.ImageSharp.Memory; using SixLabors.ImageSharp.Memory;

1
src/ImageSharp/Formats/Tiff/Compression/Decompressors/T4TiffCompression.cs

@ -2,7 +2,6 @@
// Licensed under the Apache License, Version 2.0. // Licensed under the Apache License, Version 2.0.
using System; using System;
using SixLabors.ImageSharp.Formats.Tiff.Constants; using SixLabors.ImageSharp.Formats.Tiff.Constants;
using SixLabors.ImageSharp.IO; using SixLabors.ImageSharp.IO;
using SixLabors.ImageSharp.Memory; using SixLabors.ImageSharp.Memory;

1
src/ImageSharp/Formats/Tiff/Compression/Decompressors/T6BitReader.cs

@ -3,7 +3,6 @@
using System.Collections.Generic; using System.Collections.Generic;
using System.IO; using System.IO;
using SixLabors.ImageSharp.Formats.Tiff.Constants; using SixLabors.ImageSharp.Formats.Tiff.Constants;
using SixLabors.ImageSharp.Memory; using SixLabors.ImageSharp.Memory;

1
src/ImageSharp/Formats/Tiff/Compression/TiffBaseDecompressor.cs

@ -3,7 +3,6 @@
using System; using System;
using System.IO; using System.IO;
using SixLabors.ImageSharp.Formats.Tiff.Constants; using SixLabors.ImageSharp.Formats.Tiff.Constants;
using SixLabors.ImageSharp.IO; using SixLabors.ImageSharp.IO;
using SixLabors.ImageSharp.Memory; using SixLabors.ImageSharp.Memory;

1
src/ImageSharp/Formats/Tiff/Ifd/EntryReader.cs

@ -4,7 +4,6 @@
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.IO; using System.IO;
using SixLabors.ImageSharp.Formats.Tiff.Constants; using SixLabors.ImageSharp.Formats.Tiff.Constants;
using SixLabors.ImageSharp.Metadata.Profiles.Exif; using SixLabors.ImageSharp.Metadata.Profiles.Exif;

1
src/ImageSharp/Formats/Tiff/PhotometricInterpretation/BlackIsZero1TiffColor{TPixel}.cs

@ -2,7 +2,6 @@
// Licensed under the Apache License, Version 2.0. // Licensed under the Apache License, Version 2.0.
using System; using System;
using SixLabors.ImageSharp.Memory; using SixLabors.ImageSharp.Memory;
using SixLabors.ImageSharp.PixelFormats; using SixLabors.ImageSharp.PixelFormats;

1
src/ImageSharp/Formats/Tiff/PhotometricInterpretation/BlackIsZero4TiffColor{TPixel}.cs

@ -2,7 +2,6 @@
// Licensed under the Apache License, Version 2.0. // Licensed under the Apache License, Version 2.0.
using System; using System;
using SixLabors.ImageSharp.Memory; using SixLabors.ImageSharp.Memory;
using SixLabors.ImageSharp.PixelFormats; using SixLabors.ImageSharp.PixelFormats;

1
src/ImageSharp/Formats/Tiff/PhotometricInterpretation/Rgb444TiffColor{TPixel}.cs

@ -2,7 +2,6 @@
// Licensed under the Apache License, Version 2.0. // Licensed under the Apache License, Version 2.0.
using System; using System;
using SixLabors.ImageSharp.Memory; using SixLabors.ImageSharp.Memory;
using SixLabors.ImageSharp.PixelFormats; using SixLabors.ImageSharp.PixelFormats;

1
src/ImageSharp/Formats/Tiff/PhotometricInterpretation/WhiteIsZero1TiffColor{TPixel}.cs

@ -2,7 +2,6 @@
// Licensed under the Apache License, Version 2.0. // Licensed under the Apache License, Version 2.0.
using System; using System;
using SixLabors.ImageSharp.Memory; using SixLabors.ImageSharp.Memory;
using SixLabors.ImageSharp.PixelFormats; using SixLabors.ImageSharp.PixelFormats;

1
src/ImageSharp/Formats/Tiff/PhotometricInterpretation/WhiteIsZero4TiffColor{TPixel}.cs

@ -2,7 +2,6 @@
// Licensed under the Apache License, Version 2.0. // Licensed under the Apache License, Version 2.0.
using System; using System;
using SixLabors.ImageSharp.Memory; using SixLabors.ImageSharp.Memory;
using SixLabors.ImageSharp.PixelFormats; using SixLabors.ImageSharp.PixelFormats;

1
src/ImageSharp/Formats/Tiff/TiffEncoder.cs

@ -4,7 +4,6 @@
using System.IO; using System.IO;
using System.Threading; using System.Threading;
using System.Threading.Tasks; using System.Threading.Tasks;
using SixLabors.ImageSharp.Advanced; using SixLabors.ImageSharp.Advanced;
using SixLabors.ImageSharp.Compression.Zlib; using SixLabors.ImageSharp.Compression.Zlib;
using SixLabors.ImageSharp.Formats.Tiff.Constants; using SixLabors.ImageSharp.Formats.Tiff.Constants;

1
src/ImageSharp/Formats/Tiff/TiffEncoderCore.cs

@ -5,7 +5,6 @@ using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.IO; using System.IO;
using System.Threading; using System.Threading;
using SixLabors.ImageSharp.Advanced; using SixLabors.ImageSharp.Advanced;
using SixLabors.ImageSharp.Compression.Zlib; using SixLabors.ImageSharp.Compression.Zlib;
using SixLabors.ImageSharp.Formats.Tiff.Compression; using SixLabors.ImageSharp.Formats.Tiff.Compression;

1
src/ImageSharp/Formats/Tiff/TiffFormat.cs

@ -2,7 +2,6 @@
// Licensed under the Apache License, Version 2.0. // Licensed under the Apache License, Version 2.0.
using System.Collections.Generic; using System.Collections.Generic;
using SixLabors.ImageSharp.Formats.Tiff.Constants; using SixLabors.ImageSharp.Formats.Tiff.Constants;
namespace SixLabors.ImageSharp.Formats.Tiff namespace SixLabors.ImageSharp.Formats.Tiff

1
src/ImageSharp/Formats/Tiff/Writers/TiffBiColorWriter{TPixel}.cs

@ -3,7 +3,6 @@
using System; using System;
using System.Buffers; using System.Buffers;
using SixLabors.ImageSharp.Formats.Tiff.Compression; using SixLabors.ImageSharp.Formats.Tiff.Compression;
using SixLabors.ImageSharp.Formats.Tiff.Constants; using SixLabors.ImageSharp.Formats.Tiff.Constants;
using SixLabors.ImageSharp.Memory; using SixLabors.ImageSharp.Memory;

1
src/ImageSharp/Formats/Tiff/Writers/TiffPaletteWriter{TPixel}.cs

@ -4,7 +4,6 @@
using System; using System;
using System.Buffers; using System.Buffers;
using System.Runtime.InteropServices; using System.Runtime.InteropServices;
using SixLabors.ImageSharp.Formats.Tiff.Compression; using SixLabors.ImageSharp.Formats.Tiff.Compression;
using SixLabors.ImageSharp.Memory; using SixLabors.ImageSharp.Memory;
using SixLabors.ImageSharp.Metadata.Profiles.Exif; using SixLabors.ImageSharp.Metadata.Profiles.Exif;

2
src/ImageSharp/Image.Decode.cs

@ -121,7 +121,7 @@ namespace SixLabors.ImageSharp
/// <param name="stream">The image stream to read the header from.</param> /// <param name="stream">The image stream to read the header from.</param>
/// <param name="config">The configuration.</param> /// <param name="config">The configuration.</param>
/// <returns>The decoder and the image format or null if none found.</returns> /// <returns>The decoder and the image format or null if none found.</returns>
private static async Task<(IImageDecoder decoder, IImageFormat format)> DiscoverDecoderAsync(Stream stream, Configuration config) private static async Task<(IImageDecoder Decoder, IImageFormat Format)> DiscoverDecoderAsync(Stream stream, Configuration config)
{ {
IImageFormat format = await InternalDetectFormatAsync(stream, config).ConfigureAwait(false); IImageFormat format = await InternalDetectFormatAsync(stream, config).ConfigureAwait(false);

8
src/ImageSharp/Image.FromStream.cs

@ -679,13 +679,13 @@ namespace SixLabors.ImageSharp
/// <returns>A new <see cref="Image{TPixel}"/>.</returns> /// <returns>A new <see cref="Image{TPixel}"/>.</returns>
public static Image Load(Configuration configuration, Stream stream, out IImageFormat format) public static Image Load(Configuration configuration, Stream stream, out IImageFormat format)
{ {
(Image img, IImageFormat format) data = WithSeekableStream(configuration, stream, s => Decode(s, configuration)); (Image Img, IImageFormat Format) data = WithSeekableStream(configuration, stream, s => Decode(s, configuration));
format = data.format; format = data.Format;
if (data.img != null) if (data.Img != null)
{ {
return data.img; return data.Img;
} }
var sb = new StringBuilder(); var sb = new StringBuilder();

1
src/ImageSharp/Image.WrapMemory.cs

@ -3,7 +3,6 @@
using System; using System;
using System.Buffers; using System.Buffers;
using SixLabors.ImageSharp.Memory; using SixLabors.ImageSharp.Memory;
using SixLabors.ImageSharp.Metadata; using SixLabors.ImageSharp.Metadata;
using SixLabors.ImageSharp.PixelFormats; using SixLabors.ImageSharp.PixelFormats;

1
src/ImageSharp/ImageFrameCollection{TPixel}.cs

@ -4,7 +4,6 @@
using System; using System;
using System.Collections; using System.Collections;
using System.Collections.Generic; using System.Collections.Generic;
using SixLabors.ImageSharp.Advanced; using SixLabors.ImageSharp.Advanced;
using SixLabors.ImageSharp.Memory; using SixLabors.ImageSharp.Memory;
using SixLabors.ImageSharp.PixelFormats; using SixLabors.ImageSharp.PixelFormats;

5
src/ImageSharp/ImageSharp.csproj

@ -15,6 +15,11 @@
<Configurations>Debug;Release;Debug-InnerLoop;Release-InnerLoop</Configurations> <Configurations>Debug;Release;Debug-InnerLoop;Release-InnerLoop</Configurations>
</PropertyGroup> </PropertyGroup>
<PropertyGroup>
<!--Bump to V2 prior to tagged release.-->
<MinVerMinimumMajorMinor>2.0</MinVerMinimumMajorMinor>
</PropertyGroup>
<Choose> <Choose>
<When Condition="$(SIXLABORS_TESTING_PREVIEW) == true"> <When Condition="$(SIXLABORS_TESTING_PREVIEW) == true">
<PropertyGroup> <PropertyGroup>

4
src/ImageSharp/Memory/TransformItemsDelegate{T}.cs → src/ImageSharp/Memory/TransformItemsDelegate{TSource, TTarget}.cs

@ -1,9 +1,11 @@
// Copyright (c) Six Labors. // Copyright (c) Six Labors.
// Licensed under the Apache License, Version 2.0. // Licensed under the Apache License, Version 2.0.
using System; using System;
namespace SixLabors.ImageSharp.Memory namespace SixLabors.ImageSharp.Memory
{ {
#pragma warning disable SA1649 // File name should match first type name
internal delegate void TransformItemsDelegate<TSource, TTarget>(ReadOnlySpan<TSource> source, Span<TTarget> target); internal delegate void TransformItemsDelegate<TSource, TTarget>(ReadOnlySpan<TSource> source, Span<TTarget> target);
#pragma warning restore SA1649 // File name should match first type name
} }

1
src/ImageSharp/Metadata/Profiles/Exif/ExifProfile.cs

@ -4,7 +4,6 @@
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.IO; using System.IO;
using SixLabors.ImageSharp.PixelFormats; using SixLabors.ImageSharp.PixelFormats;
namespace SixLabors.ImageSharp.Metadata.Profiles.Exif namespace SixLabors.ImageSharp.Metadata.Profiles.Exif

1
src/ImageSharp/PixelFormats/PixelConversionModifiers.cs

@ -2,7 +2,6 @@
// Licensed under the Apache License, Version 2.0. // Licensed under the Apache License, Version 2.0.
using System; using System;
using SixLabors.ImageSharp.ColorSpaces.Companding; using SixLabors.ImageSharp.ColorSpaces.Companding;
namespace SixLabors.ImageSharp.PixelFormats namespace SixLabors.ImageSharp.PixelFormats

1
src/ImageSharp/PixelFormats/Utils/Vector4Converters.cs

@ -4,7 +4,6 @@
using System; using System;
using System.Numerics; using System.Numerics;
using System.Runtime.CompilerServices; using System.Runtime.CompilerServices;
using SixLabors.ImageSharp.ColorSpaces.Companding; using SixLabors.ImageSharp.ColorSpaces.Companding;
namespace SixLabors.ImageSharp.PixelFormats.Utils namespace SixLabors.ImageSharp.PixelFormats.Utils

1
src/ImageSharp/Processing/Extensions/ProcessingExtensions.cs

@ -2,7 +2,6 @@
// Licensed under the Apache License, Version 2.0. // Licensed under the Apache License, Version 2.0.
using System; using System;
using SixLabors.ImageSharp.Advanced; using SixLabors.ImageSharp.Advanced;
using SixLabors.ImageSharp.PixelFormats; using SixLabors.ImageSharp.PixelFormats;
using SixLabors.ImageSharp.Processing.Processors; using SixLabors.ImageSharp.Processing.Processors;

1
src/ImageSharp/Processing/Extensions/Transforms/TransformExtensions.cs

@ -2,7 +2,6 @@
// Licensed under the Apache License, Version 2.0. // Licensed under the Apache License, Version 2.0.
using System.Numerics; using System.Numerics;
using SixLabors.ImageSharp.Processing.Processors.Transforms; using SixLabors.ImageSharp.Processing.Processors.Transforms;
namespace SixLabors.ImageSharp.Processing namespace SixLabors.ImageSharp.Processing

1
src/ImageSharp/Processing/Processors/Binarization/AdaptiveThresholdProcessor{TPixel}.cs

@ -4,7 +4,6 @@
using System; using System;
using System.Runtime.CompilerServices; using System.Runtime.CompilerServices;
using System.Runtime.InteropServices; using System.Runtime.InteropServices;
using SixLabors.ImageSharp.Advanced; using SixLabors.ImageSharp.Advanced;
using SixLabors.ImageSharp.Memory; using SixLabors.ImageSharp.Memory;
using SixLabors.ImageSharp.PixelFormats; using SixLabors.ImageSharp.PixelFormats;

24
src/ImageSharp/Processing/Processors/Normalization/AdaptiveHistogramEqualizationProcessor{TPixel}.cs

@ -70,7 +70,7 @@ namespace SixLabors.ImageSharp.Processing.Processors.Normalization
{ {
cdfData.CalculateLookupTables(source, this); cdfData.CalculateLookupTables(source, this);
var tileYStartPositions = new List<(int y, int cdfY)>(); var tileYStartPositions = new List<(int Y, int CdfY)>();
int cdfY = 0; int cdfY = 0;
int yStart = halfTileHeight; int yStart = halfTileHeight;
for (int tile = 0; tile < tileCount - 1; tile++) for (int tile = 0; tile < tileCount - 1; tile++)
@ -367,7 +367,7 @@ namespace SixLabors.ImageSharp.Processing.Processors.Normalization
private readonly struct RowIntervalOperation : IRowIntervalOperation private readonly struct RowIntervalOperation : IRowIntervalOperation
{ {
private readonly CdfTileData cdfData; private readonly CdfTileData cdfData;
private readonly List<(int y, int cdfY)> tileYStartPositions; private readonly List<(int Y, int CdfY)> tileYStartPositions;
private readonly int tileWidth; private readonly int tileWidth;
private readonly int tileHeight; private readonly int tileHeight;
private readonly int tileCount; private readonly int tileCount;
@ -380,7 +380,7 @@ namespace SixLabors.ImageSharp.Processing.Processors.Normalization
[MethodImpl(InliningOptions.ShortMethod)] [MethodImpl(InliningOptions.ShortMethod)]
public RowIntervalOperation( public RowIntervalOperation(
CdfTileData cdfData, CdfTileData cdfData,
List<(int y, int cdfY)> tileYStartPositions, List<(int Y, int CdfY)> tileYStartPositions,
int tileWidth, int tileWidth,
int tileHeight, int tileHeight,
int tileCount, int tileCount,
@ -406,9 +406,9 @@ namespace SixLabors.ImageSharp.Processing.Processors.Normalization
{ {
for (int index = rows.Min; index < rows.Max; index++) for (int index = rows.Min; index < rows.Max; index++)
{ {
(int y, int cdfY) tileYStartPosition = this.tileYStartPositions[index]; (int Y, int CdfY) tileYStartPosition = this.tileYStartPositions[index];
int y = tileYStartPosition.y; int y = tileYStartPosition.Y;
int cdfYY = tileYStartPosition.cdfY; int cdfYY = tileYStartPosition.CdfY;
int cdfX = 0; int cdfX = 0;
int x = this.halfTileWidth; int x = this.halfTileWidth;
@ -473,7 +473,7 @@ namespace SixLabors.ImageSharp.Processing.Processors.Normalization
private readonly int tileWidth; private readonly int tileWidth;
private readonly int tileHeight; private readonly int tileHeight;
private readonly int luminanceLevels; private readonly int luminanceLevels;
private readonly List<(int y, int cdfY)> tileYStartPositions; private readonly List<(int Y, int CdfY)> tileYStartPositions;
public CdfTileData( public CdfTileData(
Configuration configuration, Configuration configuration,
@ -496,7 +496,7 @@ namespace SixLabors.ImageSharp.Processing.Processors.Normalization
this.pixelsInTile = tileWidth * tileHeight; this.pixelsInTile = tileWidth * tileHeight;
// Calculate the start positions and rent buffers. // Calculate the start positions and rent buffers.
this.tileYStartPositions = new List<(int y, int cdfY)>(); this.tileYStartPositions = new List<(int Y, int CdfY)>();
int cdfY = 0; int cdfY = 0;
for (int y = 0; y < sourceHeight; y += tileHeight) for (int y = 0; y < sourceHeight; y += tileHeight)
{ {
@ -556,7 +556,7 @@ namespace SixLabors.ImageSharp.Processing.Processors.Normalization
private readonly MemoryAllocator allocator; private readonly MemoryAllocator allocator;
private readonly Buffer2D<int> cdfMinBuffer2D; private readonly Buffer2D<int> cdfMinBuffer2D;
private readonly Buffer2D<int> cdfLutBuffer2D; private readonly Buffer2D<int> cdfLutBuffer2D;
private readonly List<(int y, int cdfY)> tileYStartPositions; private readonly List<(int Y, int CdfY)> tileYStartPositions;
private readonly int tileWidth; private readonly int tileWidth;
private readonly int tileHeight; private readonly int tileHeight;
private readonly int luminanceLevels; private readonly int luminanceLevels;
@ -570,7 +570,7 @@ namespace SixLabors.ImageSharp.Processing.Processors.Normalization
MemoryAllocator allocator, MemoryAllocator allocator,
Buffer2D<int> cdfMinBuffer2D, Buffer2D<int> cdfMinBuffer2D,
Buffer2D<int> cdfLutBuffer2D, Buffer2D<int> cdfLutBuffer2D,
List<(int y, int cdfY)> tileYStartPositions, List<(int Y, int CdfY)> tileYStartPositions,
int tileWidth, int tileWidth,
int tileHeight, int tileHeight,
int luminanceLevels, int luminanceLevels,
@ -596,8 +596,8 @@ namespace SixLabors.ImageSharp.Processing.Processors.Normalization
for (int index = rows.Min; index < rows.Max; index++) for (int index = rows.Min; index < rows.Max; index++)
{ {
int cdfX = 0; int cdfX = 0;
int cdfY = this.tileYStartPositions[index].cdfY; int cdfY = this.tileYStartPositions[index].CdfY;
int y = this.tileYStartPositions[index].y; int y = this.tileYStartPositions[index].Y;
int endY = Math.Min(y + this.tileHeight, this.sourceHeight); int endY = Math.Min(y + this.tileHeight, this.sourceHeight);
Span<int> cdfMinSpan = this.cdfMinBuffer2D.GetRowSpan(cdfY); Span<int> cdfMinSpan = this.cdfMinBuffer2D.GetRowSpan(cdfY);
cdfMinSpan.Clear(); cdfMinSpan.Clear();

1
src/ImageSharp/Processing/Processors/Normalization/AdaptiveHistogramEqualizationSlidingWindowProcessor{TPixel}.cs

@ -7,7 +7,6 @@ using System.Numerics;
using System.Runtime.CompilerServices; using System.Runtime.CompilerServices;
using System.Runtime.InteropServices; using System.Runtime.InteropServices;
using System.Threading.Tasks; using System.Threading.Tasks;
using SixLabors.ImageSharp.Advanced; using SixLabors.ImageSharp.Advanced;
using SixLabors.ImageSharp.Memory; using SixLabors.ImageSharp.Memory;
using SixLabors.ImageSharp.PixelFormats; using SixLabors.ImageSharp.PixelFormats;

1
src/ImageSharp/Processing/Processors/Normalization/HistogramEqualizationProcessor{TPixel}.cs

@ -4,7 +4,6 @@
using System; using System;
using System.Runtime.CompilerServices; using System.Runtime.CompilerServices;
using System.Runtime.InteropServices; using System.Runtime.InteropServices;
using SixLabors.ImageSharp.PixelFormats; using SixLabors.ImageSharp.PixelFormats;
namespace SixLabors.ImageSharp.Processing.Processors.Normalization namespace SixLabors.ImageSharp.Processing.Processors.Normalization

1
src/ImageSharp/Processing/Processors/Transforms/Linear/AutoOrientProcessor{TPixel}.cs

@ -2,7 +2,6 @@
// Licensed under the Apache License, Version 2.0. // Licensed under the Apache License, Version 2.0.
using System; using System;
using SixLabors.ImageSharp.Metadata.Profiles.Exif; using SixLabors.ImageSharp.Metadata.Profiles.Exif;
using SixLabors.ImageSharp.PixelFormats; using SixLabors.ImageSharp.PixelFormats;

14
src/ImageSharp/Processing/Processors/Transforms/Resize/ResizeHelper.cs

@ -30,7 +30,7 @@ namespace SixLabors.ImageSharp.Processing.Processors.Transforms
/// <returns> /// <returns>
/// The tuple representing the location and the bounds /// The tuple representing the location and the bounds
/// </returns> /// </returns>
public static (Size, Rectangle) CalculateTargetLocationAndBounds(Size sourceSize, ResizeOptions options) public static (Size Size, Rectangle Rectangle) CalculateTargetLocationAndBounds(Size sourceSize, ResizeOptions options)
{ {
int width = options.Size.Width; int width = options.Size.Width;
int height = options.Size.Height; int height = options.Size.Height;
@ -76,7 +76,7 @@ namespace SixLabors.ImageSharp.Processing.Processors.Transforms
} }
} }
private static (Size, Rectangle) CalculateBoxPadRectangle( private static (Size Size, Rectangle Rectangle) CalculateBoxPadRectangle(
Size source, Size source,
ResizeOptions options, ResizeOptions options,
int width, int width,
@ -150,7 +150,7 @@ namespace SixLabors.ImageSharp.Processing.Processors.Transforms
return CalculatePadRectangle(source, options, width, height); return CalculatePadRectangle(source, options, width, height);
} }
private static (Size, Rectangle) CalculateCropRectangle( private static (Size Size, Rectangle Rectangle) CalculateCropRectangle(
Size source, Size source,
ResizeOptions options, ResizeOptions options,
int width, int width,
@ -256,7 +256,7 @@ namespace SixLabors.ImageSharp.Processing.Processors.Transforms
return (new Size(Sanitize(width), Sanitize(height)), new Rectangle(targetX, targetY, Sanitize(targetWidth), Sanitize(targetHeight))); return (new Size(Sanitize(width), Sanitize(height)), new Rectangle(targetX, targetY, Sanitize(targetWidth), Sanitize(targetHeight)));
} }
private static (Size, Rectangle) CalculateMaxRectangle( private static (Size Size, Rectangle Rectangle) CalculateMaxRectangle(
Size source, Size source,
int width, int width,
int height) int height)
@ -285,7 +285,7 @@ namespace SixLabors.ImageSharp.Processing.Processors.Transforms
return (new Size(Sanitize(targetWidth), Sanitize(targetHeight)), new Rectangle(0, 0, Sanitize(targetWidth), Sanitize(targetHeight))); return (new Size(Sanitize(targetWidth), Sanitize(targetHeight)), new Rectangle(0, 0, Sanitize(targetWidth), Sanitize(targetHeight)));
} }
private static (Size, Rectangle) CalculateMinRectangle( private static (Size Size, Rectangle Rectangle) CalculateMinRectangle(
Size source, Size source,
int width, int width,
int height) int height)
@ -333,7 +333,7 @@ namespace SixLabors.ImageSharp.Processing.Processors.Transforms
return (new Size(Sanitize(targetWidth), Sanitize(targetHeight)), new Rectangle(0, 0, Sanitize(targetWidth), Sanitize(targetHeight))); return (new Size(Sanitize(targetWidth), Sanitize(targetHeight)), new Rectangle(0, 0, Sanitize(targetWidth), Sanitize(targetHeight)));
} }
private static (Size, Rectangle) CalculatePadRectangle( private static (Size Size, Rectangle Rectangle) CalculatePadRectangle(
Size sourceSize, Size sourceSize,
ResizeOptions options, ResizeOptions options,
int width, int width,
@ -401,7 +401,7 @@ namespace SixLabors.ImageSharp.Processing.Processors.Transforms
return (new Size(Sanitize(width), Sanitize(height)), new Rectangle(targetX, targetY, Sanitize(targetWidth), Sanitize(targetHeight))); return (new Size(Sanitize(width), Sanitize(height)), new Rectangle(targetX, targetY, Sanitize(targetWidth), Sanitize(targetHeight)));
} }
private static (Size, Rectangle) CalculateManualRectangle( private static (Size Size, Rectangle Rectangle) CalculateManualRectangle(
ResizeOptions options, ResizeOptions options,
int width, int width,
int height) int height)

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

@ -6,12 +6,10 @@
//// #define BIG_TESTS //// #define BIG_TESTS
using System.IO; using System.IO;
using BenchmarkDotNet.Attributes; using BenchmarkDotNet.Attributes;
using SixLabors.ImageSharp.PixelFormats; using SixLabors.ImageSharp.PixelFormats;
using SixLabors.ImageSharp.Tests; using SixLabors.ImageSharp.Tests;
using SDImage = System.Drawing.Image; using SDImage = System.Drawing.Image;
using SDSize = System.Drawing.Size; using SDSize = System.Drawing.Size;

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

@ -3,7 +3,6 @@
using System.Drawing.Imaging; using System.Drawing.Imaging;
using System.IO; using System.IO;
using BenchmarkDotNet.Attributes; using BenchmarkDotNet.Attributes;
using SixLabors.ImageSharp.Formats.Tiff; using SixLabors.ImageSharp.Formats.Tiff;

5
tests/ImageSharp.Benchmarks/Codecs/Jpeg/BlockOperations/Block8x8F_CopyTo1x1.cs

@ -5,14 +5,11 @@ using System;
using System.Numerics; using System.Numerics;
using System.Runtime.CompilerServices; using System.Runtime.CompilerServices;
using System.Runtime.InteropServices; using System.Runtime.InteropServices;
#if SUPPORTS_RUNTIME_INTRINSICS #if SUPPORTS_RUNTIME_INTRINSICS
using System.Runtime.Intrinsics; using System.Runtime.Intrinsics;
using System.Runtime.Intrinsics.X86; using System.Runtime.Intrinsics.X86;
#endif #endif
using BenchmarkDotNet.Attributes; using BenchmarkDotNet.Attributes;
using SixLabors.ImageSharp.Formats.Jpeg.Components; using SixLabors.ImageSharp.Formats.Jpeg.Components;
// ReSharper disable InconsistentNaming // ReSharper disable InconsistentNaming
@ -319,6 +316,7 @@ namespace SixLabors.ImageSharp.Benchmarks.Codecs.Jpeg.BlockOperations
{ {
int stride = Width; int stride = Width;
fixed (float* d = this.unpinnedBuffer) fixed (float* d = this.unpinnedBuffer)
{
fixed (Block8x8F* ss = &this.block) fixed (Block8x8F* ss = &this.block)
{ {
var s = (float*)ss; var s = (float*)ss;
@ -341,6 +339,7 @@ namespace SixLabors.ImageSharp.Benchmarks.Codecs.Jpeg.BlockOperations
Avx.Store(d + (stride * 7), v3); Avx.Store(d + (stride * 7), v3);
} }
} }
}
// [Benchmark] // [Benchmark]
public void UseVector256_Avx2_Variant3_sbyte() public void UseVector256_Avx2_Variant3_sbyte()

1
tests/ImageSharp.Benchmarks/Codecs/Jpeg/BlockOperations/Block8x8F_CopyTo2x2.cs

@ -3,7 +3,6 @@
using System.Numerics; using System.Numerics;
using System.Runtime.CompilerServices; using System.Runtime.CompilerServices;
using BenchmarkDotNet.Attributes; using BenchmarkDotNet.Attributes;
using SixLabors.ImageSharp.Formats.Jpeg.Components; using SixLabors.ImageSharp.Formats.Jpeg.Components;

1
tests/ImageSharp.Benchmarks/Codecs/Jpeg/BlockOperations/Block8x8F_DivideRound.cs

@ -3,7 +3,6 @@
using System.Numerics; using System.Numerics;
using System.Runtime.CompilerServices; using System.Runtime.CompilerServices;
using BenchmarkDotNet.Attributes; using BenchmarkDotNet.Attributes;
using SixLabors.ImageSharp.Formats.Jpeg.Components; using SixLabors.ImageSharp.Formats.Jpeg.Components;

1
tests/ImageSharp.Benchmarks/Codecs/Jpeg/BlockOperations/Block8x8F_LoadFromInt16.cs

@ -3,7 +3,6 @@
using System; using System;
using System.Numerics; using System.Numerics;
using BenchmarkDotNet.Attributes; using BenchmarkDotNet.Attributes;
using SixLabors.ImageSharp.Formats.Jpeg.Components; using SixLabors.ImageSharp.Formats.Jpeg.Components;

2
tests/ImageSharp.Benchmarks/Codecs/Jpeg/BlockOperations/Block8x8F_Round.cs

@ -5,12 +5,10 @@ using System;
using System.Numerics; using System.Numerics;
using System.Runtime.CompilerServices; using System.Runtime.CompilerServices;
using System.Runtime.InteropServices; using System.Runtime.InteropServices;
#if SUPPORTS_RUNTIME_INTRINSICS #if SUPPORTS_RUNTIME_INTRINSICS
using System.Runtime.Intrinsics; using System.Runtime.Intrinsics;
using System.Runtime.Intrinsics.X86; using System.Runtime.Intrinsics.X86;
#endif #endif
using BenchmarkDotNet.Attributes; using BenchmarkDotNet.Attributes;
using SixLabors.ImageSharp.Formats.Jpeg.Components; using SixLabors.ImageSharp.Formats.Jpeg.Components;

2
tests/ImageSharp.Benchmarks/Color/Bulk/FromVector4.cs

@ -6,12 +6,10 @@ using System.Buffers;
using System.Numerics; using System.Numerics;
using System.Runtime.CompilerServices; using System.Runtime.CompilerServices;
using System.Runtime.InteropServices; using System.Runtime.InteropServices;
#if SUPPORTS_RUNTIME_INTRINSICS #if SUPPORTS_RUNTIME_INTRINSICS
using System.Runtime.Intrinsics; using System.Runtime.Intrinsics;
using System.Runtime.Intrinsics.X86; using System.Runtime.Intrinsics.X86;
#endif #endif
using BenchmarkDotNet.Attributes; using BenchmarkDotNet.Attributes;
using SixLabors.ImageSharp.Memory; using SixLabors.ImageSharp.Memory;
using SixLabors.ImageSharp.PixelFormats; using SixLabors.ImageSharp.PixelFormats;

1
tests/ImageSharp.Benchmarks/Color/Bulk/ToVector4_Rgba32.cs

@ -5,7 +5,6 @@ using System;
using System.Numerics; using System.Numerics;
using System.Runtime.CompilerServices; using System.Runtime.CompilerServices;
using System.Runtime.InteropServices; using System.Runtime.InteropServices;
using BenchmarkDotNet.Attributes; using BenchmarkDotNet.Attributes;
using SixLabors.ImageSharp.Memory; using SixLabors.ImageSharp.Memory;

1
tests/ImageSharp.Benchmarks/Color/RgbToYCbCr.cs

@ -3,7 +3,6 @@
using System.Numerics; using System.Numerics;
using System.Runtime.CompilerServices; using System.Runtime.CompilerServices;
using BenchmarkDotNet.Attributes; using BenchmarkDotNet.Attributes;
using SixLabors.ImageSharp.Formats.Jpeg.Components; using SixLabors.ImageSharp.Formats.Jpeg.Components;

1
tests/ImageSharp.Benchmarks/General/Array2D.cs

@ -2,7 +2,6 @@
// Licensed under the Apache License, Version 2.0. // Licensed under the Apache License, Version 2.0.
using System; using System;
using BenchmarkDotNet.Attributes; using BenchmarkDotNet.Attributes;
using SixLabors.ImageSharp; using SixLabors.ImageSharp;

1
tests/ImageSharp.Benchmarks/General/ArrayReverse.cs

@ -2,7 +2,6 @@
// Licensed under the Apache License, Version 2.0. // Licensed under the Apache License, Version 2.0.
using System; using System;
using BenchmarkDotNet.Attributes; using BenchmarkDotNet.Attributes;
namespace SixLabors.ImageSharp.Benchmarks.General namespace SixLabors.ImageSharp.Benchmarks.General

1
tests/ImageSharp.Benchmarks/General/BasicMath/Abs.cs

@ -2,7 +2,6 @@
// Licensed under the Apache License, Version 2.0. // Licensed under the Apache License, Version 2.0.
using System; using System;
using BenchmarkDotNet.Attributes; using BenchmarkDotNet.Attributes;
namespace SixLabors.ImageSharp.Benchmarks.General.BasicMath namespace SixLabors.ImageSharp.Benchmarks.General.BasicMath

1
tests/ImageSharp.Benchmarks/General/BasicMath/ClampFloat.cs

@ -3,7 +3,6 @@
using System; using System;
using System.Runtime.CompilerServices; using System.Runtime.CompilerServices;
using BenchmarkDotNet.Attributes; using BenchmarkDotNet.Attributes;
namespace SixLabors.ImageSharp.Benchmarks.General.BasicMath namespace SixLabors.ImageSharp.Benchmarks.General.BasicMath

1
tests/ImageSharp.Benchmarks/General/BasicMath/ClampInt32IntoByte.cs

@ -3,7 +3,6 @@
using System; using System;
using System.Runtime.CompilerServices; using System.Runtime.CompilerServices;
using BenchmarkDotNet.Attributes; using BenchmarkDotNet.Attributes;
namespace SixLabors.ImageSharp.Benchmarks.General.BasicMath namespace SixLabors.ImageSharp.Benchmarks.General.BasicMath

1
tests/ImageSharp.Benchmarks/General/BasicMath/ClampVector4.cs

@ -3,7 +3,6 @@
using System.Numerics; using System.Numerics;
using System.Runtime.CompilerServices; using System.Runtime.CompilerServices;
using BenchmarkDotNet.Attributes; using BenchmarkDotNet.Attributes;
namespace SixLabors.ImageSharp.Benchmarks.General.BasicMath namespace SixLabors.ImageSharp.Benchmarks.General.BasicMath

1
tests/ImageSharp.Benchmarks/General/BasicMath/Pow.cs

@ -2,7 +2,6 @@
// Licensed under the Apache License, Version 2.0. // Licensed under the Apache License, Version 2.0.
using System; using System;
using BenchmarkDotNet.Attributes; using BenchmarkDotNet.Attributes;
namespace SixLabors.ImageSharp.Benchmarks.General.BasicMath namespace SixLabors.ImageSharp.Benchmarks.General.BasicMath

1
tests/ImageSharp.Benchmarks/General/CopyBuffers.cs

@ -5,7 +5,6 @@ using System;
using System.Buffers; using System.Buffers;
using System.Runtime.CompilerServices; using System.Runtime.CompilerServices;
using System.Runtime.InteropServices; using System.Runtime.InteropServices;
using BenchmarkDotNet.Attributes; using BenchmarkDotNet.Attributes;
namespace SixLabors.ImageSharp.Benchmarks.General namespace SixLabors.ImageSharp.Benchmarks.General

1
tests/ImageSharp.Benchmarks/General/PixelConversion/ITestPixel.cs

@ -2,7 +2,6 @@
// Licensed under the Apache License, Version 2.0. // Licensed under the Apache License, Version 2.0.
using System.Numerics; using System.Numerics;
using SixLabors.ImageSharp.PixelFormats; using SixLabors.ImageSharp.PixelFormats;
namespace SixLabors.ImageSharp.Benchmarks.General.PixelConversion namespace SixLabors.ImageSharp.Benchmarks.General.PixelConversion

1
tests/ImageSharp.Benchmarks/General/PixelConversion/PixelConversion_ConvertFromRgba32.cs

@ -4,7 +4,6 @@
using System; using System;
using System.Runtime.CompilerServices; using System.Runtime.CompilerServices;
using System.Runtime.InteropServices; using System.Runtime.InteropServices;
using BenchmarkDotNet.Attributes; using BenchmarkDotNet.Attributes;
using SixLabors.ImageSharp.PixelFormats; using SixLabors.ImageSharp.PixelFormats;

1
tests/ImageSharp.Benchmarks/General/PixelConversion/PixelConversion_ConvertFromVector4.cs

@ -4,7 +4,6 @@
using System.Numerics; using System.Numerics;
using System.Runtime.CompilerServices; using System.Runtime.CompilerServices;
using System.Runtime.InteropServices; using System.Runtime.InteropServices;
using BenchmarkDotNet.Attributes; using BenchmarkDotNet.Attributes;
using SixLabors.ImageSharp.PixelFormats; using SixLabors.ImageSharp.PixelFormats;

1
tests/ImageSharp.Benchmarks/General/PixelConversion/PixelConversion_ConvertToRgba32.cs

@ -2,7 +2,6 @@
// Licensed under the Apache License, Version 2.0. // Licensed under the Apache License, Version 2.0.
using System.Runtime.CompilerServices; using System.Runtime.CompilerServices;
using BenchmarkDotNet.Attributes; using BenchmarkDotNet.Attributes;
using SixLabors.ImageSharp.PixelFormats; using SixLabors.ImageSharp.PixelFormats;

1
tests/ImageSharp.Benchmarks/General/PixelConversion/PixelConversion_ConvertToRgba32_AsPartOfCompositeOperation.cs

@ -2,7 +2,6 @@
// Licensed under the Apache License, Version 2.0. // Licensed under the Apache License, Version 2.0.
using System.Runtime.CompilerServices; using System.Runtime.CompilerServices;
using BenchmarkDotNet.Attributes; using BenchmarkDotNet.Attributes;
using SixLabors.ImageSharp.PixelFormats; using SixLabors.ImageSharp.PixelFormats;

1
tests/ImageSharp.Benchmarks/General/PixelConversion/PixelConversion_ConvertToVector4.cs

@ -3,7 +3,6 @@
using System.Numerics; using System.Numerics;
using System.Runtime.CompilerServices; using System.Runtime.CompilerServices;
using BenchmarkDotNet.Attributes; using BenchmarkDotNet.Attributes;
namespace SixLabors.ImageSharp.Benchmarks.General.PixelConversion namespace SixLabors.ImageSharp.Benchmarks.General.PixelConversion

1
tests/ImageSharp.Benchmarks/General/PixelConversion/PixelConversion_ConvertToVector4_AsPartOfCompositeOperation.cs

@ -3,7 +3,6 @@
using System.Numerics; using System.Numerics;
using System.Runtime.CompilerServices; using System.Runtime.CompilerServices;
using BenchmarkDotNet.Attributes; using BenchmarkDotNet.Attributes;
namespace SixLabors.ImageSharp.Benchmarks.General.PixelConversion namespace SixLabors.ImageSharp.Benchmarks.General.PixelConversion

6
tests/ImageSharp.Benchmarks/General/PixelConversion/PixelConversion_PackFromRgbPlanes.cs

@ -50,8 +50,11 @@ namespace SixLabors.ImageSharp.Benchmarks.General.PixelConversion
public void Rgb24_Scalar_PerElement_Pinned() public void Rgb24_Scalar_PerElement_Pinned()
{ {
fixed (byte* r = &this.rBuf[0]) fixed (byte* r = &this.rBuf[0])
{
fixed (byte* g = &this.gBuf[0]) fixed (byte* g = &this.gBuf[0])
{
fixed (byte* b = &this.bBuf[0]) fixed (byte* b = &this.bBuf[0])
{
fixed (Rgb24* rgb = &this.rgbBuf[0]) fixed (Rgb24* rgb = &this.rgbBuf[0])
{ {
for (int i = 0; i < this.Count; i++) for (int i = 0; i < this.Count; i++)
@ -63,6 +66,9 @@ namespace SixLabors.ImageSharp.Benchmarks.General.PixelConversion
} }
} }
} }
}
}
}
[Benchmark] [Benchmark]
public void Rgb24_Scalar_PerElement_Span() public void Rgb24_Scalar_PerElement_Span()

1
tests/ImageSharp.Benchmarks/General/PixelConversion/PixelConversion_Rgba32_To_Argb32.cs

@ -4,7 +4,6 @@
using System; using System;
using System.Runtime.CompilerServices; using System.Runtime.CompilerServices;
using System.Runtime.InteropServices; using System.Runtime.InteropServices;
using BenchmarkDotNet.Attributes; using BenchmarkDotNet.Attributes;
using SixLabors.ImageSharp.PixelFormats; using SixLabors.ImageSharp.PixelFormats;

1
tests/ImageSharp.Benchmarks/General/PixelConversion/PixelConversion_Rgba32_To_Bgra32.cs

@ -5,7 +5,6 @@ using System;
using System.Numerics; using System.Numerics;
using System.Runtime.CompilerServices; using System.Runtime.CompilerServices;
using System.Runtime.InteropServices; using System.Runtime.InteropServices;
using BenchmarkDotNet.Attributes; using BenchmarkDotNet.Attributes;
using SixLabors.ImageSharp.PixelFormats; using SixLabors.ImageSharp.PixelFormats;

1
tests/ImageSharp.Benchmarks/General/PixelConversion/TestArgb.cs

@ -4,7 +4,6 @@
using System.Numerics; using System.Numerics;
using System.Runtime.CompilerServices; using System.Runtime.CompilerServices;
using System.Runtime.InteropServices; using System.Runtime.InteropServices;
using SixLabors.ImageSharp.PixelFormats; using SixLabors.ImageSharp.PixelFormats;
namespace SixLabors.ImageSharp.Benchmarks.General.PixelConversion namespace SixLabors.ImageSharp.Benchmarks.General.PixelConversion

1
tests/ImageSharp.Benchmarks/General/PixelConversion/TestRgba.cs

@ -4,7 +4,6 @@
using System.Numerics; using System.Numerics;
using System.Runtime.CompilerServices; using System.Runtime.CompilerServices;
using System.Runtime.InteropServices; using System.Runtime.InteropServices;
using SixLabors.ImageSharp.PixelFormats; using SixLabors.ImageSharp.PixelFormats;
namespace SixLabors.ImageSharp.Benchmarks.General.PixelConversion namespace SixLabors.ImageSharp.Benchmarks.General.PixelConversion

1
tests/ImageSharp.Benchmarks/General/Vector4Constants.cs

@ -3,7 +3,6 @@
using System; using System;
using System.Numerics; using System.Numerics;
using BenchmarkDotNet.Attributes; using BenchmarkDotNet.Attributes;
namespace SixLabors.ImageSharp.Benchmarks.General namespace SixLabors.ImageSharp.Benchmarks.General

1
tests/ImageSharp.Benchmarks/General/Vectorization/BitwiseOrUint32.cs

@ -2,7 +2,6 @@
// Licensed under the Apache License, Version 2.0. // Licensed under the Apache License, Version 2.0.
using System.Numerics; using System.Numerics;
using BenchmarkDotNet.Attributes; using BenchmarkDotNet.Attributes;
namespace SixLabors.ImageSharp.Benchmarks.General.Vectorization namespace SixLabors.ImageSharp.Benchmarks.General.Vectorization

1
tests/ImageSharp.Benchmarks/General/Vectorization/DivFloat.cs

@ -2,7 +2,6 @@
// Licensed under the Apache License, Version 2.0. // Licensed under the Apache License, Version 2.0.
using System.Numerics; using System.Numerics;
using BenchmarkDotNet.Attributes; using BenchmarkDotNet.Attributes;
namespace SixLabors.ImageSharp.Benchmarks.General.Vectorization namespace SixLabors.ImageSharp.Benchmarks.General.Vectorization

1
tests/ImageSharp.Benchmarks/General/Vectorization/DivUInt32.cs

@ -2,7 +2,6 @@
// Licensed under the Apache License, Version 2.0. // Licensed under the Apache License, Version 2.0.
using System.Numerics; using System.Numerics;
using BenchmarkDotNet.Attributes; using BenchmarkDotNet.Attributes;
namespace SixLabors.ImageSharp.Benchmarks.General.Vectorization namespace SixLabors.ImageSharp.Benchmarks.General.Vectorization

1
tests/ImageSharp.Benchmarks/General/Vectorization/Divide.cs

@ -2,7 +2,6 @@
// Licensed under the Apache License, Version 2.0. // Licensed under the Apache License, Version 2.0.
using System.Numerics; using System.Numerics;
using BenchmarkDotNet.Attributes; using BenchmarkDotNet.Attributes;
namespace ImageSharp.Benchmarks.General.Vectorization namespace ImageSharp.Benchmarks.General.Vectorization

1
tests/ImageSharp.Benchmarks/General/Vectorization/MulFloat.cs

@ -2,7 +2,6 @@
// Licensed under the Apache License, Version 2.0. // Licensed under the Apache License, Version 2.0.
using System.Numerics; using System.Numerics;
using BenchmarkDotNet.Attributes; using BenchmarkDotNet.Attributes;
namespace SixLabors.ImageSharp.Benchmarks.General.Vectorization namespace SixLabors.ImageSharp.Benchmarks.General.Vectorization

1
tests/ImageSharp.Benchmarks/General/Vectorization/MulUInt32.cs

@ -2,7 +2,6 @@
// Licensed under the Apache License, Version 2.0. // Licensed under the Apache License, Version 2.0.
using System.Numerics; using System.Numerics;
using BenchmarkDotNet.Attributes; using BenchmarkDotNet.Attributes;
namespace SixLabors.ImageSharp.Benchmarks.General.Vectorization namespace SixLabors.ImageSharp.Benchmarks.General.Vectorization

1
tests/ImageSharp.Benchmarks/General/Vectorization/ReinterpretUInt32AsFloat.cs

@ -3,7 +3,6 @@
using System.Numerics; using System.Numerics;
using System.Runtime.InteropServices; using System.Runtime.InteropServices;
using BenchmarkDotNet.Attributes; using BenchmarkDotNet.Attributes;
namespace SixLabors.ImageSharp.Benchmarks.General.Vectorization namespace SixLabors.ImageSharp.Benchmarks.General.Vectorization

1
tests/ImageSharp.Benchmarks/General/Vectorization/SIMDBenchmarkBase.cs

@ -3,7 +3,6 @@
using System.Numerics; using System.Numerics;
using System.Runtime.CompilerServices; using System.Runtime.CompilerServices;
using BenchmarkDotNet.Attributes; using BenchmarkDotNet.Attributes;
namespace ImageSharp.Benchmarks.General.Vectorization namespace ImageSharp.Benchmarks.General.Vectorization

1
tests/ImageSharp.Benchmarks/General/Vectorization/UInt32ToSingle.cs

@ -3,7 +3,6 @@
using System.Numerics; using System.Numerics;
using System.Runtime.CompilerServices; using System.Runtime.CompilerServices;
using BenchmarkDotNet.Attributes; using BenchmarkDotNet.Attributes;
namespace SixLabors.ImageSharp.Benchmarks.General.Vectorization namespace SixLabors.ImageSharp.Benchmarks.General.Vectorization

1
tests/ImageSharp.Benchmarks/General/Vectorization/WidenBytesToUInt32.cs

@ -3,7 +3,6 @@
using System.Numerics; using System.Numerics;
using System.Runtime.CompilerServices; using System.Runtime.CompilerServices;
using BenchmarkDotNet.Attributes; using BenchmarkDotNet.Attributes;
using SixLabors.ImageSharp.Tuples; using SixLabors.ImageSharp.Tuples;

28
tests/ImageSharp.Benchmarks/LoadResizeSave/LoadResizeSaveStressRunner.cs

@ -41,7 +41,7 @@ namespace SixLabors.ImageSharp.Benchmarks.LoadResizeSave
private const string SkiaSharpBitmap = nameof(SkiaSharpBitmap); private const string SkiaSharpBitmap = nameof(SkiaSharpBitmap);
// Set the quality for ImagSharp // Set the quality for ImagSharp
private readonly JpegEncoder imageSharpJpegEncoder = new () { Quality = Quality }; private readonly JpegEncoder imageSharpJpegEncoder = new() { Quality = Quality };
private readonly ImageCodecInfo systemDrawingJpegCodec = private readonly ImageCodecInfo systemDrawingJpegCodec =
ImageCodecInfo.GetImageEncoders().First(codec => codec.FormatID == ImageFormat.Jpeg.Guid); ImageCodecInfo.GetImageEncoders().First(codec => codec.FormatID == ImageFormat.Jpeg.Guid);
@ -138,7 +138,7 @@ namespace SixLabors.ImageSharp.Benchmarks.LoadResizeSave
this.outputDirectory, this.outputDirectory,
Path.GetFileNameWithoutExtension(inputPath) + "-" + postfix + Path.GetExtension(inputPath)); Path.GetFileNameWithoutExtension(inputPath) + "-" + postfix + Path.GetExtension(inputPath));
private (int width, int height) ScaledSize(int inWidth, int inHeight, int outSize) private (int Width, int Height) ScaledSize(int inWidth, int inHeight, int outSize)
{ {
int width, height; int width, height;
if (inWidth > inHeight) if (inWidth > inHeight)
@ -160,8 +160,8 @@ namespace SixLabors.ImageSharp.Benchmarks.LoadResizeSave
using var image = SystemDrawingImage.FromFile(input, true); using var image = SystemDrawingImage.FromFile(input, true);
this.IncreaseTotalMegapixels(image.Width, image.Height); this.IncreaseTotalMegapixels(image.Width, image.Height);
(int width, int height) scaled = this.ScaledSize(image.Width, image.Height, ThumbnailSize); (int Width, int Height) scaled = this.ScaledSize(image.Width, image.Height, this.ThumbnailSize);
var resized = new Bitmap(scaled.width, scaled.height); var resized = new Bitmap(scaled.Width, scaled.Height);
using var graphics = Graphics.FromImage(resized); using var graphics = Graphics.FromImage(resized);
using var attributes = new ImageAttributes(); using var attributes = new ImageAttributes();
attributes.SetWrapMode(WrapMode.TileFlipXY); attributes.SetWrapMode(WrapMode.TileFlipXY);
@ -188,7 +188,7 @@ namespace SixLabors.ImageSharp.Benchmarks.LoadResizeSave
image.Mutate(i => i.Resize(new ResizeOptions image.Mutate(i => i.Resize(new ResizeOptions
{ {
Size = new ImageSharpSize(ThumbnailSize, ThumbnailSize), Size = new ImageSharpSize(this.ThumbnailSize, this.ThumbnailSize),
Mode = ResizeMode.Max Mode = ResizeMode.Max
})); }));
@ -205,7 +205,7 @@ namespace SixLabors.ImageSharp.Benchmarks.LoadResizeSave
this.IncreaseTotalMegapixels(image.Width, image.Height); this.IncreaseTotalMegapixels(image.Width, image.Height);
// Resize it to fit a 150x150 square // Resize it to fit a 150x150 square
image.Resize(ThumbnailSize, ThumbnailSize); image.Resize(this.ThumbnailSize, this.ThumbnailSize);
// Reduce the size of the file // Reduce the size of the file
image.Strip(); image.Strip();
@ -221,8 +221,8 @@ namespace SixLabors.ImageSharp.Benchmarks.LoadResizeSave
{ {
var settings = new ProcessImageSettings() var settings = new ProcessImageSettings()
{ {
Width = ThumbnailSize, Width = this.ThumbnailSize,
Height = ThumbnailSize, Height = this.ThumbnailSize,
ResizeMode = CropScaleMode.Max, ResizeMode = CropScaleMode.Max,
SaveFormat = FileFormat.Jpeg, SaveFormat = FileFormat.Jpeg,
JpegQuality = Quality, JpegQuality = Quality,
@ -238,11 +238,11 @@ namespace SixLabors.ImageSharp.Benchmarks.LoadResizeSave
{ {
using var original = SKBitmap.Decode(input); using var original = SKBitmap.Decode(input);
this.IncreaseTotalMegapixels(original.Width, original.Height); this.IncreaseTotalMegapixels(original.Width, original.Height);
(int width, int height) scaled = this.ScaledSize(original.Width, original.Height, ThumbnailSize); (int Width, int Height) scaled = this.ScaledSize(original.Width, original.Height, this.ThumbnailSize);
using var surface = SKSurface.Create(new SKImageInfo(scaled.width, scaled.height, original.ColorType, original.AlphaType)); using var surface = SKSurface.Create(new SKImageInfo(scaled.Width, scaled.Height, original.ColorType, original.AlphaType));
using var paint = new SKPaint() { FilterQuality = SKFilterQuality.High }; using var paint = new SKPaint() { FilterQuality = SKFilterQuality.High };
SKCanvas canvas = surface.Canvas; SKCanvas canvas = surface.Canvas;
canvas.Scale((float)scaled.width / original.Width); canvas.Scale((float)scaled.Width / original.Width);
canvas.DrawBitmap(original, 0, 0, paint); canvas.DrawBitmap(original, 0, 0, paint);
canvas.Flush(); canvas.Flush();
@ -256,8 +256,8 @@ namespace SixLabors.ImageSharp.Benchmarks.LoadResizeSave
{ {
using var original = SKBitmap.Decode(input); using var original = SKBitmap.Decode(input);
this.IncreaseTotalMegapixels(original.Width, original.Height); this.IncreaseTotalMegapixels(original.Width, original.Height);
(int width, int height) scaled = this.ScaledSize(original.Width, original.Height, ThumbnailSize); (int Width, int Height) scaled = this.ScaledSize(original.Width, original.Height, this.ThumbnailSize);
using var resized = original.Resize(new SKImageInfo(scaled.width, scaled.height), SKFilterQuality.High); using var resized = original.Resize(new SKImageInfo(scaled.Width, scaled.Height), SKFilterQuality.High);
if (resized == null) if (resized == null)
{ {
return; return;
@ -272,7 +272,7 @@ namespace SixLabors.ImageSharp.Benchmarks.LoadResizeSave
public void NetVipsResize(string input) public void NetVipsResize(string input)
{ {
// Thumbnail to fit a 150x150 square // Thumbnail to fit a 150x150 square
using var thumb = NetVipsImage.Thumbnail(input, ThumbnailSize, ThumbnailSize); using var thumb = NetVipsImage.Thumbnail(input, this.ThumbnailSize, this.ThumbnailSize);
// Save the results // Save the results
thumb.Jpegsave(this.OutputPath(input, NetVips), q: Quality, strip: true); thumb.Jpegsave(this.OutputPath(input, NetVips), q: Quality, strip: true);

4
tests/ImageSharp.Tests.ProfilingSandbox/LoadResizeSaveParallelMemoryStress.cs

@ -1,4 +1,4 @@
// Copyright (c) Six Labors. // Copyright (c) Six Labors.
// Licensed under the Apache License, Version 2.0. // Licensed under the Apache License, Version 2.0.
using System; using System;
@ -121,7 +121,7 @@ namespace SixLabors.ImageSharp.Tests.ProfilingSandbox
return bld.ToString(); return bld.ToString();
static string L(string header) => new ('-', header.Length); static string L(string header) => new('-', header.Length);
static string F(string column) => $"{{0,{column.Length}:f3}}"; static string F(string column) => $"{{0,{column.Length}:f3}}";
} }
} }

3
tests/ImageSharp.Tests.ProfilingSandbox/Program.cs

@ -1,3 +1,6 @@
// Copyright (c) Six Labors.
// Licensed under the Apache License, Version 2.0.
using System; using System;
using SixLabors.ImageSharp.Tests.Formats.Jpg; using SixLabors.ImageSharp.Tests.Formats.Jpg;
using SixLabors.ImageSharp.Tests.PixelFormats.PixelOperations; using SixLabors.ImageSharp.Tests.PixelFormats.PixelOperations;

1
tests/ImageSharp.Tests/Formats/Bmp/BmpDecoderTests.cs

@ -14,7 +14,6 @@ using SixLabors.ImageSharp.Tests.TestUtilities.ImageComparison;
using SixLabors.ImageSharp.Tests.TestUtilities.ReferenceCodecs; using SixLabors.ImageSharp.Tests.TestUtilities.ReferenceCodecs;
using Xunit; using Xunit;
using static SixLabors.ImageSharp.Tests.TestImages.Bmp; using static SixLabors.ImageSharp.Tests.TestImages.Bmp;
// ReSharper disable InconsistentNaming // ReSharper disable InconsistentNaming

2
tests/ImageSharp.Tests/Formats/Bmp/BmpEncoderTests.cs

@ -2,7 +2,6 @@
// Licensed under the Apache License, Version 2.0. // Licensed under the Apache License, Version 2.0.
using System.IO; using System.IO;
using SixLabors.ImageSharp.Formats; using SixLabors.ImageSharp.Formats;
using SixLabors.ImageSharp.Formats.Bmp; using SixLabors.ImageSharp.Formats.Bmp;
using SixLabors.ImageSharp.Metadata; using SixLabors.ImageSharp.Metadata;
@ -13,7 +12,6 @@ using SixLabors.ImageSharp.Tests.TestUtilities.ImageComparison;
using SixLabors.ImageSharp.Tests.TestUtilities.ReferenceCodecs; using SixLabors.ImageSharp.Tests.TestUtilities.ReferenceCodecs;
using Xunit; using Xunit;
using static SixLabors.ImageSharp.Tests.TestImages.Bmp; using static SixLabors.ImageSharp.Tests.TestImages.Bmp;
// ReSharper disable InconsistentNaming // ReSharper disable InconsistentNaming

2
tests/ImageSharp.Tests/Formats/Bmp/BmpMetadataTests.cs

@ -2,11 +2,9 @@
// Licensed under the Apache License, Version 2.0. // Licensed under the Apache License, Version 2.0.
using System.IO; using System.IO;
using SixLabors.ImageSharp.Formats.Bmp; using SixLabors.ImageSharp.Formats.Bmp;
using Xunit; using Xunit;
using static SixLabors.ImageSharp.Tests.TestImages.Bmp; using static SixLabors.ImageSharp.Tests.TestImages.Bmp;
// ReSharper disable InconsistentNaming // ReSharper disable InconsistentNaming

1
tests/ImageSharp.Tests/Formats/Gif/GifEncoderTests.cs

@ -2,7 +2,6 @@
// Licensed under the Apache License, Version 2.0. // Licensed under the Apache License, Version 2.0.
using System.IO; using System.IO;
using SixLabors.ImageSharp.Formats.Gif; using SixLabors.ImageSharp.Formats.Gif;
using SixLabors.ImageSharp.Metadata; using SixLabors.ImageSharp.Metadata;
using SixLabors.ImageSharp.PixelFormats; using SixLabors.ImageSharp.PixelFormats;

1
tests/ImageSharp.Tests/Formats/Gif/GifMetadataTests.cs

@ -4,7 +4,6 @@
using System.Collections.Generic; using System.Collections.Generic;
using System.IO; using System.IO;
using System.Linq; using System.Linq;
using SixLabors.ImageSharp.Formats.Gif; using SixLabors.ImageSharp.Formats.Gif;
using SixLabors.ImageSharp.Metadata; using SixLabors.ImageSharp.Metadata;
using SixLabors.ImageSharp.PixelFormats; using SixLabors.ImageSharp.PixelFormats;

1
tests/ImageSharp.Tests/Formats/Jpg/Block8x8FTests.cs

@ -7,7 +7,6 @@ using System;
#if SUPPORTS_RUNTIME_INTRINSICS #if SUPPORTS_RUNTIME_INTRINSICS
using System.Runtime.Intrinsics.X86; using System.Runtime.Intrinsics.X86;
#endif #endif
using SixLabors.ImageSharp.Formats.Jpeg.Components; using SixLabors.ImageSharp.Formats.Jpeg.Components;
using SixLabors.ImageSharp.Tests.Formats.Jpg.Utils; using SixLabors.ImageSharp.Tests.Formats.Jpg.Utils;
using SixLabors.ImageSharp.Tests.TestUtilities; using SixLabors.ImageSharp.Tests.TestUtilities;

1
tests/ImageSharp.Tests/Formats/Jpg/GenericBlock8x8Tests.cs

@ -2,7 +2,6 @@
// Licensed under the Apache License, Version 2.0. // Licensed under the Apache License, Version 2.0.
using System; using System;
using SixLabors.ImageSharp.Formats.Jpeg.Components; using SixLabors.ImageSharp.Formats.Jpeg.Components;
using SixLabors.ImageSharp.Memory; using SixLabors.ImageSharp.Memory;
using SixLabors.ImageSharp.PixelFormats; using SixLabors.ImageSharp.PixelFormats;

1
tests/ImageSharp.Tests/Formats/Jpg/JpegColorConverterTests.cs

@ -3,7 +3,6 @@
using System; using System;
using System.Numerics; using System.Numerics;
using SixLabors.ImageSharp.ColorSpaces; using SixLabors.ImageSharp.ColorSpaces;
using SixLabors.ImageSharp.ColorSpaces.Conversion; using SixLabors.ImageSharp.ColorSpaces.Conversion;
using SixLabors.ImageSharp.Formats.Jpeg.Components.Decoder; using SixLabors.ImageSharp.Formats.Jpeg.Components.Decoder;

1
tests/ImageSharp.Tests/Formats/Jpg/JpegDecoderTests.Metadata.cs

@ -4,7 +4,6 @@
using System; using System;
using System.IO; using System.IO;
using System.Runtime.CompilerServices; using System.Runtime.CompilerServices;
using SixLabors.ImageSharp.Formats; using SixLabors.ImageSharp.Formats;
using SixLabors.ImageSharp.Formats.Jpeg; using SixLabors.ImageSharp.Formats.Jpeg;
using SixLabors.ImageSharp.Metadata; using SixLabors.ImageSharp.Metadata;

Some files were not shown because too many files changed in this diff

Loading…
Cancel
Save