Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
die_coolen_jungs
our_own_cloud_project
Commits
968fca8b
Commit
968fca8b
authored
Mar 24, 2015
by
Morris Jobke
Browse files
Merge pull request #15048 from owncloud/avatar-crop-square
round width and height when cropping avatar
parents
965d97a8
bd1d7107
Changes
1
Hide whitespace changes
Inline
Side-by-side
core/avatar/avatarcontroller.php
View file @
968fca8b
...
...
@@ -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
);
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment