X BitMap

Last updated

X BitMap
Blarg.xbm.png
A sample XBM file
Filename extension
.xbm
Internet media type
image/x-xbitmap, image/x-xbm [1]
Uniform Type Identifier (UTI) public.xbitmap-image [2]
Type of format Image file formats
Extended from C (programming language)
Extended to X PixMap (XPM)

In computer graphics, the X Window System used X BitMap (XBM), a plain text binary image format, for storing cursor and icon bitmaps used in the X GUI. [3] The XBM format is superseded by XPM, which first appeared for X11 in 1989. [4]

Contents

Format

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. The image data is encoded as a comma-separated list of byte values, each written in the C hexadecimal notation, '0x13' for example, so that multiple ASCII characters are used to express a single byte of image information. [5]

XBM data consists of a series of static unsigned char arrays containing the monochrome pixel data. When the format was in common use, an XBM typically appeared in headers (.h files) which featured one array per image stored in the header. The following piece of C code exemplifies the XBM file Blarg displayed in the panel at right:

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

In place of the usual image-file-format header, XBM files has two or four #define statements. The first two #defines specify the height and width of the bitmap in pixels. The second two, if any, specify the position of any hotspot within the bitmap. (In the case of bitmapped cursors, the "hotspot" refers to the position of the cursor "point", generally at 0,0.)

XBM image data consists of a line of pixel values stored in a static array. Because a single bit represents each pixel (0 for white or 1 for black), 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 extra bits in the last byte of each row are ignored.

Support

Some web browsers support displaying XBM images as a holdover from the early days of the World Wide Web, when XBM was the minimal non-proprietary image file format. The Arena web browser had full support since version 0.3.34 (25 July 1997). [6] XBM support was removed from Internet Explorer 6, Mozilla Firefox 3.6, [7] and WebKit-based browsers. [8] There is a strong indication that Chromium (and therefore, also, Google Chrome) does not support XBM. [9] Documentation for Opera 2.12 and 6.0 indicates that XBM was at least previously supported. [10] [11]

Some image viewers/converters, e.g., XnView, FFmpeg and IrfanView, support XBM. [12] A 48×48 XBM can be converted to Ikon and eventually X-Face with Netpbm tools. [13]

Despite having been superseded by the XPM format, XBM is still used by some modern but lightweight window managers like Openbox to define simple button images in a window's title bar, such as the iconify/minimize, restore, and maximize buttons. [14] XBM is also used in embedded processing (microControllers) to display Icons used in GUIs. [15] ImageMagick [16] supports converting images both to and from XBM. GIMP may be used to create or modify images using the XBM format, and also supports converting images to and from the XBM format.

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, was 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 stored 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.

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.

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">X PixMap</span> Image file format

X PixMap (XPM) is an image file format used by the X Window System, created in 1989 by Daniel Dardailler and Colas Nahaboo working at Bull Research Center at Sophia Antipolis, France, and later enhanced by Arnaud Le Hors.

<span class="mw-page-title-main">Smacker video</span> Digital video file format

Smacker video is a video file format developed by Epic Games Tools, and primarily used for full-motion video in video games. Smacker uses an adaptive 8-bit RGB palette. RAD's format for video at higher color depths is Bink Video. The Smacker format specifies a container format, a video compression format, and an audio compression format. Since its release in 1994, Smacker has been used in over 2300 games. Blizzard used this format for the cinematic videos seen in its games Warcraft II, StarCraft and Diablo I.

Mach-O, short for Mach object file format, is a file format for executables, object code, shared libraries, dynamically loaded code, and core dumps. It was developed to replace the a.out format.

<span class="mw-page-title-main">X-Face</span> Bitmap image

An X-Face is a small bitmap image which is added to a Usenet posting or e-mail message, typically showing a picture of the author's face. The image data is included in the posting as encoded text, and attached with an 'X-Face' header. It was devised by James Ashton.

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.

<span class="mw-page-title-main">Eye of GNOME</span> Free image viewer software for the GNOME desktop environment

Eye of GNOME is the former default image viewer for the GNOME desktop environment, where it had also been known as Image Viewer. It has been superseded by Loupe in GNOME 45. There is also another official image viewer for GNOME called gThumb that has more advanced features like image organizing and image editing functions.

Flash Video is a container file format used to deliver digital video content over the Internet using Adobe Flash Player version 6 and newer. Flash Video content may also be embedded within SWF files. There are two different Flash Video file formats: FLV and F4V. The audio and video data within FLV files are encoded in the same way as SWF files. The F4V file format is based on the ISO base media file format, starting with Flash Player 9 update 3. Both formats are supported in Adobe Flash Player and developed by Adobe Systems. FLV was originally developed by Macromedia. In the early 2000s, Flash Video was the de facto standard for web-based streaming video. Users include Hulu, VEVO, Yahoo! Video, metacafe, Reuters.com, and many other news providers.

In the X Window System, the program xwd captures the content of a screen or of a window and optionally saves it into a file.

The Apple Icon Image format is an icon format used in Apple Inc.'s macOS. It supports icons of 16 × 16, 32 × 32, 48 × 48, 128 × 128, 256 × 256, 512 × 512 points at 1x and 2x scale, with both 1- and 8-bit alpha channels and multiple image states. The fixed-size icons can be scaled by the operating system and displayed at any intermediate size.

Silicon Graphics Image (SGI) or the RGB file format is the native raster graphics file format for Silicon Graphics workstations. The format was invented by Paul Haeberli. It can be run-length encoded (RLE). FFmpeg and ImageMagick, among others, support this format.

OTA Bitmap was a specification designed by Nokia for black and white images for mobile phones.

In computing, a bitmap is a mapping from some domain to bits. It is also called a bit array or bitmap index.

<span class="mw-page-title-main">WebP</span> Image file format

WebP is a raster graphics file format developed by Google intended as a replacement for JPEG, PNG, and GIF file formats. It supports both lossy and lossless compression, as well as animation and alpha transparency.

The Quite OK Image Format (QOI) is a specification for lossless image compression of 24-bit or 32-bit color raster (bitmapped) images, invented by Dominic Szablewski and first announced on 24 November 2021.

References

  1. .xbm MIME type not registered at IANA
  2. "System-Declared Uniform Type Identifiers". Uniform Type Identifiers Reference. Apple Inc.
  3. Steve Kinzler (2005). "Picons Archive" . Retrieved 6 January 2014. picons are in either monochrome XBM format or color XPM and GIF formats
  4. Daniel Dardailler (15 July 1996). "The XPM Story". Colas Nahaboo and Arnaud Le Hors. Archived from the original on 2 January 2014. Retrieved 1 January 2014.
  5. James D. Murray; William van Ryper (April 1996). Encyclopedia of Graphics File Formats, Second Edition . O'Reilly. ISBN   1-56592-161-5 . Retrieved 27 February 2014.
  6. QingLong, Lu (24 March 1998). "Arena change history". Yggdrasil Computing. Archived from the original on 28 February 2003. Retrieved 27 February 2014.
  7. "504822 Remove XBM support from Mozilla". Mozilla. 12 July 2010. Retrieved 22 October 2014.
  8. "Bug 27823 Remove XBM support". WebKit. 12 January 2010. Retrieved 22 October 2014.
  9. "Issue 372898: Chrome displays broken image icon when given direct link to XBM image". chromium - An open-source project to help move the web forward. 26 June 2014. Archived from the original on 21 December 2014. Retrieved 22 October 2014.
  10. "Opera Software ASA - Opera version history". Opera Software. 5 February 2013. Retrieved 22 October 2014.
  11. "Changelog for Opera 6.0 for Unix TP 1". Opera Software. 26 November 2001. Retrieved 22 October 2014.
  12. "Image Formats". FFmpeg General Documentation. 2014. Retrieved 23 February 2014.
  13. Jeff Dairiki. "Online X-Face Converter" . Retrieved 2 March 2014.
  14. "Openbox Theme Documentation" . Retrieved 8 October 2014.
  15. olikraus. "U8g2 library reference". GitHub . Retrieved 22 May 2017.
  16. Aseem Kishore (8 May 2010). "Convert Images Between Formats via the Command Line in Ubuntu" . Retrieved 22 May 2017.