Skip to content

The working copy for large images ​

  1. The browser decodes the original once, in WebAssembly, and downscales it to a deterministic working copy. Its longest side is workingCopy.maxSide (2048 by default). Up to limits.maxClientMegapixels (16 by default) the browser also keeps the full image; above it, the browser keeps only the working copy. An original above limits.maxClientBytes (50e6 by default) does not load.
  2. Every edit previews on the working copy through the same WASM core.
  3. Export or download renders in the browser when the full image is resident.
  4. Above the megapixel limit the browser cannot export. export() and download() fail with NOT_RESIDENT, and the element disables its Export and Download buttons. Your application renders the original with @sealpixel/render instead.
Edit on the working copy, render on the originalThe editor reads the original once and builds a working copy of at most 2048 pixels on its long side. Every edit previews on the working copy. Up to limits.maxClientMegapixels, 16 by default, the browser exports at full resolution. Above it, the browser cannot export: your server takes the original and the log, and @sealpixel/render renders the original.EDITOR IN THE BROWSER · SEALPIXELYOUR SERVEROriginalread onceWorking copymax. 2048 pxup to16 MP?maxClientMegapixelsBrowser exportfull resolutionyesEvery edit previews on the working copy.noOriginal + log{ log, index }@sealpixel/renderrenders the originalRendered fileyour response or storage
The tinted zone is the editor in the browser. The dashed zone is your server. 16 MP is the default of limits.maxClientMegapixels, and 2048 px is the default of workingCopy.maxSide.

The editor builds the working copy itself and never sends the image to a server.

Above the limit ​

The edit log describes the full resolution, whatever the browser holds. Take it from the editor:

ts
const { log, index } = editor.getEditLog();

Send the original and { log, index } to your server in the way your application works. There, createRenderer renders the full resolution with the same core, and the hash matches a browser export of the same image. The log's source.hash is the sha256 of the original the editor loaded, so the renderer refuses a different file.

estimateMemoryMB(width, height) tells you the memory a render needs. See Render on your server for the contract, and Edit in the browser, render on your server for the whole flow.