mirror of
https://github.com/microsoft/DirectXTex.git
synced 2026-02-10 06:36:14 +01:00
Add support for HEIF and WEBP to command-line tools (#268)
This commit is contained in:
@@ -819,6 +819,7 @@ namespace DirectX
|
||||
WIC_CODEC_GIF, // Graphics Interchange Format (.gif)
|
||||
WIC_CODEC_WMP, // Windows Media Photo / HD Photo / JPEG XR (.hdp, .jxr, .wdp)
|
||||
WIC_CODEC_ICO, // Windows Icon (.ico)
|
||||
WIC_CODEC_HEIF, // High Efficiency Image File (.heif, .heic)
|
||||
};
|
||||
|
||||
REFGUID __cdecl GetWICCodec(_In_ WICCodecs codec) noexcept;
|
||||
|
||||
@@ -270,6 +270,10 @@ REFGUID DirectX::GetWICCodec(WICCodecs codec) noexcept
|
||||
case WIC_CODEC_ICO:
|
||||
return GUID_ContainerFormatIco;
|
||||
|
||||
case WIC_CODEC_HEIF:
|
||||
// This requires installing https://aka.ms/heif
|
||||
return GUID_ContainerFormatHeif;
|
||||
|
||||
default:
|
||||
return GUID_NULL;
|
||||
}
|
||||
|
||||
@@ -1569,7 +1569,7 @@ HRESULT DirectX::SaveToWICFile(
|
||||
if (FAILED(hr))
|
||||
{
|
||||
stream.Reset();
|
||||
DeleteFileW(szFile);
|
||||
std::ignore = DeleteFileW(szFile);
|
||||
return hr;
|
||||
}
|
||||
|
||||
@@ -1611,7 +1611,7 @@ HRESULT DirectX::SaveToWICFile(
|
||||
if (FAILED(hr))
|
||||
{
|
||||
stream.Reset();
|
||||
DeleteFileW(szFile);
|
||||
std::ignore = DeleteFileW(szFile);
|
||||
return hr;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user