How to concatenate two images?

1

If I have two image files (eg. JPEGs) and I want to have one on the left side and one on the right side to make up one image, how do I do this?

CJ7

Posted 2012-02-15T03:46:03.803

Reputation: 1 060

1what? Are the images of the same height? do you want to automate that or just for this one case? If you just want to do it once the simplest way to do it I can think of is to open them both up in Ms Paint then>>> Ctrl+A on one of them, Ctrl+C to copy, switch to the other window, resize the canvas by dragging the bottom corner down and to the right, Ctrl+V to paste the first image, then manually click and drag/use the arrow keys to align the paste with the other image as desired. – enthdegree – 2012-02-15T03:57:31.710

mspaint indeed! notepad too. Why are we so masochistic. :-D – Synetech – 2012-02-15T04:44:43.223

2@Synetech: How could you do this in notepad? – CJ7 – 2012-02-15T04:47:30.397

2I didn’t mean notepad for this, lol I meant that we often reach for the tools that come with Windows first, even though they are limited. – Synetech – 2012-02-15T04:55:14.627

Answers

1

In simple words, add the widths of the two images, then create a new canvas which has this sum as its width, and the highest height of the two original images as its height, then place the two original images side-by-side in this canvas.

In Paint.NET you can do it faster. You can simply expand the canvas (Image > Canvas size) of second image to the left to a width that's enough to accommodate first image (that is, the sum of two original widths), then just paste the first image in. If the height is not enough, Paint.NET will ask you whether to expand the canvas.

PhotoFiltre is even faster and can do such stitching automatically:

  1. Open both images.
  2. On any one image, click Edit > Copy.
  3. On the other image, click Edit > Paste Special > Assemble.
  4. Choose the desired direction and click OK.

ADTC

Posted 2012-02-15T03:46:03.803

Reputation: 2 649

2or IrfanView Edit Paste Special | Add On Side | Top/Left/Bottom/Right. only problem with this approach is that it resizes the pasted photo to fit. Photo filtre will keep the original size intact and fill the rest with white space. So depends what you need. One day some genius will implement a dialog in some program to ask so we can have the best of both worlds. – Mikey – 2016-03-17T14:21:32.540

0

AxB sized image1 and CxD sized image2. Create a A+C x B(if B>D, othervise D) sized image and copy image1 to 0;0 point, copy image2 to A;0 point with some image editing program.

The_aLiEn

Posted 2012-02-15T03:46:03.803

Reputation: 1 431

A bit too many calculations for such a simple task, don't you think? Anyway PhotoFiltre can do such stitching automatically. I sorely miss such a function in Paint.NET where I have to stitch manually, but it's much easier than using MS Paint. – ADTC – 2012-02-15T08:55:14.247

Where is the difficulty on adding C to A? It is basic math, don't you think? Besides, this is exactly what @enthdegree explained, just some parameters involved. – The_aLiEn – 2012-02-15T16:39:59.390

Sorry, my comment should have been "a bit too much mathematically inclined thought process" (with variables like A, B, etc, and points on a graphing system like A,0; etc.). – ADTC – 2012-02-18T07:54:39.687

No hard feelings. It is just a worded explanation of a such numerical thing. – The_aLiEn – 2012-02-18T16:21:50.403