Learning more about the JPEG format makes me realize that this information can be grabbed by just running some regex on the binary data. A progressive DCT-based JPEG can be identified by bytes “0xFF, 0xC2″ so that should be enough. Also, Progressive JPEG images usually contain multiple scans so I would expect a couple “Start of Scan” matches (bytes: “0xFF, 0xDA”). So, I did some testing in bash and got accurate results: