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.
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.
Aligns the right pixel on the linked layers to the rightmost pixel on all selected layers, or to the right edge of the selection border.
Updated in the October 2018 release of Photoshop CC (version 20.0)
Spaces the layers evenly, starting from the top pixel of each layer.
Spaces the layers evenly, starting from the vertical center pixel of each layer.
Spaces the layers evenly, starting from the bottom pixel of each layer.
Spaces the layers evenly, starting from the left pixel of each layer.
Spaces the layers evenly, starting from the horizontal center of each layer.
Spaces the layers evenly, starting from the right pixel on each layer.
Distributes horizontal spacing between the layers evenly.
Distributes vertical spacing between the layers evenly.
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.
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.
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.
Automatically corrects for lens defects:
Compensates for a lens defect that causes the edges, especially the corners, of an image to be darker than the center.
Compensates for barrel, pincushion, or fisheye distortion.
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.