XBM (.xbm)

BackgroundBackground

    MIME type: image/x-xbitmap
    X Window bitmap format.
    Used in the X11 windowing system for storing icons, cursors, and other graphics resources.
    ASCII format.
    Stores a monochrome bitmap as C language source code.
    XBM is an acronym derived from X BitMap.
    Developed in the 1980s at MIT.

Import and ExportImport and Export

  • Import["file.xbm"] imports an XBM file, returning an Image object.
  • Import["file.xbm",elem] imports the specified element from an XBM file.
  • The import format can be specified with Import["file","XBM"] or Import["file",{"XBM",elem,}].
  • Export["file.xbm",expr] exports graphics or any other expression as an image to XBM.
  • When exporting Wolfram Language graphics or arbitrary expressions, the resulting image has the same raster size as its displayed form.
  • Because XBM is a raster image format, all fonts are rasterized on export.
  • See the reference pages for full general information on Import and Export.
  • ImportString and ExportString support the XBM format.

ElementsElements

  • General Import elements:
  • "Elements" list of elements and options available in this file
    "Rules"full list of rules for each element and option
    "Options"list of rules for options, properties, and settings
  • Data representation elements:
  • "Data"array of color values
    "Graphics"Graphics object representing an image
    "Image"raster image represented as an Image object
  • Import and Export by default use the "Image" element for XBM files.
  • Advanced Import elements:
  • "BitDepth"bits used to represent each color channel in the file
    "Channels"the number of color channels used in the file
    "ColorSpace"color encoding used in the file
    "ImageSize"raster dimensions
    "Summary"summary of the file

OptionsOptions

ExamplesExamplesopen allclose all

Basic Examples  (3)Basic Examples  (3)

Import an XBM file:

In[1]:=
Click for copyable input
Out[1]=

Summary of an image:

In[1]:=
Click for copyable input
Out[1]=

Export an image to XBM:

In[1]:=
Click for copyable input
Out[1]=
Introduced in 1999
(4.0)
| Updated in 2016
(11.0)
Translate this page: