private function determineHeight(InterventionImage $img, $height): ?int
    {
        if (is_null($height)) {
            return null;
        }