// Detect It Easy: detection rule file
// Author: LinXP
// doc-ref: http://www.libpng.org/pub/mng/spec/

meta("image", "Multiple-image Network Graphics (.MNG)");

function detect() {
    if (Binary.getSize() >= 0x40) {
        if (Binary.compare("8A'MNG\r\n'1A0A........'MHDR'")) {
            bDetected = true;
            if (Binary.isVerbose()) {
                sOption(Binary.read_uint32(0x10, _BE) + "x" + Binary.read_uint32(0x14, _BE));
                sOption("frames:" + Binary.read_uint32(0x18, _BE));
            }
        }
    }

    return result();
}