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

Function ilIsValidExr

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

Checks if the file specified in FileName is a valid EXR file.

Source from the content-addressed store, hash-verified

44
45//! Checks if the file specified in FileName is a valid EXR file.
46ILboolean ilIsValidExr(ILconst_string FileName)
47{
48 ILHANDLE ExrFile;
49 ILboolean bExr = IL_FALSE;
50
51 if (!iCheckExtension(FileName, IL_TEXT("exr"))) {
52 ilSetError(IL_INVALID_EXTENSION);
53 return bExr;
54 }
55
56 ExrFile = iopenr(FileName);
57 if (ExrFile == NULL) {
58 ilSetError(IL_COULD_NOT_OPEN_FILE);
59 return bExr;
60 }
61
62 bExr = ilIsValidExrF(ExrFile);
63 icloser(ExrFile);
64
65 return bExr;
66}
67
68
69//! Checks if the ILHANDLE contains a valid EXR file at the current position.

Callers

nothing calls this directly

Calls 3

iCheckExtensionFunction · 0.85
ilSetErrorFunction · 0.85
ilIsValidExrFFunction · 0.70

Tested by

no test coverage detected