Limit the size of contact avatars
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user