0XC00D102E

Fix NS_E_WMP_BMP_INVALID_BITMASK (0XC00D102E) - BMP bitmask error

Windows Errors Intermediate 👁 7 views 📅 Jun 17, 2026

Windows Media Player can't open a BMP because the bitmask (color channel mapping) is corrupted. The fix is re-saving the file or patching the header.

What's actually happening here

Windows Media Player throws error 0XC00D102E (NS_E_WMP_BMP_INVALID_BITMASK) when it can't parse the bitmask inside a BMP file's header. The bitmask tells the player which bits in each pixel correspond to red, green, blue, and alpha channels. When that mask is missing, zeroed out, or uses an unsupported format, WMP gives up. This usually happens with BMPs saved from software that writes a non-standard header — like old photo editors, game screenshot tools, or buggy image converters. The file looks fine in Paint or Photos, but WMP chokes on it.

Real-world trigger: You exported a BMP from GIMP with 32-bit alpha enabled, or used an ancient tool like ACDSee 3.0. WMP says no.

The fixes go from dead simple (re-save it) to a bit surgical (hex edit). Pick whichever matches your patience.

The 30-second fix: Re-save with Paint

This works for 90% of cases. Paint ignores the broken bitmask and writes a clean header when you save. No brainer.

  1. Right-click your broken BMP → Open withPaint.
  2. Don't edit anything. Just hit Ctrl+S or go to FileSave.
  3. Try opening the file in Windows Media Player now.

Why this works: Paint saves BMPs using the BI_RGB compression type, which doesn't use bitmasks at all. It's the simplest BMP format — 24-bit with no alpha. WMP handles that effortlessly. The broken bitmask from the original file is completely replaced.

If that didn't fix it, your BMP might have a deeper header issue. Move on.

The 5-minute fix: GIMP or IrfanView re-export

Paint won't preserve transparency or 32-bit color depth. If you need those, use a proper image editor.

With GIMP (free)

  1. Open the BMP in GIMP.
  2. Go to FileExport As → choose BMP.
  3. In the export dialog, under Compatibility Options, uncheck “Do not write color space information” — actually, leave it checked to keep it simple. Wait, here's the key bit: set “24 bits” (no alpha) or “32 bits” with “Alpha channel” if you need transparency. Then click Export.
  4. Test in WMP.

Why step 3 matters: GIMP can write the bitmask in the BITFIELDS format, and it sometimes writes it incorrectly if the source header was corrupt. Forcing a re-export with explicit bit depth clears that.

With IrfanView (free)

  1. Open the BMP in IrfanView.
  2. FileSave As → pick BMP.
  3. In the Save Options, choose “24-bit” (RGB) or “32-bit”. Hit Save.
  4. Test.

IrfanView is less picky about bitmasks than GIMP, but still overwrites the header cleanly.

The 15+ minute fix: Hex-edit the bitmask bytes

Only do this if you can't replace the file (e.g., it's part of an application's asset folder, and you need the original dimensions or embedded metadata). You'll need a hex editor — HxD is free and works.

Understand the BMP header layout

Here's what matters for a 32-bit BMP with bitfields:

  • Offset 0x0E (14 bytes in): BITMAPINFOHEADER size. Should be 40 (0x28) for standard, or 108 (0x6C) if it includes bitmasks.
  • Offset 0x1E (30 bytes in): Bits per pixel. 32 for a 32-bit BMP.
  • Offset 0x22 (34 bytes in): Compression type. 0 = BI_RGB (no bitmask), 3 = BI_BITFIELDS (bitmask present). If it's 3 and the bitmask values are garbage, WMP fails.
  • If compression is 3 (0x03), bitmask fields start at offset 0x36 (for a 40-byte header) or 0x38 (for a 108-byte header). Each mask is 4 bytes: Red, Green, Blue, Alpha.

How to fix it

  1. Open the BMP in HxD.
  2. Check the compression byte at offset 0x22. It's a 4-byte little-endian integer. If it's 03 00 00 00, you have a bitfields BMP.
  3. Look at the bitmasks starting at 0x36. For a typical 32-bit RGBA BMP, they should be:
    Red mask:   00 00 FF 00  (0x00FF0000)
    Green mask: 00 FF 00 00  (0x0000FF00)
    Blue mask:  FF 00 00 00  (0x000000FF)
    Alpha mask: 00 00 00 FF  (0xFF000000)
    
    If those bytes are all zeros or look wrong, replace them with the values above.
  4. Alternatively: Change the compression byte to 00 00 00 00 (BI_RGB). This tells WMP to ignore bitmasks entirely. WMP will treat the BMP as 24-bit or 32-bit without masks. This works for nearly all BMPs except ones with alpha data that rely on the mask.
  5. Save the file. Test in WMP.

Why step 3 works: The bitmask tells WMP which bits in a pixel are red, green, blue, and alpha. A standard 32-bit BMP stores pixel data as BGRA (blue in lowest 8 bits, green next, red next, alpha in highest). The masks are literal bit patterns that extract those channels. If the masks are zero, WMP can't extract any color — so it fails. Writing the correct masks back fixes it.

Alternative: Convert the header to BI_RGB entirely

If you want the cleanest header, you can also reduce the bitmap info header size to 40 bytes and zero out anything after that. But that's overkill unless you're a glutton for hex punishment. The compression byte trick is enough.

When none of this works

If the file still refuses, it's not a bitmask issue — the BMP might be corrupted in other ways (bad palette, truncated data, weird scanline padding). In that case, run sfc /scannow just to be sure Windows itself isn't wonky, then use a tool like BMP Repair Kit (paid) or re-encode the image as PNG and convert back with Paint.

One last dirty trick: rename the file to .png — WMP won't open it, but you can then open it in Paint and save as BMP again. That bypasses the header entirely.

Was this solution helpful?