Avatar of Ruttensoft
Ruttensoft
 asked on

Download only images < 1MB

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?
C#

Avatar of undefined
Last Comment
kaufmed

8/22/2022 - Mon
ASKER CERTIFIED SOLUTION
kaufmed

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
I started with Experts Exchange in 2004 and it's been a mainstay of my professional computing life since. It helped me launch a career as a programmer / Oracle data analyst
William Peck