mirror of
https://github.com/friendica/friendica
synced 2025-04-20 17:50:12 +00:00
Limit the size of contact avatars
This commit is contained in:
parent
7e283dcdf4
commit
e98d11a9ae
2 changed files with 38 additions and 0 deletions
|
@ -575,6 +575,21 @@ class Image
|
|||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Convert a GIF to a PNG to make it static
|
||||
*/
|
||||
public function toStatic()
|
||||
{
|
||||
if ($this->type != 'image/gif') {
|
||||
return;
|
||||
}
|
||||
|
||||
if ($this->isImagick()) {
|
||||
$this->type == 'image/png';
|
||||
$this->image->setFormat('png');
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @param integer $max maximum
|
||||
* @param integer $x x coordinate
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue