Refactor to support more image formats, initial support for detecting JPEG2000 files in JPC format