Skip to content
WAP Resources

WBMP Type 0 to PNG: inspect before converting

The converter on this site accepts supported WBMP Type 0 files and produces PNG locally in the browser. The example below shows what is inside a tiny monochrome file, so a failed conversion can be investigated without guessing what the bytes mean.

New editorial edition, December 2026. This historical address is retained for existing links; the text below is newly written.

WBMP Type 0 Specification

According to Open Mobile Alliance (OMA) specifications, WBMP Type 0 is an uncompressed monochrome bitmap format. Unlike compressed formats, Type 0 relies on a simple header followed by a raw bitstream where each bit represents a single pixel.

The pixel encoding follows a specific logic: a bit value of 1 represents a white pixel, while a bit value of 0 represents a black pixel. The data is organized with the most significant bit (MSB) representing the leftmost pixel in a row, and rows are processed from top to bottom.

Read the fixed header before the dimensions

For the Type 0 example here, the first 00 is TypeField and the next 00 is FixHeaderField. Width and height follow as multi-byte unsigned integers. Do not treat the fixed-header byte as part of the width.

Rows occupy whole bytes: the required pixel payload is ceil(width / 8) × height bytes. Unused bits at the end of a row must be zero under the specification. A dimension limit enforced by this site is an implementation limit, not the definition of WBMP.

This converter’s limits

Our converter accepts Type 0 input up to 2 MiB and dimensions up to 2048 pixels. Conversion stays in the browser and the output is PNG. Preserve the original file separately.

A non-supported type or fixed header, incomplete dimensions, truncated pixel data or a dimension outside this converter’s limits should be investigated as an input problem. A rejection by this implementation does not prove that every WBMP application would reject the same file.

Decode an eight-by-two fixture

The exact bytes are 00 00 08 02 AA 55. The header occupies four bytes and the pixel payload occupies two.

  1. Each eight-pixel row needs ceil(8 / 8) = 1 byte.
  2. Two rows therefore need 1 * 2 = 2 bytes of pixel data.
  3. The two remaining bytes AA and 55 meet that length. Read each from its most significant bit at the left.
  4. For a nine-pixel row, allocate two bytes per row and require the seven unused bits in the last byte to be zero.
Byte offsetHexMeaning
000TypeField: Type 0
100FixHeaderField: 0
208Width: 8 pixels
302Height: 2 rows
4AAFirst row: 10101010, white then black alternately
555Second row: 01010101, black then white alternately
00 00 08 02 AA 55
header: 00 | 00 | 08 | 02
pixels: AA | 55
  • Identify TypeField and FixHeaderField separately.
  • Calculate row bytes with rounding up, not ordinary division.
  • Check the full pixel payload and any unused row bits.
  • Apply this converter’s size limits without calling them universal format limits.

WBMP Type 0 uses a 1-bit-per-pixel system where 1 is white and 0 is black, requiring row-level byte padding and MSB-first ordering.

Open the practical tool →