Skip to content

Commit 43be871

Browse files
committed
Fix rounding
1 parent a4243f0 commit 43be871

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/InitialAvatar.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -557,6 +557,7 @@ protected function makeAvatar( $image ) {
557557

558558
if ( $this->getRounded() && $this->getSmooth() ) {
559559
$width *= 5;
560+
$height *= 5;
560561
}
561562

562563
$avatar = $image->canvas( $width, $height, ! $this->getRounded() ? $bgColor : null );
@@ -569,6 +570,7 @@ protected function makeAvatar( $image ) {
569570

570571
if ( $this->getRounded() && $this->getSmooth() ) {
571572
$width /= 5;
573+
$height /= 5;
572574
$avatar->resize( $width, $height );
573575
}
574576

0 commit comments

Comments
 (0)