From: Robin Appelman Date: Fri, 20 Mar 2015 03:08:24 +0000 (+0100) Subject: round width and height when cropping avatar X-Git-Tag: v8.1.0alpha1~198^2 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=bd1d7107bb31314cf3d7bb66c22b709fecb63333;p=nextcloud-server.git round width and height when cropping avatar --- diff --git a/core/avatar/avatarcontroller.php b/core/avatar/avatarcontroller.php index f63e02b7761..0aefc336eeb 100644 --- a/core/avatar/avatarcontroller.php +++ b/core/avatar/avatarcontroller.php @@ -244,7 +244,7 @@ class AvatarController extends Controller { } $image = new \OC_Image($tmpAvatar); - $image->crop($crop['x'], $crop['y'], $crop['w'], $crop['h']); + $image->crop($crop['x'], $crop['y'], round($crop['w']), round($crop['h'])); try { $avatar = $this->avatarManager->getAvatar($userId); $avatar->set($image);