public function resolveMissingDimensions(Image $image, $width, $height)
    {
        if (is_null($width) and is_null($height)) {
            $width = $image->width();
            $height = $image->height();
        }

        if (is_null($width)) {
            $width = $height * ($image->width() / $image->height());
        }

        if (is_null($height)) {
            $height = $width / ($image->width() / $image->height());
        }

        return [
            (int) $width,
            (int) $height,
        ];
    }