Images & photos · Browser Image & Drawing Editor
Why editing a 12-megapixel photo in a browser needs about 48 MB
· How it works
image-editing canvas browser-processing
A 3 MB JPEG becomes tens of megabytes the moment it is decoded, because every pixel needs four bytes in memory. This post explains the arithmetic, why browser tools are limited by your device's memory rather than an upload cap, and what to do when a file is too big.
The photo that opens slowly or not at all — the problem behind a browser editor stalling on a large camera file
Compressed megabytes do not predict a decoded editing footprint. Start with the photo that opens slowly or not at all: that is the practical problem behind a browser editor stalling on a large camera file. For this memory calculation, the implemented rule is RGBA snapshot estimates use four bytes per pixel, so twelve million pixels require 48,000,000 bytes for one bitmap before working copies. Input files are capped at 40 MB, while decoded dimensions are independently constrained to 8,192 per side and a device pixel budget.
Multiply width by height by four for one RGBA copy, then compare the source with the reduced dimensions reported after opening. The default budget is 33,177,600 pixels and the iOS path uses 16,777,216; oversized sources are reduced with a notice. Working canvases and history can add copies, so this is a baseline, not a total tab-memory promise.
File size versus decoded size — why compression makes the file small but the editor must work on every uncompressed pixel
Compressed megabytes do not predict a decoded editing footprint. Separate file size from decoded size: compression makes the JPEG small on disk, but the editor must work on every uncompressed pixel. For this memory calculation, the implemented rule is Input files are capped at 40 MB, while decoded dimensions are independently constrained to 8,192 per side and a device pixel budget. The default budget is 33,177,600 pixels and the iOS path uses 16,777,216; oversized sources are proportionally reduced with a notice.
Multiply width by height by four for one RGBA copy, then compare the source with the reduced dimensions. Undo retains at most forty steps and approximately 96 MiB, evicting oldest entries while keeping one oversized action undoable. Working canvases add copies, so the single-bitmap figure is only a baseline.
Four bytes per pixel: the arithmetic — width × height × RGBA gives 48 MB for 12 megapixels, and more for working copies
Compressed megabytes do not predict a decoded editing footprint. The key arithmetic is four bytes per pixel: width multiplied by height and RGBA gives 48 MB for twelve megapixels, before any working copies. For this memory calculation, the implemented rule is The default budget is 33,177,600 pixels and the iOS path uses 16,777,216; oversized sources are proportionally reduced with a notice. Undo retains at most forty steps and approximately 96 MiB, evicting oldest entries while keeping one oversized action undoable.
Multiply width by height by four for one RGBA copy, then compare the source with the reduced dimensions. RGBA snapshot estimates use four bytes per pixel, so twelve million pixels require 48,000,000 bytes before working copies. Working canvases and history add copies, so the single-bitmap figure is a baseline.
Where the limits come from — browser canvas dimension caps, per-tab memory and the difference between a phone and a desktop
Compressed megabytes do not predict a decoded editing footprint. The limits come from several places: browser canvas dimensions, per-tab memory, and the difference between a phone and a desktop. For this memory calculation, the implemented rule is Undo retains at most forty steps and approximately 96 MiB, evicting oldest entries while keeping one oversized action undoable. RGBA snapshot estimates use four bytes per pixel, so twelve million pixels require 48,000,000 bytes for one bitmap before working copies.
Multiply width by height by four for one RGBA copy, then compare the source with the reduced dimensions. Input files are capped at 40 MB, while decoded dimensions are independently constrained to 8,192 per side and a device pixel budget. Working canvases and history add copies, so the single-bitmap figure is a baseline.
The implemented limits are pixel and dimension budgets, not guessed per-tab memory totals
Compressed megabytes do not predict a decoded editing footprint. The local model means device memory, not a server-side image-processing pool, is the practical ceiling. For this memory calculation, the implemented rule is RGBA snapshot estimates use four bytes per pixel, so twelve million pixels require 48,000,000 bytes for one bitmap before working copies. Input files are capped at 40 MB, while decoded dimensions are independently constrained to 8,192 per side and a device pixel budget.
Multiply width by height by four for one RGBA copy, then compare the source with the reduced dimensions. The default budget is 33,177,600 pixels and the iOS path uses 16,777,216; oversized sources are reduced with a notice. Working canvases and history add copies, so this is a baseline.
File input has a 40 MB validation cap even though no image upload occurs
Compressed megabytes do not predict a decoded editing footprint. Consider a 6000×4000 photo: one full RGBA copy is 96,000,000 bytes before device fitting, history, or other canvases. For this memory calculation, the implemented rule is Input files are capped at 40 MB, while decoded dimensions are independently constrained to 8,192 per side and a device pixel budget. The default budget is 33,177,600 pixels and the iOS path uses 16,777,216; oversized sources are proportionally reduced with a notice.
Multiply width by height by four for one RGBA copy, then compare the source with the reduced dimensions. Undo retains at most forty steps and approximately 96 MiB, evicting oldest entries while keeping one oversized action undoable. Working canvases add copies, so this is a baseline.
Worked example: a 6000×4000 source needs 96,000,000 bytes per RGBA copy before device fitting
Compressed megabytes do not predict a decoded editing footprint. This does not cover exact per-browser limits, which change between versions, or the memory behaviour of RAW and HDR formats. For this memory calculation, the implemented rule is The default budget is 33,177,600 pixels and the iOS path uses 16,777,216; oversized sources are proportionally reduced with a notice. Undo retains at most forty steps and approximately 96 MiB, evicting oldest entries while keeping one oversized action undoable.
Multiply width by height by four for one RGBA copy, then compare the source with the reduced dimensions. RGBA snapshot estimates use four bytes per pixel, so twelve million pixels require 48,000,000 bytes before working copies. Working canvases and history add copies, so this is a baseline.
Takeaway: know the arithmetic, then edit — how the Browser Image & Drawing Editor handles large files locally and what to do if a device runs short
Compressed megabytes do not predict a decoded editing footprint. The takeaway is to know the arithmetic before editing: the Browser Image & Drawing Editor handles large files locally, but a device can still run short. For this memory calculation, the implemented rule is Undo retains at most forty steps and approximately 96 MiB, evicting oldest entries while keeping one oversized action undoable. RGBA snapshot estimates use four bytes per pixel, so twelve million pixels require 48,000,000 bytes for one bitmap before working copies.
Multiply width by height by four for one RGBA copy, then compare the source with the reduced dimensions. Input files are capped at 40 MB, while decoded dimensions are independently constrained to 8,192 per side and a device pixel budget. Working canvases and history add copies, so this is a baseline.