// Detect It Easy: detection rule file format
// Author: Jason Hood <jadoxa@yahoo.com.au>

init("tool", "");

function detect(bShowType, bShowVersion, bShowOptions) {
    if (Binary.isJpeg()) {
        if (Binary.isJpegChunkPresent(0xE2)) {
            _setResult("tool", "FlashPix/ICC", "", "");
        }
        if (Binary.isJpegChunkPresent(0xE3)) {
            _setResult("tool", "Kodak", "", "");
        }
        if (Binary.isJpegChunkPresent(0xE4)) {
            _setResult("tool", "FlashPix", "", "");
        }
        if (Binary.isJpegChunkPresent(0xE5)) {
            _setResult("tool", "Ricoh", "", "");
        }
        if (Binary.isJpegChunkPresent(0xE6)) {
            _setResult("tool", "GoPro", "", "");
        }
        if (Binary.isJpegChunkPresent(0xE7)) {
            _setResult("tool", "Spiff", "", "");
        }
        if (Binary.isJpegChunkPresent(0xE8)) {
            _setResult("tool", "XXXXXX", "", "");
        }
        if (Binary.isJpegChunkPresent(0xE9)) {
            _setResult("tool", "MediaJukebox", "", "");
        }
        if (Binary.isJpegChunkPresent(0xEA)) {
            _setResult("tool", "PhotoStudio", "", "");
        }
        if (Binary.isJpegChunkPresent(0xEB)) {
            _setResult("tool", "HDR", "", "");
        }
        if (Binary.isJpegChunkPresent(0xEC)) {
            _setResult("tool", "Photoshop", "", "Web");
        }
        if (Binary.isJpegChunkPresent(0xED)) {
            _setResult("tool", "Photoshop", "", "");
        }
        if (Binary.isJpegChunkPresent(0xEE)) {
            _setResult("tool", "Adobe", "", "");
        }
        if (Binary.isJpegChunkPresent(0xEF)) {
            _setResult("tool", "GraphicConverter", "", "");
        }
    }

    return result(bShowType, bShowVersion, bShowOptions);
}