A .psd file

A Photoshop file (.psd, version 1) shows its facts, its flattened preview and its layer list, read from the bytes with no tool and no unpacking to disk. Code: src/web/render/psd-read.ts (readPsd, readPsdHeader, pure), src/web/render/psd.ts (the page psd), src/tui/ui/psd-note.ts (the terminal psdNote).

What is shown

Limits

LimitValueWhy
Read whole5 MB (READ_CEILING)The preview is an inline PNG data URI, up to 4 MP × 4 bytes of page, so the page stays light.
Preview8-bit RGB, up to 4 megapixels (MAX_PIXELS)No buffer is allocated until the body holds the bytes the header and the RLE table claim. The worst honest file, 4 MP of one colour in about 200 KB, costs 28 MB of buffers and a 4 MP PNG encode per view.
Layers listed200 (LAYER_CAP)The rest are walked and counted; the count is the records that parse, never the file's claim.

A file over 5 MB is not sent to the binary view: only its first bytes are read, the 26-byte header gives size, mode and channels, and the page says no preview and no layer list. Download streams at any size.

Fallbacks

A file that is not version 1, has an impossible header, or is cut short keeps the binary view. Layers stop at the first record that does not parse, and the count says how many did; the header facts still show. Every length is checked against what is left before it is read.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs