Internal function used to check if the HEADER is a valid EXR header.
| 114 | |
| 115 | // Internal function used to check if the HEADER is a valid EXR header. |
| 116 | ILboolean 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. |