There are several ways to lock the contents of a Photoshop PSD file. Locking refers to protecting certain elements of a composition from editing, usually a layer or layer group. Generally the primary reason to lock elements of your composition is to protect them from unintended changes while you edit something else within the composition.
Layers and Layer Groups
Layers and layer groups are what you'll be locking in most instances. There are several options to control how a layer is locked. To totally protect the layer from any editing, fully locking the layer is the best option. Otherwise, you can lock the transparency, image pixels and/or the layer's position.
Select the desired layers or layer groups from the Layers palette.
- Select multiple contiguous layers by selecting the top-most desired layer from the list, holding down Shift, and clicking the bottom-most desired layer.
- Select multiple non-contiguous layers by holding down Ctrl and clicking each desired layer.
Click the Lock all button from the Lock options on the layers tab to fully lock the layer and prevent any edits.
To fully lock all selected layers, pres Ctrl-/ or select Layer followed by Lock Layers from the menu.
Click the Lock transparent pixels button to lock all transparent pixels, preventing edits to pixels with less than 100 percent opacity.
Click the Lock image pixels button to lock only the pixels and prevent edits when using painting tools.
Click the Lock position button to prevent all pixels on the selected layer from being moved.
To quickly unlock all layers except the Background layer at any time, press Ctrl-Alt-/.
Photoshop's Slice tool can also lock a composition with slices. The Slice tool divides the image or composition into smaller sections or "slices," which you can then edit individually. Unlike layers, individual slices or their properties can't be locked: choosing the Slice Lock option fully locks all slices.
To lock slices, click View followed by Lock Slices. Select this option again at any time to unlock your slices.