🍱 Lunchbox Hands

psd

Opening a PSD Without Photoshop: Why Maximize Compatibility Matters

A PSD opens cleanly outside Photoshop only if it was saved with Maximize Compatibility. What's inside the file, why viewers show blank or wrong images, and PSD vs PSB.

Someone sends you a .psd, you don’t have Photoshop, and the preview on your machine is blank, or it looks different from the screenshot they sent. Most of the time the cause is one checkbox the sender clicked (or dismissed) when they saved. Whether a PSD opens correctly outside Photoshop depends mostly on one thing: whether the file contains a ready-made flattened copy of the image. “Maximize Compatibility” controls that. If the flattened copy is there, any reader can show the file exactly. If it isn’t, the reader has to redo Photoshop’s compositing itself, and nothing outside Photoshop does that perfectly. Below: what’s inside a PSD, why that option matters, where PSB fits in, and what free viewers, including our PSD to PNG converter, can do with a layered file.

Everything about the format below comes from Adobe’s Photoshop File Formats Specification, the Library of Congress’s format description for the Photoshop family, and the source of ag-psd 31.0.2, the open-source parser our tool uses.

What a PSD actually contains

Adobe’s spec says a Photoshop file “is divided into five major parts,” always in this order:

SectionWhat’s in it
File headerSignature, version, channel count, width, height, bit depth, color mode. Fixed length.
Color mode dataThe palette for Indexed images, duotone data for Duotone, empty for most files.
Image resourcesMetadata blocks: resolution, guides, the thumbnail, and a version-info record.
Layer and mask informationOne record per layer (name, bounds, opacity, blend mode, flags, masks, effects, text and smart-object data), then each layer’s own pixels.
Image dataThe merged image: the whole document flattened into a single bitmap.

The last section is the important one. The spec calls it the section where “the complete merged/composite image resides,” stored in planar order (“first all the red data, then all the green data, etc.”) and either raw, RLE-compressed, or ZIP-compressed with or without prediction.

The header is small enough to read by hand. Here are the first 26 bytes of a 1920×1080, 8-bit RGB document with transparency, built with the same header parser our converter uses:

38 42 50 53  00 01  00 00 00 00 00 00  00 04  00 00 04 38  00 00 07 80  00 08  00 03
└─ "8BPS" ┘  ver 1  └── reserved ───┘  4 ch   h = 1080     w = 1920     8-bit  RGB

8BPS is the file’s magic number: the fixed bytes that identify the format no matter what the file extension says. (If magic numbers are new to you, our post on file signatures explains how programs use them.) Version 1 means PSD and version 2 means PSB. Height comes before width. The spec lists the color mode codes as Bitmap 0, Grayscale 1, Indexed 2, RGB 3, CMYK 4, Multichannel 7, Duotone 8 and Lab 9, and the allowed bit depths as 1, 8, 16 and 32 bits per channel.

What “Maximize Compatibility” actually does

When you save a layered PSD, Photoshop offers to “Maximize PSD and PSB File Compatibility.” The Library of Congress describes the option as a way to “incorporate a composite version of the layered image to be read by other applications.” Adobe’s spec states what happens when it’s off:

If maximize compatibility is unchecked then the merged/composite is not created and the layer data must be read to reproduce the final image.

With the option on, the image data section holds the real flattened picture. Anything that can parse the header and decompress one bitmap can show the document pixel for pixel, with every blend mode, adjustment layer, layer style and smart filter already applied, because Photoshop did that work before saving.

With the option off, that flattened picture doesn’t exist, and “the layer data must be read to reproduce the final image.” A reader then has to apply every layer in stack order, with every blend mode, mask, clipping group, effect and adjustment, the way Photoshop does. That’s why a PSD can look right on the designer’s machine and wrong or blank everywhere else.

You can tell which case you have. The image resources section includes a version-info record (resource ID 1057). The spec lists its fields as “4 bytes version, 1 byte hasRealMergedData,” followed by writer and reader names. Our converter reads that hasRealMergedData byte. When it’s false, the tool treats whatever sits in the image data section as a placeholder rather than the real picture.

The cost is file size (layers plus a full-resolution flattened copy), but for a file going to someone without Photoshop, turn it on anyway.

What our converter does in each case

The decision logic (a function called chooseSource in our source) is short:

  1. If the file has a merged image and hasRealMergedData isn’t false, use the merged image. This result is exact.
  2. Otherwise, if any visible layers have pixels, rebuild the image from them.
  3. Otherwise, use whatever merged image exists, with a warning that it may be blank.

When both sources exist, an “Image source” menu lets you choose between “Saved composite (exact)” and “Rebuild from visible layers,” so you can compare them yourself.

The rebuild is a deliberately simple compositor. It stacks visible layers from the bottom up using Photoshop’s Normal blend and each layer’s opacity (standard “source-over” on straight alpha). It skips hidden layers, everything inside hidden groups, and adjustment layers. It does not reproduce blend modes (Multiply, Screen, Overlay and the rest), layer masks, clipping masks, layer effects such as drop shadows, strokes and glows, or adjustment layers. It also counts the visible layers that use any of those and tells you how many there are, so you know how far the rebuild might be from what Photoshop shows.

There’s one subtler difference, which is how group opacity is handled. In Photoshop, a group set to 50% opacity is flattened first and then faded as a single unit. Our compositor instead multiplies the group’s opacity into each child layer. That gives the same result when the children don’t overlap, and a different one when they do. Here’s a single pixel, computed with our lib: a white background, then a group at 50% containing an opaque red layer under an opaque blue layer.

MethodStepsResulting pixel (RGB)
Photoshop (group flattened first)Group = blue, then 50% blue over white128, 128, 255
Our rebuild (opacity pushed to children)50% red over white, then 50% blue over that128, 64, 192

A light blue in Photoshop comes out purple in the rebuild. The tool counts a visible group faded below 100% the same way it counts a mask or a blend mode, so a file like this one shows a non-zero “will differ from Photoshop” count. That kind of error is why the tool labels rebuilt images as approximate and why the fix is always the same: re-save the file in Photoshop with Maximize Compatibility on. Then the converter reads the stored composite and does no compositing at all.

Color modes and bit depths

The header tells a reader in a few bytes whether it can decode the file. ag-psd 31.0.2 reads four color modes: its supportedColorModes list in psdReader.js is Bitmap, Grayscale, RGB and Indexed, and all of them are converted to RGB. For anything else it throws Color mode not supported. (The Limitations section of the ag-psd README is behind its code on this. It still says Indexed, 16-bit and PSB are unsupported, but the reader source has an Indexed decode path, 16- and 32-bit buffers and PSB handling, and our converter accepts those files.)

Our converter checks the header before loading the parser at all, so an unsupported file fails immediately with an instruction instead of a stack trace:

Header saysWhat happens
RGB, Grayscale, Indexed, BitmapDecoded and converted to RGB
CMYK, Lab, Duotone, MultichannelRejected: “In Photoshop choose Image → Mode → RGB Color, save, and try again.”
16 bits per channelScaled to 8-bit: each value ÷ 257, rounded (65535 → 255, 32768 → 128)
32 bits per channel (HDR)Photoshop stores linear-light floats, so we apply the sRGB transfer curve (0.18 → 118, 0.5 → 188); alpha stays linear
Width or height above 30,000 (PSD) or 300,000 (PSB)Rejected as probably damaged, since the format doesn’t allow it

The 32-bit conversion is a straight transfer curve with no tone mapping, so it will be close to Photoshop’s HDR toning but not identical. CMYK print files, which are common in agency work, have to be converted to RGB in Photoshop (or another editor that reads CMYK PSDs) before our tool can open them.

PSD vs PSB

PSB, the “Large Document Format,” is the same format with bigger fields. The spec says it is “identical to the Photoshop native format in many ways,” with certain length fields widened to 8 bytes, and that it “supports documents up to 300,000 pixels in any dimension. All Photoshop features, such as layers, effects, and filters, are supported.”

PSDPSB
Header version12
Max width/height30,000 px300,000 px
Max file size2 GBup to 4 exabytes
Magic bytes8BPS8BPS (same)

The pixel limits come from the spec’s header table. The file-size figures come from the Library of Congress description: PSD has “a length limit of two gigabytes,” while PSB file sizes “can range up to 4 exabytes.” Adobe’s spec doesn’t give byte limits, so we’re citing LoC for those.

Our converter opens both. The practical limit is your browser, not the format. A decoded image needs 4 bytes per pixel (RGBA), so a 6000×4000 document needs about 92 MB for the flattened image alone, and a maximum-size 30,000×30,000 PSD would need 3.6 GB before counting any layers. ag-psd’s own README warns that “even valid PSD files could require terabytes of memory to be decompressed into bitmaps,” and its reader has a memory limit (2 GB by default). Our tool warns you before decoding any file over 150 MB. If the full decode hits the memory limit, it retries with the flattened image only. The layer tree still loads, but individual layer export is turned off for that file.

Layers: the tree and the zip export

Our converter shows the tree in the same order as Photoshop’s Layers panel (top of the stack first, groups before their contents, indented by depth), and each row shows:

  • visibility: visible, hidden, or “in hidden” (the layer is on but a parent group is off)
  • kind: Group, Text, Adjustment, Smart object, Shape, Pixel or Empty
  • bounds and position, e.g. 1200×300 at 360, 90
  • opacity below 100%, any non-Normal blend mode, and markers for mask, clipped and fx

Every layer that contains pixels gets its own PNG button. “Export layers (.zip)” saves all of them, and the filenames are zero-padded in stack order (007 Logo _ final_.png), so the zip listing sorts the same way as the Layers panel. Characters that aren’t allowed in filenames, such as / and ?, become underscores. By default each PNG is cropped to the layer’s own bounds. Tick Full canvas size to place each layer at its original position on a transparent, document-sized canvas, which is easier to reassemble in another editor. Include hidden adds layers whose eye is off.

An exported layer holds that layer’s raw pixels at full opacity. Masks, effects and blend modes aren’t applied, and adjustment and empty layers have no pixels, so they have nothing to export.

What other free options do

  • macOS Preview. The Library of Congress lists Apple Preview with the note “images are flattened, which does not allow for layer manipulation.” It shows the composite, so a file saved without Maximize Compatibility is where Preview lets you down.
  • GIMP. GIMP imports PSD layers and does its own compositing. When the GIMP team added clipping-layer support in 2.99.10, they wrote that the result matches “the PSD merged image unless there are other PSD elements in play that we don’t handle yet.” That’s an honest description of every layer-based reader, ours included.
  • Photopea. A browser-based editor built around PSD. Its documentation says it “uses the PSD format as the main format for storing image documents” and that it “runs completely in your device… It does not upload any of your files.” Use it when you need to edit the layers, not just see them.
  • Our converter. Read-only: it views, flattens and exports. It runs entirely in your browser. The PSD decoder loads on the page, the PNG or JPG is encoded by your browser’s canvas, and nothing is uploaded.

Practical checklist

If you’re sending a PSD to someone without Photoshop, save it with Maximize Compatibility on, and convert CMYK to RGB if they only need to look at it. If you’ve received one, drop it into the PSD to PNG converter and check for the amber note. If there isn’t one, you have Photoshop’s own flattened image and the result is exact. If the note says the image was rebuilt from layers, ask the sender to re-save it with Maximize Compatibility on.

Pick PNG for anything with text, sharp edges or transparency. Pick JPG (saved at 92% quality, with transparent areas filled with white) for photographic artwork. PNG vs JPG vs WebP vs AVIF covers that choice in more detail. After exporting, the image compressor can shrink a large flattened PNG into WebP or JPEG, and the image format converter handles PNG, JPEG and WebP conversions for a batch of exported layers. If the designer sent vector artwork as SVG instead of a PSD, the SVG to PNG converter is the equivalent tool, and this post on blank SVG exports explains its own “why is it empty” problem.