Fix pfm and pnm reader

This commit is contained in:
2021-01-05 01:25:33 +01:00
parent 89ec52abf1
commit f21a665903
2 changed files with 2 additions and 0 deletions

View File

@@ -60,6 +60,7 @@ namespace openVulkanoCpp
else throw std::runtime_error("Malformed PFM header!"); else throw std::runtime_error("Malformed PFM header!");
inStream >> pfmHeader.width >> pfmHeader.height; inStream >> pfmHeader.width >> pfmHeader.height;
inStream >> pfmHeader.maxValue; inStream >> pfmHeader.maxValue;
inStream.get();
if (pfmHeader.maxValue < 0) if (pfmHeader.maxValue < 0)
{ {
pfmHeader.maxValue *= -1; pfmHeader.maxValue *= -1;

View File

@@ -84,6 +84,7 @@ namespace openVulkanoCpp
pnmHeader.color = static_cast<ColorMode>(val & 0x11); pnmHeader.color = static_cast<ColorMode>(val & 0x11);
inStream >> pnmHeader.width >> pnmHeader.height; inStream >> pnmHeader.width >> pnmHeader.height;
inStream >> pnmHeader.maxValue; inStream >> pnmHeader.maxValue;
inStream.get();
return inStream; return inStream;
} }