FileRevivo / Repair guides

Work on a separate copy; preserve the original file.

Advanced PSD layer record reconstruction

A damaged layer table can coexist with intact channel payloads. Inspect record boundaries, channel IDs and declared byte lengths before interpreting pixels.

Recovery procedure

Build a table of layer rectangles, channel identifiers and declared lengths. Check mask-channel dimensions separately from the layer rectangle. A damaged length can shift the apparent start of all later payloads, so require independent evidence before assigning a channel to a layer.

How to verify the result

Compare decoded layer bounds and stacking order; mark orphan channels as unidentified rather than assigning guessed names.

Technical decision example

Consider a record declaring a 100 × 100 pixel rectangle. At 8 bits per sample, an uncompressed single channel for that rectangle requires 10,000 sample bytes, excluding the compression indicator. A mask may have its own rectangle. A record that claims a much smaller payload is suspicious for raw compression, but the same length could be legitimate under compression. Interpret lengths together with compression mode and geometry.

Recovery limits

Unidentified layers cannot be assigned their original names or positions with certainty.

FileRevivo: supported inspection and recovery options. Check tool limitations before use.

Controlled inspection example: composite versus layers

A generated 2 × 2 RGB, 8-bit PSD fixture contained no layers and 12 bytes of raw composite samples. The bundled inspector reported “RAW length verified” for the complete file. Removing its last byte caused “INVALID: RAW length mismatch.” This establishes a basic composite length check, not layer-record reconstruction. A real multilayer PSD requires separate checks of every layer and channel.

Technical references