Last post Apr 07, 2008 06:47 PM by JWTech
Apr 07, 2008 10:48 AM|JWTech|LINK
How do you get the resized image to display through and Image Server Control.
here is the code
private void retreiveImage(object sender, System.EventArgs s)
System.Drawing.Image.GetThumbnailImageAbort dummycallback = new System.Drawing.Image.GetThumbnailImageAbort(ref getThumb);
System.Drawing.Image img = System.Drawing.Image.FromFile(Server.MapPath("/webtest/images/Blue hills.jpg"));
thumbImage = img.GetThumbnailImage(100, 100, dummycallback, IntPtr.Zero);
Image1.ImageUrl = "thumbBH.gif";
Image1.Visible = true;
Apr 07, 2008 02:01 PM|TonyDong|LINK
Why not use page instead of the image server control, it will much easy to use it.
<img src="~/image/RetreiveImage.aspx" ... />
Apr 07, 2008 06:47 PM|JWTech|LINK
I don't want to use page because I'm doing the resize in a separate class and saving it into a variable. These are product images so there is a whole list which I'm resizing and displaying through a FormVeiw. So I would like to be able to just pass out
the new resized image.