mirror of
https://git.sekbaer.de/Friendica/friendica.git
synced 2025-06-08 16:14:26 +02:00
Issue 12327: Convert avatars to static
This commit is contained in:
parent
62f982cf7e
commit
5bff6f38d7
5 changed files with 32 additions and 9 deletions
|
@ -57,7 +57,7 @@ class Image
|
|||
*/
|
||||
public function __construct(string $data, string $type = null)
|
||||
{
|
||||
$this->imagick = class_exists('Imagick');
|
||||
$this->imagick = class_exists('Imagick') && !class_exists('GDImage');
|
||||
$this->types = Images::supportedTypes();
|
||||
if (!array_key_exists($type, $this->types)) {
|
||||
$type = 'image/jpeg';
|
||||
|
@ -751,7 +751,7 @@ class Image
|
|||
$row = [];
|
||||
for ($x = 0; $x < $width; ++$x) {
|
||||
$index = imagecolorat($this->image, $x, $y);
|
||||
$colors = imagecolorsforindex($this->image, $index);
|
||||
$colors = @imagecolorsforindex($this->image, $index);
|
||||
|
||||
$row[] = [$colors['red'], $colors['green'], $colors['blue']];
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue