Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ensure seekable streams can be read multiple times. #2267

Merged
merged 8 commits into from
Oct 24, 2022

Conversation

JimBobSquarePants
Copy link
Member

Prerequisites

  • I have written a descriptive pull-request title
  • I have verified that there are no overlapping pull-requests open
  • I have verified that I am following the existing coding patterns and practice as demonstrated in the repository. These follow strict Stylecop rules 馃懏.
  • I have provided test coverage for my change (where applicable)

Description

Fixes #2259

I wasn't able to replicate the issue with main in synchronous loading (likely due to the decoder refactor) but I was able to do so for our asynchronous load.

I addition I've included a more efficient fix for buffered stream position setting.

src/ImageSharp/IO/BufferedReadStream.cs Outdated Show resolved Hide resolved
src/ImageSharp/IO/BufferedReadStream.cs Outdated Show resolved Hide resolved
@JimBobSquarePants JimBobSquarePants merged commit 451a713 into main Oct 24, 2022
@JimBobSquarePants JimBobSquarePants deleted the js/buffered-read-fix branch October 24, 2022 11:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Loading image from a stream doesn't start at the current position
2 participants