mirror of
https://git.tt-rss.org/fox/tt-rss.git
synced 2025-10-14 20:40:59 +02:00
do no try to pass MS icon files to GD
This commit is contained in:
parent
8d1cfe8020
commit
a586afa37d
@ -288,16 +288,23 @@ function hsl2rgb($arr) {
|
|||||||
|
|
||||||
$size = @getimagesize($imageFile);
|
$size = @getimagesize($imageFile);
|
||||||
|
|
||||||
if (strtolower($size['mime']) == 'image/vnd.microsoft.icon' && class_exists("floIcon")) {
|
// to enable .ico support place floIcon.php into lib/
|
||||||
|
if (strtolower($size['mime']) == 'image/vnd.microsoft.icon') {
|
||||||
|
|
||||||
|
if (class_exists("floIcon")) {
|
||||||
|
|
||||||
$ico = new floIcon();
|
$ico = new floIcon();
|
||||||
@$ico->readICO($imageFile);
|
@$ico->readICO($imageFile);
|
||||||
|
|
||||||
if(count($ico->images)==0)
|
if(count($ico->images)==0)
|
||||||
return null;
|
return false;
|
||||||
else
|
else
|
||||||
$img = @$ico->images[count($ico->images)-1]->getImageResource();
|
$img = @$ico->images[count($ico->images)-1]->getImageResource();
|
||||||
|
|
||||||
|
} else {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
} 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…
x
Reference in New Issue
Block a user