0

I am using asyncfileupload ajax control and can successfully upload and save picture on server.

I need to do the following and not sure how:

  1. When user is in process of uploading, I only want them to see *.jpg *.gif and *.bmp files

  2. Once the user uploads their picture, how do I reduce the quality of the picture so it is less than 10 KB?

Env is VS 2008 C#

Thanks, Behrouz

Bruce
  • 2,133
  • 12
  • 34
  • 52

1 Answers1

0

See here for a perfect answer on scaling and covnerting images: High Quality Image Scaling Library

You will have to play with width/height and/or quality until you are below 10k.

René

Community
  • 1
  • 1
Krumelur
  • 32,180
  • 27
  • 124
  • 263
  • Thanks, how about the ability for the user to only see images when choosing files? – Bruce Jan 15 '11 at 20:52
  • For the allowed extension have a look here: http://programming.top54u.com/post/ASP-Net-FileUpload-File-Type-Filter-using-JavaScript-Validation.aspx – Homam Jan 15 '11 at 21:34