I am working on the task to convert raw files from cameras like Canon and Nikon with WIC to tiff format. I found examples on creating an WIC factory object using the filename.
//Create a WIC Decoder
////////////////////////////////////////////////////////////////////////////
IWICImagingFactory *piFactory = NULL;
IWICBitmapDecoder *piDecoder = NULL;
//Create the COM imaging factory.
HRESULT hr = CoCreateInstance(
CLSID_WICImagingFactory,
NULL,
CLSCTX_INPROC_SERVER,
IID_IWICImagingFactory,
(LPVOID*)&piFactory);
//Create the decoder.
if (SUCCEEDED(hr))
{
hr = piFactory->CreateDecoderFromFilename(
L"test_raw.cr2",
NULL,
GENERIC_READ,
WICDecodeMetadataCacheOnDemand, //For JPEG lossless decoding/encoding.
&piDecoder);
}
The file has a ".cr2" extension for Canon. As I know there are at least 2 different codecs for cr2 files. One from Canon and one from Microsoft. I want to make sure that one specific codec is used. How can I do this?
Thanks