Fix large screenshot bug with jpeg format