User1906504752 posted
I want to put my logo on uploaded images.
I used this code.. But it enlarges the Logo image and the logo is not getting a good qulity.
string imgPathTemp = Server.MapPath(string.Concat("~/upload/temp/", Images[j].ImageName));
System.Drawing.Image imgTemp = System.Drawing.Image.FromFile(imgPathTemp);
Bitmap bitmapSmall = CreateThumbnail(imgTemp, 80, 60);
bitmapSmall.Save(Server.MapPath(string.Concat("~/upload/final/small/", Images[j].ImageName)), System.Drawing.Imaging.ImageFormat.Jpeg);
bitmapSmall.Dispose();
Graphics graphTemp = Graphics.FromImage(imgTemp);
System.Drawing.Image imgOverlay = System.Drawing.Image.FromFile(Server.MapPath("~/App_Themes/" + Page.Theme + "/images/videoOverlay.png"));
graphTemp.DrawImage(imgOverlay, imgTemp.Width - imgOverlay.Width - 20, imgTemp.Height - imgOverlay.Height);
imgTemp.Save(Server.MapPath(string.Concat("~/upload/final/large/", Images[j].ImageName)), System.Drawing.Imaging.ImageFormat.Jpeg);
graphTemp.Dispose();
imgTemp.Dispose();
imgOverlay.Dispose();