Added function to check for progressive JPEGs and calculate their percentage within a given sample