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