A bitmap file stores images as a grid of colored dots
A bitmap is a picture made up of tiny squares of color arranged in rows and columns, like a checkerboard. Each square is called a pixel, and the computer stores information about the color of every single pixel in the file. When you open a bitmap file, your computer reads that color data and displays the grid on your screen — from far away it looks like a smooth picture, but if you zoom in far enough, you see the individual colored squares.
The most common bitmap file format is BMP (which stands for bitmap), but JPG, PNG, and GIF files are also bitmaps. They all work the same way: store a grid of pixels, each with its own color value. The main differences between these formats are how much they compress the data (to make the file smaller) and what features they support, like transparency or animation.
Bitmap files are different from vector files, which store images as mathematical instructions for drawing shapes instead of as a grid of pixels. A vector file says "draw a red circle here with this radius" — a bitmap file says "make pixel 1,1 red, pixel 1,2 red, pixel 2,1 red" and so on for every pixel in the image.
Key Takeaways
- A bitmap stores an image as a grid of colored pixels, with color information for each individual square.
- Common bitmap formats include BMP, JPG, PNG, and GIF, each with different compression and feature options.
- Bitmap files get larger when you increase the image dimensions or the color depth, because more pixels means more data to store.
- Zooming into a bitmap eventually shows the individual colored squares, while vector images stay sharp at any zoom level.
- Bitmaps work well for photographs and complex images, but vector files are better for logos and graphics that need to scale.
How bitmap files store color information
Every pixel in a bitmap has a color value, and that value is stored as a number. The simplest bitmaps use 1 bit per pixel — that means each pixel is either black or white, because 1 bit can only be 0 or 1. A 4-bit bitmap can show 16 different colors, an 8-bit bitmap can show 256 colors, and a 24-bit bitmap can show over 16 million colors (which is more than the human eye can distinguish).
The file also stores the width and height of the image in pixels. If you have a 1000-by-1000 pixel image with 24-bit color, the file needs to store color information for 1 million pixels, with 24 bits of data per pixel. That is why larger images and higher color depths create much bigger files. A 1000-by-1000 pixel 24-bit bitmap is roughly 3 megabytes before any compression.
Most bitmap formats used today apply compression to shrink the file size. JPG uses lossy compression, which throws away some color information that the human eye probably will not notice — that is why JPG files are small but lose quality if you edit and re-save them many times. PNG uses lossless compression, which shrinks the file without losing any data, so you can edit a PNG repeatedly without degradation.
Why bitmap files get blurry when you enlarge them
When you zoom into a bitmap, you are asking the computer to display fewer pixels across the same screen space, so each pixel becomes larger. At some point the pixels become visible as colored squares, and the image looks blocky or blurry. This is called pixelation.
The computer cannot invent new detail that was not in the original file. If your original image is 500 pixels wide and you enlarge it to fill a 2000-pixel-wide screen, the computer has to guess what color each new pixel should be — usually by copying nearby pixels or blending them together. Both methods create a soft, blurry appearance.
This is why bitmap files are not ideal for logos, text, or anything that needs to stay sharp at different sizes. A vector file, by contrast, stores the instructions for drawing shapes, so the computer can redraw the image at any size without loss of sharpness.
Bitmap versus vector: when to use each
Bitmap files are the right choice for photographs, artwork, and any image with many colors and fine detail. Your camera produces bitmap files (usually JPG or RAW), and most artwork created in Photoshop is bitmap. Bitmap files are also smaller than vector files for complex images, because storing a mathematical description of a photograph would require enormous amounts of data.
Vector files are better for logos, icons, text, and anything that needs to scale to different sizes without losing sharpness. If you design a logo in Adobe Illustrator, you get a vector file that stays crisp whether it appears on a business card or a billboard. Vector files are also easier to edit — you can select a shape and change its color or size without affecting the rest of the image.
Some files contain both bitmap and vector data. A PDF file, for example, can hold text (vector) and photographs (bitmap) in the same document. Photoshop can work with both formats, though it treats them differently — vector shapes stay sharp when you resize them, but bitmap layers get pixelated.
Common bitmap file formats and their uses
BMP is the original Windows bitmap format. It stores uncompressed pixel data, so BMP files are large and rarely used today except in legacy systems. JPG is the standard format for photographs because it compresses well and produces small files, though it loses some quality in the process. PNG is better for images that need transparency (like a logo on a colored background) or for images where you need lossless compression. GIF is an older format that supports animation and transparency, but PNG has largely replaced it for static images.
Your operating system and web browsers support all of these formats natively. When you save a photo from your phone, it is usually JPG. When you take a screenshot, it is usually PNG. When you download an image from a website, it could be any of these formats depending on what the website chose.
What happens when you edit and re-save a bitmap
Every time you open a bitmap file, edit it, and save it again, you risk losing quality — especially with JPG files. When you save a JPG, the compression algorithm makes decisions about which color information to throw away. If you open that JPG, make a small change, and save it again, the algorithm runs a second time and throws away more information. After several rounds of editing and saving, a JPG image can look noticeably worse.
This is why photographers and designers often keep an uncompressed or lossless version of their work (like a TIFF or PNG file) for editing, and only convert to JPG when they are ready to share the final image. If you need to edit an image multiple times, use PNG or another lossless format during the editing process, then convert to JPG only at the end.
Bitmap formats like BMP and TIFF do not compress at all (or use lossless compression), so they preserve all the original pixel data. The trade-off is that these files are much larger than JPG files of the same image.
Frequently Asked Questions
What is the difference between a bitmap and a raster image?
They are the same thing. "Bitmap" and "raster" are two names for the same concept — an image stored as a grid of pixels. Bitmap is the older term, raster is more common in professional graphics software, but they mean the same thing.
Can I convert a bitmap to a vector file?
You can use software like Adobe Illustrator or Inkscape to trace a bitmap and create a vector version, but the software is making educated guesses about what shapes and colors are in the image. The result is usually acceptable for simple images like logos, but complex photographs cannot be converted to vector in any useful way.
Why is my bitmap file so large?
Bitmap files are large because they store color information for every single pixel. A 4000-by-3000 pixel photograph with 24-bit color is 36 megabytes before compression. JPG compression shrinks it to 2 to 5 megabytes depending on quality settings. If your file is larger than expected, check whether compression is enabled, or whether the image dimensions are larger than you thought.
Do I need to worry about bitmap files on my computer?
No. Bitmap files are the standard way images are stored and displayed. Your photos, screenshots, and downloaded images are all bitmaps. You only need to understand the difference between bitmap and vector if you are doing graphic design or need to choose between file formats for a specific purpose.
What does DPI mean for a bitmap file?
DPI (dots per inch) describes how many pixels are packed into one inch of printed space. A 300 DPI image is suitable for printing, while 72 DPI is standard for screens. DPI does not change the file size — it only affects how large the image will be when printed. A 1000-by-1000 pixel image at 72 DPI prints at about 14 inches square, while the same image at 300 DPI prints at about 3 inches square.