Images and Graphics
Formats, megapixels, color depth, PPI and resizing.
A picture is a grid of pixels, and each pixel costs bits. Multiply the width, the height and the bits per pixel and you know how many bytes an uncompressed image needs. Everything else in this topic follows from that one formula.
These guides explain how formats such as JPEG, PNG, WebP and AVIF store the same picture in fewer bytes, and what you give up when you choose a lossy format. They cover megapixels, color depth, the difference between PPI and DPI, and aspect ratios, including how to resize without stretching. You will also see why a vector graphic can stay small at any size while a raster image grows with its pixel dimensions, and how to choose pixel dimensions for a web page so visitors do not download more bytes than they can see.
Use the image file size calculator and the aspect ratio calculator alongside the articles. Both show their formulas, so you can check any number yourself.
All 9 articles in this topic
Images and Graphics
JPEG vs. PNG: When Each Format Makes Sense
A plain comparison of lossy and lossless image files, with rules for photographs, screenshots, logos and transparent graphics.
Images and Graphics
WebP and AVIF: What the Newer Image Formats Offer
How the two newer image formats work, how to read their size-saving claims, and why a fallback file still matters.
Images and Graphics
What Is a Megapixel? Resolution and File Size Explained
Turn pixel dimensions into megapixels, link them to file size, and see why doubling the count does not double the detail.
Images and Graphics
Color Depth Explained: 8-bit, 24-bit and Beyond
What bits per pixel and bits per channel mean, how many colors each depth allows and how depth changes uncompressed file size.
Images and Graphics
PPI vs. DPI: Pixels, Print Size and Screen Size
Define PPI and DPI precisely, calculate print size from pixel dimensions, and see why the density number does not change file size.
Images and Graphics
Aspect Ratios Explained: 16:9, 4:3, 1:1 and How to Resize
Reduce any width and height to a ratio, resize while keeping the shape, and choose between cropping and bars.
Images and Graphics
How Big Is an Uncompressed Image? A Worked Example
A step-by-step calculation of raw image size, with decimal and binary units, bit-depth variants and a library-sized estimate.
Images and Graphics
Vector vs. Raster Graphics: Why SVG Files Stay Small
Compare pixel grids with drawing instructions, count the bytes of a small SVG, and learn when vector files stop being small.
Images and Graphics
Choosing Image Dimensions for the Web
Match pixel dimensions to display size and screen density, then estimate what oversized pictures cost in bytes and seconds.