
A 1,000 × 20,000 screenshot contains 20 million pixels. In an uncompressed RGBA Canvas, the raw pixel buffer alone is roughly 80 million bytes before temporary canvases, decoded source images, undo snapshots, PDF data, and browser overhead are counted. File size on disk is therefore a poor estimate of editing memory.
Screenshot PDF version 0.0.13 uses device-aware pixel and history budgets to reduce crashes on lower-memory systems while retaining more detail and undo capacity on stronger devices. This article explains those current values and the reasoning users can apply to any browser-based image workflow.
PNG and JPEG compress repeated or predictable visual information. A 4 MB PNG can expand into a much larger pixel buffer after decoding. The first calculation for a screenshot is:
pixel area = width × height
A rough lower-bound buffer estimate is:
RGBA bytes = width × height × 4
At 32 million pixels, one raw buffer is about 128 MB. A browser operation may temporarily hold the decoded image, destination Canvas, cropped Canvas, preview, and undo state at the same time. Actual memory use is implementation- and browser-dependent, so the formula is planning guidance rather than a promise.
The editor reads the browser's navigator.deviceMemory hint when available and otherwise assumes a conservative middle value. Its Canvas pixel limits are:
| Reported device memory | Canvas pixel budget | | --- | ---: | | 2 GB or less | 20,000,000 | | Up to 4 GB | 32,000,000 | | Up to 8 GB | 48,000,000 | | More than 8 GB | 64,000,000 |
The browser value is coarse and not universally available. It should not be interpreted as a precise measurement of free RAM. The budget is a guardrail, not a benchmark score.

When an uploaded image exceeds the selected pixel budget, the editor computes a scale using the square root of the allowed-area ratio:
scale = √(pixel budget ÷ source pixel area)
Both width and height are multiplied by that scale. This preserves aspect ratio while reducing total area to the budget. For example, halving both dimensions reduces pixel area to one quarter.
Scaling prevents a single image from allocating an unbounded Canvas, but it also reduces source detail. Small interface text and thin lines should be inspected at 100 percent in the PDF preview. If they become difficult to read, divide the source into narrower or shorter sections instead of repeatedly increasing compression quality.
Undo snapshots can duplicate a large Canvas. Screenshot PDF therefore adapts history depth:
Older object URLs are revoked when snapshots are evicted. This limits retained browser resources without altering the current document. Users should still export or save important work rather than treating undo history as persistent storage.
Browsers and graphics backends may impose maximum Canvas width or height in addition to total pixel area. Screenshot PDF's stitching path applies a separate maximum dimension before the area budget. Extremely narrow and tall images can hit a dimension boundary even when their total area appears reasonable.
Browser versions, GPU configuration, operating system, and available memory affect practical behavior. MDN's Canvas tutorial describes the API but does not provide one universal safe maximum for every environment.
These symptoms do not automatically indicate a corrupted file. Reproduce with a smaller copy, close unrelated heavy tabs, and record source dimensions and device context.
For receipts, research, or support evidence, sectional files can be clearer than one enormous image. Use deterministic names such as part-01, part-02, and record the overlap or section boundaries.
When reporting a problem, include source width and height, compressed file size, browser and extension versions, reported device-memory tier if available, operation attempted, and the smallest dimensions that reproduce the failure. Do not attach private screenshots when a synthetic image can demonstrate the same allocation behavior.
Adaptive limits are not a claim that every device in a tier behaves identically. They are an explicit tradeoff between detail, stability, and undo capacity. Understanding the pixel math helps users choose a smaller, clearer capture before the browser reaches an unrecoverable limit.