Update tinyexr.

This commit is contained in:
Alex Szpakowski
2017-12-17 21:42:04 -04:00
parent 487c17d1d8
commit f69affebc9
2 changed files with 462 additions and 179 deletions
Regular → Executable
+457 -178
View File
File diff suppressed because it is too large Load Diff
+5 -1
View File
@@ -23,8 +23,12 @@
#include "common/halffloat.h"
#include "common/Exception.h"
// zlib (for tinyexr)
#include <zlib.h>
// tinyexr
#define TINYEXR_IMPLEMENTATION
#define TINYEXR_USE_MINIZ 0
#include "libraries/tinyexr/tinyexr.h"
// C
@@ -124,7 +128,7 @@ FormatHandler::DecodedImage EXRHandler::decode(Data *data)
if (ParseEXRHeaderFromMemory(&exrHeader, &exrVersion, mem, memsize, &err) != TINYEXR_SUCCESS)
throw love::Exception("Could not parse EXR image header: %s", err);
if (LoadEXRImageFromMemory(&exrImage, &exrHeader, mem, &err) != TINYEXR_SUCCESS)
if (LoadEXRImageFromMemory(&exrImage, &exrHeader, mem, memsize, &err) != TINYEXR_SUCCESS)
throw love::Exception("Could not decode EXR image: %s", err);
int pixelType = exrHeader.pixel_types[0];