How Much Memory Does an Image Use?
Calculate decoded image memory from pixel dimensions and bit depth, understand MB versus MiB, and learn why a small JPEG can need much more working memory.
In This Article
Start With Pixels, Not the Download Size
A compressed file and a decoded image answer different questions. The file size describes bytes stored or transferred. Working memory describes the pixel data an application must hold after decoding.
Open the Image File Size Calculator, enter the width and height, then choose the total bits per pixel. The raw packed-pixel result is the reliable starting point.
Use the Raw Image Size Formula
Multiply width by height to count pixels. Multiply that number by the total bits per pixel and divide by eight to convert bits to bytes.
For a 1920 × 1080 RGB image at 24 bits per pixel, the result is 6,220,800 bytes: 6.22 MB or about 5.93 MiB. A 32-bit RGBA buffer for the same dimensions needs 8,294,400 bytes.
Separate Bits per Channel From Bits per Pixel
An 8-bit RGB image normally has three 8-bit channels, so it uses 24 bits per pixel. Adding an 8-bit alpha channel creates 32 bits per pixel. A 16-bit-per-channel RGB image uses 48 bits per pixel.
Check whether a specification names each channel or the whole pixel before using the number. Confusing 8 bits per channel with 8 bits per pixel understates RGB storage by a factor of three.
Understand MB Versus MiB
Storage vendors usually use decimal units: one MB is 1,000,000 bytes. Operating systems and engineering tools may show binary units: one MiB is 1,048,576 bytes.
Both can be correct. Label the unit explicitly when documenting a memory budget, upload limit, or capacity estimate.
Why a Small JPEG Can Use Much More Memory
JPEG, PNG, WebP, and AVIF store compressed representations. Once decoded for display or editing, the browser may hold a full RGBA buffer at four bytes per pixel, plus temporary canvases, resized copies, thumbnails, and GPU textures.
That is why a 2 MB download can still contribute tens of megabytes to a page or editor. Measure actual runtime memory when the device limit matters.
Plan a Batch Without Pretending Compression Is Exact
Multiply the per-image estimate by the number of images for a raw batch budget. A compression ratio can provide a planning range, but two photographs with identical dimensions may encode to very different sizes because texture, noise, format, quality, and metadata differ.
Use the calculator for capacity planning, then confirm the final exported files before committing to a card, upload limit, or delivery estimate.
A Practical Image Memory Checklist
Record pixel dimensions, channels, bits per channel, image count, and whether the requirement concerns transfer size or decoded memory. Include extra working buffers for crop, resize, filters, undo history, or GPU upload.
If the download is the problem, use Image Compressor. If decoded memory is the problem, reduce pixel dimensions with Image Resizer before changing encoding quality.