DirectXTexWIC.cpp:
```
hr = FC->Initialize( frame.Get(), pfGuid, _GetWICDither( flags ), 0, 0, WICBitmapPaletteTypeCustom );
if ( FAILED(hr) )
return hr;
```
The param "pfGuid" is the src format. I use "sourceGUID" to instead it and it works correctly.
```
hr = FC->Initialize( frame.Get(), sourceGUID, _GetWICDither( flags ), 0, 0, WICBitmapPaletteTypeCustom );
if ( FAILED(hr) )
return hr;
```
Comments: ** Comment from web user: NinjaRhyme **
There is the code that I use to load the GIF picture:
```
WCHAR ext[_MAX_EXT];
_wsplitpath_s(_file, nullptr, 0, nullptr, 0, nullptr, 0, ext, _MAX_EXT);
ScratchImage image;
HRESULT hr;
if (_wcsicmp(ext, L".dds") == 0)
{
hr = LoadFromDDSFile(_file, DDS_FLAGS_FORCE_RGB, nullptr, image);
}
else if (_wcsicmp(ext, L".tga") == 0)
{
hr = LoadFromTGAFile(_file, nullptr, image);
}
else
{
hr = LoadFromWICFile(_file, WIC_FLAGS_ALL_FRAMES | WIC_FLAGS_FORCE_RGB | WIC_FLAGS_IGNORE_SRGB, nullptr, image);
}
if (SUCCEEDED(hr))
{
ID3D11Device *device = EECore::s_EECore->GetDevice();
ID3D11ShaderResourceView *texture = nullptr;
hr = CreateShaderResourceViewEx(device,
image.GetImages(), image.GetImageCount(), image.GetMetadata(),
D3D11_USAGE_DEFAULT, D3D11_BIND_SHADER_RESOURCE | D3D11_BIND_UNORDERED_ACCESS, 0, 0, false,
&texture);
//use the texture
return true;
}
return false;
```