Last post Jan 20, 2007 09:45 AM by MIB426
Jan 20, 2007 09:27 AM|sasikantt_24|LINK
I have Image Control of a fixed size . and i am getting image using fileupload control , which i bind to image control .
But problem is i don't know the exact size of a image ,that i am getting .So what should i do to resize that image which i am going to bind to imagecontrol without affecting quality of an image ,i.e . if an image is small i want to enlarge that
image and if an image is bigger than size of a control i want to reduce that image without affecting the quality .
Thanks n regard
Jan 20, 2007 09:42 AM|pkellner|LINK
You need to use the System.Drawing API to do resizing of the upload image so that it will fit in your size correctly. Can't help with losing quality when you go from small to big. Here is an article that shows you how to do this.
Jan 20, 2007 09:45 AM|MIB426|LINK
just set width and height property
like for imageButton
<asp:ImageButton runat="server" ID="img1" Height="20px" Width="20px" />