Reads a raw data file
| 20 | |
| 21 | //! Reads a raw data file |
| 22 | ILboolean ILAPIENTRY ilLoadData(ILconst_string FileName, ILuint Width, ILuint Height, ILuint Depth, ILubyte Bpp) |
| 23 | { |
| 24 | ILHANDLE RawFile; |
| 25 | ILboolean bRaw = IL_FALSE; |
| 26 | |
| 27 | // No need to check for raw data |
| 28 | /*if (!iCheckExtension(FileName, "raw")) { |
| 29 | ilSetError(IL_INVALID_EXTENSION); |
| 30 | return bRaw; |
| 31 | }*/ |
| 32 | |
| 33 | RawFile = iopenr(FileName); |
| 34 | if (RawFile == NULL) { |
| 35 | ilSetError(IL_COULD_NOT_OPEN_FILE); |
| 36 | return bRaw; |
| 37 | } |
| 38 | |
| 39 | bRaw = ilLoadDataF(RawFile, Width, Height, Depth, Bpp); |
| 40 | icloser(RawFile); |
| 41 | |
| 42 | return bRaw; |
| 43 | } |
| 44 | |
| 45 | |
| 46 | //! Reads an already-opened raw data file |
nothing calls this directly
no test coverage detected