Convert WMF to XBM

Drag and drop files here or click to select.
Max file size 100mb.
Uploading progress:

WMF vs XBM Format Comparison

Aspect WMF (Source Format) XBM (Target Format)
Format Overview
WMF
Windows Metafile

A 16-bit vector/raster graphics format introduced with Windows 3.0 in 1990. WMF stores GDI (Graphics Device Interface) drawing commands including lines, shapes, text, and embedded bitmaps. It was widely used for clip art in Microsoft Office and corporate document templates throughout the 1990s and 2000s. As a legacy format, it has significant security concerns and no modern browser support.

Legacy Format Lossless
XBM
X BitMap (XBM)

XBM (X BitMap) is a monochrome image format stored as C source code. It was created for the X Window System to define cursors, icons, and bitmap patterns.

Legacy Format Lossless
Technical Specifications
Type: 16-bit vector/raster metafile
Drawing Model: Windows GDI commands
Transparency: Not supported
Animation: Not supported
Extensions: .wmf
Color Depth: 1-bit monochrome (black and white only)
Compression: None (stored as C source code array)
Transparency: Implicit (0 bits are transparent in X11 usage)
Animation: Not supported
Extensions: .xbm
Image Features
  • Vector Graphics: Stores GDI drawing commands, not pixels
  • Raster Support: Can embed bitmap images within vector container
  • Text Rendering: Windows font rendering via GDI text commands
  • Color Model: Windows GDI RGB color space
  • Scalability: Resolution-independent vector content
  • Metadata: Minimal header with bounding box and DPI info
  • Transparency: Implicit masking in X11 windowing system
  • Format: Plain C source code with byte array
  • Color Depth: Strictly 1-bit monochrome
  • Compilation: Can be compiled directly into C/C++ programs
  • X11 Native: Standard format for X Window System cursors/icons
  • Text Based: Human-readable and editable in any text editor
Processing & Tools

WMF rendering requires Windows GDI or compatible libraries:

# Convert WMF using ImageMagick
magick input.wmf output.png

# Convert WMF using LibreOffice
libreoffice --headless \
  --convert-to png input.wmf

# Python with Pillow
from PIL import Image
img = Image.open("input.wmf")

XBM creation and processing tools:

# Convert to XBM using ImageMagick
magick input.wmf output.xbm

# Python with Pillow
from PIL import Image
img = Image.open("input.wmf")
img.save("output.xbm")

# Batch convert directory
magick mogrify -format xbm \
  *.wmf
Advantages
  • Resolution-independent vector graphics scale to any size
  • Compact file size for complex drawings (stores commands, not pixels)
  • Native support in all Microsoft Office applications
  • Supports text, shapes, lines, and embedded bitmaps
  • Widely used in legacy corporate document templates
  • Can be rendered at any DPI without quality loss
  • Stored as compilable C source code
  • Can be #included directly in C programs
  • Native format for X11 cursors and icons
  • Human-readable and editable in text editors
  • No binary parsing needed — just compile
  • Perfect for small monochrome UI elements
Disadvantages
  • 16-bit format with limited GDI command set
  • No support in web browsers or modern viewers
  • Security vulnerabilities in WMF parsing (historical exploits)
  • No transparency or alpha channel support
  • Windows-only format, poor cross-platform support
  • Strictly monochrome (1-bit, no color or grayscale)
  • No compression — inefficient for storage
  • Very limited modern use outside X11 development
  • Not suitable for web, print, or general imaging
  • Large text representation of even small images
Common Uses
  • Legacy Microsoft Office clip art libraries
  • Embedded graphics in Word and PowerPoint documents
  • Corporate document templates and letterheads
  • Windows application resource graphics
  • Early desktop publishing clip art collections
  • X11 window system cursor definitions
  • X11 application icon bitmaps
  • Embedded bitmaps in C/C++ source code
  • X Window System toolbar icons
  • Legacy Unix/Linux desktop icons
Best For
  • Legacy Microsoft Office document graphics
  • Scalable clip art in Windows environments
  • Corporate templates from the Windows 3.x/95/XP era
  • Vector graphics within the Microsoft GDI ecosystem
  • X11/Xlib programming cursor and icon creation
  • Embedding monochrome bitmaps in C source code
  • Legacy Unix/X11 desktop environment customization
  • Small monochrome icons for embedded/IoT displays
Version History
Introduced: 1990 (Microsoft, Windows 3.0)
Current Version: WMF (16-bit), EMF (32-bit successor)
Status: Legacy, superseded by EMF/EMF+
Evolution: WMF (1990) → EMF (1993) → EMF+ (2000, GDI+)
Introduced: 1989 (X Consortium, X Window System)
Current Version: XBM (X11R6, unchanged specification)
Status: Legacy, largely replaced by XPM and PNG
Evolution: XBM (1989) → XPM (1989, color) → PNG (modern replacement)
Software Support
Office Apps: Word, PowerPoint, Publisher (legacy versions)
Web Browsers: Not supported in any browser
OS Preview: Windows (native GDI), limited macOS/Linux
Image Editors: LibreOffice Draw, Inkscape (import), GIMP (limited)
CLI Tools: ImageMagick, LibreOffice CLI, Pillow
Image Editors: GIMP, bitmap (X11 editor), Emacs, any text editor
Web Browsers: Firefox (limited), most browsers do not support
OS Preview: Linux/Unix (X11 native), others via libraries
Mobile: Not supported on mobile platforms
CLI Tools: ImageMagick, Pillow, Netpbm (pbmtoxbm), X11 tools

Why Convert WMF to XBM?

Converting WMF to XBM creates monochrome bitmap definitions usable in X11 (X Window System) programming. XBM files are stored as C source code, allowing the bitmap data to be compiled directly into X11 applications, making this conversion useful for developers creating cursors, icons, and toolbar bitmaps for Unix/Linux desktop applications.

Linux and Unix desktop developers customizing window managers and X11 applications can convert WMF icons and symbols to XBM for use as cursor shapes, window manager icons, and bitmap resources. The XBM format's C source code representation means converted WMF graphics become part of the application's compiled binary.

For embedded systems running lightweight X11 environments (framebuffer X servers, embedded Linux), XBM provides extremely compact monochrome graphics. WMF technical symbols and simple icons convert well to XBM's 1-bit format for use on small displays, control panels, and headless server management interfaces.

Note that XBM is strictly monochrome (1-bit, black and white only). All WMF colors, gradients, and anti-aliasing are reduced to binary black/white using threshold conversion. XBM is stored as C source code text, not binary data. For color X11 graphics, use XPM format instead. For general monochrome use, PNG or PBM are more practical.

Key Benefits of Converting WMF to XBM:

  • Compilable Source: C source code format compiles directly into X11 applications
  • X11 Native: Standard bitmap format for X Window System programming
  • Text Editable: Can be edited in any text editor, even vi or Emacs
  • Zero Dependencies: No image library needed — just #include the file
  • Embedded Friendly: Compact monochrome images for embedded Linux displays
  • Build Integration: Becomes part of compiled binary, no runtime file loading
  • Simple Format: Trivial to parse, generate, and manipulate programmatically

Practical Examples

Example 1: X11 Application Cursor

Scenario: A Linux developer converts a WMF pointer graphic into XBM for use as a custom cursor in an Xlib application.

Source: custom_cursor.wmf (3 KB)
Rasterize at 32x32px
Convert WMF → XBM monochrome
Result: custom_cursor.xbm (285 bytes)

Output is C source code:
#define custom_cursor_width 32
#define custom_cursor_height 32
static unsigned char
  custom_cursor_bits[] = { ... };
- #include in Xlib program
- Use with XCreateBitmapFromData()

Example 2: Window Manager Icon

Scenario: A user customizes their tiling window manager by converting WMF symbols to XBM for workspace indicator icons.

Source: workspace_icon.wmf (4 KB)
Rasterize at 16x16px
Convert WMF → XBM for WM config
Result: workspace_icon.xbm (98 bytes)

- 16x16 monochrome icon
- Referenced in WM config file
- Loads as X11 bitmap resource
- Clean rendering at small size

Example 3: Embedded Linux HMI Graphics

Scenario: An engineer converts WMF status symbols into XBM for an embedded Linux control panel with an X11 framebuffer.

Source: status_warning.wmf (5 KB)
Rasterize at 48x48px
Convert WMF → XBM for HMI
Result: status_warning.xbm (580 bytes)

- 48x48 monochrome warning icon
- Compiled into firmware binary
- No filesystem read at runtime
- Minimal memory footprint

Frequently Asked Questions (FAQ)

Q: What is XBM format?

A: XBM (X BitMap) is a monochrome image format stored as C source code. It was created for the X Window System to define cursors, icons, and bitmap patterns. The file is a valid C header that can be #included directly in programs, defining the bitmap as a static array of bytes.

Q: Why is XBM stored as C code?

A: XBM was designed for X11 development where bitmaps need to be compiled into applications. Storing as C source allows the bitmap to be #included and compiled without any image loading library. The X11 function XCreateBitmapFromData() reads this compiled data directly.

Q: Can XBM have colors?

A: No. XBM is strictly 1-bit monochrome (black and white). For color bitmaps in X11, the XPM (X PixMap) format was created. For general color images, use PNG or any modern format.

Q: Can web browsers display XBM?

A: Firefox has legacy XBM support. Most other browsers do not support XBM. It is not a web format. For web display, convert to PNG or SVG.

Q: How large are XBM files?

A: XBM files are larger than their bitmap size because they store each byte as a hexadecimal text string in C source code. A 32x32 monochrome image is 128 bytes of data but approximately 285 bytes as XBM text. Larger images produce proportionally larger text files.

Q: What is the difference between XBM and XPM?

A: XBM is monochrome (1-bit, black/white). XPM (X PixMap) supports up to 256 colors with a character-to-color mapping. Both are stored as C source code. XPM is the color extension of XBM, introduced in 1989 alongside XBM.

Q: Is XBM still used in modern Linux?

A: XBM is still used in some window managers (dwm, i3, bspwm) for workspace icons and toolbar bitmaps. Xcursor has largely replaced XBM for cursor definitions. Most modern Linux applications use PNG or SVG for icons. XBM remains relevant for minimalist and embedded X11 applications.

Q: Can I edit XBM files in a text editor?

A: Yes. XBM files are plain C source code text. You can open them in any text editor and modify the hexadecimal byte values directly. However, visually editing a bitmap through hex values is impractical — use GIMP's XBM export or the X11 'bitmap' editor tool instead.