PSD (Photoshop Document) format: cartographic editorial — OSM export for print graphics
PSD — Photoshop Document — is Adobe Photoshop's native format, alive since 1990 and the industry standard for layered raster graphics. Unlike a flat PNG or JPEG, PSD preserves the full editorial structure of a document: each raster group as a separate layer, masks (alpha + vector + clipping), smart objects, text blocks, adjustment layers (curves, levels, hue), blend modes (multiply, screen, overlay), and groups. For a cartographic editorial workflow this means that a Saint Petersburg district map can be opened by a designer who recolors roads to a brand color via a Hue/Saturation adjustment, adds labels via a text layer, and overlays a building photo through a smart object — all without losing the source geometry. On osm2cdr.ru psd_exporter.py after the F-0053 refactor (April 2026) bakes a real multi-layer PSD: 5 thematic groups (Water, Green, Buildings, Roads, Labels) render as transparent PNGs through QgsMapRendererParallelJob and assemble into a single .psd via the psd-tools library — the designer opens the file in Photoshop and sees a ready editorial structure without having to manually split a PNG render into layers.

History: Photoshop 1990 and the raster era
PSD's story starts before Adobe — in 1987 brothers Thomas and John Knoll wrote a program called Display for the Macintosh Plus that could show grayscale images on a black-and-white screen. The program evolved into ImagePro and, after a demo at Adobe, was licensed and renamed Photoshop. The first commercial release shipped on February 19, 1990 — Photoshop 1.0 for Macintosh, distributed on three 3.5-inch floppies.
Adobe Systems was by then a serious graphics-industry player — founded in 1982 by John Warnock and Charles Geschke (ex-Xerox PARC), with PostScript as its flagship product that revolutionized typesetting. Photoshop became the raster companion to the vector PostScript ecosystem, and PSD was designed as the program's native container.
Architecturally PSD inherited the Mac era's quirks: big-endian byte order (most significant byte first) — a legacy of the Motorola 68000 that ran the early Macintosh. A curious detail: even when Apple moved to Intel x86 (2006) and later to Apple Silicon (2020), Adobe didn't change PSD's byte order — too much existing tooling would break.
By 1996 (Photoshop 4.0) the format gained layers — a revolutionary feature that distinguished Photoshop from competitors. Photoshop 7.0 (2002) brought text layers with real font editing. CS2 (2005) introduced smart objects, letting designers embed external files as un-baked links. CS5 (2010) added content-aware fill. CC (2013) brought Creative Cloud sync. Every version extended PSD's structure, but base compatibility held — Photoshop 2024 opens PSDs from Photoshop 4.0.
In 2005 Photoshop CS introduced a second format — PSB (Photoshop Big), for files over 2 GB. Technically it's the same PSD but with 64-bit offsets in the header (instead of 32-bit) and a theoretical 4 exabyte limit. In practice PSB is used for huge compositions — movie posters at full resolution (8K × 12K at 32 bits per channel), scientific visualizations, cartographic atlases with 200+ layers.
What's inside a PSD file
PSD is a binary format with big-endian byte order. Structure of 5 sections, documented in the Adobe Photoshop File Formats Specification (last revision — November 2019):
1. File Header (26 bytes) — magic "8BPS", version (1=PSD, 2=PSB),
channels (1-56), height, width, bit depth (1/8/16/32),
color mode (Bitmap/Grayscale/Indexed/RGB/CMYK/Lab/Multichannel/Duotone)
2. Color Mode Data — palette for Indexed/Duotone (or 0 bytes otherwise)
3. Image Resources — non-pixel metadata:
thumbnail, ICC profile, EXIF, captions, grid/guides, slices,
layer comp data, print settings, version info
4. Layer & Mask Information — layers themselves:
layer count, per-layer: bounding rect, channel count, channel data,
blend mode, opacity, clipping, flags, name (Pascal string + Unicode),
masks, adjustment layers (curves/levels/hue/curves), smart object data
5. Image Data — flattened composite, "merged" view of all layers,
used by programs that don't parse layers (preview)
Each layer stores its pixel data as RLE-compressed per-channel (R, G, B, A separately). That allows opening a PSD with 100 layers and reading only the needed one without decompressing everything — critical for editorial workflows with heavy compositions.
Smart objects — a special layer type introduced in CS2 (2005). Inside a smart object lives the original file (PSD, AI, PDF, RAW, JPEG) at full resolution. On canvas Photoshop shows a downsampled preview, but export uses the original. That lets you scale or transform a smart object without quality loss — unlike regular raster layers.
Adobe keeps the PSD spec formally closed, but it published a reference document "Adobe Photoshop File Formats Specification" — enough to implement compatible readers. From it come: - psd-tools (Python) — main library for reading and writing PSD, used by Mikulas Dite - libpsd (C) — low-level parser - Pixie (Rust) — modern PSD/PSB reader/writer - PSDDocument (inside Affinity Photo) — full-fidelity R/W

Layers, blend modes, masks — anatomy of an editorial composition
PSD's main strength is its layered architecture. The cartographic editorial pipeline uses every part:
Raster layers. The base type — pixel data with opacity and blend mode. Each OSM category (water, green, buildings, roads, labels) becomes a separate raster layer — the designer hides, recolors, or edits independently.
Adjustment layers. Virtual layers that apply correction to layers beneath without destructive editing. Curves, Levels, Hue/Saturation, Color Balance, Vibrance — all these tools work as non-destructive layers. The entire map tint can be shifted with one adjustment without re-rendering.
Text layers. Vector layers with typography. In PSD text is stored as real text with font, size, kerning info — not rasterized. The designer edits labels, swaps fonts, changes color — no redraw.
Shape layers. Vector shapes (rectangle, ellipse, custom path) with fill and stroke. Also non-destructive — scale without quality loss.
Smart objects. Embedded external files. An osm2cdr.ru map can be embedded as a smart object inside a large composition (a 1×1.5 m poster) — updating the source PSD updates the smart object automatically.
Groups. Logical layer grouping. The OSM export creates 5 groups up front (Water/Green/Buildings/Roads/Labels) — the designer sees structure and operates on entire categories.
Masks. Three kinds: alpha mask (grayscale → opacity), vector mask (path → clip), clipping mask (lower layer → opacity reference). Let you hide parts of a layer locally without deleting pixel data.
Blend modes. 27 modes (Normal, Multiply, Screen, Overlay, Hard Light, Color Dodge, Difference, Hue, Saturation, Color, Luminosity, ...) — define how a layer's pixels combine with those below. Multiply darkens, Screen lightens, Color Dodge creates neon glow.
Color modes: RGB, CMYK, Lab — choosing for the target medium
PSD supports 8 color modes at varied bit depths:
- Bitmap (1-bit) — black & white only, for print masks
- Grayscale (8/16-bit) — gray tones, for monochrome publication
- Indexed (8-bit) — palette up to 256 colors, legacy web
- RGB (8/16/32-bit per channel) — standard screen and web
- CMYK (8/16-bit per channel) — four-color print (Cyan, Magenta, Yellow, Key/Black)
- Lab (8/16-bit per channel) — perceptual color, for color science
- Multichannel — arbitrary spot channels (Pantone etc.)
- Duotone — two-to-four spot inks, for classic typography
Editorial print typically uses CMYK 16-bit — gives exact match to print-shop inks without surprise color shifts at press. RGB 16-bit — for digital publishing (PDF magazines, web). Lab — rare, mostly for scientific color correction.
OSM2CDR exports RGB 8-bit by default (standard for web maps and preview), but in Photoshop the designer easily converts to CMYK via Image → Mode → CMYK Color before sending to the print shop.
PSD vs AI vs EPS vs PNG — raster or vector
A cartographic pipeline often uses all four at different stages. Understanding differences is critical:
| Parameter | PSD | AI | EPS | PNG |
|---|---|---|---|---|
| Nature | Raster (with vector text/shape) | Vector (PDF wrapper) | Vector (PostScript) | Raster (flat) |
| Layers | Yes (full hierarchy) | Yes (PDF layers) | No | No |
| Blend modes | 27 modes | Limited | No | Alpha only |
| Smart objects | Yes | No (linked only) | No | No |
| Text editing | Live text | Live text | Outlines only | Rasterized |
| CMYK | Yes | Yes | Yes | No |
| Block-size map | 30-150 MB | 1-6 MB | 1-8 MB | 0.5-3 MB |
| Best for | Editorial with photos | Vector finalization | Legacy print | Web preview |
A typical cartographic pipeline through all four: osm2cdr.ru renders PNG for web preview → the designer opens PSD for editorial work with photo overlay and color correction → imports financial-quality vector via AI for logo and vector annotations → delivers to print as EPS or PDF/X.
More on vector siblings — in the AI article and the EPS article. On PNG as web preview — in the PNG article.
Software for PSD
Adobe Photoshop. Native reader/writer. Paid Creative Cloud subscription (~23 USD/mo for the standalone Photoshop plan). Windows, macOS, iPad. Reference functionality — every feature of the PSD spec works perfectly. adobe.com/products/photoshop
Affinity Photo. Paid, one-time ~70 USD, no subscription. Windows, macOS, iPad. Opens and saves PSD with high accuracy: layers, adjustment layers, smart objects, text layers, blend modes — almost everything. Minimal differences from Photoshop but 10× lower price for full ownership. affinity.serif.com/photo
GIMP. Free, GPL, cross-platform. Opens PSD via built-in parser. Basic support: layers + alpha + opacity work. Smart objects, adjustment layers, blend modes — limited or absent. Good for viewing and basic editing, not full editorial. gimp.org
Krita. Free, GPL, cross-platform. Better than GIMP at PSD: text layers, group layers, some blend modes. Krita's main focus is digital painting, but as a PSD reader it works. krita.org
Photopea. Free (ad-supported) online editor in the browser. Strikingly close to Photoshop in UI and capability. Opens and saves PSD with high fidelity: layers, smart objects, text layers, most adjustment layers. Best free no-install alternative. photopea.com
Pixelmator Pro. Paid (~50 USD one-time), macOS only. Apple Silicon-native, opens and saves PSD with most features.
ImageMagick / Pillow. Command-line / Python libraries. Read PSD as a flattened image (composite from image data section). Don't work with layers. Good for batch PSD → PNG/JPEG/TIFF conversion.
psd-tools (Python). Free open-source library for full PSD parsing. Reads layer structure, exports individual layers, writes new PSDs. Used inside psd_exporter.py in OSM2CDR.
Pipeline in OSM2CDR: F-0053 refactor
Before April 2026 OSM2CDR's PSD export was flat — we rendered the map as a regular PNG and renamed it to .psd via ImageMagick. It opened in Photoshop, but as a single layer — no editorial structure. Designers complained: "if it's a PNG, why pay for PSD?"
The F-0053 refactor (April 2026) rewrote psd_exporter.py to produce real layered output. The algorithm:
Step 1: Layer grouping. OSM layers are grouped into 5 thematic groups by cartographic role: - Water — natural=water, waterway=river/canal/stream - Green — leisure=park, natural=wood/forest, landuse=grass - Buildings — building= with all subcategories - Roads — highway= split into motorway/primary/secondary/residential - Labels — all text labels (place names, street names, POI names)
Step 2: Per-group parallel rendering. For each group QgsMapRendererParallelJob runs with a transparent background. Each group renders to a separate transparent PNG in a memory buffer (no disk write).
Step 3: PSD assembly via psd-tools. Through psd-tools a PSD document is built with the right structure: - File header (RGB, 8-bit, target dimensions) - 5 raster layers (one per group) with RLE compression - Layer naming in Unicode (supports Cyrillic / Chinese names) - Composite preview (flattened image for programs without layer support) - ICC profile sRGB (editorial standard)
Step 4: Fallback on error. If psd-tools fails (corrupt geometry, OOM on huge bbox) — fallback to flat single-layer PSD via ImageMagick. The designer still gets a working file, just without layers.
Result: the designer opens the PSD in Photoshop and sees 5 ready layers in the Layers panel — no need to manually select and mask. Editorial workflow time for a magazine map dropped from ~40 minutes (preparation + render + slicing a PNG into layers) to ~10 minutes (open PSD + apply brand styles via adjustment layers).

Use cases for editorial cartography
Magazine map designer. National Geographic-style thematic map for an article on a district. Opens PSD, hides/recolors groups, adds smart objects with landmark photos, applies custom typography via text layers, exports PDF/X for the print shop. 60-90 minute workflow.
Banner ad designer. District map for real estate advertising — social media banner. PSD with editorial styling, brand colors via Color Overlay on the buildings group, smart object for the company logo, export to PNG/JPEG at the required sizes (Facebook, Instagram, Twitter — different formats from a single PSD).
Atlas illustrator. Thematic map in an atlas (city guidebook, historical atlas, tourist handbook). PSD with 20+ layers — base map + 5-10 themed overlays (transit, dining, history, photos). Each atlas page is a separate PSD with consistent layer naming for batch processing.
Cartographic artist. Decorative "atmospheric" district map for commercial art prints (Stamen Watercolor style, neon-noir, vintage atlas). Photoshop's tools are the killer feature: brushes, custom blend modes, photo-based textures, painted text. Without a layered PSD from osm2cdr.ru, such a composition would have to start from scratch.
Social media graphics. City map for a tourism Instagram account. A PSD template with a ready composition adapts to different cities — only the base map slot (smart object) is swapped.
Strengths and weaknesses
Strengths. Full editorial flexibility — separate layers, blend modes, adjustment layers, smart objects, text editing. Industry standard in design and publishing (magazines, books, advertising). Preserves non-destructive editing — any layer can be revisited without re-rendering. CMYK support for print. Backward compatibility to Photoshop 4.0 (1996). 16/32-bit per channel for HDR. Photopea offers a free alternative without Photoshop.
Weaknesses. Closed proprietary format — full fidelity only in Photoshop / Affinity Photo / Photopea. Files are large (30-150 MB for an editorial map) — layers are compressed but it's still raster pixel data. No vector (apart from text/shape layers) — raster nature means zoom-in shows pixels. Not suited for web delivery (needs conversion to PNG/JPEG). Sub-2 GB limit — huge compositions need PSB (not every program opens it). GIMP/Inkscape — incomplete support.
Pitfalls
Big files. A 2×2 km district map at A3 300 DPI with 5 layers comes out at 80-150 MB. Photoshop opens it, but operations lag on older machines. Solution: drop DPI to 150 for preview, raise to 300 only before final export.
Fonts not embedded. Unlike PDF, PSD doesn't embed fonts in the file. If the recipient lacks the font — Photoshop will ask for a substitute. For cross-platform editorial — use universally available fonts (Helvetica, Arial, Roboto) or outline text before sending.
CMYK conversion. OSM2CDR exports RGB. The designer must manually convert via Image → Mode → CMYK Color before sending to print. Color shift is minimal but non-zero — soft proof in CMYK via View → Proof Setup before finalizing.
Smart objects not embedded by default. If a smart object is linked (not embedded), moving the PSD to another machine breaks the reference. For archival, always embed (Smart Object → Convert to Embedded).
PSB vs PSD. Files >2 GB auto-promote to PSB. Affinity Photo, GIMP, Krita — not all open PSB equally well. If the final recipient isn't Photoshop — split the composition into smaller PSDs.
FAQ
Does our PSD open in GIMP? Basically yes — layers read, opacity works. But adjustment layers, smart objects, and many blend modes aren't supported. For full editorial we recommend Photoshop, Affinity Photo, or Photopea.
Does PSD work on iPad? Yes: Photoshop iPad (full Adobe subscription), Affinity Photo iPad (~25 USD one-time), Procreate with limits. 80-150 MB files open but operations are slower than on desktop.
Photopea — a free alternative? Yes, photopea.com — a browser editor strikingly close to Photoshop. Opens our PSDs with full layer structure, supports most adjustment layers and blend modes. Saves back to PSD. Main downside — ads in the free version, and for huge files (>500 MB) the browser may kill the tab.
Can PSD be batch-processed? Yes, via several paths: Adobe Script (JavaScript/ExtendScript for Photoshop), Photoshop Actions + Image Processor, or Python through psd-tools (for programmatic read/write). A typical cartographic batch pipeline: osm2cdr.ru exports 50 district PSD maps → a Python script via psd-tools recolors the building layer to a brand color → batch export to PNG/PDF.
PSD vs SVG — which to pick for editing? PSD — for raster editorial with photo effects, textures, brushes. SVG — for pure vector without raster effects. If the map will print as part of a poster with photography — PSD. If the map goes on a site or needs precise vector editing — SVG.
Related
- AI — Adobe Illustrator format for designers
- EPS — Encapsulated PostScript for print
- PNG — web format and preview standard
- PSD maps as Photoshop art projects
- PSD format landing
Sources
- Adobe Photoshop File Formats Specification — adobe.com/devnet-apps/photoshop/fileformatashtml
- Paul Bourke, PSD/PSB format — paulbourke.net/dataformats/psdpsb
- psd-tools (Python library) — github.com/psd-tools/psd-tools
- libpsd (C library) — sourceforge.net/projects/libpsd
- Photopea online editor — photopea.com
- Wikipedia, Adobe Photoshop — en.wikipedia.org/wiki/Adobe_Photoshop