importexif: condense code