Browse Source

Renaming

pull/1570/head
Ildar Khayrutdinov 5 years ago
parent
commit
bc07090d28
  1. 8
      src/ImageSharp/Formats/Tiff/TiffDecoderCore.cs
  2. 4
      src/ImageSharp/Formats/Tiff/TiffDecoderOptionsParser.cs

8
src/ImageSharp/Formats/Tiff/TiffDecoderCore.cs

@ -60,7 +60,7 @@ namespace SixLabors.ImageSharp.Formats.Experimental.Tiff
/// </summary>
public ushort[] BitsPerSample { get; set; }
public int ChunkyBitsPerPixel { get; set; }
public int BitsPerPixel { get; set; }
/// <summary>
/// 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<TPixel> pixels = frame.PixelBuffer;
@ -315,7 +315,7 @@ namespace SixLabors.ImageSharp.Formats.Experimental.Tiff
where TPixel : unmanaged, IPixel<TPixel>
{
int uncompressedStripSize = this.CalculateStripBufferSize(frame.Width, rowsPerStrip);
int bitsPerPixel = this.ChunkyBitsPerPixel;
int bitsPerPixel = this.BitsPerPixel;
using IManagedByteBuffer stripBuffer = this.memoryAllocator.AllocateManagedByteBuffer(uncompressedStripSize, AllocationOptions.Clean);

4
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);

Loading…
Cancel
Save