From 5624f948af97b9f380c6cc40e9a27407ce671fc4 Mon Sep 17 00:00:00 2001 From: Chuck Walbourn Date: Mon, 28 Sep 2020 22:40:27 -0700 Subject: [PATCH] Fixed TGA 2.0 metadata writing for small images --- DirectXTex/DirectXTexTGA.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/DirectXTex/DirectXTexTGA.cpp b/DirectXTex/DirectXTexTGA.cpp index 25d523f..ba90d77 100644 --- a/DirectXTex/DirectXTexTGA.cpp +++ b/DirectXTex/DirectXTexTGA.cpp @@ -1881,7 +1881,7 @@ HRESULT DirectX::SaveToTGAMemory( _Use_decl_annotations_ HRESULT DirectX::SaveToTGAFile( const Image& image, - TGA_FLAGS /*flags*/, + TGA_FLAGS flags, const wchar_t* szFile, const TexMetadata* metadata) noexcept { @@ -1922,7 +1922,7 @@ HRESULT DirectX::SaveToTGAFile( // For small images, it is better to create an in-memory file and write it out Blob blob; - hr = SaveToTGAMemory(image, blob); + hr = SaveToTGAMemory(image, flags, blob, metadata); if (FAILED(hr)) return hr;