mirror of
https://git.tt-rss.org/fox/tt-rss.git
synced 2026-05-04 23:26:09 +02:00
Fix calculating average color for *.ico
Currently colorPalette() always fails for *.ico due to a logic error. It's a regression from 8f749fe61b038833069c4e2d0dec4749643b4371.
This commit is contained in:
parent
0cd4abe4eb
commit
40afee5d12
@ -355,8 +355,9 @@ function colorPalette(string $imageFile, int $numColors, int $granularity = 5):
|
||||
} else {
|
||||
$img = @$ico->images[count($ico->images)-1]->getImageResource();
|
||||
}
|
||||
} else {
|
||||
return null;
|
||||
}
|
||||
return null;
|
||||
} else if ($size[0] > 0 && $size[1] > 0) {
|
||||
$img = @imagecreatefromstring(file_get_contents($imageFile));
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user