factor JPEG info extraction function out of `extract_mcus`