| Previous | Next |
| WINCODEC_ERR_BADIMAGE | WINCODEC_ERR_FRAMEMISSING |
WINCODEC_ERR_BADHEADER
WINCODEC_ERR_BADHEADER means that the image header is not valid for the container format being decoded. It can indicate a truncated file, a damaged signature or header field, an incorrect byte order, or a caller that passed a stream at an offset after the header.
What to inspect
- Verify the first bytes and the expected container signature before creating or reusing a decoder.
- Check stream seek position and confirm that wrapper code did not consume the header before WIC reads it.
- For generated images, validate that the encoder completed and committed the output before the file was published or read by another process.
A valid extension is not evidence that the header is valid.
Microsoft: WIC decoding overview
Looking for a different code? Search another status or error code.
