raise exception when JPEG data can not be read