Browse Source

Revert constructor parameter ordering

pull/2266/head
James Jackson-South 4 years ago
parent
commit
a6dd6e3efb
  1. 4
      src/ImageSharp/Formats/Tiff/Compression/Decompressors/JpegTiffCompression.cs
  2. 2
      src/ImageSharp/Formats/Tiff/Compression/TiffDecompressorsFactory.cs

4
src/ImageSharp/Formats/Tiff/Compression/Decompressors/JpegTiffCompression.cs

@ -25,17 +25,17 @@ internal sealed class JpegTiffCompression : TiffBaseDecompressor
/// <summary>
/// Initializes a new instance of the <see cref="JpegTiffCompression"/> class.
/// </summary>
/// <param name="options">The specialized jpeg decoder options.</param>
/// <param name="memoryAllocator">The memoryAllocator to use for buffer allocations.</param>
/// <param name="width">The image width.</param>
/// <param name="bitsPerPixel">The bits per pixel.</param>
/// <param name="options">The specialized jpeg decoder options.</param>
/// <param name="jpegTables">The JPEG tables containing the quantization and/or Huffman tables.</param>
/// <param name="photometricInterpretation">The photometric interpretation.</param>
public JpegTiffCompression(
JpegDecoderOptions options,
MemoryAllocator memoryAllocator,
int width,
int bitsPerPixel,
JpegDecoderOptions options,
byte[] jpegTables,
TiffPhotometricInterpretation photometricInterpretation)
: base(memoryAllocator, width, bitsPerPixel)

2
src/ImageSharp/Formats/Tiff/Compression/TiffDecompressorsFactory.cs

@ -59,7 +59,7 @@ internal static class TiffDecompressorsFactory
case TiffDecoderCompressionType.Jpeg:
DebugGuard.IsTrue(predictor == TiffPredictor.None, "Predictor should only be used with lzw or deflate compression");
return new JpegTiffCompression(allocator, width, bitsPerPixel, new() { GeneralOptions = options }, jpegTables, photometricInterpretation);
return new JpegTiffCompression(new() { GeneralOptions = options }, allocator, width, bitsPerPixel, jpegTables, photometricInterpretation);
case TiffDecoderCompressionType.OldJpeg:
DebugGuard.IsTrue(predictor == TiffPredictor.None, "Predictor should only be used with lzw or deflate compression");

Loading…
Cancel
Save