Windows DDB

Windows DDB (Device-Dependent Bitmap), or Windows BMP v1, is a graphics format associated with Microsoft Windows 1.0. It has only a little in common with the BMP formats that succeeded it.

This article covers both a particular file format, and the BITMAP structure on which it is based (which may be embedded in other formats).

BITMAP structure
Originally named BITMAP, the structure is often called BITMAP16, to distinguish it from the versions of BITMAP associated with later operating systems.

The structure is 14 bytes in size, with the last 4 bytes ("bmBits") being a memory pointer to the bitmap pixels.

In a file on disk, the bmBits field is usually not used (it's not clear whether some formats omit it entirely). The pixel data usually immediately follows.

BITMAP16:

Other formats that can contain this structure include HLP (via SHG), WRI, WMF, and resources in EXE/NE files of that era.

DDB file format
Bitmap files in this format can be found in the Windows 2 DDK.

This format is not the format saved by Windows 1.0 Paint. It is generated by ICONEDIT, the Windows 1.x icon / cursor / bitmap editor.

Files begin with a 16-byte header, the last 14 bytes of which correspond to the BITMAP structure: This is followed by the bitmap, in top-to-bottom order, with bmWidthBytes bytes per line.

Specifications

 * BITMAP16:
 * Refer to the WMF specification, "Bitmap16" structure
 * As defined by Wine

Software

 * The MSWrite decoder from libwps appears to have source code for reading embedded DDB objects.

Links

 * , from the Encyclopedia of Graphics File Formats