User-1773939321 posted
I want to embed a small image on a large iamge. For e.g I have an image back.jpg and front.jpg. The back.jpg will be large image and the front image will be small image.
Here is the code i found below.
private void GenererateGalleryImage(string baseImage, string smallImage)
{
Bitmap objImage = new Bitmap(baseImage);
Bitmap objSmallImage = new Bitmap(smallImage);
using (Graphics g = Graphics.FromImage(objImage))
{
g.DrawImage(objSmallImage,50,50);
// there are 30-some overloads of DrawImage, but
// basically you use objSmallImage as the source,
// plus various ways of telling the method
// where to draw the smaller image.
}
objImage.Save(Response.OutputStream, ImageFormat.Jpeg);
objImage.Dispose();
objSmallImage.Dispose();
}
I want to embed image propotionally as in the back image and front image.