Browse Source

Track input stream position on load. (#820)

pull/829/head
James Jackson-South 7 years ago
committed by GitHub
parent
commit
9c48c190a2
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 1
      src/ImageSharp/IO/DoubleBufferedStreamReader.cs

1
src/ImageSharp/IO/DoubleBufferedStreamReader.cs

@ -42,6 +42,7 @@ namespace SixLabors.ImageSharp.IO
public DoubleBufferedStreamReader(MemoryAllocator memoryAllocator, Stream stream)
{
this.stream = stream;
this.Position = (int)stream.Position;
this.length = (int)stream.Length;
this.managedBuffer = memoryAllocator.AllocateManagedByteBuffer(ChunkLength, AllocationOptions.Clean);
this.bufferChunk = this.managedBuffer.Array;

Loading…
Cancel
Save