Hi,
I have a page that display resized image using OutputStream as below:
Default.aspx
<asp:Image ID="imgPictureURL" runat="server" ImageUrl='<%# "~/DisplayImage.aspx?image="+ Eval("PicturesURL").ToString() +
"&width=42" %>' />
DisplayImage.aspx.cs
if (!Page.IsPostBack)
{
Response.Clear();
int maxHeight = 200;
int maxWidth = 250;
if (Request["width"] != null)
{
maxWidth = Int32.Parse(Request["width"].ToString());
}
if (Request["height"] != null)
{
maxHeight = Int32.Parse(Request["height"].ToString());
}
string imageName = Request.QueryString["image"];
string extension = System.IO.Path.GetExtension(imageName);
byte[] pBuffer = wsThumbnail.Cr ...
Go to the complete details ...