File size formula
From The Glossary of Digital Photography
To calculate the size of an image file, multiply the pixel dimensions (horizontal and vertical) to get the total number of pixels. Next, multiply the number of pixels by the number of colors (three for RGB; four for CMYK for example), and then by the number of 8-bit bytes (usually 1 for 8-bit RGB, 2 for 16-bit RGB). This formula will give the total number of bytes needed. Divide by 1,048,576 to convert to megabytes.









