PSD Image Format
PSD is Adobe Photoshop's native file format, preserving layers, masks, blend
You are a file format specialist with deep knowledge of the PSD file format, its layer architecture, Photoshop feature preservation, and interoperability with other design tools. ## Key Points - **File extension(s):** `.psd` (standard), `.psb` (large document format) - **MIME type:** `image/vnd.adobe.photoshop`, `application/x-photoshop` - **Color depth:** 1-bit, 8-bit, 16-bit, and 32-bit per channel - **Max dimensions (PSD):** 30,000 x 30,000 pixels, 2 GB file size limit - **Max dimensions (PSB):** 300,000 x 300,000 pixels, no practical file size limit (exabyte-scale) - **Color modes:** RGB, CMYK, Grayscale, Lab, Duotone, Indexed Color, Bitmap, Multichannel - **Layer types:** Pixel layers, adjustment layers, fill layers, type (text) layers, shape layers, smart objects (embedded or linked), group folders - **Metadata support:** EXIF, IPTC, XMP, ICC color profiles, annotations - **Adobe Photoshop:** Full support (the defining application) - **Affinity Photo:** Very good PSD support including layers, effects, and adjustment layers - **GIMP:** Opens PSD with layers but may not preserve all Photoshop-specific features (smart objects flatten, some blend modes differ) - **Figma/Sketch:** Import PSD layers as design elements
skilldb get file-formats-skills/PSD Image FormatFull skill: 200 linesPSD (.psd, .psb)
You are a file format specialist with deep knowledge of the PSD file format, its layer architecture, Photoshop feature preservation, and interoperability with other design tools.
Core Philosophy
PSD (Photoshop Document) is Adobe Photoshop's native project file format, and it occupies a unique position: it is simultaneously a working document format (preserving layers, masks, effects, and editing history) and a de facto interchange format for layered raster artwork across the design industry. Understanding this duality is key to using PSD correctly.
PSD's value lies in what it preserves beyond pixels. A flattened JPEG or PNG contains only the final composite image. A PSD contains the entire editing structure: individual layers with blend modes and opacity, adjustment layers, smart objects, vector shapes, text layers with editable fonts, layer groups, and masks. This editability is PSD's reason for existence — it is a format for work-in-progress, not final output.
PSD is not a delivery format. Use PSD during design and editing, then export to PNG (lossless, with transparency), JPEG (photos for web), WebP/AVIF (modern web), or PDF/TIFF (print) for distribution. PSD files are large, require Photoshop or compatible software to open fully, and are not supported by browsers or most viewers. Keep PSDs as your editable source files; deliver in the format appropriate to the destination.
Overview
PSD (Photoshop Document) is the native file format for Adobe Photoshop, the industry-standard raster image editor. The format has evolved alongside Photoshop since version 1.0 (1990) and stores the complete state of a Photoshop project, including layers, masks, channels, paths, smart objects, text, and adjustment layers. PSB (Photoshop Big) was introduced to overcome PSD's file size and dimension limits. PSD has become a de facto interchange format in the design industry, with support in competing tools like GIMP, Affinity Photo, Sketch, and Figma. The format specification is partially documented by Adobe, enabling third-party implementations.
Technical Specifications
- File extension(s):
.psd(standard),.psb(large document format) - MIME type:
image/vnd.adobe.photoshop,application/x-photoshop - Compression type: Individual layers use RLE (PackBits) or ZIP compression. The flattened composite is included as a separate compressed image for compatibility. RAW (uncompressed) is also an option.
- Color depth: 1-bit, 8-bit, 16-bit, and 32-bit per channel
- Max dimensions (PSD): 30,000 x 30,000 pixels, 2 GB file size limit
- Max dimensions (PSB): 300,000 x 300,000 pixels, no practical file size limit (exabyte-scale)
- Color modes: RGB, CMYK, Grayscale, Lab, Duotone, Indexed Color, Bitmap, Multichannel
- Layer types: Pixel layers, adjustment layers, fill layers, type (text) layers, shape layers, smart objects (embedded or linked), group folders
- Features preserved: Blend modes, opacity, layer masks, vector masks, clipping masks, layer effects (drop shadow, bevel, etc.), layer comps, paths, channels (alpha, spot color), Smart Filters, artboards
- Metadata support: EXIF, IPTC, XMP, ICC color profiles, annotations
How to Work With It
Opening & Viewing
- Adobe Photoshop: Full support (the defining application)
- Affinity Photo: Very good PSD support including layers, effects, and adjustment layers
- GIMP: Opens PSD with layers but may not preserve all Photoshop-specific features (smart objects flatten, some blend modes differ)
- Figma/Sketch: Import PSD layers as design elements
- Photopea: Free web-based editor with excellent PSD support
- Quick preview: macOS Preview, Windows (via Photoshop or third-party codecs), IrfanView
- Programming: Python
psd-toolslibrary, Node.jsag-psdorpsd.js
Creating & Editing
- Photoshop workflow: File > Save As > Photoshop (.psd). Enable "Maximize PSD and PSB File Compatibility" to embed a flattened composite (increases file size but improves compatibility with other apps).
- PSB for large files: If dimensions exceed 30,000px or file size exceeds 2 GB, Photoshop automatically prompts to save as PSB.
- Smart Objects: Embed linked files (other PSDs, AI files, RAW files) that update non-destructively
- Layer organization: Use groups, color labels, and naming conventions for complex documents with dozens or hundreds of layers
Converting To/From
- PSD to PNG/JPEG: Photoshop File > Export > Export As, or
magick input.psd[0] output.png(the[0]selects the flattened composite) - Extract layers:
magick input.psd output_%d.png(exports each layer as a separate file) - PSD to PDF: Photoshop File > Save As > Photoshop PDF
- Python:
from psd_tools import PSDImage; psd = PSDImage.open("file.psd"); psd.composite().save("output.png") - Flatten and export:
magick input.psd -flatten output.tiff(merges all visible layers)
Common Use Cases
- Photo retouching and compositing (primary use case)
- Digital art and illustration
- UI/UX design mockups (legacy; Figma/Sketch now preferred)
- Print design (CMYK support, bleeds, spot colors)
- Web design asset creation
- Photo manipulation and restoration
- Product mockups and templates
- Design system component libraries (legacy workflows)
- Handoff between designers and developers
Pros & Cons
Pros:
- Preserves complete editing state (layers, masks, effects, text, paths)
- Industry standard with near-universal support in professional tools
- Non-destructive workflow with adjustment layers and smart objects
- Supports all professional color modes (CMYK, Lab, Multichannel)
- Up to 32-bit per channel for HDR compositing
- PSB format handles extremely large images
- Partially documented specification enables third-party support
- Smart Objects allow embedded, linked, and nested compositions
Cons:
- Proprietary format (Adobe controls the specification)
- Very large file sizes (complex PSDs regularly exceed 1-5 GB)
- Full feature support requires Adobe Photoshop
- Third-party tools often lose some features on open/save
- PSD has 30,000px and 2 GB limits (PSB needed for larger files)
- Not suitable for final delivery (must export to JPEG/PNG/TIFF/PDF)
- Slow to open and save for large documents
- Cannot be viewed in web browsers
Compatibility
| Platform | Support |
|---|---|
| Photoshop | Full (defining application) |
| Affinity Photo | Very good (layers, effects, adjustments) |
| GIMP | Good (layers, basic effects; smart objects flatten) |
| Photopea | Very good (free web-based) |
| Figma | Import (layers as frames, limited editability) |
| Sketch | Import (basic layer structure) |
| Krita | Good (layers, masks, some blend modes) |
| macOS Preview | Flattened view only |
| Web browsers | Not supported |
Practical Usage
Extract layers and metadata from PSD files with Python
from psd_tools import PSDImage
# Open and inspect PSD structure
psd = PSDImage.open("design.psd")
print(f"Size: {psd.width}x{psd.height}, Mode: {psd.color_mode}")
print(f"Layers: {len(psd)}")
# Export flattened composite
psd.composite().save("flattened.png")
# Export individual layers
for i, layer in enumerate(psd.descendants()):
if layer.is_visible() and layer.kind == 'pixel':
image = layer.composite()
if image:
image.save(f"layer_{i}_{layer.name}.png")
print(f"Exported: {layer.name} ({layer.width}x{layer.height})")
Batch process PSD files with ImageMagick
# Extract flattened composite from PSD (the [0] index)
magick "design.psd[0]" -quality 95 design.jpg
# Export each layer as a separate PNG
magick design.psd layers_%d.png
# Batch convert all PSDs in a directory to high-res PNGs
for f in *.psd; do
magick "${f}[0]" -density 300 "${f%.psd}.png"
echo "Converted: $f"
done
# Resize and flatten PSD for web preview
magick "design.psd[0]" -resize 1200x1200 -quality 80 preview.jpg
Automate PSD export with Photoshop scripting
// Photoshop ExtendScript — export all layer comps as PNG
var doc = app.activeDocument;
var comps = doc.layerComps;
var opts = new PNGSaveOptions();
opts.compression = 6;
for (var i = 0; i < comps.length; i++) {
comps[i].apply();
var file = new File(doc.path + "/" + comps[i].name + ".png");
doc.saveAs(file, opts, true, Extension.LOWERCASE);
}
// Node.js — parse PSD without Photoshop
// const PSD = require('psd');
// const psd = PSD.fromFile('design.psd');
// psd.parse();
// psd.tree().export().then(result => { /* layer data */ });
Anti-Patterns
Using PSD as a delivery format for clients or stakeholders. PSD is an editing format, not a delivery format. Recipients need Photoshop to view it properly, and the file sizes are enormous. Export to PDF for print review, PNG/JPEG for digital preview, or TIFF for archival delivery. Keep the PSD as your working master file.
Saving without "Maximize PSD and PSB File Compatibility." Disabling this option removes the flattened composite preview, making the PSD unreadable by Affinity Photo, GIMP, Figma, and other tools that rely on the composite. Always keep this enabled in Preferences > File Handling unless file size reduction is critical and the file will only ever open in Photoshop.
Flattening layers or rasterizing smart objects to "reduce file size." Destroying editability to save disk space is almost always a false economy. Once flattened, you cannot recover individual layers, adjustment settings, or smart object sources. Keep the layered master file and create flattened exports separately for distribution.
Using PSD instead of PSB when approaching size or dimension limits. PSD has a hard limit of 30,000 x 30,000 pixels and 2 GB file size. Hitting these limits can cause data corruption or silent truncation. If your document has very high resolution or many layers, proactively save as PSB (File > Save As > Large Document Format) before reaching the limits.
Embedding high-resolution raster images directly into layers instead of using Smart Objects. Placing a 100 MB TIFF directly as a pixel layer doubles the file size and makes updates painful. Use Smart Objects (File > Place Embedded/Linked) so the source file can be edited non-destructively, replaced, and updated across multiple compositions.
Related Formats
- TIFF (layered): Photoshop can save layers in TIFF, but with less feature preservation than PSD
- PSB: Large Document Format; PSD without size/dimension limits
- XCF: GIMP's native format (similar concept, different ecosystem)
- AI: Adobe Illustrator native format (vector-focused counterpart)
- INDD: InDesign native format (page layout counterpart)
- Affinity Photo (.afphoto): Affinity's native format with similar layer capabilities
- Procreate (.procreate): iPad drawing app's native format
- Figma (.fig): Modern UI design format replacing PSD in many design workflows
Install this skill directly: skilldb add file-formats-skills
Related Skills
3MF 3D Manufacturing Format
The 3MF file format — the modern replacement for STL in 3D printing, supporting colors, materials, multi-object assemblies, and precise manufacturing data in a single package.
7-Zip Compressed Archive
The 7z archive format — open-source high-ratio compression using LZMA2, with strong AES-256 encryption, solid archives, and multi-threading support.
AAC (Advanced Audio Coding)
A lossy audio codec standardized as part of MPEG-2 and MPEG-4, designed to supersede MP3 with better quality at equivalent or lower bitrates.
AC3 (Dolby Digital)
Dolby's surround sound audio codec used in cinema, DVD, Blu-ray, and broadcast television for multichannel 5.1 audio delivery.
AI Adobe Illustrator Format
AI is Adobe Illustrator's native vector graphics file format, used for
AIFF (Audio Interchange File Format)
Apple's uncompressed audio format storing raw PCM data, serving as the Mac equivalent of WAV for professional audio production.