X BitMap

X BitMap

Infobox file format
name = X BitMap
extension = .xbm
mime = image/x-xbitmapunofficial
image/x-xbmunofficial
owner =
creatorcode = XBM
genre = Image file formats
containerfor =
containedby =
extendedfrom =
extendedto = XPM
In computer graphics, the X Window System uses X BitMap (XBM), an ASCII text monochrome image format, for storing cursor and icon bitmaps used in the X GUI. XBM files differ markedly from most image files in that they take the form of C source files. This means that they can be compiled directly into an application without any preprocessing steps, but it also makes them far larger than their raw pixel data would be (each byte of image data takes 5 bytes in a XBM file).

XBM data typically appears in headers (.h files) and consist of a series of static unsigned char arrays containing the monochrome pixel data. They feature one array per image stored in the header.

The following piece of C code exemplifies an XBM file:

#define test_width 16 #define test_height 7 static char test_bits [] = { 0x13, 0x00, 0x15, 0x00, 0x93, 0xcd, 0x55, 0xa5, 0x93, 0xc5, 0x00, 0x80, 0x00, 0x60 };

The file defines a 16x7 bitmap. One can view it by opening a new text file, pasting in the C code above, naming it blarg.xbm, and then trying to view blarg.xbm either in an image viewer or via a web browser.

In place of the usual image-file-format header, XBM files have two or four #define statements. The first two #defines specify the height and width of the bitmap in pixels. The second two, if they exist, specify the position of any hotspot within the bitmap. (Programmers use a hotspot within the image for bitmapped cursors to define where to position the "pointer" of the cursor, generally at 0,0.)

The image data consists of a line of pixel values stored in a static array. Because a single bit represents each pixel (black or white), each byte in the array contains the information for eight pixels, with the upper left pixel in the bitmap represented by the low bit of the first byte in the array. If the image width does not match a multiple of 8, the display mechanism ignores and discards the extra bits in the last byte of each row.

Compare X PixMap

A number of web browsers still offer support for displaying XBM images. This is a holdover from the early days of the WWW, when XBM was the minimal non-proprietary image file format. XBM support was removed from Internet Explorer 6, although it is still supported in Firefox and some other browsers, including Safari and Opera.

ee also

*Netpbm format


Wikimedia Foundation. 2010.

Игры ⚽ Нужно решить контрольную?

Look at other dictionaries:

  • Bitmap-Grafik — Bitmap Grafik,   ein Computerbild, bei dem die Bildinformationen punktweise gespeichert sind. Bei Schwarz Weiß Bildern wird jeder Bildpunkt durch genau ein Bit beschrieben; bei Graustufen und Farbbildern sind mehrere Bits für jeden Bildpunkt… …   Universal-Lexikon

  • Bitmap-Format — Bitmap Format,   ein Dateiformat zur Speicherung von Bitmap Grafiken. Ein Pixel eines Bitmaps nimmt je nach Farbtiefe zwischen einem Bit (monochrom, schwarzweiß) und drei Byte (TrueColor mit 16,7 Millionen Farben) Speicherplatz ein. Damit… …   Universal-Lexikon

  • Bitmap-Font —   (Bitmap Zeichensatz, Bitmap Font), Bitmap orientierte Schrift (Bitmap Schrift) …   Universal-Lexikon

  • Bitmap Distribution Format — (BDF)  созданный компанией Adobe формат файлов для хранения растровых шрифтов. Содержимое файла представлено в текстовом виде, удобочитаемом как для человека так и для компьютера. Обычно, BDF используется в UNIX средах. Содержание 1 Введение …   Википедия

  • Bitmap textures — are digital images representing a surface, a material, a pattern or even a picture, generated by an artist or designer using a bitmap editor software such as Adobe Photoshop or Gimp or simply by scanning an image and, if necessary, retouching it… …   Wikipedia

  • Bitmap file — may be a generic term for:* File format for storing raster graphics * Computer file containing a raster graphics imageBitmap file may also refer to:* Windows bitmap, or BMP, a particular graphics file format …   Wikipedia

  • Bitmap format — is:* Generic term for file formats for raster graphics images * Specific term for Windows bitmap (BMP) or X Bitmap (XBM) file format …   Wikipedia

  • Bitmap (disambiguation) — Bitmap is a type of memory organization or image file format used to store digital images.Bitmap may also mean the following:*Bitmap (group), an alternative music band from England …   Wikipedia

  • Bitmap-Schrift — Bitmap Schrift,   Schrift (Font), deren Zeichen aus einem Punktmuster bestehen, also aus einer Bitmap. Eine derartige Schrift eignet sich jeweils nur für ein bestimmtes Ausgabegerät, entweder für den Bildschirm oder für den Drucker. Größe und… …   Universal-Lexikon

  • bitmap Computing — noun a representation in which each item corresponds to one or more bits of information, especially the information used to control the display of a computer screen. verb (bitmaps, bitmapping, bitmapped) represent as a bitmap …   English new terms dictionary

  • bitmap — [bit′map΄] n. Comput. a representation of a graphic image, as a letter or number, as a sequence of bits that generates a corresponding pattern of pixels on a video screen * * * bit map or bit·map (bĭtʹmăp ) n. Computer Science A set of bits that… …   Universalium

Share the article and excerpts

Direct link
Do a right-click on the link above
and select “Copy Link”