Click here to Skip to main content
15,030,320 members
Please Sign up or sign in to vote.
4.00/5 (2 votes)
See more:
Hi All,

I am implementing code for image compression.
I want to compress image and then upload on a server using Asp.net ..
will it be possible?
If anybody have an idea then plz help me.
Thanks in advance..
Posted

1 solution

Hi,

you simply need to create a new Bitmap with System.Drawing Class and resize/set a new resolution to uploaded image.

With Best Regards
   
v2
Comments
Manisha Tambade 12-Mar-12 12:11pm
   
Bjorn Thanks for the answer.But insted of image there can be any scanned document or pdf file in that case will this Bitmap logic work? Actually i am new to this so need suggestion.
El_Codero 12-Mar-12 13:28pm
   
Unfortunately no, Bitmap Class is only to resize/reduce size of Images. You can use 7-zip SDK to store uploaded contents compressed to your server, but it would be not a good solution if users must be able to "work" with their uploaded files because you have to View/extract their contents from Archive in each session.
http://www.7-zip.org/sdk.html
Best Regards

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)




CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900