Merge pull request #15048 from owncloud/avatar-crop-square
round width and height when cropping avatar
This commit is contained in:
commit
968fca8b55
|
@ -244,7 +244,7 @@ class AvatarController extends Controller {
|
||||||
}
|
}
|
||||||
|
|
||||||
$image = new \OC_Image($tmpAvatar);
|
$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 {
|
try {
|
||||||
$avatar = $this->avatarManager->getAvatar($userId);
|
$avatar = $this->avatarManager->getAvatar($userId);
|
||||||
$avatar->set($image);
|
$avatar->set($image);
|
||||||
|
|
Loading…
Reference in New Issue