Merge pull request 'Fix calculating average color for *.ico' (#100) from yan12125/tt-rss:fix-ico-avg-color into master
Reviewed-on: https://dev.tt-rss.org/tt-rss/tt-rss/pulls/100
This commit is contained in:
commit
7bbe71b818
|
@ -355,8 +355,9 @@ function colorPalette(string $imageFile, int $numColors, int $granularity = 5):
|
||||||
} else {
|
} else {
|
||||||
$img = @$ico->images[count($ico->images)-1]->getImageResource();
|
$img = @$ico->images[count($ico->images)-1]->getImageResource();
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
return null;
|
||||||
}
|
}
|
||||||
return null;
|
|
||||||
} else if ($size[0] > 0 && $size[1] > 0) {
|
} else if ($size[0] > 0 && $size[1] > 0) {
|
||||||
$img = @imagecreatefromstring(file_get_contents($imageFile));
|
$img = @imagecreatefromstring(file_get_contents($imageFile));
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue