Checking where an uncompressed frame model rounds to bytes
The raw-image size tool rounds each frame up to a whole number of bytes before multiplying by the frame count. This worksheet shows how that order of operations changes results for very small frames.
Where the rounding happens in the formula
The Uncompressed Image Size Calculator computes bytes = ceil(width × height × depth / 8) × frames. Inside the parentheses, width times height times bits per pixel gives the bit count of one frame. Dividing by 8 converts bits to bytes, and the ceiling rounds any fraction up to the next whole byte. Only after that is the result multiplied by the number of frames. The order matters whenever one frame does not fill a whole number of bytes. Each frame then carries spare bits, and the spare bits are paid for again with every frame, because the model assumes frames start on byte boundaries.
A single one-pixel frame
Start with the smallest case: a frame of 1 by 1 pixel at 1 bit per pixel. The frame holds a single bit. Divided by 8, that is 0.125 byte, and the ceiling raises it to 1 byte. The result is 1 byte for 1 frame, so 7 of the 8 bits in that byte are unused. Nobody stores real images this small, which is the point of the example: with so few bits the rounding is the whole answer. The case isolates the rule that a frame always occupies at least one whole byte in this model, whatever its pixel count and depth multiply to.
Nine frames against one nine-bit frame
Set the frame count to 9 with the same 1 by 1 frame at 1 bit. Each frame rounds to 1 byte, so the total is 9 bytes. Compare it with a single frame that is 9 pixels wide, 1 pixel high and 1 bit deep. It holds 9 bits, 9 / 8 = 1.125, and the ceiling gives 2 bytes. The same nine bits of information cost 9 bytes in one arrangement and 2 bytes in the other. Per-frame rounding repeated nine times wastes nearly an entire byte per frame, while aggregate rounding wastes bits only once, at the end of the data.
More frames that waste bits
The effect grows with scale. A frame of 3 by 3 pixels at 1 bit holds 9 bits and rounds to 2 bytes, so 100 such frames occupy 200 bytes. A single frame of 30 by 30 pixels at 1 bit holds the same 900 bits as the hundred small frames, and 900 / 8 = 112.5 rounds up to 113 bytes. The difference is 87 bytes, almost half of the per-frame total. A frame of 5 by 5 at 1 bit holds 25 bits and costs 4 bytes, wasting 7 bits, while an 8 by 8 frame holds exactly 64 bits and wastes nothing. The waste depends on how the bit count falls relative to a multiple of 8. At worst a frame wastes 7 bits, when its bit count is one more than a multiple of 8, as with 9 or 25 bits. Because the waste per frame is capped at under one byte, it is a large share of the total only when frames are tiny, and it becomes negligible as frames grow. A 1,000-frame stack of 3 by 3 one-bit frames costs 2,000 bytes against 1,125 for the aggregate bits, a 78 percent excess.
Frames that need no rounding
For frames where width × height × depth is a multiple of 8, the ceiling changes nothing, and per-frame rounding gives the same answer as aggregate rounding. Most ordinary raster images fall in this group. A 1,920 by 1,080 image at 24 bits per pixel holds 49,766,400 bits, which is 6,220,800 bytes, or about 6.22 decimal megabytes. The spare-bit effect disappears because the pixel count is divisible by 8 and every common depth, 8, 16, 24 and 32 bits, is itself a multiple of 8. Rounding only matters for bit-packed depths such as 1, 2, 4 or 10 bits combined with pixel counts that leave a remainder.
Depths that do not divide evenly
Packed formats make the issue real. A 4-bit image with 5 by 5 pixels holds 100 bits, and 100 / 8 = 12.5 rounds to 13 bytes. A 10-bit-per-channel format with three channels uses 30 bits per pixel, and a frame of 3 by 3 pixels holds 270 bits, which rounds from 33.75 to 34 bytes. Real storage formats often handle this by padding rows to a boundary of 4 bytes, 8 bytes or another size, so their sizes can exceed what this model gives. The calculator applies one simple rule, which is rounding the entire frame, and it does not mimic any particular format.
Why the frame count multiplies afterward
The model treats frames as independent units laid end to end, which is a fair picture of a stack of uncompressed images or a raw video buffer in which each frame begins on a byte boundary. Multiplying after rounding follows from that picture. A video of 240 frames, for example 10 seconds at 24 frames per second, at 1,920 by 1,080 pixels and 24 bits per pixel, comes to 6,220,800 × 240 = 1,492,992,000 bytes, about 1,493 decimal megabytes. No rounding loss appears here, but the example shows how quickly raw sizes grow with the frame count.
Decimal megabytes in the output
The megabyte figure is bytes divided by 1,000,000, a decimal megabyte. A buffer of 6,220,800 bytes is 6.2208 megabytes in this convention, or about 5.93 mebibytes if you divide by 1,048,576. Operating systems and image tools differ in which they display, so the same file can look 5 percent different between two programs. When comparing this page to another tool, check the unit prefix first. The bytes figure is unambiguous and is the better value to compare, since both conventions start from the same count of whole bytes.
Matching the model to the real storage layout
The controls expose the calculator's own convention and nothing more. They say nothing about an image container, file header, color table, row alignment or compression. If a real format stores a 5 by 5 one-bit image with each row padded to a whole byte, it uses 5 bytes, not the 4 that this model gives. For an accurate figure, read the specification of the format or measure actual files. Some formats store each row on a boundary of 2 or 4 bytes, so a 1-bit image 5 pixels wide would use 4 bytes per row there, 20 bytes for five rows, against the 4 bytes this model gives for the whole frame. Others place a header of tens of bytes before the pixels. Use this page when you want the raw, header-free size under a stated rounding rule, or when you want to see how bit packing and frame counts interact.
Reproduce the checks
One tiny frame
Open the Uncompressed Image Size Calculator and enter:
- Width
1- Height
1- Bits per pixel
1- Frames
1
Expected output:
Uncompressed size
1The frame is rounded to one whole byte.
Nine separate frames
Open the Uncompressed Image Size Calculator and enter:
- Width
1- Height
1- Bits per pixel
1- Frames
9
Expected output:
Uncompressed size
9Per-frame rounding happens before multiplication.
Nine-bit aggregate control
Open the Uncompressed Image Size Calculator and enter:
- Width
9- Height
1- Bits per pixel
1- Frames
1
Expected output:
Uncompressed size
2One aggregate frame uses a different rounding boundary.
References and implementation scope
The examples describe the behavior of the linked Computandum tools. A successful local check does not establish that another application accepts the same format or applies the same limits.