| Previous | Next |
| WINCODEC_ERR_TOOMUCHMETADATA | WINCODEC_ERR_BADHEADER |
WINCODEC_ERR_BADIMAGE
WINCODEC_ERR_BADIMAGE means that a WIC codec could not recognize the supplied data as a valid image. The file may be truncated, contain invalid container data, have been decoded from the wrong stream position, or use a format that the selected codec cannot interpret correctly.
Diagnosis
- Preserve the original bytes and compare their length and hash with the producer's output.
- Check whether the stream was rewound before decoder creation and whether an earlier network or file read stopped early.
- Use a separate format parser or a second tool only to identify the failing layer; do not rewrite the file in place before collecting evidence.
Compare with WINCODEC_ERR_UNKNOWNIMAGEFORMAT: that code is primarily about finding a decoder, while this result comes from interpreting image data.
Microsoft: WIC decoding overview
Looking for a different code? Search another status or error code.