Bitmap

Last updated

In computing, a bitmap (also called raster) graphic is an image formed from rows of different colored pixels. [1] A GIF is an example of a graphics image file that uses a bitmap. [2]

Contents

As a noun, the term "bitmap" is very often used to refer to a particular bitmapping application: the pix-map, which refers to a map of pixels, where each pixel may store more than two colors, thus using more than one bit per pixel. In such a case, the domain in question is the array of pixels which constitute a digital graphic output device (a screen or monitor). In some contexts, the term bitmap implies one bit per pixel, whereas pixmap is used for images with multiple bits per pixel. [3] [4]

A bitmap is a type of memory organization or image file format used to store digital images. The term bitmap comes from the computer programming terminology, meaning just a map of bits, a spatially mapped array of bits. Now, along with pixmap, it commonly refers to the similar concept of a spatially mapped array of pixels. Raster images in general may be referred to as bitmaps or pixmaps, whether synthetic or photographic, in files or memory.

Many graphical user interfaces use bitmaps in their built-in graphics subsystems; [5] for example, the Microsoft Windows and OS/2 platforms' GDI subsystem, where the specific format used is the Windows and OS/2 bitmap file format, usually named with the file extension of .BMP (or .DIB for device-independent bitmap). Besides BMP, other file formats that store literal bitmaps include InterLeaved Bitmap (ILBM), Portable Bitmap (PBM), X Bitmap (XBM), and Wireless Application Protocol Bitmap (WBMP). Similarly, most other image file formats, such as JPEG, TIFF, PNG, and GIF, also store bitmap images (as opposed to vector graphics), but they are not usually referred to as bitmaps, since they use compressed formats internally.

Pixel storage

In typical uncompressed bitmaps, image pixels are generally stored with a variable number of bits per pixel which identify its color, the color depth. Pixels of 8 bits and fewer can represent either grayscale or indexed color. An alpha channel (for transparency) may be stored in a separate bitmap, where it is similar to a grayscale bitmap, or in a fourth channel that, for example, converts 24-bit images to 32 bits per pixel.

The bits representing the bitmap pixels may be packed or unpacked (spaced out to byte or word boundaries), depending on the format or device requirements. Depending on the color depth, a pixel in the picture will occupy at least n/8 bytes, where n is the bit depth.

For an uncompressed, packed within rows, bitmap, such as is stored in Microsoft DIB or BMP file format, or in uncompressed TIFF format, a lower bound on storage size for a n-bit-per-pixel (2n colors) bitmap, in bytes, can be calculated as:

where width and height are given in pixels.

In the formula above, header size and color palette size, if any, are not included. Due to effects of row padding to align each row start to a storage unit boundary such as a word, additional bytes may be needed.

Device-independent bitmaps and BMP file format

Microsoft has defined a particular representation of color bitmaps of different color depths, as an aid to exchanging bitmaps between devices and applications with a variety of internal representations. They called these device-independent bitmaps as DIBs, and the file format for them is called DIB file format or BMP file format. According to Microsoft support: [6]

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). A DIB is an external format, in contrast to a device-dependent bitmap, which appears in the system as a bitmap object (created by an application...). A DIB is normally transported in metafiles (usually using the StretchDIBits() function), BMP files, and the Clipboard (CF_DIB data format).

Here, "device independent" refers to the format, or storage arrangement, and should not be confused with device-independent color.

Other bitmap file formats

The X Window System uses a similar XBM format for black-and-white images, and XPM (pixelmap) for color images. Numerous other uncompressed bitmap file formats are in use, though most not widely. [7] For most purposes standardized compressed bitmap files such as GIF, PNG, TIFF, and JPEG are used; lossless compression in particular provides the same information as a bitmap in a smaller file size. [8] TIFF and JPEG have various options. JPEG is usually lossy compression. TIFF is usually either uncompressed, or lossless Lempel-Ziv-Welch compressed like GIF. PNG uses deflate lossless compression, another Lempel-Ziv variant.

There are also a variety of "raw" image files, which store raw bitmaps with no other information; such raw files are just bitmaps in files, often with no header or size information (they are distinct from photographic raw image formats, which store raw unprocessed sensor data in a structured container such as TIFF format along with extensive image metadata).

See also

Related Research Articles

<span class="mw-page-title-main">GIF</span> Bitmap image file format family

The Graphics Interchange Format is a bitmap image format that was developed by a team at the online services provider CompuServe led by American computer scientist Steve Wilhite and released on June 15, 1987.

<span class="mw-page-title-main">PNG</span> Family of lossless compression file formats for image files

Portable Network Graphics is a raster-graphics file format that supports lossless data compression. PNG was developed as an improved, non-patented replacement for Graphics Interchange Format (GIF)—unofficially, the initials PNG stood for the recursive acronym "PNG's not GIF".

PCX, standing for PiCture eXchange, is an image file format developed by the now-defunct ZSoft Corporation of Marietta, Georgia, United States. It was the native file format for PC Paintbrush and became one of the first widely accepted DOS imaging standards, although it has since been succeeded by more sophisticated image formats, such as BMP, JPEG, and PNG. PCX files commonly store palette-indexed images ranging from 2 or 4 colors to 16 and 256 colors, although the format has been extended to record true-color (24-bit) images as well.

<span class="mw-page-title-main">Raster graphics</span> Matrix-based data structure

In computer graphics and digital photography, a raster graphic represents a two-dimensional picture as a rectangular matrix or grid of pixels, viewable via a computer display, paper, or other display medium. A raster is technically characterized by the width and height of the image in pixels and by the number of bits per pixel. Raster images are stored in image files with varying dissemination, production, generation, and acquisition formats.

<span class="mw-page-title-main">Raster graphics editor</span> Type of application software

A raster graphics editor is a computer program that allows users to create and edit images interactively on the computer screen and save them in one of many raster graphics file formats such as JPEG, PNG, and GIF.

Tag Image File Format or Tagged Image File Format, commonly known by the abbreviations TIFF or TIF, is an image file format for storing raster graphics images, popular among graphic artists, the publishing industry, and photographers. TIFF is widely supported by scanning, faxing, word processing, optical character recognition, image manipulation, desktop publishing, and page-layout applications. The format was created by the Aldus Corporation for use in desktop publishing. It published the latest version 6.0 in 1992, subsequently updated with an Adobe Systems copyright after the latter acquired Aldus in 1994. Several Aldus or Adobe technical notes have been published with minor extensions to the format, and several specifications have been based on TIFF 6.0, including TIFF/EP, TIFF/IT, TIFF-F and TIFF-FX.

The BMP file format or bitmap, is a raster graphics image file format used to store bitmap digital images, independently of the display device, especially on Microsoft Windows and OS/2 operating systems.

CodedColor is a bitmap graphics editor and image organizer for computers running the Microsoft Windows operating system, and is published by 1STEIN.

Truevision TGA, often referred to as TARGA, is a raster graphics file format created by Truevision Inc.. It was the native format of TARGA and VISTA boards, which were the first graphic cards for IBM-compatible PCs to support Highcolor/truecolor display. This family of graphic cards was intended for professional computer image synthesis and video editing with PCs; for this reason, usual resolutions of TGA image files match those of the NTSC and PAL video formats.

<span class="mw-page-title-main">Preview (macOS)</span> Image and PDF viewer software by Apple

Preview is the built-in image viewer and PDF viewer of the macOS operating system. In addition to viewing and printing digital images and Portable Document Format (PDF) files, it can also edit these media types. It employs the Aqua graphical user interface, the Quartz graphics layer, and the ImageIO and Core Image frameworks.

<span class="mw-page-title-main">Microsoft Paint</span> Raster graphics editor

Microsoft Paint is a simple raster graphics editor that has been included with all versions of Microsoft Windows. The program opens, modifies and saves image files in Windows bitmap (BMP), JPEG, GIF, PNG, and single-page TIFF formats. The program can be in color mode or two-color black-and-white, but there is no grayscale mode. For its simplicity and wide availability, it rapidly became one of the most used Windows applications, introducing many to painting on a computer for the first time.

Netpbm is an open-source package of graphics programs and a programming library. It is used mainly in the Unix world, where one can find it included in all major open-source operating system distributions, but also works on Microsoft Windows, macOS, and other operating systems.

The ICO file format is an image file format for computer icons in Microsoft Windows. ICO files contain one or more small images at multiple sizes and color depths, such that they may be scaled appropriately. In Windows, all executables that display an icon to the user, on the desktop, in the Start Menu, or in file Explorer, must carry the icon in ICO format.

An image file format is a file format for a digital image. There are many formats that can be used, such as JPEG, PNG, and GIF. Most formats up until 2022 were for storing 2D images, not 3D ones. The data stored in an image file format may be compressed or uncompressed. If the data is compressed, it may be done so using lossy compression or lossless compression. For graphic design applications, vector formats are often used. Some image file formats support transparency.

A camera raw image file contains unprocessed or minimally processed data from the image sensor of either a digital camera, a motion picture film scanner, or other image scanner. Raw files are so named because they are not yet processed, and contain large amounts of potentially redundant data. Normally, the image is processed by a raw converter, in a wide-gamut internal color space where precise adjustments can be made before conversion to a viewable file format such as JPEG or PNG for storage, printing, or further manipulation. There are dozens of raw formats in use by different manufacturers of digital image capture equipment.

In computing, indexed color is a technique to manage digital images' colors in a limited fashion, in order to save computer memory and file storage, while speeding up display refresh and file transfers. It is a form of vector quantization compression.

JPEG XR is an image compression standard for continuous tone photographic images, based on the HD Photo specifications that Microsoft originally developed and patented. It supports both lossy and lossless compression, and is the preferred image format for Ecma-388 Open XML Paper Specification documents.

Bitmap is a type of memory organization or image file format used to store digital images.

<span class="mw-page-title-main">GrafX2</span> Raster graphics editor

GrafX2 is a bitmap graphics editor inspired by the Amiga programs Deluxe Paint and Brilliance. It is free software and distributed under the GPL-2.0-only license.

Paintbrush is a raster graphics editor for Mac OS X. It aims to replace MacPaint, an image editor for the classic Mac OS last released in 1988. It also is an alternative to Microsoft Paint. It has basic raster image editing capabilities and a simple interface designed for ease of use. It exports as PNG, JPG, BMP, GIF, and TIFF. The application also is often used for pixel art because of its grid option, and is not made for large scale images or GIMP or Photoshop-like editing on pictures or photographs.

References

  1. "ARCHIVED: What are bitmap and vector graphics, and how are they different". University Information Technology Servivces. September 22, 2023. Archived from the original on April 21, 2024. Retrieved April 21, 2024.
  2. Gregersen, Erik (January 26, 2022). "bitmap". Encyclopædia Britannica . Archived from the original on April 21, 2024. Retrieved April 21, 2024.
  3. James D. Foley (1995). Computer Graphics: Principles and Practice. Addison-Wesley Professional. p. 13. ISBN   0-201-84840-6. The term bitmap, strictly speaking, applies only to 1-bit-per-pixel bilevel systems; for multiple-bit-per-pixel systems, we use the more general term pix-map (short for pixel map).
  4. V.K. Pachghare (2005). Comprehensive Computer Graphics: Including C++. Laxmi Publications. p. 93. ISBN   81-7008-185-8.
  5. Julian Smart; Stefan Csomor & Kevin Hock (2006). Cross-Platform GUI Programming with Wxwidgets. Prentice Hall. ISBN   0-13-147381-6.
  6. "DIBs and Their Uses". Microsoft Help and Support. 2005-02-11.
  7. "List of bitmap file types". File-Extensions.org.
  8. J. Thomas; A. Jones (2006). Communicating Science Effectively: a practical handbook for integrating visual elements. IWA Publishing. ISBN   1-84339-125-2.