MCPcopy Create free account
hub / github.com/ARM-software/astc-encoder / ParseEXRVersionFromMemory

Function ParseEXRVersionFromMemory

Source/ThirdParty/tinyexr.h:10443–10460  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

10441} // anonymous namespace
10442
10443int ParseEXRVersionFromMemory(EXRVersion *version, const unsigned char *memory,
10444 size_t size) {
10445 if (version == NULL || memory == NULL) {
10446 return TINYEXR_ERROR_INVALID_ARGUMENT;
10447 }
10448
10449 if (size < tinyexr::kEXRVersionSize) {
10450 return TINYEXR_ERROR_INVALID_DATA;
10451 }
10452
10453 // Use Reader class for safer memory access
10454 tinyexr::Reader reader(memory, size, tinyexr::Endian::Little);
10455 int ret = ParseEXRVersionWithReader(version, reader);
10456
10457 // Note: errors are accumulated in reader.errors() but not propagated
10458 // to maintain compatibility with existing API
10459 return ret;
10460}
10461
10462int ParseEXRVersionFromFile(EXRVersion *version, const char *filename) {
10463 if (filename == NULL) {

Callers 4

IsEXRFromMemoryFunction · 0.85
LoadEXRFromMemoryFunction · 0.85
ParseEXRVersionFromFileFunction · 0.85
IsSpectralEXRFromMemoryFunction · 0.85

Calls 1

Tested by

no test coverage detected