In Photoshop you can use the Align and Distribute options to easily line up and properly space your image layers, used frequently for creating panoramic images.
You can align the content of layers and groups using the Move tool . (See Move the content of layers.)
To align multiple layers, select the layers with the Move tool or in the Layers panel, or select a group.
To align the content of one or more layers to a selection border, make a selection in the image, and then select the layers in the Layers panel. Use this method to align to any specified point in the image.
Choose Layer > Align or Layer > Align Layers To Selection, and choose a command from the submenu. These same commands are available as Alignment buttons in the Move tool options bar.
Aligns the top pixel on the selected layers to the topmost pixel on all selected layers, or to the top edge of the selection border.
Aligns the vertical center pixel on each selected layers to the vertical center pixel of all the selected layers, or to the vertical center of the selection border.
Aligns the bottom pixel on the selected layers to the bottommost pixel on selected layers, or to the bottom edge of the selection border.
Aligns the left pixel on the selected layers to the left pixel on the leftmost layer, or to the left edge of the selection border.
Aligns the horizontal center pixel on the selected layers to the horizontal center pixel of all the selected layers, or to the horizontal center of the selection border.
The Auto-Align Layers command can automatically align layers based on similar content in different layers, such as corners and edges. You assign one layer as a reference layer, or let Photoshop automatically choose the reference layer. Other layers are aligned to the reference layer so that matching content overlays itself.
Using the Auto-Align Layers command, you can combine images in several ways:
Replace or delete parts of images that have the same background. After aligning the images, use masking or blending effects to combine parts of each image into one image.
Stitch images together that share overlapping content.
For video frames shot against a static background, you can convert frames into layers, then add or delete content across multiple frames.
Each image will be in a separate layer. See Duplicate layers.
You can load multiple images into layers using a script. Choose File > Scripts > Load Files into Stack.
(Optional) In the Layers panel, create a reference layer by locking it. See Lock layers. If you do not set a reference layer, Photoshop will analyze all the layers and select the one at the center of the final composition as the reference.
To select multiple adjacent layers from the panel, Shift-click; To select noncontiguous layers, Ctrl-Click (Windows) or Command-click (Mac OS).
Do not select adjustment layers, vector layers, or Smart Objects that do not contain information needed for alignment.
Choose Edit > Auto-Align Layers, and choose an alignment option. For stitching together multiple images that share overlapping areas—for example, to create a panorama—use the Auto, Perspective, or Cylindrical options. To align scanned images with offset content, use the Reposition Only option.
Photoshop analyzes the source images and applies either a Perspective or Cylindrical layout, depending on which produces a better composite.
Creates a consistent composition by designating one of the source images (by default, the middle image) as the reference image. The other images are then transformed (repositioned, stretched, or skewed, as necessary) so that overlapping content across layers is matched.
Reduces the “bow‑tie” distortion that can occur with the Perspective layout by displaying individual images as on an unfolded cylinder. Overlapping content across layers is still matched. The reference image is placed at the center. Best suited for creating wide panoramas.
Aligns images with wide fields of view (vertical and horizontal). Designates one of the sources images (the middle image, by default) as the reference image and spherically transforms the other images so that overlapping content is matched.
Aligns layers and matches overlapping content, without changing the shape of the objects in the image (for example, a circle will still be a circle).
Aligns the layers and matches overlapping content, but does not transform (stretch or skew) any of the source layers.
Compensates for a lens defect that causes the edges, especially the corners, of an image to be darker than the center.
Geometric Distortion will try to take into account the radical distortion to improve the result of the alignment, except with fish eye lens; when fish eye metadata is detected, Geometric Distortion will align the images for fish eye
After auto-aligning, you can use Edit > Free Transform to fine tune the alignment or make tonal adjustments to even out exposure differences between layers, then combine the layers into one composite image.
For a video on using Photoshop's alignment tools and automatic features to create panoramas, see Create a panoramic photo.