MCPcopy Create free account
hub / github.com/DentonW/DevIL / iCheckExr

Function iCheckExr

DevIL/src-IL/src/il_exr.cpp:116–127  ·  view source on GitHub ↗

Internal function used to check if the HEADER is a valid EXR header.

Source from the content-addressed store, hash-verified

114
115// Internal function used to check if the HEADER is a valid EXR header.
116ILboolean iCheckExr(EXRHEAD *Header)
117{
118 // The file magic number (signature) is 0x76, 0x2f, 0x31, 0x01
119 if (Header->MagicNumber != 0x01312F76)
120 return IL_FALSE;
121 // The only valid version so far is version 2. The upper value has
122 // to do with tiling.
123 if (Header->Version != 0x002 && Header->Version != 0x202)
124 return IL_FALSE;
125
126 return IL_TRUE;
127}
128
129
130// Nothing to do here in the constructor.

Callers 1

iIsValidExrFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected