troubleshooting Question

Download only images < 1MB

Avatar of Ruttensoft
Ruttensoft asked on
C#
1 Comment1 Solution324 ViewsLast Modified:
Hello
I have several URL's to Images. now to save bandwith, I would like to auto-download only Bitmaps/Images which are < 1MB.

Now how to do this. Using BitmapImage, I can download Images, but not see how large they are before I've downloaded them.

So I am now just creating a webrequest, then checking the webresponse Content-length. If it's > 1MB, I'm aborting the request. If not, I am downloading and creating the BitmapImage.

Any better variant of this?
ASKER CERTIFIED SOLUTION
Join our community to see this answer!
Unlock 1 Answer and 1 Comment.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 1 Comment.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros