From d8e9d5b12ac628487d82a91c09c58c6455281335 Mon Sep 17 00:00:00 2001 From: Chuck Walbourn Date: Thu, 7 Nov 2024 14:56:31 -0800 Subject: [PATCH] texconv: Portable Half Map uses .phm extension (#550) --- Texconv/PortablePixMap.cpp | 4 ++-- Texconv/texconv.cpp | 2 +- build/DirectXTex-OneFuzz.yml | 5 ++++- 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/Texconv/PortablePixMap.cpp b/Texconv/PortablePixMap.cpp index 085b420..f293280 100644 --- a/Texconv/PortablePixMap.cpp +++ b/Texconv/PortablePixMap.cpp @@ -449,9 +449,9 @@ HRESULT __cdecl SaveToPortablePixMap( //============================================================================ -// PFM (Portable Float Map) +// PFM (Portable Float Map) / PHM (Portable Half Map) // http://paulbourke.net/dataformats/pbmhdr/ -// https://oyranos.org/2015/03/portable-float-map-with-16-bit-half/index.html +// https://github.com/syoyo/libphm //============================================================================ HRESULT __cdecl LoadFromPortablePixMapHDR( diff --git a/Texconv/texconv.cpp b/Texconv/texconv.cpp index 653a1cc..24dcf3d 100644 --- a/Texconv/texconv.cpp +++ b/Texconv/texconv.cpp @@ -2121,7 +2121,7 @@ int __cdecl wmain(_In_ int argc, _In_z_count_(argc) wchar_t* argv[]) continue; } } - else if (_wcsicmp(ext.c_str(), L".pfm") == 0) + else if (_wcsicmp(ext.c_str(), L".pfm") == 0 || _wcsicmp(ext.c_str(), L".phm") == 0) { hr = LoadFromPortablePixMapHDR(curpath.c_str(), &info, *image); if (FAILED(hr)) diff --git a/build/DirectXTex-OneFuzz.yml b/build/DirectXTex-OneFuzz.yml index ff0919c..bd45310 100644 --- a/build/DirectXTex-OneFuzz.yml +++ b/build/DirectXTex-OneFuzz.yml @@ -104,7 +104,10 @@ jobs: "UBW8.TGA", "ucm8.tga", "testimg.ppm", - "grad4d.pfm"; + "grad4d.pfm", + "grad4d.phm", + "grad4d_mono.pfm", + "grad4d_mono.phm"; New-Item -ItemType Directory -Force -Path .drop\seeds\