Fix pfm and pnm reader
This commit is contained in:
@@ -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;
|
||||||
|
|||||||
@@ -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;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user