PSD Adobe Photoshop Format: Understanding the Industry Standard
PSD (Photoshop Document) is Adobe's native file format for Photoshop, first introduced with Photoshop 1.0 in 1990. It is the cornerstone format of professional digital image editing, capable of storing every Photoshop feature: layers, adjustment layers, masks, channels, paths, smart objects, blend modes, effects, and text with full editability. The newer PSB (Large Document) format extends PSD to support files larger than 2 GB.
PSD File Structure
A PSD file consists of five major sections:
1. File Header — 26 bytes
Magic: '8BPS'
Version: 1 (PSD) or 2 (PSB)
Channels: 1-56
Height: 1-30,000 px (PSD) / 1-300,000 px (PSB)
Width: 1-30,000 px (PSD) / 1-300,000 px (PSB)
Bit depth: 1, 8, 16, or 32 bits per channel
Color mode: Bitmap/Grayscale/Indexed/RGB/CMYK/Multichannel/Duotone/Lab
2. Color Mode Data — palette for indexed, duotone curves
3. Image Resources — metadata: ICC profile, slices, guides, history, EXIF
4. Layer and Mask Info — the core: all layer data
Layer Count
Per layer:
Bounding rectangle
Number of channels
Channel data (compressed pixel data)
Blend mode + opacity + flags
Layer name
Additional layer info (text, effects, adjustment data, smart object link)
Global layer mask info
5. Merged Image Data — flattened composite (for compatibility with programs
that cannot read layers)
The Merged Image Data at section 5 is critical: it allows non-layer-aware applications to open PSD files and see the correct flattened result. This is why Photoshop makes you wait when saving — it writes both the full layer tree AND a flattened composite.
Layer Types
PSD supports these layer types:
Pixel Layers
Standard raster layers containing pixel data, compressed with PackBits or ZIP (Deflate). Each channel is stored separately (R, G, B, A as independent streams).
Adjustment Layers
Non-destructive corrections that affect layers below them:
- Curves, Levels, Brightness/Contrast
- Hue/Saturation, Color Balance, Selective Color
- Vibrance, Photo Filter, Channel Mixer
- Gradient Map, Invert, Threshold, Posterize
Adjustment layers store their parameters (curve points, color shifts, etc.) as binary data in the additional layer info block — no pixel data is stored until the layer is rasterized.
Text Layers
Text layers store:
- The text string (Unicode)
- Font name, size, style, color, tracking, kerning
- Warp settings (if text is warped)
- Anti-aliasing mode (None/Sharp/Crisp/Strong/Smooth/Platform LCD/Platform Gray)
Text is stored as raw text data, not as pixels — fonts are not embedded. Opening a PSD on a machine without the required fonts substitutes available fonts and marks them with a yellow warning triangle.
Shape/Vector Layers
Store path data (Bezier curves) as Work Paths — resolution-independent vector shapes. The path is defined in the vmsk (vector mask) additional layer info. Fill and stroke properties are stored as effect data.
Smart Objects
Smart Objects are the most complex layer type — they embed a complete, separate document within the PSD:
- For raster content: a full embedded PSD or TIFF with its own pixel data
- For vector content: an embedded Illustrator AI/PDF
- For external Smart Objects: a link to an external file on disk
The embedded document data is stored as a raw binary blob (SoLd/SoLE resources). Double-clicking a Smart Object opens the embedded content in a separate window; saving it updates all instances in the host document.
Group Layers (Layer Groups)
Layer groups (folders) store a parent-child relationship. Opening markers ('<lyr') and closing markers ('lyr>') in the layer list delimit groups. Groups have their own blend mode and opacity independent of contained layers.
Blend Modes
PSD supports 27+ blend modes:
| Category | Modes |
|---|---|
| Normal | Normal, Dissolve |
| Darken | Darken, Multiply, Color Burn, Linear Burn, Darker Color |
| Lighten | Lighten, Screen, Color Dodge, Linear Dodge (Add), Lighter Color |
| Contrast | Overlay, Soft Light, Hard Light, Vivid Light, Linear Light, Pin Light, Hard Mix |
| Inversion | Difference, Exclusion, Subtract, Divide |
| Component | Hue, Saturation, Color, Luminosity |
Blend modes are stored as 4-byte ASCII codes: norm, mul , scrn, over, etc.
Layer Masks and Vector Masks
Each layer can have up to two masks:
- Pixel Mask (Layer Mask): An 8-bit grayscale channel defining opacity (white=opaque, black=transparent, gray=semi-transparent). Stored as a separate channel in the layer data.
- Vector Mask: A path that clips the layer. Editable as a Bezier path; renders anti-aliased at any resolution.
These masks are non-destructive — the underlying pixel data is preserved regardless of mask state.
Channels
PSD stores all image channels:
- Color channels: R, G, B (or C, M, Y, K for CMYK; L, a, b for Lab)
- Alpha channel: Overall layer opacity
- Spot color channels: For printing with custom ink colors (Pantone, specialty inks)
- Transparency channel per layer: Each layer's own alpha
Spot color channels are stored with the ink's CMYK equivalent values and Lab color — crucial for print production where specific Pantone colors must be preserved.
PSD Compatibility and Opening in Other Applications
| Application | PSD Support |
|---|---|
| Photoshop | Full native |
| GIMP | Good (most layer types, limited effects) |
| Affinity Photo | Excellent (most features) |
| Sketch | Basic (imports flattened or simple layers) |
| Figma | Basic (imports as flattened images) |
| Inkscape | Poor (only exports merged image) |
| Preview (macOS) | Merged image only (no layers) |
| Krita | Good (pixel layers, adjustments) |
Working with PSD — Essential Commands
ImageMagick
# Flatten PSD to JPEG (uses merged image)
convert input.psd -flatten output.jpg
# Extract specific layer by index
convert "input.psd[3]" layer3.png
# Convert all layers to separate files
convert input.psd layer_%d.png
# Get layer information
identify -verbose input.psd | grep -A5 "Image:"
ffmpeg (for thumbnailing)
# Extract thumbnail from PSD
ffmpeg -i input.psd -vframes 1 thumbnail.jpg
Python with Psd-tools
from psd_tools import PSDImage
psd = PSDImage.open('input.psd')
# Composite (flatten) the entire document
image = psd.composite()
image.save('output.png')
# Access individual layers
for layer in psd:
print(layer.name, layer.kind, layer.bbox)
if layer.has_pixels():
pil_image = layer.composite()
pil_image.save(f'{layer.name}.png')
PSD vs. PSB — Size Limits
| Attribute | PSD | PSB |
|---|---|---|
| Max dimension | 30,000 px | 300,000 px |
| Max file size | 2 GB | ~4 EB (exabytes) |
| Extension | .psd | .psb |
| Version code | 1 | 2 |
| Compatibility | All Photoshop versions | Photoshop CS and later |
Switch to PSB when working with:
- Large format print at high resolution (billboard, large format)
- Panorama stitching (multiple overlapping frames)
- Very high layer count composite images
Saving PSD Efficiently
PSD file size is dominated by layer pixel data. Strategies to reduce size:
- Merge layers that don't need to remain editable:
Ctrl+E(Merge Visible) or flatten groups - Delete hidden layers: Hidden layers still store pixel data
- Purge history states: Edit → Purge → Histories
- Use Smart Objects sparingly for large embedded content
- Maximize Compatibility off: File → Preferences → File Handling → uncheck "Maximize PSD and PSB File Compatibility" — removes the merged image (section 5), saving 20–40% file size at the cost of compatibility with non-Photoshop apps
Summary
PSD's comprehensive feature set — layers with non-destructive masks, adjustment layers, smart objects, text layers, vector shapes, and support for 1/8/16/32-bit depths and RGB/CMYK/Lab color modes — makes it the lingua franca of professional digital design. Its file structure, while large, systematically preserves every creative decision in an editable state. For inter-application exchange, convert PSD to TIFF (preserving maximum quality) or PDF (for print). For web delivery, export to JPEG, PNG, or WebP. The PSD itself should be treated as the master source file, never the delivery format.
Related conversions
Most teams that read this guide convert images in one of these directions: