Move code from readAPP0 to extractThumbnail