Esme Povirk (@madewokherd) commented about dlls/d3dx9_36/surface.c:
hr = IWICImagingFactory_CreateFormatConverter(wic_factory, &wic_converter);
if (FAILED(hr))
goto exit;
hr = IWICFormatConverter_CanConvert(wic_converter, &src_pixel_format, dst_pixel_format, &can_convert);
if (FAILED(hr))
goto exit;
if (!can_convert)
{
WARN("Format converting %s to %s is not supported by WIC.\n", debugstr_guid(&src_pixel_format),
debugstr_guid(dst_pixel_format));
hr = E_NOTIMPL;
goto exit;
}
There's no need to call CanConvert first, Initialize will fail for unsupported conversions.