Browse Source

Remove more unused variables

pull/3096/head
Brian Popow 1 month ago
parent
commit
84182c5aaf
  1. 2
      src/ImageSharp/Formats/Exr/Compression/Decompressors/B44ExrCompression.cs
  2. 4
      src/ImageSharp/Formats/Exr/ExrEncoderCore.cs

2
src/ImageSharp/Formats/Exr/Compression/Decompressors/B44ExrCompression.cs

@ -18,7 +18,7 @@ internal class B44ExrCompression : ExrBaseDecompressor
private readonly byte[] scratch = new byte[14];
private ushort[] s = new ushort[16];
private readonly ushort[] s = new ushort[16];
private readonly IMemoryOwner<ushort> tmpBuffer;

4
src/ImageSharp/Formats/Exr/ExrEncoderCore.cs

@ -121,7 +121,6 @@ internal sealed class ExrEncoderCore
this.WriteHeader(stream, header);
// Next is offsets table to each pixel row, which will be written after the pixel data was written.
int bytesPerChannel = this.pixelType == ExrPixelType.Half ? 2 : 4;
ulong startOfRowOffsetData = (ulong)stream.Position;
stream.Position += 8 * height;
@ -238,7 +237,6 @@ internal sealed class ExrEncoderCore
uint bytesPerRow = ExrUtils.CalculateBytesPerRow(channels, (uint)width);
uint rowsPerBlock = ExrUtils.RowsPerBlock(compression);
uint bytesPerBlock = bytesPerRow * rowsPerBlock;
int channelCount = channels.Count;
using IMemoryOwner<uint> rgbBuffer = this.memoryAllocator.Allocate<uint>(width * 3, AllocationOptions.Clean);
using IMemoryOwner<byte> rowBlockBuffer = this.memoryAllocator.Allocate<byte>((int)bytesPerBlock, AllocationOptions.Clean);
@ -379,8 +377,6 @@ internal sealed class ExrEncoderCore
private void WriteRowOffsets(Stream stream, int height, ulong[] rowOffsets)
{
ulong startOfRowOffsetData = (ulong)stream.Position;
ulong offset = startOfRowOffsetData;
for (int i = 0; i < height; i++)
{
BinaryPrimitives.WriteUInt64LittleEndian(this.buffer, rowOffsets[i]);

Loading…
Cancel
Save