| Server IP : 190.92.174.109 / Your IP : 216.73.217.175 Web Server : Microsoft-IIS/10.0 System : Windows NT P3613 10.0 build 20348 (Windows Server 2016) AMD64 User : IWPD_2296(hkwrmyfr) ( 0) PHP Version : 7.4.33 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : OFF | Perl : OFF | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : C:/Inetpub/vhosts/aargeesapps.com/klesssmscollege.edu.in/ |
Upload File : |
<%@ WebHandler Language="C#" Class="ThumbNail" %>
using System;
using System.Web;
public class ThumbNail : IHttpHandler {
public void ProcessRequest (HttpContext context)
{
string imageurl = context.Request.QueryString["ImURL"];
string str = context.Server.MapPath(".") + imageurl;
System.Drawing.Bitmap bmp = new System.Drawing.Bitmap(str);
System.Drawing.Image img = bmp.GetThumbnailImage(100, 100, null, IntPtr.Zero);
System.IO.MemoryStream ms = new System.IO.MemoryStream();
img.Save(ms, System.Drawing.Imaging.ImageFormat.Jpeg);
byte[] bmpBytes = ms.GetBuffer();
img.Dispose();
ms.Close();
context.Response.BinaryWrite(bmpBytes);
context.Response.End();
}
public bool IsReusable {
get {
return false;
}
}
}