Identifying an image stream whilst streaming it elsewhere #2811
Unanswered
ozziepeeps
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hi community. Thank you in advance for a great library and for helping out 👍
I have a .NET
Streamthat I am streaming up to AWS S3 via the AWSSDK. The benefit of this is I don't need to have the entire file (represented by theStream) in memory at once so it is memory efficient.I'd also like to be able to leverage
ImageSharp'sIdentifymethod (which takes aStream) to extract the image dimensions. Is there an approach I can take to stream the file up to S3 and also end up being able to get the dimensions fromIdentifyin a single pass?I have to assume that the
Streamis not seekable (since it is coming in from an HTTP request), and don't want to copy it into aMemoryStreamas that will spike my memory usage and some of my files can be very large.I'm looking for perhaps a "decorator" approach where I can wrap the
Streamand stream it up to S3 and in the process also haveImageSharpprocess theStreamin order to `Identify’ the dimensions.Any ideas would be much appreciated! Thank you!
Beta Was this translation helpful? Give feedback.
All reactions