- 6 minutes to read
A bitmap is an array of bits that specify the color of each pixel in a rectangular array of pixels. The number of bits devoted to an individual pixel determines the number of colors that can be assigned to that pixel. For example, if each pixel is represented by 4 bits, then a given pixel can be assigned one of 16 different colors (2^4 = 16). The following table shows a few examples of the number of colors that can be assigned to a pixel represented by a given number of bits.
|Bits per pixel||Number of colors that can be assigned to a pixel|
|1||2^1 = 2|
|2||2^2 = 4|
|4||2^4 = 16|
|8||2^8 = 256|
|16||2^16 = 65,536|
|24||2^24 = 16,777,216|
Disk files that store bitmaps usually contain one or more information blocks that store information such as the number of bits per pixel, number of pixels in each row, and number of rows in the array. Such a file might also contain a color table (sometimes called a color palette). A color table maps numbers in the bitmap to specific colors. The following illustration shows an enlarged image along with its bitmap and color table. Each pixel is represented by a 4-bit number, so there are 2^4 = 16 colors in the color table. Each color in the table is represented by a 24-bit number: 8 bits for red, 8 bits for green, and 8 bits for blue. The numbers are shown in hexadecimal (base 16) form: A = 10, B = 11, C = 12, D = 13, E = 14, F = 15.
Look at the pixel in row 3, column 5 of the image. The corresponding number in the bitmap is 1. The color table tells us that 1 represents the color red so the pixel is red. All the entries in the top row of the bitmap are 3. The color table tells us that 3 represents blue, so all the pixels in the top row of the image are blue.
Some bitmaps are stored in bottom-up format; the numbers in the first row of the bitmap correspond to the pixels in the bottom row of the image.
A bitmap that stores indexes into a color table is called a palette-indexed bitmap. Some bitmaps have no need for a color table. For example, if a bitmap uses 24 bits per pixel, that bitmap can store the colors themselves rather than indexes into a color table. The following illustration shows a bitmap that stores colors directly (24 bits per pixel) rather than using a color table. The illustration also shows an enlarged view of the corresponding image. In the bitmap, FFFFFF represents white, FF0000 represents red, 00FF00 represents green, and 0000FF represents blue.
Graphics File Formats
There are many standard formats for saving bitmaps in disk files. GDI+ supports the graphics file formats described in the following paragraphs.
BMP is a standard format used by Windows to store device-independent and application-independent images. The number of bits per pixel (1, 4, 8, 15, 24, 32, or 64) for a given BMP file is specified in a file header. BMP files with 24 bits per pixel are common. BMP files are usually not compressed and, therefore, are not well suited for transfer across the Internet.
Graphics Interchange Format (GIF)
GIF is a common format for images that appear on Web pages. GIFs work well for line drawings, pictures with blocks of solid color, and pictures with sharp boundaries between colors. GIFs are compressed, but no information is lost in the compression process; a decompressed image is exactly the same as the original. One color in a GIF can be designated as transparent, so that the image will have the background color of any Web page that displays it. A sequence of GIF images can be stored in a single file to form an animated GIF. GIFs store at most 8 bits per pixel, so they are limited to 256 colors.
Joint Photographic Experts Group (JPEG)
JPEG is a compression scheme that works well for natural scenes such as scanned photographs. Some information is lost in the compression process, but often the loss is imperceptible to the human eye. JPEGs store 24 bits per pixel, so they are capable of displaying more than 16 million colors. JPEGs do not support transparency or animation.
The level of compression in JPEG images is configurable, but higher compression levels (smaller files) result in more loss of information. A 20:1 compression ratio often produces an image that the human eye finds difficult to distinguish from the original. The following illustration shows a BMP image and two JPEG images that were compressed from that BMP image. The first JPEG has a compression ratio of 4:1 and the second JPEG has a compression ratio of about 8:1.
JPEG compression does not work well for line drawings, blocks of solid color, and sharp boundaries. The following illustration shows a BMP along with two JPEGs and a GIF. The JPEGs and the GIF were compressed from the BMP. The compression ratio is 4:1 for the GIF, 4:1 for the smaller JPEG, and 8:3 for the larger JPEG. Note that the GIF maintains the sharp boundaries along the lines, but the JPEGs tend to blur the boundaries.
JPEG is a compression scheme, not a file format. JPEG File Interchange Format (JFIF) is a file format commonly used for storing and transferring images that have been compressed according to the JPEG scheme. JFIF files displayed by Web browsers use the .jpg extension.
Exchangeable Image File (EXIF)
EXIF is a file format used for photographs captured by digital cameras. An EXIF file contains an image that is compressed according to the JPEG specification. An EXIF file also contains information about the photograph (date taken, shutter speed, exposure time, and so on) and information about the camera (manufacturer, model, and so on).
Portable Network Graphics (PNG)
The PNG format retains many of the advantages of the GIF format but also provides capabilities beyond those of GIF. Like GIF files, PNG files are compressed with no loss of information. PNG files can store colors with 8, 24, or 48 bits per pixel and grayscales with 1, 2, 4, 8, or 16 bits per pixel. In contrast, GIF files can use only 1, 2, 4, or 8 bits per pixel. A PNG file can also store an alpha value for each pixel, which specifies the degree to which the color of that pixel is blended with the background color.
PNG improves on GIF in its ability to progressively display an image (that is, to display better and better approximations of the image as it arrives over a network connection). PNG files can contain gamma correction and color correction information so that the images can be accurately rendered on a variety of display devices.
Tag Image File Format (TIFF)
TIFF is a flexible and extendable format that is supported by a wide variety of platforms and image-processing applications. TIFF files can store images with an arbitrary number of bits per pixel and can employ a variety of compression algorithms. Several images can be stored in a single, multiple-page TIFF file. Information related to the image (scanner make, host computer, type of compression, orientation, samples per pixel, and so on) can be stored in the file and arranged through the use of tags. The TIFF format can be extended as needed by the approval and addition of new tags.
- Images, Bitmaps, and Metafiles
- Working with Images, Bitmaps, Icons, and Metafiles
BMP: limited file format. GIF: mainly used for internet graphics. JPEG: or rather the JFIF file format, which is mainly used for internet graphics. TIFF: the most popular bitmap file format.What are examples of bitmaps? ›
Examples of bitmap graphic formats include GIF, JPEG, PNG, TIFF, XBM, BMP, and PCX as well as bitmap (i.e., screen) fonts. The image displayed on a computer monitor is also a bitmap, as are the outputs of printers, scanners, and similar devices. They are created using paint programs like Adobe Photoshop.Which types of image are bitmaps suitable for? ›
As mentioned above Bitmaps are best used for photographs or detailed images. Bitmaps are usually the best choice for websites as screen resolutions are relatively low compared to print or other types of media.What are the 3 types of image? ›
In visual storytelling, you'll usually apply three different types of images: iconic images, symbolic images, and indexical images.What are the 4 types of images? ›
- TIFF (. tif, . tiff) ...
- GIF (. gif) GIF or Graphics Interchange Format files are widely used for web graphics, because they are limited to only 256 colors, can allow for transparency, and can be animated. ...
- PNG (. png) ...
- EPS (. eps) ...
- RAW Image Files (. raw, .
Device-independent bitmaps and BMP file format
A device-independent bitmap (DIB) is a format used to define device-independent bitmaps in various color resolutions. The main purpose of DIBs is to allow bitmaps to be moved from one device to another (hence, the device-independent part of the name).
- bmp (Bitmap file, Windows mostly.)
- gif (Compuserve's Graphic Interchange Format, now seldom used because of old copyright issues. ...
- png (Portable Network Graphic). ...
- jpg The most common format for bitmap images these days. ...
- xpm (X PixMap)
- xbm (X BitMap)
- ppm (Portable Pixmap)
The BMP format is an uncompressed raster file designed to display high-quality images on Windows and store printable photos.What is bitmap best used for? ›
One of the advantages of using bitmap images in your designs is that bitmap files can hold a lot of color information. This is especially useful when working with photographs or when you want to create images are look very real. This also gives you access to a wider range of colors for rich color transitions and more.What is the best quality bitmap? ›
PNG. A bitmap format with lossless compression. Probably the best choice for everything except photographs.
Bitmap images are widely used on digital cameras, smartphones and online. Common bitmap image file types include JPEG , GIF and PNG .What are the 4 common types of files? ›
- Portable document format (PDF) A PDF file is a common file type in many work environments. ...
- Word document (DOC and DOCX) ...
- Hypertext markup language (HTML and HTM) ...
- Microsoft excel spreadsheet file (XLS and XLSX) ...
- Text file (TXT)
All digital image files fall into one of two categories: vector or raster.What are the 3 common file type of an image file? ›
The PNG, JPEG, and GIF formats are most often used to display images on the Internet. Some of these graphic formats are listed and briefly described below, separated into the two main families of graphics: raster and vector.What are types image? ›
JPEG, GIF, and PNG are all raster image extensions. Every photo you find online or in print is a raster image.How many types file formats? ›
There are twenty main types of files. Text files: A text file is a file that contains lines of electronic text. Common extensions for this file type include . doc, .What are the 3 method of image information? ›
3.1 Detection of Edges, Lines, and Corners. Our NL detection algorithm uses three image processing methods: edge detection, line detection, and corner detection. Edge detection transforms images into bitmaps where every pixel is classified as belonging or not belonging to an edge.How many image types are there? ›
The 5 Types of Digital Image Files: TIFF, JPEG, GIF, PNG, and Raw Image Files, and When to Use Each One. There are 5 main formats in which to store images.What are the types of visual image? ›
- Data-driven visuals. To be a well-known leader in your industry, start creating data-driven content. ...
- Quotes. ...
- Infographics. ...
- Gifographics. ...
- GIFs. ...
- Memes. ...
- Videos. ...
Explanation: A bitmap is simply an array of bits. A bitmap can be used for various purposes such as bitmap indexing. ADVERTISEMENT.
A bit map (often spelled "bitmap") defines a display space and the color for each pixel or "bit" in the display space. A Graphics Interchange Format and a JPEG are examples of graphic image file types that contain bit maps. A bit map does not need to contain a bit of color-coded information for each pixel on every row.What are the properties of bitmap? ›
What characteristics define a bitmap? Bitmap images are characterized by two parameters: the number of pixels (resolution) and the color depth per pixel. Color depth refers to the information contained within the image. For example, a 1-bit image means that a pixel could either be black or white.Which of the following is not a bitmap format? ›
The correct answer is ODT. A bitmap basically describes a type of image. Pixels all the basic sources of information. BMP, GIF, JPEG, EXIF, PNG, and TIFF are bitmap file formats.What is bitmap C#? ›
A Bitmap is an object used to work with images defined by pixel data.What is bitmap file size? ›
If both files contain an identical image, BMP files will be slightly larger. But because of their fixed dimensions, BMP files generally won't exceed 4GB in size. There is no size limit to a PNG — they can easily be 140GB or larger.How are bitmap files stored? ›
BMPs use a very simple form of compression called Run Length Encoded (RLE). Instead of storing a value for each pixel RLE stores a number, N, followed by an index. This means that the next N pixels are of the color for this index.Is bitmap good quality? ›
BMP files generally have a higher quality than JPEGs. In a BMP image, each pixel has its own specific colour. The file may also contain information like colour depth, colour profiles, alpha channels and more. This gives BMP images a higher resolution than JPEG files.What are bitmap tools? ›
The Bitmap Tool is an application that allows you to test and correct your Windows application's appearance by comparing two or more bitmaps and identifying the differences between them.Is PNG a bitmap? ›
What is a PNG File? PNG is a popular bitmap image format on the Internet. It is short for “Portable Graphics Format”. This format was created as an alternative of Graphics Interchange Format (GIF).Is JPEG a bitmap? ›
|8||Extensions used are .jpg and .jpeg..||Extensions used are .bmp and .dib.|
Along with RAW, TIFF files are among the highest quality graphic formats available. If you're printing photos—especially at enormous sizes—use this format. You are making a high-quality scan. Using TIFF to scan your documents, photos and artwork will ensure that you have the best original file to work off of.How many bits is a bitmap? ›
BMP files with 24 bits per pixel are common.
Most operating systems allow you to format a partition based on a set of file systems. For instance, if you are formatting a partition on Windows, you can choose between FAT32, NTFS, and exFAT file systems.What are the 3 types of computer files? ›
- Ordinary files. Ordinary files help to store information like text, graphics, images, etc. ...
- Directory files. Directory files are nothing but a place/area/location where details of files are stored. ...
- Device files. Device files are also called as special files. ...
- FIFO files.
- Disk file systems. ...
- Flash file systems. ...
- Tape file systems. ...
- Database file systems. ...
- Transactional file systems. ...
- Network file systems. ...
- Shared disk file systems. ...
- Special file systems.
- Interactive computing or Interactive processing, historically introduced as Time-sharing.
- Transaction processing.
- Batch processing.
- Real-time processing.
A file system stores and organizes data and can be thought of as a type of index for all the data contained in a storage device. These devices can include hard drives, optical drives and flash drives.What is file and its types? ›
A file is an object on a computer that stores data, information, settings, or commands used with a computer program. On a computer there are three types of files, application files, data files, and system files.What is extension name? ›
A filename extension, file name extension or file extension is a suffix to the name of a computer file (e.g., . txt , . docx , . md ). The extension indicates a characteristic of the file contents or its intended use.What is the most common type of image file format? ›
The most common image file formats, the most important for cameras, printing, scanning, and internet use, are JPG, TIF, PNG, and GIF. JPG is the most used image file format. JPG is the file extension for JPEG files (Joint Photographic Experts Group, a committee of ISO and ITU).
Common raster file formats include JPEG, PSD, PNG and TIFF. If you want to learn more about resolution and resizing raster graphics, read our piece on how to resize images in Photoshop (opens in new tab).What are bitmaps images? ›
What are bitmap images? Bitmap or raster images are created with a collection of bits or pixels. In their simplest form, bitmap images are two colors: black and white. A bitmap image is a collection of pixels with different colors and weights.What else are bitmap images called? ›
Raster (or bitmap) images are generally what you think about when thinking of images. These are the types of images that are produced when scanning or photographing an object. Raster images are compiled using pixels, or tiny dots, containing unique color and tonal information that come together to create the image.What are the 4 types of file formats? ›
- JPEG (Joint Photographic Experts Group) ...
- PNG (Portable Network Graphics) ...
- GIF (Graphics Interchange Format) ...
- PDF (Portable Document Format) ...
- SVG (Scalable Vector Graphics) ...
- MP4 (Moving Picture Experts Group)
One of the advantages of using bitmap images in your designs is that bitmap files can hold a lot of color information. This is especially useful when working with photographs or when you want to create images are look very real. This also gives you access to a wider range of colors for rich color transitions and more.What is bitmap size? ›
A bitmap is rectangular and has a spatial dimension, which is the width and height of the image in pixels. For example, this grid could represent a very small bitmap that is 9 pixels wide and 6 pixels high or, more concisely, 9 by 6: By convention, the shorthand dimension of a bitmap is given with the width first.