write to disk as JPEG to preserve orientation.