When you have finalized the content of layers, you can merge them to reduce the size of your image files. When you merge layers, the data on the top layers replaces any data it overlaps on the lower layers. The intersection of all transparent areas in the merged layers remains transparent.
In addition to merging layers, you can stamp them. Stamping allows you to merge the contents of more than one layer into a target layer while leaving the other layers intact.
Merge two layers or groups
Merge layers in a clipping maskFor more information on clipping masks, see Mask layers with clipping masks.
Merge all visible layers and groups in an image
Choose Merge Visible from the Layers palette
or the Layers palette menu. All layers showing an eye icon
are merged.
Stamp multiple layers or linked layersWhen you stamp multiple selected layers or linked layers, Photoshop creates a new layer containing the merged content.
Stamp all visible layers
Flatten all layersFlattening reduces file size by merging all visible layers into the background and discarding hidden layers. Any transparent areas that remain are filled with white. When you save a flattened image, you cannot revert back to the unflattened state; the layers are permanently merged.