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

Function ilIsValidHdr

DevIL/src-IL/src/il_hdr.cpp:21–41  ·  view source on GitHub ↗

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

Source from the content-addressed store, hash-verified

19
20//! Checks if the file specified in FileName is a valid .hdr file.
21ILboolean ilIsValidHdr(ILconst_string FileName)
22{
23 ILHANDLE HdrFile;
24 ILboolean bHdr = IL_FALSE;
25
26 if (!iCheckExtension(FileName, IL_TEXT("hdr"))) {
27 ilSetError(IL_INVALID_EXTENSION);
28 return bHdr;
29 }
30
31 HdrFile = iopenr(FileName);
32 if (HdrFile == NULL) {
33 ilSetError(IL_COULD_NOT_OPEN_FILE);
34 return bHdr;
35 }
36
37 bHdr = ilIsValidHdrF(HdrFile);
38 icloser(HdrFile);
39
40 return bHdr;
41}
42
43
44//! Checks if the ILHANDLE contains a valid .hdr file at the current position.

Callers 1

ILAPIENTRY ilIsValidFunction · 0.85

Calls 3

iCheckExtensionFunction · 0.85
ilSetErrorFunction · 0.85
ilIsValidHdrFFunction · 0.85

Tested by

no test coverage detected