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’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Restore streaming output writes #39

Merged
merged 1 commit into from May 21, 2023
Merged

Restore streaming output writes #39

merged 1 commit into from May 21, 2023

Conversation

9ary
Copy link
Member

@9ary 9ary commented May 14, 2023

During the upgrade from image 0.23 to 0.24, ImageBuffer::write_to() was changed to require a seekable writer.
This doesn't work when writing to stdout, so we were forced to buffer the output before writing it out in one go.

It turns out that most individual encoders don't actually require seeking, and neither of the two we use does.
Restore streaming behavior by invoking encoders directly.

See: image-rs/image#1922

This still requires testing.

src/main.rs Outdated Show resolved Hide resolved
@9ary 9ary force-pushed the streaming_output branch 3 times, most recently from 0950575 to 7694466 Compare May 16, 2023 13:24
During the upgrade from image 0.23 to 0.24, `ImageBuffer::write_to()`
was changed to require a seekable writer.
This doesn't work when writing to stdout, so we were forced to buffer
the output before writing it out in one go.

It turns out that most individual encoders don't actually require
seeking, and neither of the two we use does.
Restore streaming behavior by invoking encoders directly.

See: image-rs/image#1922
@9ary 9ary merged commit f023e9a into master May 21, 2023
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant