Skip to content

Commit

Permalink
Merge pull request #2838 from SixLabors/js/v4-chunked-stream
Browse files Browse the repository at this point in the history
V4 : Rewrite ChunkedMemoryStream
  • Loading branch information
JimBobSquarePants authored Nov 13, 2024
2 parents 702d71f + e7a38e9 commit 123d5c3
Show file tree
Hide file tree
Showing 5 changed files with 404 additions and 431 deletions.
2 changes: 1 addition & 1 deletion src/ImageSharp/Formats/ImageEncoder.cs
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ private void EncodeWithSeekableStream<TPixel>(Image<TPixel> image, Stream stream
else
{
using ChunkedMemoryStream ms = new(configuration.MemoryAllocator);
this.Encode(image, stream, cancellationToken);
this.Encode(image, ms, cancellationToken);
ms.Position = 0;
ms.CopyTo(stream, configuration.StreamProcessingBufferSize);
}
Expand Down
Loading

0 comments on commit 123d5c3

Please sign in to comment.