A bitmap is a digital image made from a grid of colored dots called pixels

When you take a photo on your phone or open a picture file on your computer, you are looking at a bitmap. The image is built from thousands or millions of tiny squares, each one a single color. If you zoom in far enough on any bitmap image, you will see these individual colored squares instead of a smooth picture. This is different from other image types that store instructions for drawing shapes — a bitmap just stores the color information for each dot.

The word "bitmap" comes from the idea of a map of bits. In the earliest computer graphics, each pixel was either on or off, black or white — one bit of information per dot. Modern bitmaps use many more bits per pixel to show millions of colors, but the basic idea is the same: a rectangular grid where each square has a color value.

Key Takeaways

  • A bitmap stores an image as a grid of individual colored pixels, so the file size grows larger as the image gets bigger or more detailed.
  • Common bitmap formats include JPEG, PNG, GIF, and BMP, each with different ways of compressing or storing the color information.
  • When you resize a bitmap larger, it becomes blurry because the computer has to guess what color the new pixels should be.
  • Photographs and screenshots are almost always bitmaps, while logos and text are often stored as vector images instead.

How bitmap file formats differ from each other

Not all bitmap files work the same way. The format — the file type — determines how the color information is stored and whether the file is compressed. JPEG is the most common format for photographs because it shrinks the file size by throwing away some color information your eye probably will not notice. PNG keeps all the original color information and also lets you have transparent areas, so it works well for images you want to edit or place on top of other things. GIF is limited to 256 colors but handles animation, so you see it used for straightforward moving images online.

The plain BMP format stores every pixel's color without any compression, which is why BMP files are much larger than JPEG or PNG files of the same image. You rarely see BMP files in everyday use because they waste storage space. All of these formats — JPEG, PNG, GIF, and BMP — are bitmaps. The difference is in how they pack the information into the file.

Why bitmap file size depends on image dimensions

A bitmap file's size is tied directly to how many pixels it contains. An image that is 1000 pixels wide and 1000 pixels tall contains one million pixels. If each pixel needs three bytes of information to store its color, that image needs three million bytes before any compression. If you double the width and height to 2000 by 2000 pixels, you now have four million pixels and need twelve million bytes — the file size quadrupled even though you only doubled the dimensions.

This is why a photograph from a modern phone camera — which can be 4000 pixels wide or wider — creates such large files. A JPEG compresses the file by reducing unnecessary detail, which is why a JPEG of that same photo is much smaller than an uncompressed bitmap would be. The trade-off is that JPEG compression loses some information permanently, so you cannot get back the original detail if you edit the file.

What happens when you resize a bitmap image

Resizing a bitmap is not like resizing a text document. When you make a bitmap image larger, the computer cannot add new detail that was not there — it can only guess. It takes the existing pixels and spreads them across more space, then fills in the gaps by averaging the colors of nearby pixels. The result is a blurry image. The larger you resize, the blurrier it becomes.

Making a bitmap smaller works better because you are throwing away pixels rather than inventing them. The computer can combine nearby pixels into single pixels and lose less information in the process. This is why photographers always start with the largest image possible — you can always make it smaller without much loss, but you cannot make it larger without blur.

Bitmap versus vector images

Vector images work completely differently. Instead of storing a grid of pixels, a vector file stores mathematical instructions: "draw a red circle here with this radius" or "draw a blue line from this point to that point." Because vectors are instructions rather than pixels, you can resize them as large as you want without any blur. A logo stored as a vector looks sharp whether it is printed on a business card or a billboard.

The downside is that vectors are harder to create and edit. Photographs cannot be stored as vectors because a photo is not made of straightforward shapes — it is made of millions of subtle color variations. Logos, diagrams, and text are often vectors. Most of what you see on the internet and in everyday use is bitmap, because photographs, screenshots, and web graphics are all bitmaps.

Common bitmap file extensions you will encounter

When you see a file name with an extension like .jpg, .jpeg, .png, .gif, or .bmp, you are looking at a bitmap file. You might also see .tiff or .tif, which is a format often used in professional photography and printing because it can store very high quality images. .webp is a newer format that compresses images even smaller than JPEG while keeping better quality, and it is becoming more common on websites.

All of these extensions mean the file is a bitmap — a grid of pixels with color information. The extension just tells your computer which method was used to store that information. Your computer can usually open any of these formats with a photo viewer or web browser.

Frequently Asked Questions

Why do photos look pixelated when I zoom in really far?

Because you are seeing the individual pixels that make up the bitmap. Each pixel is a single color square. When you zoom in, those squares become large enough to see. If you zoom in far enough on any bitmap image, you will always see this pixelation eventually.

Is a screenshot a bitmap?

Yes. When you take a screenshot, your computer captures the pixels currently displayed on your screen and saves them as a bitmap file, usually PNG or BMP format. This is why screenshots can look blurry if you resize them larger.

Can I convert a bitmap to a vector?

Software exists that can trace the outlines in a bitmap and create a vector version, but the result is usually not as good as a vector created from scratch. The conversion works best on straightforward images with bold shapes and solid colors, and poorly on photographs.

What is the difference between JPEG and PNG?

JPEG compresses the file by removing some color information, making smaller files but losing quality. PNG keeps all the original information and supports transparency, but creates larger files. Use JPEG for photographs and PNG for images you need to edit or that have transparent areas.

Why is my image blurry after I made it bigger?

Because the bitmap does not have enough pixels to fill the larger size. The computer guessed at the colors for the new pixels by averaging nearby colors, which creates blur. To avoid this, always start with the largest image size you will need.