isValidFile static method
Parse just enough of the file to identify that it's an EXR image.
Implementation
static bool isValidFile(List<int> bytes) {
final input = InputBuffer(bytes);
final magic = input.readUint32();
if (magic != MAGIC) {
return false;
}
final version = input.readByte();
if (version != EXR_VERSION) {
return false;
}
final flags = input.readUint24();
if (!_supportsFlags(flags)) {
return false;
}
return true;
}