string logoUrl = HttpContext.Current.Server.MapPath("DeviceLogo"); System.Drawing.Image SourceLogo = System.Drawing.Image.FromFile(logoUrl + @"\" + objDevice.FileName); //Create a logo for this device and reseller/client business Bitmap newImage = new Bitmap(objDevice.LogoWidth, objDevice.LogoHeight, PixelFormat.Format24bppRgb); using (Graphics graphics = Graphics.FromImage(newImage)) { graphics.CompositingQuality = CompositingQuality.HighQuality; graphics.InterpolationMode = InterpolationMode.HighQualityBicubic; graphics.SmoothingMode = SmoothingMode.HighQuality; graphics.DrawImage(SourceLogo, 0, 0, objDevice.LogoWidth, objDevice.LogoHeight); } string filepath = HttpContext.Current.Server.MapPath("DeviceLogo"); //Save the resized image newImage.Save(filepath + objDevice.FileName);
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)