- Bitmap
In
computer graphics , a bitmap or pixmap is a type of memory organization orimage file format used to storedigital image s. The term "bitmap" comes from thecomputer 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 ofpixel s. Raster images in general may be referred to as bitmaps or pixmaps, whether synthetic or photographic, in files or in memory.In some contexts, the term bitmap implies one bit per pixel, while pixmap is used for images with multiple bits per pixel. [cite book | quote = 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 pixmap (short for pixel map). | title = Computer Graphics: Principles and Practice | author = James D. Foley | pages = p.13 | publisher = Addison-Wesley Professional | year = 1995 | isbn = 0201848406 | url = http://books.google.com/books?id=A4k29b0BdVMC&pg=PA13&dq=bitmap+pixmap+%22short+for+pixel+map%22&as_brr=3&ei=JyjwRpvsFYHSpgLN0LyeDA&sig=fcHA65Hg-o819ClX-ueoRJJTk-Q ] [cite book | title = Comprehensive Computer Graphics: Including C++ | author = V.K. Pachghare | publisher = Laxmi Publications | pages = p.93 | year = 2005 | isbn = 8170081858 | url = http://books.google.com/books?id=xIKK9RcSTR4C&pg=PA93&dq=bitmap+pixmap+one-bit+date:2004-2007&as_brr=0&ei=PkXwRpD0H4bs7gLC9-jrCQ&sig=ebuyyYGL6FKBWHDjV62IR9MEJA8 ]
Many
graphical user interface s use bitmaps in their built-in graphics subsystems; [cite book | title = Cross-Platform GUI Programming with Wxwidgets | author = Julian Smart, Stefan Csomor, and Kevin Hock | url = http://books.google.com/books?id=CyMsvtgnq0QC&pg=PA265&dq=bitmap+pixmap+gui&as_brr=3&ei=4SjwRrTpHYSipgL63NS3BA&sig=4_ev_R-Xs8tXCVONCaiJEnFLtI0 | publisher = Prentice Hall | year = 2006 | isbn = 0131473816 ] for example, theMicrosoft Windows andOS/2 platforms' GDI subsystem, where the specific format used is the "Windows and OS/2 bitmap file format", usually named with thefile 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 asJPEG ,TIFF , PNG, andGIF , also store bitmap images (as opposed tovector graphics ), but they are not usually referred to as "bitmaps", since they use compressed formats internally.Pixel storage
In typical uncompressed bitmaps, image
pixel s are generally stored with acolor depth of 1, 4, 8, 16, 24, 32, 48, or 64 bits per pixel. Pixels of 8 bits and fewer can represent eithergrayscale orindexed color . Analpha channel (for transparency) may be stored in a separate bitmap, where it is similar to agreyscale 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 uncompressedTIFF format, the approximate size for a n-bit-per-pixel (2n colors) bitmap, inbyte s, can be calculated as::size approx width cdot height cdot n/8, where height and width 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 or DIBs, and the file format for them is called DIB file format or
BMP file format . According to Microsoft support:cite web | url = http://support.microsoft.com/kb/q81498/ | title = DIBs and Their Uses | work = Microsoft Help and Support | date = 2005-02-11]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 forblack-and-white images, and XPM ("pixelmap") forcolor images. Numerous other uncompressed bitmap file formats are in use, though most not widely. [cite web | url = http://www.file-extensions.org/filetype/extensions/name/Bitmap+image/
title = List of bitmap file types | work = Search File-Extensions.org] Much more common are the standardized compressed bitmap files such asGIF , PNG,TIFF , and 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, and should not be confused with photographic
raw image format s, which store raw unprocessed sensor data in a structured container such asTIFF format along with extensive imagemetadata .See also
*
Raster graphics
*Raster scan References
Wikimedia Foundation. 2010.