diff --git a/src/Avatar.php b/src/Avatar.php index 536271e..0a1c2d4 100644 --- a/src/Avatar.php +++ b/src/Avatar.php @@ -200,7 +200,7 @@ public function save($path, $quality = 90) return $this->image->save($path, $quality); } - public function toSvg() + public function toSvg($customWidth=null,$customHeight) { $this->buildInitial(); @@ -208,6 +208,11 @@ public function toSvg() $width = $height = $this->width - $this->borderSize; $radius = ($this->width - $this->borderSize) / 2; $center = $this->width / 2; + + if(!is_null($customWidth)) + $this->width = $customWidth; + if(!is_null($customHeight)) + $this->height = $customHeight; $svg = '';