WBMP (Wireless Bitmap) is the black-and-white image format of the first mobile internet. The Nokia 7110 of 1999, the first phone with a WAP browser, had a monochrome display of 96 × 65 pixels and a data connection measured in kilobits per second. WBMP was designed for exactly that kind of device. Today WBMP files appear in archives of old WAP sites, in collections of operator logos and pictures from the early 2000s, in embedded projects that need a trivially simple 1-bit format, and as an output option of the GD image library in PHP.
History
WBMP was defined by the WAP Forum, the industry group behind the Wireless Application Protocol, as part of its Wireless Application Environment specification. The media type image/vnd.wap.wbmp was registered with IANA on 2 March 1999. Every WAP 1.x phone that could show images had to support WBMP. WAP 2.0 (2002) moved to XHTML Mobile Profile and ordinary web images like GIF, JPEG and PNG, and colour screens made WBMP obsolete within a few years. The WAP Forum itself became part of the Open Mobile Alliance in 2002.
How a WBMP file is built
The specification describes a general header able to announce many image types, but only one was ever defined: type 0, an uncompressed 1-bit bitmap.
- Header: the type (0), one byte of fixed header flags, then width and height as "multi-byte integers" in which every byte carries 7 bits of value and the top bit says whether another byte follows.
- Image data: rows from top to bottom, eight pixels per byte with the leftmost pixel in the highest bit, every row padded to whole bytes.
- White is 1, black is 0. PBM uses the opposite convention, a classic source of inverted images in home-made converters.
- No compression, no grey levels, no colour, no metadata and no magic number. A file is recognised by its extension or MIME type only.
The format is tiny. A full-screen picture for the Nokia 7110 needs a 4-byte header and 780 bytes of pixels, 784 bytes in total.
How to open a WBMP file
- Windows: IrfanView or XnView MP.
- macOS and Linux: XnView MP or Netpbm (
wbmptopbm). - Web browsers and phones today do not display WBMP. Convert it to PNG or GIF.
- PHP: the GD extension reads and writes WBMP with
imagecreatefromwbmp()andimagewbmp().
Common WBMP problems
"Unknown format" when opening a .wbmp file
Without a magic number, programs rely on the extension. A WBMP renamed to .bmp or saved without extension is not recognised; give it the .wbmp extension back.
The converted WBMP is almost all black or all white
Our converter turns the picture to grey, stretches the contrast and splits it at 50 % brightness, without dithering. Photos lose most detail. Prepare the image first: crop it, raise the contrast and simplify it until it reads well in pure black and white.
The WBMP is huge
We do not resize. A 4000 × 3000 photo becomes a WBMP of about 1.5 MB, which no device of the WAP era could show. Scale the image to the target screen before converting.
My own decoder shows a negative
In WBMP, 1 is white. Code written for PBM gets this backwards.
Converting WBMP
For archiving, convert WBMP to PNG or GIF: both are lossless, keep the 1-bit pixels exactly and open everywhere. WBMP to SVG traces an old logo into vector curves, which is useful when you need it bigger. Creating WBMP from JPG, PNG or BMP works for embedded displays and legacy systems, with the limitations above.
WBMP at a glance
| Developer | WAP Forum (today Open Mobile Alliance) |
|---|---|
| Introduced | 1998–99, with WAP 1.x; MIME type registered 2 March 1999 |
| Specification | WAP Wireless Application Environment, WBMP type 0 |
| Type | Raster image, 1 bit per pixel |
| Compression | None |
| Typical use | WAP pages and phone logos around 2000, small monochrome displays |
References: IANA registration of image/vnd.wap.wbmp and imagewbmp() in the PHP manual.