I have two JPEG files with different dimensions:
Image1 (Width1,Height1)
Image2 (Width2,Height2)
I want to create Image3 (Width3, Height3) with Image1 on the left side and Image2 on the right.
Something like this will give you a new image with the two original images side by side.
Bitmap bitmap = new Bitmap(image1.Width + image2.Width, Math.Max(image1.Height, image2.Height));
using (Graphics g = Graphics.FromImage(bitmap))
{
g.DrawImage(image1, 0, 0);
g.DrawImage(image2, image1.Width, 0);
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With