1
0
mirror of https://git.tt-rss.org/git/tt-rss.git synced 2026-01-09 10:39:15 +00:00

Revert "remove floicon because its author is a colossal shitlord (http://tt-rss.org/forum/viewtopic.php?f=1&t=2055&p=10824#p10822)"

This reverts commit dce5037888.
This commit is contained in:
Andrew Dolgov
2013-05-19 13:51:23 +04:00
parent 8e74763dc8
commit 82852ecd33
2 changed files with 864 additions and 1 deletions

View File

@@ -1,5 +1,7 @@
<?php
require_once "lib/floIcon.php";
function _resolve_htmlcolor($color) {
$htmlcolors = array ("aliceblue" => "#f0f8ff",
"antiquewhite" => "#faebd7",
@@ -283,7 +285,19 @@ function hsl2rgb($arr) {
$colors = array();
$size = @getimagesize($imageFile);
$img = @imagecreatefromstring(file_get_contents($imageFile));
if (!defined('_DISABLE_FLOICON') && strtolower($size['mime']) == 'image/vnd.microsoft.icon') {
$ico = new floIcon();
@$ico->readICO($imageFile);
if(count($ico->images)==0)
return null;
else
$img = @$ico->images[count($ico->images)-1]->getImageResource();
} else {
$img = @imagecreatefromstring(file_get_contents($imageFile));
}
if (!$img) return false;