Checks if the file specified in FileName is a valid EXR file.
| 44 | |
| 45 | //! Checks if the file specified in FileName is a valid EXR file. |
| 46 | ILboolean 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. |
nothing calls this directly
no test coverage detected