Click here to Skip to main content
15,920,708 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi All,

I have one image control in my .aspx page. I load that image control with an image at run time. Whenever the image size is big when compared to the image control, it is displaying correctly. But, whenever the image is small when compared to the image control, the image is extended and distorted. The image quality is lost. Can some one help me in retaining the size and the resolution of the image in c#.

Thanks,
Hepsi
Posted

You can always get the dimensions of the image. Check if it is smaller than the image-placeholder in your website. If so, you found it is smaller than don't force the resizing and keep it as it is.
 
Share this answer
 

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