diff --git a/src/ImageSharp/Formats/Tiff/TiffDecoderCore.cs b/src/ImageSharp/Formats/Tiff/TiffDecoderCore.cs index c448540810..db8b59858b 100644 --- a/src/ImageSharp/Formats/Tiff/TiffDecoderCore.cs +++ b/src/ImageSharp/Formats/Tiff/TiffDecoderCore.cs @@ -60,7 +60,7 @@ namespace SixLabors.ImageSharp.Formats.Experimental.Tiff /// public ushort[] BitsPerSample { get; set; } - public int ChunkyBitsPerPixel { get; set; } + public int BitsPerPixel { get; set; } /// /// Gets or sets the lookup table for RGB palette colored images. @@ -243,7 +243,7 @@ namespace SixLabors.ImageSharp.Formats.Experimental.Tiff if (this.PlanarConfiguration == TiffPlanarConfiguration.Chunky) { DebugGuard.IsTrue(plane == -1, "Excepted Chunky planar."); - bitsPerPixel = this.ChunkyBitsPerPixel; + bitsPerPixel = this.BitsPerPixel; } else { @@ -270,7 +270,7 @@ namespace SixLabors.ImageSharp.Formats.Experimental.Tiff { int stripsPerPixel = this.BitsPerSample.Length; int stripsPerPlane = stripOffsets.Length / stripsPerPixel; - int bitsPerPixel = this.ChunkyBitsPerPixel; // todo? + int bitsPerPixel = this.BitsPerPixel; Buffer2D pixels = frame.PixelBuffer; @@ -315,7 +315,7 @@ namespace SixLabors.ImageSharp.Formats.Experimental.Tiff where TPixel : unmanaged, IPixel { int uncompressedStripSize = this.CalculateStripBufferSize(frame.Width, rowsPerStrip); - int bitsPerPixel = this.ChunkyBitsPerPixel; + int bitsPerPixel = this.BitsPerPixel; using IManagedByteBuffer stripBuffer = this.memoryAllocator.AllocateManagedByteBuffer(uncompressedStripSize, AllocationOptions.Clean); diff --git a/src/ImageSharp/Formats/Tiff/TiffDecoderOptionsParser.cs b/src/ImageSharp/Formats/Tiff/TiffDecoderOptionsParser.cs index e81e519460..713c85c06d 100644 --- a/src/ImageSharp/Formats/Tiff/TiffDecoderOptionsParser.cs +++ b/src/ImageSharp/Formats/Tiff/TiffDecoderOptionsParser.cs @@ -52,11 +52,9 @@ namespace SixLabors.ImageSharp.Formats.Experimental.Tiff options.PlanarConfiguration = entries.PlanarConfiguration; options.Predictor = entries.Predictor; - - // todo: There is no default for PhotometricInterpretation, and it is required. options.PhotometricInterpretation = entries.PhotometricInterpretation; options.BitsPerSample = entries.BitsPerSample; - options.ChunkyBitsPerPixel = entries.BitsPerPixel; + options.BitsPerPixel = entries.BitsPerPixel; ParseColorType(options, entries); ParseCompression(options, entries.Compression);