public function scale($ratio) { return new static(max(round($ratio * $this->width), 1), max(round($ratio * $this->height), 1)); }