.DIB

DIB File

Device Independent Bitmap
Ask a question
QUICK ANSWER

A .dib file is a Device Independent Bitmap, technically identical to a .bmp file. Any program that opens BMP images opens DIB files too: Windows Photos, Paint, IrfanView, GIMP, and Photoshop all work. Because the format stores pixels uncompressed, DIB files are large; convert to PNG for lossless compression or JPG for photos.

Developer: Microsoft (with IBM, for OS/2) Category: Raster Image Files Open standard MIME: image/bmp
OPENS ON Windows macOS Linux
Related: .JPG · .PNG · .TIF · .ECW

On this page

19k+ extensions indexed
Last reviewed Jul 31, 2026

Not sure what your file is?

Drop any file into our identifier - we read just the first bytes to name the format.

Identify a file

What is the DIB file format?

The .dib extension denotes a Device Independent Bitmap, a raster image format developed by Microsoft (in collaboration with IBM for OS/2) that underlies the common .bmp file. Being device independent means the color data is self-describing - the file carries its own palette or bit-depth metadata so the image displays consistently regardless of the output device's capabilities.

On disk, a .dib file is structurally identical to a .bmp file: a 14-byte BITMAPFILEHEADER (starting with the two-byte signature BM) is followed by a DIB header variant, an optional color palette, and a raw pixel array. The most common header is the 40-byte BITMAPINFOHEADER introduced with Windows 3.0 in 1990. Pixel rows are stored bottom-up by default, padded to 4-byte boundaries. Supported color depths range from 1-bit monochrome to 32-bit RGBA (the alpha channel requires BITMAPV4HEADER or BITMAPV5HEADER).

In Windows GDI programming, the term DIB refers specifically to the in-memory data structure (BITMAPINFO + pixel bits), while .bmp is the disk-file form that prepends an additional 14-byte file header. The .dib extension on disk is rare and fully interchangeable with .bmp - every application that opens .bmp files also handles .dib without issue.

Most .dib files use uncompressed BI_RGB mode. Optional run-length encoding (BI_RLE8 for 8-bit, BI_RLE4 for 4-bit images) reduces file size modestly. Because the format is uncompressed by default, file sizes are large compared with PNG or JPEG equivalents.

Security & safety

RISK: LOW

DIB/BMP is plain pixel data with no scripts or macros - low-risk format. Historical parser vulnerabilities (malformed header dimensions, bad RLE runs) could crash older image libraries, so keep your software updated. Avoid ad-laden "free DIB converter" sites; use IrfanView, GIMP, ImageMagick, or Squoosh instead.

Format details

in a nutshell
FULL NAMEDevice Independent Bitmapaka DIB file, Windows DIB
DEVELOPERMicrosoft (with IBM, for OS/2)since 1985 (Windows 1.0/2.0); modern BITMAPINFOHEADER form with Windows 3.0, 1990
MIME TYPEimage/bmp
TYPEUncompressed (or lightly RLE-compressed) raster image, binary
STANDARDOpen · royalty-free
MAGIC BYTES · FILE SIGNATURE
OFFSET
0001
HEX
424D
ASCII
BM
Same as BMP. Files on disk start with 'BM' (42 4D). DIBs in memory omit the 14-byte BITMAPFILEHEADER and begin directly with the BITMAPINFOHEADER. The DWORD at 0x0E (or 0x00 for in-memory DIB) is the DIB header size, identifying version: 12=CORE, 40=INFO, 108=V4, 124=V5.

Programs that open DIB files

Windows5 apps
Adobe Photoshop Paid Open and edit the DIB; use Save As to convert to another format.
GIMP Open-source File > Open to edit; File > Export As to save as PNG/JPG.
IrfanView Free Open the .dib; use File > Save As to change format, or Batch Conversion for many files.
Photos / Paint (built-in) Built-in Double-click to view in Photos; open in Paint to edit and re-save as BMP/PNG.
XnView MP Free View and convert; right-click in browser > Convert for export to other formats.
macOS3 apps
Adobe Photoshop Paid Open and convert via Save As.
GIMP Open-source Open and edit, Export As to convert.
Preview (built-in) Built-in Double-click to open; File > Export to convert to PNG/JPEG.
Linux2 apps
GIMP Open-source File > Open; File > Export As for conversion.
ImageMagick Open-source magick image.dib image.png - convert from command line; supports batch.

Technical details

deep spec
File signature`BM` (hex `42 4D`) at byte offset 0 - BITMAPFILEHEADER magic bytes
Header variantsBITMAPCOREHEADER (12 bytes, OS/2), BITMAPINFOHEADER (40 bytes, Win3.0+), BITMAPV4HEADER (108 bytes), BITMAPV5HEADER (124 bytes, ICC profile support)
Supported color depths1, 4, 8, 16, 24, or 32 bits per pixel; 1/4/8-bit use an indexed palette; 16/24/32-bit are direct RGB
Alpha channelSupported in 32-bit DIBs with BITMAPV4HEADER or BITMAPV5HEADER (Windows 98/2000+)
Pixel row orderBottom-up by default (positive height value); negative height encodes a top-down image
Row paddingEach pixel row padded to a 4-byte (DWORD) boundary
Compression modes`BI_RGB` (none, most common); `BI_RLE8` (8-bit RLE); `BI_RLE4` (4-bit RLE)
Color palettePresent for 1/4/8-bit images as an RGBQUAD array; absent for 16/24/32-bit direct-color
Byte orderLittle-endian
In-memory vs on-diskIn-memory DIB omits the 14-byte BITMAPFILEHEADER; the `.dib` file on disk includes it, identical in layout to `.bmp`
Maximum dimensions32,767 × 32,767 px with BITMAPINFOHEADER (32-bit signed field); BITMAPCOREHEADER limited to 16-bit unsigned (65,535 px)
Resolution metadataHorizontal and vertical resolution stored as pixels-per-meter in `biXPelsPerMeter` and `biYPelsPerMeter` fields
ICC color profileEmbeddable in BITMAPV5HEADER
Interoperability`.dib` is fully interchangeable with `.bmp`; all BMP-capable applications open `.dib` files without modification
Released1985 (Windows 1.0/2.0); modern BITMAPINFOHEADER form with Windows 3.0, 1990
Latest versionBITMAPV5HEADER (Windows 98/2000, 1998)
Open standardYes · royalty-free
Specificationlearn.microsoft.com

DIB conversions

Community Q&A

asked by users
Ask a quick question
Get help from people who work with DIB files. Be specific - include your system and software version.
No account needed · answers usually within a day

No questions yet - be the first to ask about DIB files.

Frequently asked questions

What is a .dib file?
A Device Independent Bitmap - structurally identical to a .bmp file. You can rename .dib to .bmp (or vice versa) without changing any data; both store raw pixel data in the same format.
How do I open a .dib file?
Any program that opens BMP files opens DIB files: Windows Photos, Paint, IrfanView, XnView, GIMP, Photoshop, and macOS Preview all work natively.
How do I convert DIB to PNG or JPG?
Open in IrfanView (File > Save As), GIMP (File > Export As), or drag into Squoosh (squoosh.app) in a browser. For many files at once, use IrfanView Batch Conversion or ImageMagick.
What is the difference between DIB and BMP?
Technically DIB is the in-memory structure used by the Windows GDI API, while BMP is the on-disk file form (with an extra 14-byte BITMAPFILEHEADER). On disk they are the same data - .dib and .bmp files are interchangeable.
Why is my .dib file so large?
DIB/BMP stores pixels uncompressed, so file size = width × height × bytes-per-pixel. Convert to PNG for lossless compression (usually 3-5× smaller) or to JPG for photographs.

References

1Microsoft Learn - Device-Independent Bitmapslearn.microsoft.com
2Microsoft Learn - Bitmap Storage (BMP/DIB file format)learn.microsoft.com

Keep exploring

across the database

Top extensions this week

1.AQQAQQ Instant Messenger File
2.CRDOWNLOADChrome Partial Download File
3.JPGJPEG Image
4.PARTPartial Download File
5.MDMarkdown Document
6.BINCD/DVD Disc Image (BIN/CUE)
7.EXEWindows Executable (Portable Executable)
8.DATProgram Data File (generic)
9.RPMSGRestricted Permission Message
10.DBSQLite Database File

Related extensions

.JPGJPEG Image
.PNGPortable Network Graphics
.TIFTagged Image File Format
.ECWEnhanced Compression Wavelet (ECW) image
.AVIFAV1 Image File Format (AVIF)
.JP2JPEG 2000 Image (ISO/IEC 15444-1)

Free file tools

An in-browser file identifier and image converter - everything runs on your device.

Open the toolbox

Browse file extensions A-Z