mirror of
https://github.com/microsoft/DirectXTex.git
synced 2026-02-04 04:16:12 +01:00
Rework libpng Auxiliary support to address numerous problems (#636)
This commit is contained in:
@@ -622,7 +622,7 @@ namespace
|
||||
#endif
|
||||
#ifdef USE_LIBPNG
|
||||
case CODEC_PNG:
|
||||
return SaveToPNGFile(img, szOutputFile);
|
||||
return SaveToPNGFile(img, PNG_FLAGS_NONE, szOutputFile);
|
||||
#endif
|
||||
|
||||
default:
|
||||
@@ -1434,7 +1434,9 @@ int __cdecl wmain(_In_ int argc, _In_z_count_(argc) wchar_t* argv[])
|
||||
#ifdef USE_LIBPNG
|
||||
else if (_wcsicmp(ext.c_str(), L".png") == 0)
|
||||
{
|
||||
hr = LoadFromPNGFile(curpath.c_str(), &info, *image);
|
||||
PNG_FLAGS pngFlags = (IsBGR(format)) ? PNG_FLAGS_BGR : PNG_FLAGS_NONE;
|
||||
|
||||
hr = LoadFromPNGFile(curpath.c_str(), pngFlags, &info, *image);
|
||||
if (FAILED(hr))
|
||||
{
|
||||
wprintf(L" FAILED (%08X%ls)\n", static_cast<unsigned int>(hr), GetErrorDesc(hr));
|
||||
|
||||
Reference in New Issue
Block a user