Open main menu
Home
Random
Recent changes
Special pages
Community portal
Preferences
About Wikipedia
Disclaimers
Incubator escapee wiki
Search
User menu
Talk
Dark mode
Contributions
Create account
Log in
Editing
X BitMap
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
{{Short description|File format}} {{Use dmy dates|date=August 2020}} {{Infobox file format | name = X BitMap | icon = | extension = <code>.xbm</code> | screenshot = [[Image:Blarg.xbm.png|240px]] | caption = A sample XBM file | mime = image/x-xbitmap, image/x-xbm<ref name="iana">.xbm [[MIME]] type not [https://www.iana.org/assignments/media-types/media-types.xhtml#image registered] at [[Internet Assigned Numbers Authority|IANA]]</ref> | uniform type = public.xbitmap-image<ref>{{cite web |url=https://developer.apple.com/library/archive/documentation/Miscellaneous/Reference/UTIRef/Articles/System-DeclaredUniformTypeIdentifiers.html |title=System-Declared Uniform Type Identifiers |work=Uniform Type Identifiers Reference |publisher=[[Apple Inc]]}}</ref> | owner = | genre = [[Image file formats]] | url = | containerfor = | containedby = | extendedfrom = [[C (programming language)]] | extendedto = [[X PixMap|X PixMap (XPM)]] }} In [[computer graphics]], the [[X Window System]] used '''X BitMap''' ('''XBM'''), a [[plain text]] [[binary image|binary]] [[image file format|image format]], for storing [[cursor (computers)|cursor]] and [[computer icon|icon]] [[bitmap]]s used in the X [[graphical user interface|GUI]].<ref>{{cite web |url=http://kinzler.com/picons/ftp/index.html|title=Picons Archive|author=Steve Kinzler|author-link=Steve Kinzler |year=2005|quote=picons are in either monochrome XBM format or color XPM and GIF formats|access-date=2014-01-06}}</ref> The XBM format is superseded by [[X PixMap|XPM]], which first appeared for [[X Window System|X11]] in 1989.<ref>{{cite web |author=Daniel Dardailler|others=Colas Nahaboo and Arnaud Le Hors |date=1996-07-15 |title=The XPM Story |url=http://www.w3.org/People/danield/xpm_story.html |access-date=2014-01-01 |archive-date=2014-01-02 |archive-url=https://web.archive.org/web/20140102193652/http://www.w3.org/People/danield/xpm_story.html |url-status=dead}}</ref> ==Format== XBM files differ markedly from most image files in that they take the form of [[C (programming language)|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.<ref>{{cite book|title=Encyclopedia of Graphics File Formats, Second Edition|date=April 1996|author1=James D. Murray |author2=William van Ryper |isbn=1-56592-161-5|publisher=[[O'Reilly Media|O'Reilly]] |url-access=registration |url=https://archive.org/details/mac_Graphics_File_Formats_Second_Edition_1996|access-date=2014-02-27}}</ref> XBM data consists of a series of static unsigned char [[Array data structure|arrays]] containing the monochrome [[pixel]] data. When the format was in common use, an XBM typically appeared in [[Header (computing)|header]]s (.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: <syntaxhighlight lang="C"> #define test_width 16 #define test_height 7 static unsigned char test_bits[] = { 0x13, 0x00, 0x15, 0x00, 0x93, 0xcd, 0x55, 0xa5, 0x93, 0xc5, 0x00, 0x80, 0x00, 0x60 }; </syntaxhighlight> 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 browser]]s 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)|Arena]] web browser had full support since version 0.3.34 (25 July 1997).<ref>{{cite web |last=QingLong|first=Lu|date=1998-03-24|title=Arena change history|publisher=Yggdrasil Computing |url=http://www.yggdrasil.com/Products/Arena/release/CHANGES.html|access-date=2014-02-27|archive-url=https://web.archive.org/web/20030228182751/http://www.yggdrasil.com/Products/Arena/release/CHANGES.html|archive-date=2003-02-28 }}</ref> XBM support was removed from [[Internet Explorer 6]], [[Mozilla Firefox 3.6]],<ref>{{cite web|title=504822 – Remove XBM support from Mozilla|url=https://bugzilla.mozilla.org/show_bug.cgi?id=504822|publisher=Mozilla|access-date=2014-10-22 |date=2010-07-12}}</ref> and [[WebKit]]-based browsers.<ref>{{cite web|title=Bug 27823 – Remove XBM support |publisher=WebKit |url=https://bugs.webkit.org/show_bug.cgi?id=27823 |access-date=2014-10-22|date=2010-01-12}}</ref> There is a strong indication that [[Chromium (web browser)|Chromium]] (and therefore, also, [[Google Chrome]]) does not support XBM.<ref>{{cite web|title=Issue 372898: Chrome displays broken image icon when given direct link to XBM image |website=chromium - An open-source project to help move the web forward |date=2014-06-26 |url=https://code.google.com/p/chromium/issues/detail?id=372898 |access-date=2014-10-22 |url-status=dead |archive-url=https://web.archive.org/web/20141221032447/https://code.google.com/p/chromium/issues/detail?id=372898 |archive-date=2014-12-21}}</ref> Documentation for [[Opera (web browser)|Opera]] 2.12 and 6.0 indicates that XBM was at least previously supported.<ref>{{cite web|title=Opera Software ASA - Opera version history|date=2013-02-05 |url=http://www.opera.com/docs/history/presto/#o2|access-date=2014-10-22|publisher=Opera Software}}</ref><ref>{{cite web |publisher=Opera Software |title=Changelog for Opera 6.0 for Unix TP 1 |url=http://www.opera.com/docs/changelogs/unix/600tp1/ |access-date=2014-10-22 |date=2001-11-26}}</ref> Some image viewers/converters, e.g., [[XnView]], [[FFmpeg]] and [[IrfanView]], support XBM.<ref>{{cite web |url=http://www.ffmpeg.org/general.html#Image-Formats|title=Image Formats|work=[[FFmpeg]] General Documentation|year=2014|access-date=2014-02-23}}</ref> A 48Γ48 XBM can be converted to ''Ikon'' and eventually [[X-Face]] with [[Netpbm]] tools.<ref>{{cite web|title=Online X-Face Converter|url=http://www.dairiki.org/xface/|author= Jeff Dairiki|access-date=2014-03-02}}</ref> Despite having been superseded by the [[X PixMap|XPM]] format, XBM is still used by some modern but lightweight [[window manager]]s like [[Openbox]] to define simple button images in a window's title bar, such as the iconify/minimize, restore, and maximize buttons.<ref>{{cite web|title=Openbox Theme Documentation |url=http://openbox.org/wiki/Help:Themes#Button_images |access-date=2014-10-08}}</ref> XBM is also used in embedded processing (microControllers) to display Icons used in GUIs.<ref>{{cite web|title=U8g2 library reference |url=https://github.com/olikraus/u8g2/wiki/u8g2reference#drawxbm|author= olikraus|website=[[GitHub]] |access-date=2017-05-22}}</ref> [[ImageMagick]]<ref>{{cite web|title=Convert Images Between Formats via the Command Line in Ubuntu |author=Aseem Kishore |date=8 May 2010 |url=http://helpdeskgeek.com/linux-tips/convert-images-between-formats-via-the-command-line-in-ubuntu/ |access-date=2017-05-22}}</ref> 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== * [[X PixMap|X PixMap (XPM)]] * [[Xlib]] * [[Netpbm format|Portable Bit Map (PBM)]] ==References== {{Reflist}} {{Graphics file formats}} [[Category:Graphics file formats]] [[Category:X Window System]] [[Category:Articles with example C code]]
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)
Pages transcluded onto the current version of this page
(
help
)
:
Template:Cite book
(
edit
)
Template:Cite web
(
edit
)
Template:Graphics file formats
(
edit
)
Template:Infobox file format
(
edit
)
Template:Reflist
(
edit
)
Template:Short description
(
edit
)
Template:Use dmy dates
(
edit
)