Commit c683562a authored by Côme Bernigaud's avatar Côme Bernigaud Committed by Benoit Mortier
Browse files

Fixes: #2926 geticon.php know handle greyscaling

Showing with 13 additions and 3 deletions
+13 -3
...@@ -32,8 +32,18 @@ if (session::global_is_set('config')) { ...@@ -32,8 +32,18 @@ if (session::global_is_set('config')) {
$config = session::global_get('config'); $config = session::global_get('config');
$theme = $config->get_cfg_value('theme'); $theme = $config->get_cfg_value('theme');
} }
IconTheme::$extensions = array('png');
$src = IconTheme::findThemeIcon($theme, $_GET['context'], $_GET['icon'], $_GET['size']); $src = IconTheme::findThemeIcon($theme, $_GET['context'], $_GET['icon'], $_GET['size']);
$size = getimagesize($src);
header("Content-Type: ".$size['mime']); header("Content-Type: image/png");
echo readfile($src); if (isset($_GET['disabled']) && $_GET['disabled']) {
$im = imagecreatefrompng($src);
imageAlphaBlending($im, TRUE);
imageSaveAlpha($im, TRUE);
imagefilter($im, IMG_FILTER_GRAYSCALE);
imagepng($im);
imagedestroy($im);
} else {
readfile($src);
}
?> ?>
html/images/action.png

397 Bytes

html/images/branch.gif

79 Bytes

html/images/branchbottom.gif

73 Bytes

html/images/branchtop.gif

67 Bytes

html/images/date_active.gif

54 Bytes

html/images/date_active.png

165 Bytes

html/images/datepicker.gif

991 Bytes

html/images/datepicker_ro.gif

994 Bytes

html/images/down-arrow.png

174 Bytes

html/images/encrypted.png

1.21 KB

html/images/filesaveas.png

1.22 KB

html/images/folder-expanded.gif

923 Bytes

html/images/folder.gif

922 Bytes

html/images/layer_menu/down-arrow.png

164 Bytes

html/images/layer_menu/forward-arrow.png

162 Bytes

html/images/layer_menu/transparent.png

148 Bytes

html/images/lists/back_grey.png

509 Bytes

html/images/lists/edit-grey.png

447 Bytes

html/images/lists/folder_grey.png

313 Bytes

  • bmortier @bmortier

    mentioned in issue #1004

    By Côme Chilliet on 2017-09-02T15:08:29 (imported from GitLab)

    ·

    mentioned in issue #1004

    By Côme Chilliet on 2017-09-02T15:08:29 (imported from GitLab)

    Toggle commit list
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment