WIC WINCODEC_ERR_BADHEADER only for JPEG images
问题 I have a simple encoding/ decoding application using Windows Imaging Component API. The issue I'm having is that when I use either the JPEGXR or BMP formats, everything works fine. However, when I use the JPEG codec - the encoder works fine and I can visually verify the generated JPEG image, but when I try to decode that stream, I get a WINCODEC_ERR_BADHEADER (0x88982f61) Here's the line that fails: hr = m_pFactory->CreateDecoderFromStream( pInputStream, NULL, WICDecodeMetadataCacheOnDemand,