You can resize the image using the GetThumbnailIma ge method.
Here's more info:
http://msdn.microsoft.com/library/de...ImageTopic.asp
Or maybe you'll find these custom functions useful that I wrote:
public Image DisplaySize(Bit map bmp)
{
Response.Write( bmp.Width.ToStr ing());
Response.Write( bmp.Height.ToSt ring());
}
//shrink the image proportionately so that neither height nor width is more
than [NewSize] pixels
public System.Drawing. Image ShrinkImage(Sys tem.Drawing.Bit map bmp, int
NewSize)
{
double NewWidth;
double NewHeight;
double ShrinkPercent;
System.Drawing. Image.GetThumbn ailImageAbort myCallback =
new System.Drawing. Image.GetThumbn ailImageAbort(T humbnailCallbac k);
if (bmp.Width>bmp. Height)
{
NewWidth=NewSiz e;
ShrinkPercent=( NewWidth/bmp.Width)*100;
NewHeight=(Shri nkPercent/100)*bmp.Height ;
}
else
{
NewHeight=NewSi ze;
ShrinkPercent=( NewHeight/bmp.Height)*100 ;
NewWidth=(Shrin kPercent/100)*bmp.Width;
}
System.Drawing. Image myShrunkenImage =
bmp.GetThumbnai lImage((int)New Width,(int)NewH eight,myCallbac k,IntPtr.Zero);
return myShrunkenImage ;
}
public bool ThumbnailCallba ck(){return false;}
--
I hope this helps,
Steve C. Orr, MCSD, MVP
http://SteveOrr.net
"asad" <as**@discussio ns.microsoft.co m> wrote in message
news:5D******** *************** ***********@mic rosoft.com...
Hello friends, i have a directory in which my uploaded images are stored i
want to create thumnails of these images dynamically and show these
thumbnail
how can i do this pls tell me about that.
Thanks