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
-
Hi community. Thank you in advance for a great library and for helping out 👍
I have a .NET
Stream
that 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
'sIdentify
method (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 fromIdentify
in a single pass?I have to assume that the
Stream
is not seekable (since it is coming in from an HTTP request), and don't want to copy it into aMemoryStream
as 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
Stream
and stream it up to S3 and in the process also haveImageSharp
process theStream
in order to `Identify’ the dimensions.Any ideas would be much appreciated! Thank you!
Beta Was this translation helpful? Give feedback.
All reactions