Jose Saiz

Jose Saiz

  • 1.5k
  • 260
  • 102.9k

Resize image without losing resolutions

Dec 16 2015 7:27 PM

Hi, Guys I am looking for a straight ASP.NET C# coding (no third party assembly please) that works at least 98% resizing the uploaded image from original size to lower size without losing its resolutions and vectors.

Explain:
I have a web application that allows the user to upload the picture taken from their staff usually the picture taken with any camera then upload to the hosted site, the goal is to use the same uploaded picture and resize it to a (2 inches X 2 inches) to be used on a non-printable photo ID what I mean by non-printable is that the photo ID will only be used on RGB or Monitor display not to be printed, I have tried quite a bit code found but neither one helped resized pictured pixelated and distorted I also found another code that works well in windows environment but not in web environment in other word the code does not convert the web image control to an image control, can any one help and if is not much asking could you also provide coding and sample how to use the code.
 
This is my photo ID code
<%---- FROM Original uploaded picture --- %> 
<ASP:image id="img1" ImageUrl="~/photos/staff0001.jpg"  runat="server" />
 
<%---- TO Resized from uploaded picture(picture above mentioned) to 2 x 2 size photo ID--- %>   
<ASP:image id="img2" ImageUrl="~/photos/Resized_staff0001.jpg"  runat="server" /> 
  
TIA 
Jose 

Answers (3)