Reputation: 109
I am working in a function where I have two images, one of them is the backgroud and the other one is a QR code, I need create a new image using the background(image 1) and the QR image, but I need define the position of the QRCode Image. like the bellow image,
best regards
Upvotes: 1
Views: 466
Reputation: 1419
using (Image background = Image.FromFile("background.jpg"))
using (Image qrCode = Image.FromFile("qrCode.jpg"))
using (Graphics graphics = Graphics.FromImage(background))
{
int x = 100;
int y = 100;
graphics.DrawImage(qrCode, x, y);
background.Save("result.jpg", ImageFormat.Jpeg);
}
Upvotes: 3